Hello, found a heikin ashi ribbon indicator on the forums that I've enjoyed using. Problem is it seems to take an extremely long time to load up on the chart. The code doesn't flag it as a 'complex script' in the editor. But I have been getting an error warning on the chart in regards to it- I'm not sure what it means or how to fix it. Here is the error and the indicator code:
"Color parameter outside of expected range: Green"
"Color parameter outside of expected range: Green"
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, 1-2, 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));