ALE

Heikin-Ashi candle smoothed

Category: Indicators By: ALE Created: June 30, 2018, 2:46 PM
June 30, 2018, 2:46 PM
Indicators
19 Comments
Heikin-Ashi candle smoothed

You can use this indicators in different ways

  • Moving Average
  • Range area
  • Filtered area of market movement

You can set :

  • Average period of candle=HeikinPeriod
  • Average Type (simple,exponential,triangular, etc) = AverageType
  • Average period of impression channel (Highest/Lowest) = ChannelPeriod
  • Transparency of the candle =Transparency
//ALE - 28.06.2018
//@PROREALCODE
/////////
//HeikinPeriod =40
//AverageType  =5
//ChannelPeriod=10
//TransParency =15
/////////
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
//Smoothed Heikin-Ashi
xxclose=Average[max (1,HeikinPeriod),AverageType](xclose)
xxOpen = Average[max (1,HeikinPeriod),AverageType](xOpen)
xxHigh = Average[max (1,HeikinPeriod),AverageType](xHigh)
xxLow  = Average[max (1,HeikinPeriod),AverageType](xLow)


//Colour Setting
MyDi = xxclose-xxclose[1]
r=50+(200-MyDi*100)
g=50+(200+MyDi*100)
b=50+(0+MyDi*30)
//Build channel with Highest and Lowest of Heikin-Ashi smoothed candle
DRAWCANDLE(xxOpen, highest[max(1, ChannelPeriod)](xxHigh), lowest[max(1, ChannelPeriod)](xxlow), xxClose) Coloured (R,G,b,MAX(50,Transparency*10))


Return

Download
Filename: Heikin_Candle_smoothed-with-colors.itf
Downloads: 433
Download
Filename: Heikin_Candle_smoothed.itf
Downloads: 599
ALE
ALE Master
My name is Alessandro, i'm a trader since 2006 You can find me on my website: <a href="http://www.automatictrading.it/" rel="dofollow">www.automatictrading.it</a> <strong>(trading programming services Italy)</strong> Italy
Author’s Profile

Comments

OliBaba
1 year ago
#

Beautiful! Bravo ! A work of art!

cv
cv
6 years ago
#

Thank you very much Nicolas and Ale,

ALE
ALE
6 years ago
#

Thanks Nicolas!

cv
cv
6 years ago
#

Hi Ale, Thank you for getting back to me. I would like the standard green for up and red for down. Kind regards, Corinne

ALE
ALE
6 years ago
#

Hello Corinne I've updated code, you will find it in the following topic: Heikin-Ashi candle smoothed Kind Regards Ale

Nicolas
6 years ago
#

I added the new ITF file in this page too (heikin ashi smoothed with colors)

cv
cv
6 years ago
#

Hi all, Still seeking help with this indicator. I love using it but my candles are all yellow, and I do not know how to change them to display as red and green. I have tried the suggestions above, but they haven't solved the issue. The code I am using is: //@PROREALCODE 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 //Smoothed Heikin-Ashi xxclose=Average[max (1,HeikinPeriod),AverageType](xclose) xxOpen = Average[max (1,HeikinPeriod),AverageType](xOpen) xxHigh = Average[max (1,HeikinPeriod),AverageType](xHigh) xxLow = Average[max (1,HeikinPeriod),AverageType](xLow) //Colour Setting MyDi = xxclose-xxclose[1] r=50+(200-MyDi*100) g=50+(200+MyDi*100) b=50+(0+MyDi*30) //Build channel with Highest and Lowest of Heikin-Ashi smoothed candle DRAWCANDLE(xxOpen, highest[max(1, ChannelPeriod)](xxHigh), lowest[max(1, ChannelPeriod)](xxlow), xxClose) Coloured (R,G,b,MAX(50,Transparency*10)) I would really appreciate some help with this. Thank you Return

ALE
ALE
6 years ago
#

Let me know which colours of candle do you wants Thanks Ale

vanheckealain
7 years ago
#

to remove color, just edit the code and comment to color selection //Colour Setting //MyDi = xxclose-xxclose[1] //r=50+(200-MyDi*100) //g=50+(200+MyDi*100) //b=50+(0+MyDi*30) and remove: Coloured (R,G,b,MAX(50,Transparency*10)) from your code.

cv
cv
7 years ago
#

Thank you Ale.

ALE
ALE
7 years ago
#

Hello CV, The color of the candles depends on the values, if you try the indicator on the indexes you will see what colors will be correct.

cv
cv
7 years ago
#

I noticed T-Radar mentioned that all his candles are yellow, mine are too. Is there anything I can do to change that ? Thank you Corinne

cv
cv
7 years ago
#

Thank you very much for your help Nicolas.

cv
cv
7 years ago
#

Hi All, My coding knowledge is very poor, and I would really appreciate some help adding this indicator. I get the following message when I try to add the indicator - Syntax error: The following variable is undefined: heikinperiod The following variable is undefined: averagetype The following variable is undefined: channelperiod The following variable is undefined: transparency Could someone please help me to fix this error? Thank you Corinne

Nicolas
7 years ago
#

Download the .itf file and import it into your platform. Or remove all the // before the name of the missing variables in the code.

RAAAMMY
7 years ago
#

Is it possible to set an audio alarm when colour of candle changes?

T-rader
8 years ago
#

I only get yellow candles. Can I change it?

ALE
ALE
8 years ago
#

T-rader Have you already find a solution?

ALE
ALE
8 years ago
#

Please write any questions in this Topic "Heikin-Ashi candle smoothed TOPIC"

ProRealCode ProRealCode
Loading...