Not logged in
Viewing 4 posts - 1 through 4 (of 4 total)

Forums>AlgoWizard / EA Wizard>General Discussion>How to look back few bar in EA Wizard

  • #113727 |
    Participant
    5 Posts

    hi,

     

    I am a newbie to EA Wizard.

     

    I tried many times to use EA wizard to look back for few bar but unfortunately i couldn’t find how to.

     

    Appreciate to help how to look back for few bar back and look for certain rules.

     

    pseudocode example as below.

     

    1. Look back within 10 bars of high and low  

    2. if high >= moving average then Trend = 1

    3. if low <= moving average then Trend = 2

    4. if trend 1 and low current bar <= price data then buy

    5. if trend 2 and high current bar >= price data then sell

     

     

    Thanks in advance.

    #130579
    Moderator
    1559 Posts

    hi kael,

     

    I can help you with that but not sure what you mean by ‘price data’. What does this represents? Thanks

    #130622
    Participant
    5 Posts

    hi kael,

     

    I can help you with that but not sure what you mean by ‘price data’. What does this represents? Thanks

     

    Hi thomas,

     

    maybe i should say the price itself either bid or ask.

     

    Thanks in advance for your help.

    #130634
    Moderator
    1559 Posts

    Hi,

    • if you just want to find out if 1 of 10 bars back has its High above moving average then simply use rule Close > (indicator) Moving Average
    • if you want to find out if the highest high of 10 bars back is above moving average then use: (Custom Indicator) Highest(10) > (indicator) Moving Average

    or do you mean something else?

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

You must be logged in to reply to this topic.