Job finished
Specification
INPUTS NEEDED:
-Initial lot
-Lots multiplier (martingale)
-Recovery Zone Size // (*has to be in points)
-TP RATIO // (the TP will be based on the size of the hedge/loss recovery zone size)
-Close all positions on 1st profit hit // (true/false)
-Close partial positions // (true/false)
-Limit to start closing positions
Start/End time (HH:MM:SS)
------------------------------------------
The EA starts opening TWO positions, 1 long 1 short, and set hedge positions for each position open.
For exemple: my hedge size is 100 points, the EA starts opening at $1000, price goes down to $900 it has to hedge the long position because is losing, so it opens a SHORT with the size based on the martingale, let's say 2x, So now we have 0.1 lot short at $1000, 0.1 lot long at $1000 and 0.2 lot short at $900. if price comes back to $1000 we gonna open another long now with 0.4 lots. and the EA has to do that untill hit TP. If I set the TP for 2x the hedge distance size (100 points) my short positions first TP will be at $800 and the and the long, as it hedged at $900, the TP will be at $700.
-------------------------------------
If I set the input to close all the positions at the first TP (short side in this case) it will close all the positions open by the EA and restart all the process with the initial lot size.
------------------------------------------
If I set the input to close partial positions it has to close the previous two or four or six (always in duo) positions open by one side when the sum of these two positions are >=0 equal or higher than 0 (BREAK EVEN POINT).
For exemple: I open a 0.1 long, 2x martingale, 100 points of zone size, TP ratio of 4x the hedge and my limit to start closing the positions is 3 positions max per cycle.
I start at $1000 with one long, price goes down to $900 we martingale shorting 0.2, than price goes back up to $1000 again, we open 0.4 long, than price goes down to $900 we open 0.4 short again. So now I have 4 positions total on the long cycle but the EA only tolerates 3 max. Than we wait until the sum of the 0.8 and 0.4 lots >=0. If price goes down to $800 that's the break even point than these two positions will be closed and the EA remains with 2 positions open.
**NOTICE: it's important to make the EA calculate the break even by the sum of equity of positions due the slippage.