Not logged in

Forums

Viewing 3 posts - 1 through 3 (of 3 total)

Forums>EA Wizard>Application Support>Conditions within a range of bars

  • #201990 |
    Conmariin
    Participant
    78 Posts

    Hi,

    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 4 months, 2 weeks ago by Conmariin Conmariin.
    #202019
    Administrator
    507 Posts

    Hello,

    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

    #202029
    Conmariin
    Participant
    78 Posts

    Aaah…thank you tomas for your idea! 🙂
    I will try it on my own.

    Thanks for your tremendous support! 🙂 *thumbs up*

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.