dasilvja: I just want to use the buffer so that when I hover my mouse over a candle it will show me the local time in the data window.
Will not be possible with buffers, because all Indicator buffers are of the "double" data-type and cannot take a "datetime" data-type. So you can only "pop-up" floating point values, and not dates & times.
The only alternative would be use Chart Events and Graphic Objects, which I am sure is not quite what you want to learn.
Indicator buffers only show as doubles in the data window. You cant' have them display a time.
- You use the buffer property to state how many visual buffers you want.
- You use indicatorBuffers to state how many additional (non-visual) buffers you want.
- You use SetIndicatorBuffer to display a price (double) array.
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
Everybody learns differently. I have access to YouTube and these forums and I even have the "Expert Advisor Programming for MT4" book that I refer to. It seems like nonsense that I would still struggle to understand such a basic concept. I know that. But that's all this is, is my lack of understanding. This isn't a scam to get someone to write code for me... despite the fact that I'm about to ask you to write a little code for me.
I'm struggling to understand IndicatorBuffers(). As I understand it, I use IndicatorBuffers(1) to say that I want 1 array of data in this indicator. I just want to use the buffer so that when I hover my mouse over a candle it will show me the local time in the data window. I'm not trying to draw anything on the chart or anything like that. I just want it to exist in a buffer so I can see it in the data window. I read that I have to use TimeLocal() but obviously not totally clear on how to use that either. I use MQL Docs and I see the different examples of its use and despite all that I keep getting errors. The error for the code below is:
" 'SetIndexBuffer' - no one of the overloads can be applied to the function call"
I would really appreciate if someone could just provide the code that accomplishes what I'm aiming to do. Seeing a clear example this way is an immeasurable help to me. And if you choose to write a few useful comments in there, I wouldn't complain. Thanks in advance!