Look in the reference for IndicatorBuffers() and use its example..
#property indicator_buffers 1 int OnInit(void) { IndicatorBuffers(2); SetIndexBuffer(0,InDataWindow, INDICATOR_DATA); SetIndexBuffer(1,NotInDataWindow, INDICATOR_CALCULATIONS); ...
Thank you gooly and honest knave, I have already tried your suggestions, but I guess that i must be missing something because they still appear in the data window.
I will read through again and try to find what I am missing
What do you get in the Data Window with this?
#property strict #property indicator_chart_window #property indicator_buffers 1 double InDataWindow[], NotInDataWindow[]; int OnInit() { IndicatorBuffers(2); SetIndexBuffer(0,InDataWindow, INDICATOR_DATA); SetIndexBuffer(1,NotInDataWindow, INDICATOR_CALCULATIONS); SetIndexLabel(0,"See Me"); SetIndexLabel(1,"Don't See Me"); return(INIT_SUCCEEDED); } int OnCalculate(const int rates_total, const int prev_calculated, const datetime &time[], const double &open[], const double &high[], const double &low[], const double &close[], const long &tick_volume[], const long &volume[], const int &spread[]) { return(rates_total); }
Be aware of the difference of
#property indicator_buffers 1
and
IndicatorBuffers(2);
Thanks Guys,
I have got it now.
That was the one line that I missed
I should have saved myself a lot of frustration and asked earlier :)
IndicatorBuffers(2);
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
Hi,
I know that it must be possible, but I have been unable to find out how.
I use some buffers just for calculations that I don't really want to display in the data window.
using INDICATOR_CALCULATIONS in SetIndexBuffer seems like it may be the way to go, but as usual, the documentation is not very clear.
Can anybody please tell me how?
Thank you :)