Proscreener sorting issue

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

    Hi,

    I got a question.

    I create a custom indicator name IBDRS and use it as the sorting criteria of another screener TrendTemplate

    The screener works fine, but the sorting criteria seems does not work. From the screener window, the criteria column has value of 0 for all stock. Seems the sorting not work. Could you help?

     

    Indicator code —>

    // relative strength IBD style
    rs3m=2*(close/close[63])
    rs6m=1*(close/close[126])
    rs9m=1*(close/close[189])
    rs12m=1*(close/close[252])
    RETURN(rs3m + rs6m + rs9m + rs12m)

     

    Screener code —>

    //PRC_Trend Template | screener
    //13.04.2017
    //Nicolas @ www.prorealcode.com
    //Sharing ProRealTime knowledge
    
    ma50=average[50]
    ma150=average[150]
    ma200=average[200]
    //rsi14 = rsi[14](close)
    ibdrs = IBDRS
    
    ONCE PercentAboveLow = 0.3
    ONCE PercentBelowHigh = 0.25
    ONCE PeriodMaUp = 20
    ONCE PerCentMaUp = 1
    //ONCE PeriodsRsUp = 20
    //ONCE PerCentRsiUp = 0.8
    
    c1 = Close > ma50
    c2 = ma50>ma150
    c3 = ma150>ma200
    c4 = summation[PeriodMaUp](ma200>ma200[1])>=PeriodMaUp*PerCentMaUp
    c5 = Close/lowest[252](low)>1+PercentAboveLow
    c6 = Close/highest[252](high)>1-PercentBelowHigh
    //c7 = summation[PeriodsRsUp](rsi14 > rsi14[1])>=PeriodsRsUp*PerCentRsiUp
    
    TrendTemplate = c1 and c2 and c3 and c4 and c5 and c6
    //and c7
    
    screener[TrendTemplate]SORT BY ibdrs

     

     

    Result  —>

    03A99203-942F-4677-B338-28DA3CF0272F.png 03A99203-942F-4677-B338-28DA3CF0272F.png
    #81397 quote
    Nicolas
    Keymaster
    Master

    That’s normal since your screener’s code doesn’t know what is IBDRS.

    I assume you have named your indicator “IBDRS”, so you can call it from your screener with a CALL instruction:

    ibrds = CALL "ibrds"

    or change “ibrds” with the proper name of your indicator.

    You can also have a look on how to call external program in any code: CALL Instruction

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

Proscreener sorting issue


ProScreener: Market Scanners & Detection

New Reply
Author
Summary

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

Topic Details
Forum: ProScreener: Market Scanners & Detection
Language: English
Started: 09/27/2018
Status: Active
Attachments: 1 files
Logo Logo
Loading...