Moving Average cross over in the last X number of bars

Forums ProRealTime English forum ProScreener support Moving Average cross over in the last X number of bars

Viewing 6 posts - 1 through 6 (of 6 total)
  • #17162

    Hi,

    How do I code the following condition?

    Long

    20 Exponential Moving average crosses over the 50 Exponential moving average in the last 20 bars

    #17176

    Assuming you want a Screener, try this?

     

     

    #17195

    Thanks I’ll give it a try.

    #17198

    I just noticed you said ‘Long’ so you probably need this?

     

     

    #17819

    … and how would I also test if price crossed over the 50EMA in the previous X bars?

    I tried the below but didn’t work:

    #17821

    GraHal were almost correct, the summation should be tested if it is at least equal to 1:

    Here, the moving average cross over may have occured more than once, you can also modified the condition with “=1” instead of “>=1”.

     

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

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