Coding for recent EMA crossover

Forums ProRealTime English forum ProScreener support Coding for recent EMA crossover

Viewing 7 posts - 1 through 7 (of 7 total)
  • #10745

    Hi.

    If I have the following code, how could I include in the condition that the EMA crossover happens within the previous 3 days if it’s part of a larger scan with more conditions? As it stands this code could give results that have just crossed over or those that crossed over 6 month previous and are still climbing.

    In essence, sine EMA’s are lagging indicators I’d like to screen for crossovers that happened, say, within the last week or so.

     

    #11210

    Maybe an event variable will help:

    If ema1 crosses over ema2 then Event = 1 Else event = 0 Endif

     

    You can then screen for event [1]=1

    #11212

    The line breaks have got lost somehow in the code.

     

    3 users thanked author for this post.
    #11222

    Thanks Derek. I’ll give it a try…

    #11234

    So what you want to do is to test if a crossover has happened in the past without having see it in real time? Am I right?

    1 user thanked author for this post.
    #11413

    Yes – to see which stocks made the move in the last 5 days for instance…

    #11463

    I have coded something similar here, I think:

    http://www.prorealcode.com/topic/screen-condition-c-within-last-x-days/

     

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

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