crossing two level lines in succession
-
Hi,im new,how can i set ea to open trades only after the indicator has crossed two levels one after another,i have tried to use the two condition blocks in succession but it still looks like only one condition is triggering the trade
-
You need to use a variable 'remembering' the first cross happened. Then connect it to the second condition. That way the EA will be able to open the trade in the exact order you want. Once both conditions have been met, the variable should be restarted.
-
@l-andorrà thank you,if you can kindly design for me one example( rsi first crossing 50 then 80) I believe I will learn to use these variables,im really looking forward.
-
I think i got it,but getting only a few trades,can you please explain more on that statement, "once the conditions are met,the variable should be restarted', thanks!
-
Here you have an example:
https://fxdreema.com/shared/Ic04OUFO
I created a boolean variable with an initial value of 'false'. Then it is modified when the first condition is met (block 1). Then condition 2 can happen later (block 3) and the trade can be open.