Hello all,
I'm trying to put a moving average on an indicator I made but seem to have some trouble with it. For some reason it draws a straight line accros the indicator chart. I have placed the following code at the end of the indicator to use iMA on array calculation, but for some reason i can't get it to run the line correctly.
//----caluclate trigger MA
ArraySetAsSeries(force, true);
triggerline[i] = iMAOnArray(force,0,MA,0,MODE_EMA,0);
Can anyone help? The rest of the indicator is cacluating correctly and drawing the histogram I asked it to do, but for some reason the above code only draws a straight line.
I'm trying to put a moving average on an indicator I made but seem to have some trouble with it. For some reason it draws a straight line accros the indicator chart. I have placed the following code at the end of the indicator to use iMA on array calculation, but for some reason i can't get it to run the line correctly.
//----caluclate trigger MA
ArraySetAsSeries(force, true);
triggerline[i] = iMAOnArray(force,0,MA,0,MODE_EMA,0);
Can anyone help? The rest of the indicator is cacluating correctly and drawing the histogram I asked it to do, but for some reason the above code only draws a straight line.