Décalage du zéro d’un histogramme ?

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #238671 quote
    Louloute
    Participant
    Average

    Bonjour,

    Je souhaite décaler de zéro à 50 l’histogramme de l’image jointe …

    Existe-t-il une fonction pour décaler le zéro d’un histogramme ou faut-il bricoler ?

     

    Merci.

    René

    #238708 quote
    Iván González
    Moderator
    Master

    Je pourrais définir une variable LevelHisto=50 modifiable en fonction de l'actif visualisé. Définissez ensuite l'histogramme comme s'il s'agissait d'une bougie avec l'instruction Drawcandle() .

    //--------------------------------------------------------//
    //-----Inputs---------------------------------------------//
    fastlength=12
    slowlength=26
    signalLength=9
    src=close
    levelHisto=50
    //--------------------------------------------------------//
    //-----MACD-----------------------------------------------//
    fastema=average[fastlength,1](src)
    slowema=average[slowlength,1](src)
    mymacd=fastema-slowema
    signal=average[signalLength,1](mymacd)
    histo=mymacd-signal
    //--------------------------------------------------------//
    //-----------New Histogram--------------------------------//
    newHistoH=levelHisto+histo
    newHistoL=levelHisto
    if newHistoH>levelHisto then
    r=0
    g=255
    else
    r=255
    g=0
    endif
    DRAWCANDLE(newHistoL, newHistoH, newHistoL, newHistoH)coloured(r,g,0)
    //--------------------------------------------------------//
    return mymacd as "MACD" coloured("red"), signal as "Signal"coloured("blue"), levelHisto as "Level Hist", 0 as "Zero"
    Louloute and RicLg thanked this post
    #238713 quote
    Louloute
    Participant
    Average

    OK !   Merci Iván.

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

Décalage du zéro d’un histogramme ?


ProBuilder : Indicateurs & Outils Personnalisés

New Reply
Author
author-avatar
Louloute @louloute Participant
Summary

This topic contains 2 replies,
has 2 voices, and was last updated by Louloute
1 year, 3 months ago.

Topic Details
Forum: ProBuilder : Indicateurs & Outils Personnalisés
Language: French
Started: 10/08/2024
Status: Active
Attachments: 1 files
Logo Logo
Loading...