Looking for help with database injection in NinjaTrader - Advanced(I think)
I'm using NinjaTrader to build a fully automated trading bot. Right now the issue I'm having is that Ninjatrader doesn't auto-update stock tickers, and there is no way to bulk add new tickers, nor is there a supported way to add them programmatically. I'm currently trying to figure out how I'd add them programmatically and could use a hand.
The way I want to do it right now is to clone an Instrument that already exists - (Example: Instrument oldInstr = Instrument.GetInstrument("MOGU");) - Change the "FullName" parameter, and add the new object to the database. Unfortunately the FullName parameter is readonly, and because I haven't been able to create a unique Instrument, I can't test adding it to the database yet.
I was able to use reflection to see the methods for the objecs and I see a DbAdd function that looks like how I would add it to the DB, but it doesn't allow me to change the FullName, nor does it accept anything other than a bool. So what I'm assuming I need to do is like I said above using the DbAdd function.
As I've mentioned in previous posts, I made an addon to open a strategy automatically based on a scanner I made. One of the issues I recently noticed is that its not creating about 5% of the hits. I found the reason it's not hitting them is because the instruments don't exist in ninjatrader.
This brings me to my question, Is
Similar Threads
Continue the conversation
Join the Discord to ask follow-up questions and connect with the community
C
C#
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.