Hey guys,
Been using this indicator for the past couple of days on a RENKO chart, with no issues. But I wanted to take the other night to do some more extensive manual backtesting and reloaded my chart from 15 days to 90 days. In so doing, the indicator no longer loads on the RENKO chart. Also there is no error warning for it in the top left chart corner.
I tried dropping the period back down all the way to 5 days, nothing changed. I tried switching over to candles and the indicator loaded back onto the chart as it should. Then switching back to RENKO it again wouldn't load. Reloaded the indicators into the edit studies menu, nothing happened. Reset workspace to default and then reloaded everything up, still it won't come back. Also, other heikinAshi type indicators seem to be working just fine on RENKO.
I don't know enough about code to tell if there is a problem somewhere, or maybe the code can be more specifically adapted to RENKO?
Been using this indicator for the past couple of days on a RENKO chart, with no issues. But I wanted to take the other night to do some more extensive manual backtesting and reloaded my chart from 15 days to 90 days. In so doing, the indicator no longer loads on the RENKO chart. Also there is no error warning for it in the top left chart corner.
I tried dropping the period back down all the way to 5 days, nothing changed. I tried switching over to candles and the indicator loaded back onto the chart as it should. Then switching back to RENKO it again wouldn't load. Reloaded the indicators into the edit studies menu, nothing happened. Reset workspace to default and then reloaded everything up, still it won't come back. Also, other heikinAshi type indicators seem to be working just fine on RENKO.
I don't know enough about code to tell if there is a problem somewhere, or maybe the code can be more specifically adapted to RENKO?
Code:
#Converted MT4 HeikinAshi_EntryExit Indicator
#MikeLikesAnacottSteel
#8-27-2022
#MT4 indicator source: https://forex-station.com/app.php/attach/file/3349947
input MaMethod1 = AverageType.EXPONENTIAL;
input MaPeriod = 40;
input MaMethod2 = AverageType.EXPONENTIAL;
input MaPeriod2 = 1;
def maOpen = MovingAverage(MaMethod1, Open, MaPeriod);
def maClose = MovingAverage(MaMethod1, Close, MaPeriod);
def maLow = MovingAverage(MaMethod1, Low, MaPeriod);
def maHigh = MovingAverage(MaMethod1, High, MaPeriod);
def haClose=(maOpen+maHigh+maLow+maClose)/4;
def haOpen=(GetValue(haOpen, 1)+GetValue(haClose, 1))/2;
def haHigh=Max(maHigh, Max(haOpen, haClose));
def haLow=Min(maLow, Min(haOpen, haClose));
def ExtMapBuffer7;
def ExtMapBuffer8;
if(haOpen<haClose)
{
ExtMapBuffer7=haLow;
ExtMapBuffer8=haHigh;
}
else
{
ExtMapBuffer7=haHigh;
ExtMapBuffer8=haLow;
}
def ExtMapBuffer5=haOpen;
def ExtMapBuffer6=haClose;
Plot ExtMapBuffer1 = MovingAverage(MaMethod2, ExtMapBuffer7, MaPeriod2);
Plot ExtMapBuffer2 = MovingAverage(MaMethod2, ExtMapBuffer8, MaPeriod2);
Plot ExtMapBuffer3 = MovingAverage(MaMethod2, ExtMapBuffer5, MaPeriod2);
Plot ExtMapBuffer4 = MovingAverage(MaMethod2, ExtMapBuffer6, MaPeriod2);
ExtMapBuffer1.SetDefaultColor(Color.RED);
ExtMapBuffer1.SetPaintingStrategy(PaintingStrategy.LINE);
ExtMapBuffer1.SetLineWeight(1);
ExtMapBuffer2.SetDefaultColor(Color.BLUE);
ExtMapBuffer2.SetPaintingStrategy(PaintingStrategy.LINE);
ExtMapBuffer2.SetLineWeight(1);
ExtMapBuffer3.SetDefaultColor(Color.RED);
ExtMapBuffer3.SetPaintingStrategy(PaintingStrategy.LINE);
ExtMapBuffer3.SetLineWeight(1);
ExtMapBuffer4.SetDefaultColor(Color.BLUE);
ExtMapBuffer4.SetPaintingStrategy(PaintingStrategy.LINE);
ExtMapBuffer4.SetLineWeight(1);
AddCloud(ExtMapBuffer1, ExtMapBuffer2, CreateColor(255,0,102), CreateColor(0, 102, 255));
AddCloud(ExtMapBuffer1, ExtMapBuffer4, CreateColor(255,0,102), CreateColor(0, 102, 255));
AddCloud(ExtMapBuffer2, ExtMapBuffer1, CreateColor(0, 102, 255), CreateColor(255,0,102));
AddCloud(ExtMapBuffer2, ExtMapBuffer3, CreateColor(0, 102, 255), CreateColor(255,0,102));
AddCloud(ExtMapBuffer3, ExtMapBuffer4, CreateColor(255,0,102), CreateColor(0, 102, 255));