Indicator Cross over

Forums ProRealTime English forum ProOrder support Indicator Cross over

Viewing 2 posts - 1 through 2 (of 2 total)
  • #11640

    Hi All,

    Messing around with a system based on ema cross overs slightly tweeked to only enter trade if diff between the ema’s  are within a given range.

    Issue I’m having is that when I am out of the market some trades are being triggered by ema’s being within the given range rather than being triggered by crossover and then being within my range.

    Question is how do in tell the system to only consider trades if there had been a crossover within say the last 5 bars?

    Any help would be greatly appreciated!

    #11678

    Hi,

    This is a recurring question. The summation of a true boolean over the last x periods would do the trick.

    Let’s say A and B are your 2 lines that crossover:

    So now, if your test return something else than 0, it’s because a crossover were met in the last 5 periods between your A and B curves. Not tested, but that would be ok.

     

    1 user thanked author for this post.
Viewing 2 posts - 1 through 2 (of 2 total)

Create your free account now and post your request to benefit from the help of the community
Register or Login