I'm using NT7 and coded a program to import historical and real time trade data from arbitrary sources.
In my specific case I created a new instrument and made sure that "save chart data as historical" is on. Then I downloaded the trade history from Bitstamp's API (a Bitcoin exchange), opened a new chart with my BTCUSD instrument and insert the data via the DLL interface (NinjaTrader.Client.dll) via LastPlayback(string instrument, double price, int size, string timestamp). This works with real time data.
Everything works fine, the data is displayed and saved, but there are three problems I want to solve:
1. NT generates and saves tick and minute data, but no day data. I know I could export the historical data and reimport it or set the time period to 1440 minutes, but I'd like to know, if there is another solution without user input.
2. When the data for a specific timestamp already exists and I run the data import again, LastPlayback() ignores the timestamp and uses the last available historical tick timestamp. This results in the undesired outcome, that duplicates are created, but even worse: with a very wrong timestamp. Is there a way to check, if a specific data record is already present?
3. This isn't a big deal at all, but nice to have. A single trade could look like "Amount: 0.000023 BTC, Price: 136,23 $" for example, but only integer numbers are allowed as order size. I multiplied the amount by one million, so I don't loose any data, but the volume data is now shifted. Is there a way to adjust that, i.e. tell NT that 1 volume point = 0,000001?
Have a great day!
Comment