if yes did you test :
for(int i=88; i>=0; i--) LineBuffer[i]=iMA(_Symbol,_Period,periodi,0,MODE_SMA,PRICE_CLOSE,i);
fly7680:
I am creating an indicator that draws a buffer line on the moving average values but the buffer is not written to the graph.
instead if I use the data of the High Value Bars, the buffer is written without problems
You'll need two more lines in your OnInit() function, as follows:
// So that LineBuffer[0] refers to the latest, rather than the earliest, bar. ArraySetAsSeries(LineBuffer,true); // With the above set, the left end of the line drops vertically to zero, // so you need this to indicate that you don't want zero values to be drawn. PlotIndexSetDouble(0,PLOT_EMPTY_VALUE,0);
These should fix your problems.
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
I am creating an indicator that draws a buffer line on the moving average values but the buffer is not written to the graph.
instead if I use the data of the High Value Bars, the buffer is written without problems