Job finished
Specification
This is a hedging ea to be used on the mt5. (all pairs including Gold, Dax30 and NASDAQ etc...)
The strategy is martingale based.
1. Ea begins with 1 buy & 1 sell at the same time, same initial lotsize; when the tp of one of them is hit, example the (buy order) in this case, we go to the next level at set Gap pips.
2. With the initial sell hanging on, ea would place a buystop order of higher lotsize some set (Gap pips) above the entry price of the initial buy that dropped off. Once this buystop is placed, modify the SL of all sell positions to the TakeProfit of buy orders + spread so if price goes up all sells & buys can close at once.
3. If the buystop order in stage 2 is triggered, a sellstop of higher lotsize (ie. last lot of buy * lot exponent) should be placed a few (x pips or GapAdjust) below the initial sell order price. Again, modify the SL of the buys orders to the TakeProfit of the new sellstop minus spread so that if market goes down all sells & buys close at once.
4. Anytime we succeed delete any pending order left onboard and the cycle repeats with the starting lot.
5. If we 'Use_Commission', there must be a calculated (y-pips) that compensate for charged commission on ECN Accounts, thus adjust TakeProfit by the y-pips.
[ y-pips = Total Commission on all orders / (10 x Difference in Lots of buys & sells)].
6. If we apply 'Hidden SL_TP' , then stoploss and TP's should not be seen by broker; just put two lines on Chat representing exit levels - up & down at which we close trades internally.
NOTE: a. The TakeProfit from stage 2 on... is a different input from the initial TP.
b. Comment Current symbol profit and Account Profit on screen
c.This should be a pretty simple EA, please refer to the attached screenshots.