Linear Regression Candles

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #230153 quote
    finplusfinplus
    Participant
    Master

    Bonsoir,

    serait-il possible d’avoir un screener qui idenfierait le passage de la bougie au dessus ou au dessous de la ligne de signal?

    Merci.

    PS : je n’ai pas réussi à insérer le code dans la cellule prévue à cet effet.

     

    //PRC_Linear Regression Candles
    //version = 0
    //15.03.24
    //Iván González @ http://www.prorealcode.com
    //Sharing ProRealTime knowledge
    ///////////////////////////////////////////////////////
    //——————Inputs——————————
    signallength = 11 //integer//Signal Smoothing
    smasignal = 1 //boolean // Simple MA (Signal Line)
    linreg = 1 //boolean//Linear Regression
    linreglength = 11//integer//Linear Regression Length
    //——————————————————
    //————-Candle definition————————
    if linreg then
    bopen = LinearRegression[linreglength](open)
    bhigh = LinearRegression[linreglength](high)
    blow = LinearRegression[linreglength](low)
    bclose = LinearRegression[linreglength](close)
    else
    bopen = open
    bhigh = high
    blow = low
    bclose = close
    endif
    //——————————————————–
    //————–Color candles—————————–
    if bopen < bclose then
    r=0
    g=0
    b=255
    else
    r=255
    g=0
    b=0
    endif
    //———————————————————
    //—————Draw Candles——————————
    DRAWCANDLE(bopen, bhigh, blow, bclose)coloured(r,g,b)
    //———————————————————
    //—————Signal definition————————-
    if smasignal then
    signal = average[signallength](bclose)
    else
    signal = average[signallength,1](bclose)
    endif

    return signal as “Signal”coloured(“white”)style(line,2)

    #230195 quote
    Iván GonzálezIván González
    Moderator
    Legend

    Bonjour ici, vous avez le code

    //PRC_Linear Regression Candles
    //version = 0
    //15.03.24
    //Iván González @ www.prorealcode.com
    //Sharing ProRealTime knowledge
    ///////////////////////////////////////////////////////
    //------------------Inputs------------------------------
    signallength = 11 //integer//Signal Smoothing
    smasignal = 1 //boolean // Simple MA (Signal Line)
    linreg = 1 //boolean//Linear Regression
    linreglength = 11//integer//Linear Regression Length
    //------------------------------------------------------
    //-------------Candle definition------------------------
    if linreg then
    //bopen = LinearRegression[linreglength](open)
    //bhigh = LinearRegression[linreglength](high)
    //blow = LinearRegression[linreglength](low)
    bclose = LinearRegression[linreglength](close)
    else
    //bopen = open
    //bhigh = high
    //blow = low
    bclose = close
    endif
    //--------------------------------------------------------
    //---------------Signal definition-------------------------
    if smasignal then
    signal = average[signallength](bclose)
    else
    signal = average[signallength,1](bclose)
    endif
    screener[bclose crosses over signal]
    //screener[bclose crosses under signal]
    finplus thanked this post
    #230211 quote
    finplusfinplus
    Participant
    Master

    Merci pour la réactivité.

Viewing 3 posts - 1 through 3 (of 3 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

Linear Regression Candles


ProScreener : Scanners de Marché & Détection

New Reply
Author
author-avatar
finplus @finplus Participant
Summary

This topic contains 2 replies,
has 2 voices, and was last updated by finplusfinplus
2 years, 6 months ago.

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