TDFI block
-
Hello all, I'm trying to figure out how to set up a TDFI cross over within my EA. I want the rule to be to take a trade if TDFI reaches 1/-1 but TDFI has to cross back into 0 level in order for the next trade to be taken.
https://fxdreema.com/shared/WvxcotoybI also want a rule to be the first time tdfi crosses a certain level it has to be = to 1 on the first candle. Ex. It cannot cross and reach .5000 level and then go to 1...that trade would not be valid.

-
@sesimon1-0 Are you sure the indicator can have those values for that buffer? You are requesting it to be exactly 0 when maybe that value is not possible for thet buffer.
-
No not exactly zero but I want it to go back inbetween the two lines. So maybe it will have to cross back below/above 0.1000/-0.1000 before taking another trade...how would I write that into the EA.
-
@sesimon1-0 You will need a true/false variable to identify when the first crossing happens and then use that as a condition for the second crossing to check. Obviously you will need to reinitialize the variable accordingly.