affichage indicateur sur l’ensemble de l’historique

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #171893 quote
    Ramahu
    Participant
    Senior

    Bonjour à tous,

    j’ai très apprécié le travail d’un membre du forum et son indicateur, cependant celui ci ne donne les infos que de la dernière période.

    J’aimerais si possible voir sur le graph le résultat de la variable “Report” pour chaque bougie dans le passé.

    Si quelqu’un peut m’aider, car le code est super complexe pour mes connaissances ^^ ..

    Info-Graph.itf
    #171895 quote
    Ramahu
    Participant
    Senior
    //
    //=/===============/=//=/===============/=//=/ Indicator Range Trend
    //
    
    defparam drawonlastbaronly = true
    
    //
    //=/===============/=//=/===============/=//=/ Range Fast
    //
    
    
    once FxRRange=close
    
    Fxscale = 2.338*average[14,1](abs(close-close[1]))
    
    FxR = average[27,1](FxScale)
    FxHH = close
    FxLL = close
    
    if FxHH > FxRRange[1] then
    if (FxHH-FxR) < FxRRange[1] then
    FxRRange = FxRRange[1]
    else
    FxRRange = (FxHH-FxR)
    endif
    elsif (FxLL+FxR) > FxRRange[1] then
    FxRRange = FxRRange[1]
    else
    FxRRange = (FxLL+FxR)
    endif
    
    FxTrend = FxRRange
    FxURange = FxRRange + FxR
    FxDRange = FxRRange - FxR
    
    //
    //=/===============/=//=/===============/=//=/ Range Low
    //
    
    once LxRRange=close
    
    LxR = 2.338*average[14,1](abs(close-close[1]))
    LxHH = high
    LxLL = low
    
    if LxHH > LxRRange[1] then
    if (LxHH-LxR) < LxRRange[1] then
    LxRRange = LxRRange[1]
    else
    LxRRange = (LxHH-LxR)
    endif
    elsif (LxLL+LxR) > LxRRange[1] then
    LxRRange = LxRRange[1]
    else
    LxRRange = (LxLL+LxR)
    endif
    
    LxTrend = LxRRange
    LxURange = LxRRange + LxR
    LxDRange = LxRRange - LxR
    
    //
    //=/===============/=//=/===============/=//=/ Trend Line
    //
    
    //=/ Trend Line
    TLr = (FxTrend+LxTrend)/2
    AvTrD1 = (TLr+TLr[1])/2
    AvTrD2 = (AvTrD1-TLr)/15
    TrDL = AvTrD1-AvTrD2
    
    //=/ Up Range
    XURange = (FxURange+LxURange)/2
    
    //=/ Dw Range
    XDRange = ((FxDRange+LxDRange)/2)
    
    //
    //=/===============/=//=/===============/=//=/ Volatility & Amplitude Settings
    //
    
    //=/ Decompte Haussier
    UAmp = 0
    if close > TrDL then
    UAmp = UAmp[1]+1
    endif
    
    //=/ Decompte Baissier
    DAmp = 0
    if close < TrDL then
    DAmp = DAmp[1]+1
    endif
    
    //=/ Decompte Global
    Amp = UAmp+DAmp
    if Amp < Amp[1]-1 then
    Amp = Amp[Amp]-Amp
    endif
    
    VRange = 0
    if TrDL = TrDL[1] then
    VRange = VRange[1]+1
    endif
    
    //=/ Decompte Amplitude
    OAmp = (Amp-VRange)-VRange
    if OAmp < 0 then
    OAmp = 0
    endif
    
    if OAmp < OAmp[1]-1 then
    OAmp = OAmp[1]-1
    endif
    
    if OAmp > OAmp[1]+1 then
    OAmp = OAmp[1]+1
    endif
    
    //=/ Decompte final
    if VRange > OAmp then
    OAmp = VRange
    endif
    
    P = round(OAmp)
    
    if forex then
    
    //=/ Volatility
    Volatilite = (((XURange*0.5)-(XDRange*0.5))*10000)
    
    XV = round(Volatilite)
    drawtext("                                                                      #XV# Volatility",barindex[1],TrDL[1]+(XURange[1]-TrDL[1]),Dialog,Bold,12) coloured(0,0,0)
    
    //=/ Amplitude
    if close > TrDL then
    Amplitude = (close-Lowest[P](low))*10000
    elsif close < TrdL then
    Amplitude = (Highest[P](high)-close)*10000
    endif
    
    XA = round(Amplitude)
    drawtext("                                                                         #XA# Amplitude",barindex[1],TrDL[1]+((XURange[1]-TrDL[1])/2),Dialog,Bold,12) coloured(0,0,0)
    
    //=/ Rapport
    RPP = (Amplitude-Volatilite)
    XR = round (RPP)
    
    if RPP > 0 then
    drawtext("                                                                      #XR# Report",barindex[1],TrDL[1],Dialog,Bold,12) coloured(0,0,0)
    elsif RPP =< 0 then
    drawtext("                                                                      #XR# Report",barindex[1],TrDL[1],Dialog,Bold,12) coloured(199,19,19)
    endif
    
    else
    
    //=/ Volatility
    Volatilite = ((XURange*0.5)-(XDRange*0.5))
    
    XV = round(Volatilite)
    drawtext("                                                                      #XV# Volatility",barindex[1],TrDL[1]+(XURange[1]-TrDL[1]),Dialog,Bold,12) coloured(0,0,0)
    
    //=/ Amplitude
    if close > TrDL then
    Amplitude = close-Lowest[P](low)
    elsif close < TrdL then
    Amplitude = Highest[P](high)-close
    endif
    
    XA = round(Amplitude)
    drawtext("                                                                         #XA# Amplitude",barindex[1],TrDL[1]+((XURange[1]-TrDL[1])/2),Dialog,Bold,12) coloured(0,0,0)
    
    //=/ Rapport
    RPP = (Amplitude-Volatilite)
    XR = round (RPP)
    
    if RPP > 0 then
    drawtext("                                                                      #XR# Report",barindex[1],TrDL[1],Dialog,Bold,12) coloured(0,0,0)
    elsif RPP =< 0 then
    drawtext("                                                                      #XR# Report",barindex[1],TrDL[1],Dialog,Bold,12) coloured(199,19,19)
    endif
    endif
    
    
    return
    
    #171913 quote
    Nicolas
    Keymaster
    Master

    J’ai échangé le titre du sujet avec quelque chose de plus descriptif “aide indicateur” n’étant pas suffisamment explicite.

    Il faut simplement changer la première ligne du code avec :

    defparam drawonlastbaronly = false

    ou la supprimer, ça évite que les objets graphiques ne soient tracés que sur le dernier chandelier.

    #171928 quote
    Ramahu
    Participant
    Senior

    Merci Nicolas, parfait comme dhab 👍

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

affichage indicateur sur l’ensemble de l’historique


ProBuilder : Indicateurs & Outils Personnalisés

New Reply
Author
author-avatar
Ramahu @ramahu Participant
Summary

This topic contains 3 replies,
has 2 voices, and was last updated by Ramahu
4 years, 8 months ago.

Topic Details
Forum: ProBuilder : Indicateurs & Outils Personnalisés
Language: French
Started: 06/16/2021
Status: Active
Attachments: 1 files
Logo Logo
Loading...