Go Back   NinjaTrader Support Forum > NinjaTrader 7 > General Development

General Development General NinjaScript development questions.

Reply
 
Thread Tools Display Modes
Old 10-03-2010, 05:31 AM   #1
kkgeorge
Junior Member
 
Join Date: Jul 2010
Posts: 2
Thanks: 0
Thanked 0 times in 0 posts
Default Adding master instruments programatically

Hi,

Is there a way to programatically add a master instrument? I can't use the "Import stock symbol list" menu as what I need to add a a whole bunch of instruments (1000+) of type index.

Thanks,
--kkg
Last edited by kkgeorge; 10-03-2010 at 05:31 AM. Reason: Modified title.
kkgeorge is offline  
Reply With Quote
Old 10-03-2010, 08:07 AM   #2
Sleeping Troll
Senior Member
 
Join Date: Mar 2010
Location: Tampa, FL
Posts: 186
Thanks: 0
Thanked 3 times in 1 post
Default

Add() does that however 6.5 does not support multiple instruments 7.0 however does.
Sleeping Troll is offline  
Reply With Quote
Old 10-03-2010, 12:58 PM   #3
NinjaTrader_Austin
NinjaTrader Customer Service
 
NinjaTrader_Austin's Avatar
 
Join Date: Jun 2009
Location: Denver, CO
Posts: 3,149
Thanks: 10
Thanked 94 times in 83 posts
Default

kkgeorge, unfortunately this is not possible.
NinjaTrader_Austin is offline  
Reply With Quote
Old 10-03-2010, 11:26 PM   #4
kkgeorge
Junior Member
 
Join Date: Jul 2010
Posts: 2
Thanks: 0
Thanked 0 times in 0 posts
Default

Thanks for the response. I solved the problem in a different manner.

What I did was to create a file called Instruments.txt with the list of all of the instruments I needed to add in the format described in c:\Program Files\NinjaTrader 7\db/Instruments.txt. Then I copied this files to 'My Documents\NinjaTrader 7\db". Restarted NinjaTrader and all my instruments got added in the manner I needed it to.

BTW in case folks are interested I was basically trying to use NinjaTrader with NSE stocks. The point to note is that if you add it as InstrumentType Stock, you will see that no data gets downloaded. Instead if we create all of the stocks with InstrumentType set to Index, data gets downloaded without any issues. Now I needed a way to bulk load all of the NSE stock symbols in and that is why I asked the question on how to modify the InstrumentType. Using the method I described in my previous para, I have not most of the symbols loaded and historical data is getting downloaded as I write this.

Hopefully other folks will find this interesting.

BTW in case any of the NinjaTrader developers are listening, the InstrumentManager interface(s) needs dramatic improvements. I in general like NinjaTrader but the InstrumentManager UI needs dramatic improvement.
--kkg
kkgeorge is offline  
Reply With Quote
Old 02-06-2011, 02:22 PM   #5
freewind
Senior Member
 
Join Date: Jan 2010
Posts: 306
Thanks: 23
Thanked 6 times in 3 posts
Default

Thanks kkgeorge you saved my day and night :-)
freewind is offline  
Reply With Quote
Old 10-11-2011, 02:54 AM   #6
Iceman03
Member
 
Join Date: Mar 2009
Posts: 46
Thanks: 0
Thanked 0 times in 0 posts
Default

