Amelioration d’un indicateur Chandelier Heikin

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #160149 quote
    AK27
    Participant
    Junior
    //Coloured normal candles with Heikin Ashi
     
    IF BarIndex=0 THEN
    xClose = (open+high+low+close)/4
    xOpen = open
    xHigh = high
    xLow = low
    ELSE
    xClose = (open+high+low+close)/4
    xOpen = (xOpen[1]+xClose[1])/2
    xHigh = Max(max(high, xOpen), xClose)
    xLow = Min(min(Low, xOpen), xClose)
    endif
     
    if (close > open and xclose > xopen) or (close < open and xclose > xopen) then
    DRAWCANDLE(open, high, low, close)coloured(0,220,0)
    elsif  (close < open and xclose < xopen) or (close > open and xclose < xopen) then
    DRAWCANDLE(open, high, low, close)coloured(255,0,0)
    endif
     
    return

    Bonjour à tous, j’ai eu une idée d’une customisation d’un indicateur, l’indicateur présent est un chandelier classique mais avec la variation de couleur en heikin pour eliminer le bruit, mais je pense qu’il peut être customisé en ayant la vraie couleur de la bougie en contours pour ne pas se perdre je vous met l’exemple en PJ. 🙂

    procode.jpg procode.jpg
    #160152 quote
    Nicolas
    Keymaster
    Master

    Ci-joint le code qui peint les contours des chandeliers selon la direction de ces derniers (en utilisant l’instruction BORDERCOLOR) :

    //Coloured normal candles with Heikin Ashi
     
    IF BarIndex=0 THEN
    xClose = (open+high+low+close)/4
    xOpen = open
    xHigh = high
    xLow = low
    ELSE
    xClose = (open+high+low+close)/4
    xOpen = (xOpen[1]+xClose[1])/2
    xHigh = Max(max(high, xOpen), xClose)
    xLow = Min(min(Low, xOpen), xClose)
    endif
     
    if close>open then 
    r=0
    g=255
    else
    r=255
    g=0
    endif
    
    if (close > open and xclose > xopen) or (close < open and xclose > xopen) then
    DRAWCANDLE(open, high, low, close)coloured(0,220,0)bordercolor(r,g,0)
    elsif  (close < open and xclose < xopen) or (close > open and xclose < xopen) then
    DRAWCANDLE(open, high, low, close)coloured(255,0,0)bordercolor(r,g,0)
    endif
     
    return
    AK27 thanked this post
    drawcandle-heikin-ashi.png drawcandle-heikin-ashi.png
    #160154 quote
    AK27
    Participant
    Junior

    MERCI !

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

Amelioration d’un indicateur Chandelier Heikin


ProBuilder : Indicateurs & Outils Personnalisés

New Reply
Author
author-avatar
AK27 @punch1 Participant
Summary

This topic contains 2 replies,
has 2 voices, and was last updated by AK27
5 years, 1 month ago.

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