@rocktheedge
Since you removed the post I'm assuming it actually does work. In the attached version, I moved the indicator buffers mapping to the top of OnInit instead of the bottom.
Since you removed the post I'm assuming it actually does work. In the attached version, I moved the indicator buffers mapping to the top of OnInit instead of the bottom.
Inserted Code
int OnInit()
{
// Indicator buffers mapping:
SetIndexBuffer(0, ExtMapBuffer1);
SetIndexBuffer(1, ExtMapBuffer2);
SetIndexBuffer(2, ExtMapBuffer3);
int draw_begin;
string short_name;
if (MA_Period < 2)
{
Print("MA Period should be greater than 1.");
return(INIT_PARAMETERS_INCORRECT);
}
// Drawing settings:
SetIndexShift(0, MA_Shift);
SetIndexShift(1, MA_Shift);
SetIndexShift(2, MA_Shift);
IndicatorDigits(_Digits);
draw_begin = MA_Period - 1;
// Indicator short name:
switch(MA_Method)
{
case MODE_SMA : short_name = "Band SMA("; break;
case MODE_EMA : short_name = "Band EMA("; draw_begin = 0; break;
case MODE_SMMA : short_name = "Band SMMA("; break;
case MODE_LWMA : short_name = "Band LWMA(";
}
IndicatorShortName(short_name + IntegerToString(MA_Period) + ")");
SetIndexDrawBegin(0, draw_begin);
SetIndexDrawBegin(1, draw_begin);
SetIndexDrawBegin(2, draw_begin);
// Initialization done.
return(INIT_SUCCEEDED);
} Software Developer and Music Producer
News Fundamentals All Time Return:
1,159.1%
1