Screener à partir de l’indicateur PRC_PerfectTrendLine 2

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #165897 quote
    P.LAFFARGUE
    Participant
    Junior

    Bonjour,

    Je veux coder un screener à partir de l’indicateur “PRC_PerfectTrendLine 2” mais j’obtient systématiquement ce résultat : La fonction “PRC_PerfectTrendLine 2” appelée via “Mon Screener” retourne 3 valeurs mais votre code en a besoin de 4. Ceci quelque soit le tri que je demande. J’utilise la version V11.1 de PRT.

    Si quelqu’un connait ce problème ou peut m’aider…merci.

    #165934 quote
    Nicolas
    Keymaster
    Master

    Le code ci-dessous scanne les changements de tendance haussière avec l’indicateur PerfectTrendLine 2

    //PRC_PerfectTrendLine 2 | indicator
    //05.11.2020
    //Nicolas @ www.prorealcode.com
    //Sharing ProRealTime knowledge
    //converted from MT5 version (original author mladen)
    //enhanced version by Nicolas
    
    // --- settings
    SlowLength         = 7 // Slow length
    FastLength         = 3 // Fast length
    // --- end of settings
    
    fasthigh = Highest[SlowLength](high)//[1]
    fastlow  = Lowest[SlowLength](low)//[1]
    slowhigh = Highest[FastLength](high)//[1]
    slowlow  = Lowest[FastLength](low)//[1]
    
    if high<slowhigh then
    thighs=slowhigh
    else
    thighs=high
    endif
    if low>slowlow then
    tlows=slowlow
    else
    tlows=low
    endif
    if high<fasthigh then
    thighf=fasthigh
    else
    thighf=high
    endif
    if low>fastlow then
    tlowf=fastlow
    else
    tlowf=low
    endif
    
    if close>slowln[1] then
    slowln=tlows
    else
    slowln=thighs
    endif
    if close>fastln[1] then
    fastln=tlowf
    else
    fastln=thighf
    endif
    
    once trend=-1
    if close<slowln and close<fastln then
    trend=1
    endif
    if close>slowln and close>fastln then
    trend=0
    endif
    
    c1 = trend<>trend[1] and trend=0
    screener[c1]
    #165936 quote
    P.LAFFARGUE
    Participant
    Junior

    Merci beaucoup Nicolas, bon week-end.

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

Screener à partir de l’indicateur PRC_PerfectTrendLine 2


ProScreener : Scanners de Marché & Détection

New Reply
Author
Summary

This topic contains 2 replies,
has 2 voices, and was last updated by P.LAFFARGUE
4 years, 11 months ago.

Topic Details
Forum: ProScreener : Scanners de Marché & Détection
Language: French
Started: 03/31/2021
Status: Active
Attachments: No files
Logo Logo
Loading...