Indicator Cross over

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #11640 quote
    minimunky
    Participant
    New

    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 quote
    Nicolas
    Keymaster
    Master

    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:

    test = SUMMATION[5](a crosses over b)

    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.

    minimunky thanked this post
Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.

Indicator Cross over


ProOrder: Automated Strategies & Backtesting

New Reply
Author
author-avatar
minimunky @minimunky Participant
Summary

This topic contains 1 reply,
has 2 voices, and was last updated by Nicolas
9 years, 5 months ago.

Topic Details
Forum: ProOrder: Automated Strategies & Backtesting
Language: English
Started: 08/13/2016
Status: Active
Attachments: No files
Logo Logo
Loading...