Hedge protect trade manager EA
I found this request dating back to July 2015.
I was wondering if it had already been created??? I'd be happy to demo it then buy it if it existed.
I would like to have a hedge trade manager EA coded. This is an EA that are intended to protect other EAs trade instead of stop-loss, to prevent me from get a margin call. IE the EA does not close trades it self to get a profit, just open, manage and close the hedge-trade at break even. The EA should have two modes: Basket mode: The EA should calculate all open orders lot-size in the currency off the chart that it is attached to, balance lot-size of buy and sell at a given percentage loss (equity loss specified in the input tab). Ie trade 1: selltrade 1,0 lot, trade 2: selltrade 0,2 lot. Trade 3: buytrade 0,1 lot – open 1,1 buy trade at the given drawdown. It should also plot a line on the chart where the hedge-trade will be opened and show the percent drawdown at the left side of line. I want to be able to “click and drag” this line to change the Hedge-trade opening position (if not as in the input) and the drawdown at the left of the line should change so I can see when I move the line. Single mode: The EA should hedge each trade individually at a given pip distance (specified in the input tab). No line needs to be plotted.
In the inputs tab I want to insert:
1. Magic number (will only manage trades with this magic number. If set to = 0, manage all trade of the currency attached to regardless of magic number).
2. Basket mode or Single mode
3. Percent of balance drawdown where to open the hedge-trade (Basket mode) (if set to 10 = open hedge-trade equal of all open orders lot-size at loss of 10% of account equity balance).
4. Hedge in pips. Number of pips to hedge trade is opened (Single mode).
5. Hedge lot multiplier. If set to 2. If the lotsize of the trade gone bad is 1,0 lot the hedge-trade should be 2,0 lot
6. Step out of hedge (true/false. Set to true the hedge-trade will close out at break even. False the trade will stay locked and not close the hedge-trade).
7. Trail break even pips. When the hedge-trade hits break even and closes this is the distance in pips that the EA will put a new pending hedge trade and trail it to the initial hedge position. (Do not know if this is used in the Pippo EA. We could discuss how to solve the problem of protection from failed hedge if you take the job).
8. Use Hedge take profit percent. (set as true or false).
9. Hedge take profit percent (the same as a take profit but open a hedge-trade to lock in profit. If set to 100 = open trade when 100% of account balance in profit).
VERY IMPORTANT! The trade/trades should never be unprotected without hedge pending order or an open hedge. This can occur when a hedge-trade is closed out at break even (there will be a gap equal to the spread).This problem seems to work nicely in the EA bellow.
So I would like to implement the “hedging” trade logic from this public EA” Pippov18.mq4” from Steve Hopwood (many thanks to a great guy), see attachment.
Sorry Sergey. EA now attached.