The first one loads tick data in the OnMarketData function.
The other one loads tick data with a BarsRequest.
However, the indicator looked different when I compared the 2 different approaches, so I tried to find a bug in my code.
After I was not able to find a bug, I exported the incoming tick data as is with a simple Print. I would like to point out that I did not change the tick data, I just exported it as is.
The format of the export was like this: dateTime, price, volume, ask, bid.
Then I compared the roughly 100k ticks in Notepad++ with the compare function.
The result is that the tick data is 99,9% similar. However, there are some random differences, which are very weird.
Sometimes each approach has some ticks which the other on does not. And sometimes the ticks are even different.
For example the 6L Future with OnMarketData has the following tick data which the BarsRequest has not.
29.03.2022 15:30:06 0,2081 1 0,20815 0,2081
This is very weird because 15:30 is the middle of the day. I was rather expecting ticks to miss in the middle of the night or when the market is closed.
I then thought that it may be a bug in the Ninja Trader local database, so I deleted the local database and tried it again. However the same differences occur.
I really think this is a bug in those two functions OnMarketData and BarsRequest.
Comment