Lavoro terminato
Specifiche
Sell condition:
1- Open short position if current candle open equal or greater than previous candle and close of current candle is lower than open of previous candle. It means current candle’s body fills all previous candle body.
Buy Condition:
2- Open long position when opposite of sell condition happened. Bullish candle’s body fill whole body of previous candle.
When buy or sell condition happened, according to the EA settings grid system start his job.
I want a variable as input to set grid size. I will set for example 0.618 of grid size. It means EA should open another position when 0.618 of previous candle reached.
For example, according to picture above, EA should open a sell position at red arrow. Then EA should calculate whole range of last candle. HIGH – Low. For example high – low = 20pip.
0.618 X 20 pip = 12.36 pip so grid size is 12 pip.
Also for order lots I want another variable to set. For example I set second order 0.03 lot. First was 0.01 and third one is 0.02. I will set these lot sizes manually from EA setting.
Back to the example, for the second order if I set it at 0.03 lots EA has to open another sell position at 12 pips. So now we have 2 positions, first in -12pip loss and one has just open with 0.03 lots.
For the third position grid has to be 2X of the first distance which is 24 pips. Fourth position 2X of 24 = 48pip. Fifth order 2X48 = 96 pip
This X2 is also a variable and I can set it to X3 or X4.
Another option of the EA will be managing position. If whole positions of a currency pair go to profit I need a trailing stop of X pips. X is another variable.
Also I need a take profit option, which is a fixed pip distance.
If whole positions go to X% of equity, close all positions.
capable to choose only buy or only sell.
if HIGH - LOW is less than Y pips dont take position. Y is another variable that I can set on EA setting.
no trade but manage current position option needed.
some notes:
if for example EA start selling EUR/USD do not trade on any new position on EUR/USD. no buy no signal if current position is still open.
about trailing: for example EA open a short position on EURUSD and I set trailing stop on 10pip. after 10 pip EA start to trailing stop loss. if position goes to negative then according to grid setup EA open another sell position. now if price come back again, sum of the 2 position should calculated. if sum of the 2 position is +$X close all position on that pair and start over again. $X is variable in EA setting.
Kali