I have it linked to this code;
if(upCloseArrowEnableM15 && tenkan_senValueM151 > kijun_sen_ValueM151 && tenkan_senValueM152 <= kijun_sen_ValueM152) { buffer3[i] = iLow(Symbol(),PERIOD_M15, i) - distance * Point; if(i == 0 && IsCrossNewBarM15() )
but when I go to higher timeframes, other arrows are their from other timeframes too
https://docs.mql4.com/constants/objectconstants/visible
example above buffer will visible on M15 or H1 only.
I read this, as I said in my original post, but I don't understand how it works with buffers.
Can you give me an example with buffers?
https://docs.mql4.com/constants/objectconstants/visible
example above buffer will visible on M15 or H1 only.
That is for Objects not Buffers
That is for Objects not Buffers
You don't need to. You just need 4 buffers.
In OnInit check the chart period and set up the 4 buffers accordingly.
In OnCalculate, again check the period and only calculate the values for the buffers relevant to the chart time-frame.

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
So I have 16 buffers currently on this indicator, 4 for 4 different timeframes.
I want 4 to appear only on one timeframe, 4 on another, etc..
Below is the code for the 15 min arrows. I've read about SetIndexBuffer, and ObjectSetInteger, but can't figure out how to apply them to these.
All the examples use ObjectCreate, or something else. I've not seen any that use buffers.
Do I need to change all of them to Objects, or is there a way of doing it with buffers?