You can turn on the Heikin-Ashi candle in Settings-Appearance. This will replace traditional candlesticks with a smoother version, beneficial in analyzing overall trends. But while it eliminates market noise during trends, it has drawbacks, mainly not displaying real prices. This limitation hinders certain analyses, such as identifying chart patterns or key support and resistance levels.
Here is the Smooth Heikin-Ashi. It addresses the limitations by working as an overlay, providing traders with the indicators benefits while retaining a view of actual price movements. Thus filtering out noise during market volatility, offering consistent signals.
There is another image that uses bars for the underlying instead of candles:
https://usethinkscript.com/threads/smoothed-heikin-ashi-for-thinkorswim.216/page-2#post-51916
Here, instead of overlaying HAcandles, the Heiken trend is displayed with a simple plotted line: https://usethinkscript.com/threads/smoothed-heikin-ashi-for-thinkorswim.216/page-2#post-110773
Here is one member's suggested setup: https://usethinkscript.com/threads/smoothed-heikin-ashi-for-thinkorswim.216/page-2#post-59985
Here, only the current trend is colored: https://usethinkscript.com/threads/smoothed-heikin-ashi-for-thinkorswim.216/page-2#post-94271
https://tos.mx/8UUAc2
Here is the Smooth Heikin-Ashi. It addresses the limitations by working as an overlay, providing traders with the indicators benefits while retaining a view of actual price movements. Thus filtering out noise during market volatility, offering consistent signals.
There is another image that uses bars for the underlying instead of candles:
https://usethinkscript.com/threads/smoothed-heikin-ashi-for-thinkorswim.216/page-2#post-51916
Here, instead of overlaying HAcandles, the Heiken trend is displayed with a simple plotted line: https://usethinkscript.com/threads/smoothed-heikin-ashi-for-thinkorswim.216/page-2#post-110773
Here is one member's suggested setup: https://usethinkscript.com/threads/smoothed-heikin-ashi-for-thinkorswim.216/page-2#post-59985
Here, only the current trend is colored: https://usethinkscript.com/threads/smoothed-heikin-ashi-for-thinkorswim.216/page-2#post-94271
https://tos.mx/8UUAc2
Code:
# Heikin Ashi Smoothed
# HoboTheClown / blt
# 9.15.2016
input period = 6;
input hideCandles = no;
input candleSmoothing = {default Valcu, Vervoort};
DefineGlobalColor("RisingMA", color.green);
DefineGlobalColor("FallingMA", color.red);
input movingAverageType = {Simple, default Exponential, Weighted, Hull, Variable, TEMA};
def openMA;
def closeMA;
def highMA;
def lowMA;
switch (movingAverageType) {
case Simple:
openMA = compoundValue(1, Average(open, period), open);
closeMA = compoundValue(1, Average(close, period), close);
highMA = compoundValue(1, Average(high, period), high);
lowMA = compoundValue(1, Average(low, period), low);
case Exponential:
openMA = compoundValue(1, ExpAverage(open, period), open);
closeMA = compoundValue(1, ExpAverage(close, period), close);
highMA = compoundValue(1, ExpAverage(high, period), high);
lowMA = compoundValue(1, ExpAverage(low, period), low);
case Weighted:
openMA = compoundValue(1, WMA(open, period), open);
closeMA = compoundValue(1, WMA(close, period), close);
highMA = compoundValue(1, WMA(high, period), high);
lowMA = compoundValue(1, WMA(low, period), low);
Case Hull:
openMA = compoundValue(1, HullMovingAvg(open, period), open);
closeMA = compoundValue(1, HullMovingAvg(close, period), close);
highMA = compoundValue(1, HullMovingAvg(high, period), high);
lowMA = compoundValue(1, HullMovingAvg(low, period), low);
case variable:
openMA = compoundValue(1, VariableMA(open, period), open);
closeMA = compoundValue(1, VariableMA(close, period), close);
highMA = compoundValue(1, VariableMA(high, period), high);
lowMA = compoundValue(1, VariableMA(low, period), low);
case TEMA:
openMA = compoundValue(1, TEMA(open, period), open);
closeMA = compoundValue(1, TEMA(close, period), close);
highMA = compoundValue(1, TEMA(high, period), high);
lowMA = compoundValue(1, TEMA(low, period), low);
}
#hidePricePlot(hideCandles);
def haOpen;
def haClose;
switch(candleSmoothing) {
case Valcu:
haOpen = CompoundValue(1, ( (haOpen[1] + (openMA[1] + highMA[1] + lowMA[1] + closeMA[1]) /4.0)/2.0), open);
haClose = ((OpenMA + HighMA + LowMA + CloseMA)/4.0) ;
case Vervoort:
haOpen = CompoundValue(1, ( (haOpen[1] + (openMA[1] + highMA[1] + lowMA[1] + closeMA[1]) /4.0)/2.0), open);
haClose = ((((OpenMA + HighMA + LowMA + CloseMA)/4.0) + haOpen + Max(HighMA, haOpen) + Min(LowMA, haOpen))/4.0);
}
plot o = haopen;
o.hide();
def haLow = min(lowMA, haOpen);
def haHigh = max(highMA,haOpen);
### NO LONGER SUPPORTED BY TOS
###
### AddChart(high = haHigh, low = haLow, open = o, close = haclose, type = ChartType.CANDLE, growColor = GlobalColor("RisingMA"), fallColor = GlobalColor("FallingMA"), neutralColor = color.gray);
input charttype = ChartType.CANDLE;
def haopen_ = if haopen>haclose
then HAopen + 0
else double.nan;
def HAhi = if haopen>=haclose
then hahigh
else double.nan;
def HAlo = if haopen>=haclose
then halow
else double.nan;
AddChart(growColor = color.red, fallColor = Color.green, neutralColor = Color.current, high = HAhi, low = HAlow, open = haopen_, close = HAclose, type = ChartType.CANDLE);
def HAclose1 = ohlc4;
def HAopen1 = if haopen<=haclose
then CompoundValue(1, (HAopen[1] + HAclose[1]) / 2, (open[1] + close[1]) / 2)
else double.nan;
def haopen_1 = if haopen<=haclose
then HAopen1 + 0
else double.nan;
def HAhigh1 = hahigh;
def HAlow1 = halow;
AddChart(growColor = Color.green, fallColor = Color.red, neutralColor = Color.current, high = HAhigh1, low = HAlow1, open = haopen_1, close = HAclose1, type = ChartType.CANDLE);
# End Study
##############################################################################
Last edited by a moderator: