Stock screener – freshness of a signal

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #80514 quote
    Meta Signals ProMeta Signals Pro
    Participant
    Veteran

    Hi everyone,

    Here is a multitimeframe screener based on reversion of the LinearRegression slop;

    but I cannot figure out how to implement a freshness of the signal

    => I want the screener to give me only the stocks where DOWN and UP (for both week and day) just occured in [0]

    thanks for your help ;

    Chris

     

    // parameters
    Length = 9
    
    timeframe (weekly)
    
    PenteRLWeek = LinearRegressionSlope[Length](close)
     
    DOWNWeek = PenteRLWeek[2]>PenteRLWeek[1] and PenteRLWeek[0]>PenteRLWeek[1]
    UPWeek = PenteRLWeek[2]<PenteRLWeek[1] and PenteRLWeek[1]>PenteRLWeek[0]
    
    if DOWNWeek then
    SignalWeek = 1
    elsif UPWeek then
    SignalWeek = -1
    else
    SignalWeek = 0
    endif
    
    
    
    timeframe (daily)
    
    PenteRLDay = LinearRegressionSlope[10](close)
    
    DOWNDAY = PenteRLDay[2]>PenteRLDay[1] and PenteRLDay[0]>PenteRLDay[1]
    UPDAY = PenteRLDay[2]<PenteRLDay[1] and PenteRLDay[1]>PenteRLDay[0]
    
    if DOWNDAY then
    SignalDay = 1
    elsif UPDAY then
    SignalDay = -1
    else
    SignalDay = 0
    endif
    
    MinPrix = close >2.5
    MinVolume = average[23](volume) > 200000
    
    //
    c1 = signalWeek = 1 and signalDay = 1
    c2 = signalWeek = -1 and signalDay = -1
    
    
    SCREENER [c1 or c2 and MinPrix and MinVolume](signalday as "signal")
    #80651 quote
    NicolasNicolas
    Keymaster
    Legend

    It should work line intended. But you should modify the screener line like this, because I think your trouble come from its wrong syntax:

    SCREENER [ (c1 or c2) and MinPrix and MinVolume](signalday as "signal")
    Meta Signals Pro thanked this post
Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.
ProRealAI ProRealAI New

Stuck on this ProBuilder code?

Describe what this topic is trying to build, in plain English, and ProRealAI writes the ProRealTime™ indicator, screener or system for you.

Available in 7 languages
Try ProRealAI

Stock screener – freshness of a signal


ProScreener: Market Scanners & Detection

New Reply
Author
Summary

This topic contains 1 reply,
has 2 voices, and was last updated by NicolasNicolas
8 years ago.

Topic Details
Forum: ProScreener: Market Scanners & Detection
Language: English
Started: 09/14/2018
Status: Active
Attachments: No files
ProRealCode ProRealCode
Loading...