Trabalho concluído
Termos de Referência
The EA will be basically a GRID strategy with a second instrument/symbol as hedge in case trade goes wrong.
The EA starts with a short and long position. If goes up it closes the long and open a new long, and martingale the short position. But if price keeps going up the drawdown will be massive, that's why we gonna use a second symbol to hedge it. Let's say the EA is at the third level of the grid and it starts to face a big drawdown, the first level opened a 1 lot, then 2, then 4, now if keeps going up to the fourth level, the EA will open a 8 lot size position. In order to prevent the DD, the EA needs to use a correlated symbol. And open an opposite position on the correlated symbol to prevent the Drawdown. If it's gonna sell 8 lots on symbol A it should buy 8 lots on the symbol B in case price keeps going up. If it goes up again to the fifth level it's gonna sell 16 lots on the symbol A and buy 16 lots on the symbol B, so on and so forth. Till it hit take profit based on the input (balance or hedge level) and restart the cycle.
Inputs needed:
-Initial lot
-Type of gride (points or percentage of price)
-Type of take profit (grid level or account balance)
-Hedging symbol
**-Martingale multiplier for second position**
-Martingale multiplier for third position on
**-Lot size multiplier for the second symbol**
-Level that second symbol will start to open hedge positions
-Start/End time
Comment for trade
How does take profit will work?
Imagine a regular grid, basic. Price goes up, martingale, goes up again, martingale, at this point you have 3 positions, 1, 2 and 4 lots respectively. If price goes back down to the second level you close all your position. That's TP based on grid level.
Also you can do by the sum of all positions based on percentage of balance/equity.
So for this EA, as you gonna be hedge, this first positions take profit BEFORE the hedge need to base based on grid levels, basic. After hedging it should be based on the INPUT that will say grid level or equity of total positions of A and B currently open.
How do the lot's multiplier will work?
We gonna work with 3 multipliers.
First multiplier is for the second position on the losing trade. We sell at first level, price goes up to the second level, we gonna use martingale to recover losses. Let's say for the second level it will be 1.5x and for the third level on the multiplier will be 2x on the main symbol.
We also gonna have a multiplier for the symbol B. And let's say that I choose to activate the hedging on the fourth level with 0.2x multiplier. So for the symbol B it will look like this:
The scheme will be the following:
SYMBOL A -- SYMBOL B
1 initial lot -- NULL
1.5 lots (second level) -- NULL
3 lots (third level) -- NULL
6 lots (fourth level) -- 1.2 lot
12 lots (fifth) -- 2.4
24 lots (sixth) -- 4.8
so on and so forth