in x candle open a trade
-
I am trying make an EA
Pirice a above macd main line 0 and above the ema 20 and open a trade only in the first 5 bars. Otherwise don t open trade.
https://fxdreema.com/shared/i8xHeRszd
Can you help me -
Do you mean the next 5 candles AFTER the MACD crossing the 0 level of 5 candles AFTER both MACD and MA conditions are true at the same time?
-
Both MACD and MA conditions are true at the same time. and I want to limit open trade only 0-5 candle. I mean both conditions are true EA won't open 6. th candle. EA should opnen trade only in 0-5 candles. Is it possible please?
-
Yes, you need a loop searching for that information. However, when you say the 'first' 5 candles, do you mean the first 5 candles AFTER the MACD line crosses 0? Or can those be ANY 5 consecutive candles regardless when that crossing happened?
-
Actually, I want to open a trade in the first 5 bars where the price rises above the 20 EMA I will also get approval from MACD main line buffer for this transaction. For example, the price is above the 20 EMA and MACD mainline buffer + trade won't open. trade can happen within just 5 bars
-
get the value in a loop, then check before placing a trade: https://fxdreema.com/shared/Qbe0mM4cd
-
@jstap
https://fxdreema.com/shared/IkqwmIAFcI am sorry. I couldn't apply this to my project
-
The condition needs to be in your tree:
