Décalage de moyenne codée

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

    Bonjour,

    Je cherche à décaler à gauche de la dernière bougie le signal ci-dessous de 26 périodes (chikou span).


    ==============================================================================

    linregLength=11

    signalLength=11

    smasignal=1 // 1=True 0=False

    bClose = LinearRegression[linregLength](close)


    //—————————————

    // 2. Calculate Signal Line

    //—————————————

    IF smaSignal = 1 THEN

    // Simple Moving Average

    signal = Average[signalLength](bClose)


    ELSE

    // Exponential Moving Average

    signal = ExponentialAverage[signalLength](bClose)


    ENDIF


    RETURN signal AS “Signal Line” COLOURED(“hotpink”)essous de 26 périodes (chikou span).

    =========================================================================================

    Ces lignes lignes sont sorties d’un code fait par ivan.

    [26] NE SUFFIT PAS , Je dois louper quelque chose

    merci à tous

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

    Peut-être que ça vaut le coup pour toi

    linregLength = 11
    signalLength = 11
    smaSignal = 1
    offset = 26
    
    bClose = LinearRegression[linregLength](close)
    
    IF smaSignal = 1 THEN
       currentSignal = Average[signalLength](bClose)
    ELSE
       currentSignal = ExponentialAverage[signalLength](bClose)
    ENDIF
    
    IF barindex > offset + 1 THEN
       r = 255
       g = 105
       b = 180
       DRAWSEGMENT(barindex[1] - offset, currentSignal[1], barindex - offset, currentSignal) COLOURED(r, g, b)
    ENDIF
    
    RETURN
    


    robertogozzi and Nicolas thanked this post
    #256905 quote
    larouedegannlarouedegann
    Participant
    Master

    Super merci ivan

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

Décalage de moyenne codée


ProBuilder : Indicateurs & Outils Personnalisés

New Reply
Author
Summary

This topic contains 2 replies,
has 2 voices, and was last updated by larouedegannlarouedegann
7 months, 3 weeks ago.

Topic Details
Forum: ProBuilder : Indicateurs & Outils Personnalisés
Language: French
Started: 01/25/2026
Status: Active
Attachments: No files
ProRealCode ProRealCode
Loading...