I don’t know how to check some conditions if they happened in a specific range of bars.
I have 3 EMA conditions with different values and they don’t cross all at the same time. So how can I verify this?
Or is it possible to check if a crossing already happened in the past when I check the next condition?
For example: Price must be above EMA 50 and EMA 100 and EMA 5 must cross below EMA 15 before
Thanks for any help! 🙂
- This topic was modified 10 months, 2 weeks ago by Conmariin.
you can setup a variable called “crossHappened” and set it to 0. Once the cross occurs you can set this variable to 1. You can then use this variable value for your next condition on trading decision. Once you enter your position you set the variable value back to 0. Let me know if you need an example on this
You must be logged in to reply to this topic.