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 CortexZenUSA, Today, 12:53 AM
|
0 responses
1 view
0 likes
|
Last Post
by CortexZenUSA
Today, 12:53 AM
|
||
Started by CortexZenUSA, Today, 12:46 AM
|
0 responses
1 view
0 likes
|
Last Post
by CortexZenUSA
Today, 12:46 AM
|
||
Started by usazencortex, Today, 12:43 AM
|
0 responses
5 views
0 likes
|
Last Post
by usazencortex
Today, 12:43 AM
|
||
Started by sidlercom80, 10-28-2023, 08:49 AM
|
168 responses
2,266 views
0 likes
|
Last Post
by sidlercom80
Today, 12:05 AM
|
||
Started by Barry Milan, Yesterday, 10:35 PM
|
3 responses
13 views
0 likes
|
Last Post Yesterday, 11:58 PM |
Comment