In 7 versions this was done by editing the "Instruments.txt" file
Announcement
Collapse
Looking for a User App or Add-On built by the NinjaTrader community?
Visit NinjaTrader EcoSystem and our free User App Share!
Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less
Partner 728x90
Collapse
NinjaTrader
Programmatically add a new instrument
Collapse
X
-
Hello vladko,
It is not supported to programmatically add an instrument to the NinjaTrader database in either NinjaTrader 7 or NinjaTrader 8.
I will submit a feature request on your behalf to allow instruments to be created from a NinjaScript.
This thread will remain open for any community members who may know of an unsupported way to achieve this and would like to share.Chelsea B.NinjaTrader Customer Service
-
Hi Chelsea,
I understand there is no proper customer support for this, but in an old NT7 thread, the adding of instruments in bulk was discussed as possible and efficient - using the intstruments.txt file.
See the thread here: http://ninjatrader.com/support/forum...ad.php?t=34232
I sorely miss such a feature and hope that maybe this is still an option in NT8, but I do not have the instruments.txt file format specs so that I could try it.
Could you please shed some light here?
Many thanks,
Libor
Comment
-
Hello Libor,
This method was not supported by NinjaTrader Support to do for NinjaTrader 7.
That said, the Instruments.txt file is no longer used for NinjaTrader 8. Instead these settings are read from the NinjaTrader.sdf file in the Program Files directory.
vladko,
I failed to provide you with a tracking ID for you feature request.
For future reference your request to allow instruments to be inserted into the NinjaTrader database via NinjaScript is being tracked with ID #SFT-1849.
Please note, it is up to the NinjaTrader Development to decide if and when a request will be implemented.
That said, I was working in a completely different area and might have found some undocumented and 100% unsupported code that might make this happen for you.
Code:Account.All.First(a=> a.Name == "Sim101").Connection.ResolveSymbol("TestSymbol1", InstrumentType.Stock, Exchange.Default, NinjaTrader.Core.Globals.MaxDate, 0, OptionRight.Unknown, true, (resolvedInstrument, errorCode, errMsg, o) => { resolvedInstrument.MasterInstrument.TickSize = 0.01; }, null);
Last edited by NinjaTrader_ChelseaB; 10-31-2019, 11:10 AM.Chelsea B.NinjaTrader Customer Service
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by cls71, Today, 04:45 AM
|
0 responses
1 view
0 likes
|
Last Post
by cls71
Today, 04:45 AM
|
||
Started by mjairg, 07-20-2023, 11:57 PM
|
3 responses
213 views
1 like
|
Last Post
by PaulMohn
Today, 04:22 AM
|
||
Started by TheWhiteDragon, 01-21-2019, 12:44 PM
|
4 responses
544 views
0 likes
|
Last Post
by PaulMohn
Today, 04:09 AM
|
||
Started by GLFX005, Today, 03:23 AM
|
0 responses
3 views
0 likes
|
Last Post
by GLFX005
Today, 03:23 AM
|
||
Started by XXtrader, Yesterday, 11:30 PM
|
2 responses
12 views
0 likes
|
Last Post
by XXtrader
Today, 03:07 AM
|
Comment