- Of course, it is.
- Your code only draws two (2) objects.
-
Your loop appears to index as non-series. Your Low/Close/Time access is as-series. Decide which way and adjust to match.
How to do your lookbacks correctly #9 — #14 & #19You can't use an as-series index in object names as they are not unique. As soon as a new bar starts, you will be trying to create a new name (e.g. "name0"), same, existing, previous, name (e.g. “name0” now on bar one.)
Use time (as int) or a non-series index:
#define SERIES(I) (Bars - 1 - I) // As-series to non-series or back.
- Of course, it is.
- Your code only draws two (2) objects.
-
Your loop appears to index as non-series. Your Low/Close/Time access is as-series. Decide which way and adjust to match.
How to do your lookbacks correctly #9 — #14 & #19You can't use an as-series index in object names as they are not unique. As soon as a new bar starts, you will be trying to create a new name (e.g. "name0"), same, existing, previous, name (e.g. “name0” now on bar one.)
Use time (as int) or a non-series index:
- Of course, it is.
- Your code only draws two (2) objects.
-
Your loop appears to index as non-series. Your Low/Close/Time access is as-series. Decide which way and adjust to match.
How to do your lookbacks correctly #9 — #14 & #19You can't use an as-series index in object names as they are not unique. As soon as a new bar starts, you will be trying to create a new name (e.g. "name0"), same, existing, previous, name (e.g. “name0” now on bar one.)
Use time (as int) or a non-series index:
i think, i got it.. thanks a lot for the reply and the help.
Don't double post! You already had this thread open.
General rules and best pratices of the Forum. - General - MQL5 programming forum (2017)
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
hi, all.
is it possible to draw objects in indicator by not using the buffers, like in the sample code below?
please help and thank you.