Rising Moving Averages – PLEASE PLEASE HELP

Forums ProRealTime English forum ProScreener support Rising Moving Averages – PLEASE PLEASE HELP

Viewing 11 posts - 1 through 11 (of 11 total)
  • #210528

    Really really hope someone is able to help with this issue – I have spent about 5 hours looking at this to no avail.

    What I am trying to do appears simple but I am clearly doing something wrong?  For instance with the code below the results returned are including assets for which the daily 1000ma is trending higher not lower as specified in my code.

    Also it is curious that when run on UK 200 there are 300 matches and when run on UK 300 there are 200 matches??

     

    Thanks in advance.

     

    indicator5 = Average[250](close)
    indicator6 = Average[1000](close)

    rem daily 250ma rising
    c1 = (indicator5 > indicator5[1])
    c2 = (indicator5 [1] > indicator5 [2])
    c3 = (indicator5 [2] > indicator5 [3])

    rem daily 1000ma falling
    c4 = (indicator6 < indicator6[3])
    c5 = (indicator6[3] < indicator6[5])
    c6 = (indicator6[5] < indicator6[10])

    rem daily 1000ma > daily 250ma
    c7 = (indicator6 > indicator5)

    rem daly 1000ma is more than 30% above daily 250ma
    c8 = indicator6 / indicator5 > 1.3

    SCREENER(c1 AND c2 AND c3 AND c4 AND c5 AND c6 AND c7 AND c8)

    #210546

    Screeners have a 254-bar limit (unless you have the premium version with PRT direct), so you can’t use a SMA greater than about 240 periods (as you are referencing 10 periods ago). Should you happen to ever use averages other than SMAs, keep in mind that they will need way more periods, so you will have to use much less than 250 periods. EMAs can be accurate up to roughly 70-80 periods, not more!

    To try to simulate (not 100% accurate) a 1000-day SMA, you should resort to a 20-period WEEKLY SMA:

     

    #210621

    Robert,

    Thank you so much.

     

    I have changed my code to that below.  Problem is I need to compare indicator5 and indicator6 and only show where indicator6 / Indicator5 > 1.30  This code doesn’t appear to be working, is that because the indicators are using different timeframes, if it is, is there a solution?

     

    TIMEFRAME(Monthly)
    indicator6 = Average[50](close)

    rem monthly 50ma falling
    c4 = (indicator6 < indicator6[1])
    c5 = (indicator6[1] < indicator6[3])
    c6 = (indicator6[3] < indicator6[5])

    TIMEFRAME(Weekly)
    indicator5 = Average[50](close)

    rem weekly 50ma rising
    c1 = (indicator5 > indicator5[1])
    c2 = (indicator5[1] > indicator5[3])
    c3 = (indicator5[2] > indicator5[5])

     

    rem daily 1000ma > daily 250ma
    rem c7 = (indicator6 > indicator5)

    rem daly 1000ma is more than 30% above daily 250ma
    rem c8 = indicator6 / indicator5 > 1.3

    SCREENER(c1 AND c2 AND c3 AND c4 AND c5 AND c6)

    #210622

    Hi,

    with the screener command, (…) are for sorting, and […] are for filtering. Maybe you meant screener[…] ?

    https://www.prorealcode.com/documentation/screener/

     

    #210623

    Thank you so much, that’s incredibly helpful.

     

    One hopefully final thing (for now!) on a slight different topic.

     

    Please see attached screen.  I can’t seem to work out how to remove the trading trading toolbar?  Also as you can see the current chart duplicate so I see weekly / monthly charts.  However when I save my workspace the monthly timeframe chart reverts back to daily, whereas the weekly stays as weekly?

    #210625

    Please see attached image where I have circled in orange at top right corner the green and red arrows button, this is where you need to click on to toggle on/off the trading toolbar.

    For saving, looks like you’re on a v12 environment, can’t rule out a bug of new version if issue can be replicated elsewhere, let me try later to see if I can replicate the issue (I am on busy on my v11 at the moment).

    #210627

    Thank you again.  Is it possible to downgrade to v11?

    #210739

    Anyone?

    #210741

    Hi,

    If you have PRT software (probably “end of day” seeing your daily weekly monthly buttons), you currently have only v12.

    If you have PRT trading, you currently have v11 and v12beta.

    If you have PRT with IG, you currently have only v11.

    Currently doing the savings tests.

    #210743

    Screener conditions must be enclosed by brackets, not parenthesis which are used for sorting criteria. I have changed the Roberto’s code above: https://www.prorealcode.com/topic/rising-moving-averages-please-please-help/#post-210546

    #210744

    Can’t replicate the saving issue. Might be dure to the new TF shortcut buttons I see you are using. I thought I had it once, but can’t replicate it. If it keeps happening for you, best to send a tech report (help menu from main window, first line, or shortcut CTRL+M).

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

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