i had this code below but i only see bars with open and close
Code: Select all
plotPB(haHigh ,haLow ,"heikin-ashi_HL",Black);
SetPlotWidth(1,1);
SetPlotColor(1,Black);
here is the original code:
Code: Select all
{ Heikin Ashi PaintBarStudy }
Inputs: UpColor(Green), DnColor(Red );
Vars: haClose(0), haOpen(0), haHigh(0), haLow(0), color(0);
If BarNumber = 1 then
begin
haOpen = open;
haClose = (O+H+L+C)/4;
haHigh = MaxList( high, haOpen, haClose);
haLow = MinList( low, haOpen,haClose);
end;
If BarNumber > 1 then
begin
haClose = (O+H+L+C)/4; //average bar price
haOpen = (haOpen [1] + haClose [1])/2; //avg open/close 1 bar ago
haHigh = MaxList(High, haOpen, haClose); //highest of high,open,close
haLow = MinList(Low, haOpen, haClose); // lowest of low, open, close
If haClose > haOpen then
color = UpColor
else
color = DnColor;
PlotPB(haHigh ,haLow ,"heikin-ashiHL",Black);
SetPlotWidth(1,1);
SetPlotColor(1,Black);
PlotPB(haOpen,haClose,"heikin-ashi",color);
SetPlotWidth(1,2);
SetPlotColor(1,color);
end;
Nuno