On the Daily charts, NT8 is plotting data on a candle it should not be plotting.
To replicate the issue, I created a simple indicator. Here I am setting the output value to the close of the candle only if the year of the candle is 2020.
protected override void OnBarUpdate() { // Set (display) the closing price of each candle only if the year is 2020 if( Time[0].Year == 2020 ) { Print(string.Format("Setting Result for {0}.", Time[0].ToString("yyyy.MM.dd HH:mm:ss"))); Result[0] = Close[0]; } }
However, I noticed that NT8 is plotting output for the previous candle (31-Dec-2019) before the first candle of 2020 (02-Jan-2020). In the trace window I cannot see the output message for 31-Dec-2019, so how is the indicator setting the output for 31-Dec-2019 ?
The problem can also be seen on the Monthly chart, where you can see the value of Dec-2019 candle being set.
It works correctly for lower time-frames like H1 (e.g. EURUSD H1 or M15 using FXCM) and seems to be an issue with Daily and higher time-frames.
Is this a bug ? Am I doing something wrong ?
I have attached the test indicator.
Steps to reproduce -
1) Connect to Kinetick data-feed.
2) Open AAPL Daily chart, set Days to Load to 365.
3) Now attach the indicator to the chart.
4) Notice the yellow output is also set on 31-Dec-2019 when it should NOT be set.
I am using NT8 8.0.21.1 (64-bit) on Windows 10. I am based in India (GMT +5:30), but I don't think that should matter.
Comment