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
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 |
//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 |
Share this
No information on this site is investment advice or a solicitation to buy or sell any financial instrument. Past performance is not indicative of future results. Trading may expose you to risk of loss greater than your deposits and is only suitable for experienced investors who have sufficient financial means to bear such risk.
ProRealTime ITF files and other attachments :
Filename : download the ITF files
How to import ITF files into ProRealTime platform?
PRC is also on YouTube, subscribe to our channel for exclusive content and tutorials
I only get yellow candles. Can I change it?
Please write any questions in this Topic “Heikin-Ashi candle smoothed TOPIC”
T-rader Have you already find a solution?
Is it possible to set an audio alarm when colour of candle changes?
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
Download the .itf file and import it into your platform. Or remove all the // before the name of the missing variables in the code.
Thank you very much for your help Nicolas.
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
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.
Thank you Ale.
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.
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
Let me know which colours of candle do you wants
Thanks
Ale
Hi Ale,
Thank you for getting back to me. I would like the standard green for up and red for down.
Kind regards,
Corinne
Hello Corinne
I’ve updated code, you will find it in the following topic: Heikin-Ashi candle smoothed
Kind Regards
Ale
I added the new ITF file in this page too (heikin ashi smoothed with colors)
Thanks Nicolas!
Thank you very much Nicolas and Ale,