Multitimeframe screener does not work

Forums ProRealTime English forum ProScreener support Multitimeframe screener does not work

  • This topic has 25 replies, 4 voices, and was last updated 7 years ago by avataralec.
Viewing 11 posts - 16 through 26 (of 26 total)
  • #37616

    Sorry, I didn’t test the code and it was wrong.

    The correct code is:

    TIMEFRAME (Weekly)
    aw=ExponentialAverage[169](close)
    bw=ExponentialAverage[12](close)
    wup = bw > aw
    wdo = bw < aw
    TIMEFRAME (Daily)
    ad=ExponentialAverage[169](close)
    bd=ExponentialAverage[12](close)
    dup = bd > ad
    ddo = bd < ad
    TIMEFRAME (4 hours)
    b4h=ExponentialAverage[12](close)
    c4h=Average[60](close)
    x4hup = b4h > c4h
    x4hdo = b4h < c4h
    TIMEFRAME (1 hour)
    b1h=ExponentialAverage[12](close)
    c1h=Average[60](close)
    x1hup = b1h > c1h
    x1hdo = b1h < c1h
    SCREENER[(wup AND dup AND x4hup AND x1hup) OR (wdo AND ddo AND x4hdo AND x1hdo)]
    #37641

    Thankyou for this; the code logic looks good. I have  attached a screenshot of the Set ProScreener. You will see I have given your code a filename :  Weekly_Daily_4hr_1hr.

    I have copied the code into the “Creation by programming Tab”, and for some reason I had to replace the 4hup and 4hdo with IVhup and IVhdo (The program creation did not like the numbers so I replaced 4 with IV ). I did the same with 1hup and 1hdo and replaced 1 with I to now have Ihup and Ihdo. Basically used roman numerals to keep it simple. )

    I have highlighted the Selection Period in the Screenshot 1. I have gone and watched the PRT videos and my understanding is  the Selection Period is not relevant because the code has defined timeframes of Weekly , Daily, etc.

    I have tried out the Screener on Germany Stocks, on Screenshot 2.

    In the Criteria column there are only Zero’s .  Am I right that the highlighted stocks  are indicating Red for Down, Green for Up and Gold for Neutral ?

    Many thanks

    #37652

    Thanks Petrus, from what I can see you have insert ‘x’ in front of the numbers; and everything else remains good.

    #37653

    Looks good! thank you for the good code work Petrus

    I couldn’t resist trying it and it works … all timeframes line up in a logical ‘buy or sell zone’ … on 3 instruments I picked at random!

    Hahah Alec beat me to it and with a better idea so I’ll change mine (add x’s) and delete my code changes!

    #37738

    Ha, the scanner works fine now, thanks to Petrus coding.

    Does anyone know if it possible to have more than one output “Criteria” on ProScreener ?

    Is it simply Either / Or , with an output of Red or Green Zero’s ?

    Now that I have seen the scanner running, it would be useful to have 2 x Outputs in one Scanner file : one for the Weekly / Daily and another for the 4hr/1hr.

    #37740

    You can run two screeners together. For example, one only for week + day, and the other one for the 4 timeframes.

    #37785

    Hi Petrus, I have looked at Help Videos and Manual but it is not clear how to run two Screeners together as you have suggested ?

    I have Split the last line to read two lines :  SCREENER[(wup AND dup AND x4hup AND x1hup) OR (wdo AND ddo AND x4hdo AND x1hdo)]  ……. is now

    SCREENER[(wup AND dup ) OR (wdo AND ddo)]  ….. this is for Weekly and Daily

    SCREENER[(wup AND dup AND x4hup AND x1hup) OR (wdo AND ddo AND x4hdo AND x1hdo)]  ….. this is for 4h and 1h

    The Screener output is muddled and I cannot differentiate each Screener output line.

    While reading the manual, Ref ProScreener Guide page 8,  it looks like I can somehow put a Screener result in a named column, but I think the code needs another couple of steps, eg. IF / ELSIF /ENDIF as per page 8, and then use the  …. AS “column_name”.

    Can someone advise if I am on the right track here please, and I will have a go at editing the code.  Thanks.

    #37786

    No Alec. I meant, you can run two screeners at the same time. The first one is weekly+daily, and is:

    TIMEFRAME (Weekly)
    aw=ExponentialAverage[169](close)
    bw=ExponentialAverage[12](close)
    wup = bw > aw
    wdo = bw < aw
    TIMEFRAME (Daily)
    ad=ExponentialAverage[169](close)
    bd=ExponentialAverage[12](close)
    dup = bd > ad
    ddo = bd < ad
    SCREENER[(wup AND dup) OR (wdo AND ddo)]
    And the other one is what I wrote first of all, with the 4 timeframes.
    You have to run both separately, but on the same time. So, with thefirst one you can be alerted if the trend is up or down, and then you can look closely to the second one, for the Buy/Sell signal.
    #37815

    Thanks Petrus, I have already tried this earlier. It does work ok although I can only run one Screener at a time.  I run the PRC_MA_Longer (see screenshot for my commodities), then I select the PRC_MA_Shorter from the drop-down list.

    This works ok : but to be honest I cannot find in documentation how to run two Screeners at the same time.

    #37823

    You have only to click Ctrl+E, select the Proscreener, run it, and then again Ctrl+E and select another one.

    Do not forget to configure each Screener predefined or personalized with the proper list of pairs, indices or shares.

    #41769

    Sorry Petrus, I missed your last Post. Thanks for your help.

Viewing 11 posts - 16 through 26 (of 26 total)

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