Petit problème d’affichage

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

    Bonjour,

    comme beaucoup, j’utilise différents indicateurs et pour m’aider visuellement, j’ai “programmé” un petit indicateur visuel qui se traduit par un signe (un point bleu ou rouge pour certains) qui apparaît en bas de mon écran avec un titre que j’attribue à l’indicateur. Depuis la version v11, le titre se positionne pas sur la ligne.

    Alors qu’il devrait apparaître tout à fait à droite, il se répète sur la ligne (et uniquement en daily). Comment faire? Merci.

    ///////////////////////////////////////////////////////////////////////////////////////////// Définition de la tendance : Trend Enveloppes & ATR & Supertrend Extended dans le même sens
    
    timePerioda=14
    Deviationa=0.1
     
    pricea=customclose
     
    dsma = WeightedAverage[timePerioda](pricea)
    valuesLow = (1 - deviationa / 100) * dsma
    valuesHigh = (1 + deviationa / 100) * dsma
     
    inputsa=pricea
     
    if (inputsa > valuesHigh) then
    trenda = 1
    elsif (inputsa < valuesLow) then
    trenda = -1
    endif
     
    EnvelopUp = (trenda > 0)
    EnvelopDn = (trenda < 0)
    
    indicator4, indicator3 = CALL "Supertrend Extended"
    
    STUp = (indicator3 > indicator4)
    STDN = (indicator3 < indicator4)
    
    LimitATR = CALL "ATR ADX Trend"(close)
    
    ATRUp = (close > LimitATR)
    ATRDn = (close < LimitATR)
    
    
    if EnvelopUp and STUp and ATRUp then
    DRAWTEXT("▲", BarIndex,6.0,SansSerif,BOLD,12) COLOURED(32,0,192)
    elsif EnvelopDn and STDn and ATRDn then
    DRAWTEXT("▼", BarIndex,6.0,SansSerif,BOLD,12) COLOURED(255,0,0)
    elsif (envelopDn and STUp and ATRUp) or (envelopUp and STUp and ATRDN) or (envelopUp and STDn and ATRUp) then
    DRAWTEXT("●", BarIndex,6.0,SansSerif,BOLD,20) COLOURED(35, 206, 235)
    elsif (envelopDn and STUP and ATRDN) or (envelopDn and STDn and ATRUP) or (envelopUp and STDn and ATRDn) then
    DRAWTEXT("●", BarIndex,6.0,SansSerif,BOLD,20) COLOURED(255, 165, 0)
    endif
    
    if IsLastBarOnChart then
    drawtext("                                    TREND",barindex,6,dialog,bold,12)
    endif
    //////////////////////////////////////////////////////////////////////////////////////////////////////////////
    
    Hi=7.5
    Lo=-1.0
     
    Return Hi,Lo

    les lignes de code et une photo du rendu.

    Capture-décran-2021-04-18-à-10.33.34.png Capture-décran-2021-04-18-à-10.33.34.png
    #167407 quote
    NicolasNicolas
    Keymaster
    Legend

    Remplacer les lignes 44 à 46 (par ailleurs tu utilises un test “isLastBarOnChart” qui n’est jamais fait dans ton code ?!)

    if IsLastBarupdate then
     drawtext("                                    TREND",barindex,6,dialog,bold,12)
    endif
    #167412 quote
    finplusfinplus
    Participant
    Master

    Bonjour,

    merci pour cette réponse rapide. Tout s’affiche correctement.

    Bon week-end.

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

Petit problème d’affichage


ProBuilder : Indicateurs & Outils Personnalisés

New Reply
Author
author-avatar
finplus @finplus Participant
Summary

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

Topic Details
Forum: ProBuilder : Indicateurs & Outils Personnalisés
Language: French
Started: 04/18/2021
Status: Active
Attachments: 1 files
ProRealCode ProRealCode
Loading...