仕事が完了した
![](https://c.mql5.com/i/avatar/avatar_na2.png)
指定
For my alredy existing Hedge EA, I want to add following 5 functions:
1.EA should not close basis order set "Activ or Inactiv"
Inactiv - is handling Orders as EA doing right now
Activ
– Strategie of EA is, if a loss position is xpips in Minus EA close order from other System or EA and
does place Hedge.
If this NEW function is Activ EA should not close basis order but
should place Hedge. So Basis Order just be open.
Strategie of
EA is to close the loss order and right after open Hedge positon.
I jut want to select in Activ modus that EA do not close the loss order and leave this order open.
Parameter for definatig loss order actuall is:
input double hiddenSL=25;
2.Function activ/inactiv – Place all orders as Pendig
Inactiv: is handel order as EA do right now! EA acti if loss pips is reached and place the Order as market Order.
Activ:
If an order is placed in system manual or via other EA – My Hedge EA
should place in NEW function Activ - direct the Order on base of his
parameters and functions as Pending
order with TP and SL if selected.
Right now EA is placing the order when xpips loss are reached ans market Order and closing also
the loss order.which were placed manual or by other System.
For the future if Activ - Just place this planed Market Order right now after Basis order as Pending Order.
Explanation: EA should handle if any open position lossing in Xpips and will
place a pending Order.
Function should be set activ or inactiv - inactiv would be EA is placing his order after xpips loss – as EA do right now
NOTE - ALL PENDINGS WILL BE GOD TILL BASIS ORDER WILL BE ACTIV
So If basis
order does not reached loss and was close in TP - Pendings will be deleted also.
If Pending Order Function is activ - all Orders from EA will be placed as Pending Orders and there are god till Basis order is activ. After Basis order is closed - Pending Orders are closed or canceled.
3. Add two more input int excluded_MagicNumber=1111;
For this
selected Magic Numbers EA Hedge EA should not open any trades or handel
orders of EA - Just possibility to add two more Magic Numbers!
4.Reactivat Order set Activ or Inactiv
Reactivation 10 pips
Reactivation TP – 5 Pips – If this TP is reached – Basis Order should be also closed
Reactivat Times - Repeat xtimes
Reactivat Order - here I give separat explanation how should work
I want after Hedge EA Order is executed in Profit and Reactivation function is activated.
Reactivation is calculated on base of entry price of Hedge EA Order.
Example: entry from Hedge EA Order price was 1.0150 – and TP was 20 Pip.
Ater Order Hedge EA was executed in TP
I want to definate reactivation of Order Xpips better than Entry price – reactivation 10 pips
So if price goes to 1.0050 hedge Level is reactivated again and will be executed in the Market at 1.0150 if Price is reached.
Order will be placed as Pending and will be good till Basis Order will be activ.
Reactivation Orders have an seperate TP – If ths TP is reached – Reactivation Order and Basis Order is closed.
Note:
If basis order does not reache loss and close in TP - Pendings will be deleted.