@fxdreema said in Possible bug in positioning candle in 'future' candles:
I tried this: https://fxdreema.com/shared/OuUNxlf3d And I got an error "array out of range" when the EA tried to get value from future candle. It's because there is no data about the future candle, it doesn't exist. I believe that the Time attribute is like Open, High, Close, Low and Volume, it's connected with the candle, and with no candle there are no attributes.
You can get the time of the current candle, because that time is rounded, and add seconds to it. The time is the number of seconds since 1.1.1970. Look at this: https://www.epochconverter.com/ The "Comment" block may draw human readable version of the time, but in reality it is an integer number.
Here is another example: https://fxdreema.com/shared/wreYKAEL
I use that "shift in time" feature, but instead of using fixed number of minutes, I use Period(). It returns the number of minutes for the current period. If the period is M15, it returns 15. So that way you can put the EA on different period and it will show you the time of the non-existent future candle. You can use 1 * Period() or 2 * Period() or MyVariable * Period(). Even _Period should work instead of Period().
i just tried on draw vertical line on Period() as per your 'comment' block but on 'draw line' block: 0_1572963836008_3bd04fa4-9842-4369-a6f6-ec194341fabd-image.png and cant draw line on both historical data and future data... @fxdreema please help?