Algo to open Buy or Sell or Buy and Sell trades with a starting lot size (LOT 1) and a starting TP 1 (Y1 Pips).
Starting lot size (LOT 1) and Starting TP 1 (Y 1 Pips) are variables can be set at the beginning.
Entry is not depending of anything, Algo enter immediately when Algo run.
A. If TP 1 hit for BUY 1 order for example, Open again a new BUY 1 order with same Starting Lot size (LOT 1) and Starting TP 1.
B. If TP 1 not hit and if price drop for (X pips) from BUY 1 entry, open BUY 2 order with LOT 2 size and TP 2 and change TP 1 of BUY 1 to the same TP2 level in a way both BUY1 and BUY 2 will close together if TP2 hit.
C. When TP 2 Hit and all BUY orders closed , start again with new BUY 1 LOT 1 TP1
NB: TP 2 is calculated by taking the average prices of BUY 1 x LOT 1 and BUY 2 x LOT 2 and add to that (Y2 Pips) profit pips.
D. If TP 2 not hit and if price drop for X pips from BUY 2 entry, open BUY 3 order with LOT 3 size and TP 3 and change TP 1 and TP2 to the same TP3 level in a way All buy orders will close together if TP3 hit.
E. When TP 3 Hit and all BUY orders closed , start again with new BUY 1 LOT 1 TP1
NB: TP 3 is calculated by taking the average prices of BUY 1 x LOT 1 and BUY 2 x LOT 2 and BUY 3 x LOT 3 and add to that (Y3 Pips) profit pips.
And so on until Maximum number of opened orders achieved. (MAX = n)
Variables:
LOT 1 , LOT 2, LOT 3 …..LOT n
Y1 Pips, Y2 Pips, Y3 Pips …..Y n Pips
X Pips
To display on the chart :
1. The Average price of all open BUY Orders
2. The TP pips from average price
3. The profit of all BUY orders at TP ( taking in considerations commission and swap)
NB: to be taken in consideration any parameters that affecting the calculations like Commission, SWAP, Spread, or affecting the entry like Slippage.
The same criteria to be followed for the SELL orders.
BUY and SELL are working separately.