Hi I was wondering if there is a way to change the symbol mapping for a group of stocks (eg CBA-ASX in the way kkgeorge has updated his instrument list?
Iceman03 is offline  
Reply With Quote
Old 10-11-2011, 03:44 AM   #7
NinjaTrader_Bertrand
NinjaTrader Customer Service
 
NinjaTrader_Bertrand's Avatar
 
Join Date: Sep 2008
Location: Germany
Posts: 26,199
Thanks: 487
Thanked 1,840 times in 1,781 posts
Default

David, you could modify the instruments.txt file for the mappings as outlined by the earlier post, but we would not be able to offer support for those approaches unfortunately.
NinjaTrader_Bertrand is offline  
Reply With Quote
Old 10-11-2011, 04:20 AM   #8
Iceman03
Member
 
Join Date: Mar 2009
Posts: 46
Thanks: 0
Thanked 0 times in 0 posts
Default

Thanks for your respone
Iceman03 is offline  
Reply With Quote
Old 10-14-2011, 02:20 AM   #9
Iceman03
Member
 
Join Date: Mar 2009
Posts: 46
Thanks: 0
Thanked 0 times in 0 posts
Default

Hi Bertrand
I know you said that you can't provide support for this approach but it's just not feasible for me to import 2500 ASX stocks one by one, since the esignal mapping has a "-" which the import utility won't accept.

Could you just confirm whether the symbol mapping is stored in the "instruments txt" file, as I can't find anything in there regards to symbol mapping or is it actually stored in the "NinjaTrader.sdf" file?

Thanks in Advance
Iceman03 is offline  
Reply With Quote
Old 10-14-2011, 02:27 AM   #10
NinjaTrader_Bertrand
NinjaTrader Customer Service
 
NinjaTrader_Bertrand's Avatar
 
Join Date: Sep 2008
Location: Germany
Posts: 26,199
Thanks: 487
Thanked 1,840 times in 1,781 posts
Default

It's stored in the Instruments.txt file, please make a copy of it and open it up in your favorite text editor, then go to the second section named 'Instruments' - the formatting setup including the sequence of brokerage / technology mapping names is outlined then.
NinjaTrader_Bertrand is offline  
Reply With Quote
Old 10-14-2011, 03:55 AM   #11
Iceman03
Member
 
Join Date: Mar 2009
Posts: 46
Thanks: 0
Thanked 0 times in 0 posts
Default

Hi Bertrand

I did look in the 2nd section "Instruments" however all it says in there about the mapping is
" ** external mappings are defaulted to TradeStation instruments"

I have been able to add the instruments by typing

WPLASX ; ; US Equities RTH ; 1 ; 0; ; 7; 1; 0.001; http://finance.yahoo.com/q?s=aa; Asx; 28; ,,-,,,,,,-,-,,-,-,-,-,,,,-,,,-,-; WPL-ASX

but the mapping and tick size does not change?

Also where can I find ( Cbi.CurrencyId) ?
Iceman03 is offline  
Reply With Quote
Old 10-14-2011, 04:04 AM   #12
NinjaTrader_Bertrand
NinjaTrader Customer Service
 
NinjaTrader_Bertrand's Avatar
 
Join Date: Sep 2008
Location: Germany
Posts: 26,199
Thanks: 487
Thanked 1,840 times in 1,781 posts
Default

That's not correct, it explicitly lists the sequence of brokernames and where you would need to add eSignal mapping then (the map itself would need to be looked up of course in the eSignal symbol guide on their webpage). Once you have changed the file, you would need to reset instruments under Tools > Options > Data to 'sync' those changes in. After that step, please restart NT7.

As this is completely unsupported territory, the currency id is not documented - 7 would be the USD, 3 the Euro and 1 the GBP.
NinjaTrader_Bertrand is offline  
Reply With Quote
Old 10-14-2011, 06:14 AM   #13
Iceman03
Member
 
Join Date: Mar 2009
Posts: 46
Thanks: 0
Thanked 0 times in 0 posts
Default

Sorry I didn't realize broker names meant that's where you put symbol mapping. That works great and it has saved me lots of time.

One last question, could you please tell me the Cbi.CurrencyId for Australian and Hong Kong Exchange Rates?
Iceman03 is offline  
Reply With Quote
Old 10-14-2011, 06:17 AM   #14
NinjaTrader_Bertrand
NinjaTrader Customer Service
 
NinjaTrader_Bertrand's Avatar
 
Join Date: Sep 2008
Location: Germany
Posts: 26,199
Thanks: 487
Thanked 1,840 times in 1,781 posts
Default

Glad to hear that David:

AUD : 0
HKD : 4
NinjaTrader_Bertrand is offline  
Reply With Quote
Old 10-14-2011, 06:26 AM   #15
Iceman03
Member
 
Join Date: Mar 2009
Posts: 46
Thanks: 0
Thanked 0 times in 0 posts
Default

Thanks again you were a big help
Iceman03 is offline  
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Master Market Clock tderrick Platform Technical Support 2 03-11-2010 09:35 AM
Master Instrument Help Needed Nillie Platform Technical Support 2 10-28-2009 06:42 PM
Accidentally delete one Master Instruments jimmyye Platform Technical Support 1 08-20-2009 10:16 AM
Deleting a master instrument would delete all instruments in the instrument list. clearpicks Platform Technical Support 11 05-13-2008 12:00 PM


All times are GMT -6. The time now is 02:11 AM.

Futures, foreign currency and options trading contains substantial risk and is not for every investor. An investor could potentially lose all or more than the initial investment. Risk capital is money that can be lost without jeopardizing ones financial security or lifestyle. Only risk capital should be used for trading and only those with sufficient risk capital should consider trading. Past performance is not necessarily indicative of future results. View Full Risk Disclosure.

CFTC Rules 4.41 - Hypothetical or Simulated performance results have certain limitations, unlike an actual performance record, simulated results do not represent actual trading. Also, since the trades have not been executed, the results may have under-or-over compensated for the impact, if any, of certain market factors, such as lack of liquidity. Simulated trading programs in general are also subject to the fact that they are designed with the benefit of hindsight. No representation is being made that any account will or is likely to achieve profit or losses similar to those shown.

This website is hosted and operated by NinjaTrader, LLC (“NT”), a software development company which owns and supports all proprietary technology relating to and including the NinjaTrader trading platform. NT is an affiliated company to NinjaTrader Brokerage (“NTB”), which is a NFA registered introducing broker (NFA #0339976) providing brokerage services to traders of futures and foreign exchange products. This website is intended for educational and informational purposes only and should not be viewed as a solicitation or recommendation of any product, service or trading strategy. No offer or solicitation to buy or sell securities, securities derivative or futures products of any kind, or any type of trading or investment advice, recommendation or strategy, is made, given, or in any manner endorsed by any NT affiliate and the information made available on this Web site is not an offer or solicitation of any kind. Specific questions related to a brokerage account should be sent to your broker directly. The content and opinions expressed on this website are those of the authors and do not necessarily reflect the official policy or position of NT or any of its affiliates. 

Vendors along with their websites, products and services, collectively referred to as (“Vendor Content”), are independent persons or companies that are in no manner affiliated with NT or any if its affiliates. NT or any of its affiliates are not responsible for, do not approve, recommend or endorse any Vendor Content referenced on this website and it’s your sole responsibility to evaluate Vendor Content. Please be aware that any performance information provided by a vendor should be considered hypothetical and must contain the disclosures required by NFA Rule 2-29(c). If you are interested in learning more about, or investigating the quality of, any such Vendor Content you must contact the vendor, provider or seller of such Vendor Content. No person employed by, or associated with, NT or any of its affiliates is authorized to provide any information about any such Vendor Content. Visit the CFTC resources for education regarding the industry and signs of fraud.