Close on opposite signal for EMA cross and close
-
Greetings friends!!
I’m currently working on an expert advisor that will go long if a candle crosses and CLOSES above the 200 EMA. Also it will do the reverse, go short if a candle crosses and CLOSES below the EMA. My trouble is getting it to close if it’s going long but crosses and closes below the EMA then automatically start going short (closing on opposite signal) Very simple EA but this is proving to be a problem
Here is the shared link for the project. Any help, particularly with a visual, will be most appreciated. Hope you all are staying safe!
https://fxdreema.com/shared/w0ZFJDv0e -
@cryptoknight You need to specify candle ID 1 on blocks 2 and 3.
-
Thanks! So to do what I need I should chance 0 to 1?
-
@cryptoknight Correct.