Smoothed Heikin Ashi Candles

Questions about MultiCharts and user contributed studies.
syracusepro
Posts: 17
Joined: 29 Sep 2016

Smoothed Heikin Ashi Candles

Postby syracusepro » 11 Oct 2016

Hi; I got compilation errors as I am trying to compile the following code to make a Smoothed Heikin Ashi study:

Code: Select all



// "Smoothed Heiken Ashi Candles"



Inputs:

len(10),
len2(10);

Variables:

openc(o),
closec(0),
highc(0),
lowc(0),
haclose(0),
haopen(0),
hahigh(0),
halow(0),
o2(0),
c2(0),
h2(0),
l2(0);

openc = XAverage(open,len);
closec = XAverage(close,len);
highc = XAverage(high,len);
lowc = XAverage(low,len);
haclose = (o+h+l+c)/4;
haopen = iff (haopen[1])
(o + c)/2 else (haopen[1] + haclose[1]) / 2;
hahigh = max (h, max(haopen,haclose));
halow = min (l, min(haopen,haclose));
o2 = XAverage(haopen, len2);
c2 = XAverage(haclose, len2);
h2 = XAverage(hahigh, len2);
l2 = XAverage(halow, len2);

//col=o2>c2 ? red : lime
//plotcandle(o2, h2, l2, c2);

plot1(o2, h2, l2, c2, "Smoothed Candles");
Thanks in advance for any help.

User avatar
TJ
Posts: 7743
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 1033 times
Been thanked: 2222 times

Re: Smoothed Heikin Ashi Candles

Postby TJ » 11 Oct 2016

Hi; I got compilation errors as I am trying to compile the following code to make a Smoothed Heikin Ashi study:
::

See post #4, pt #1
viewtopic.php?f=16&t=11713


Return to “MultiCharts”