Invalid instrument - futures io
futures io



Invalid instrument


Discussion in NinjaTrader

Updated
    1. trending_up 2,657 views
    2. thumb_up 3 thanks given
    3. group 3 followers
    1. forum 9 posts
    2. attach_file 0 attachments




Welcome to futures io: the largest futures trading community on the planet, with well over 125,000 members
  • Genuine reviews from real traders, not fake reviews from stealth vendors
  • Quality education from leading professional traders
  • We are a friendly, helpful, and positive community
  • We do not tolerate rude behavior, trolling, or vendors advertising in posts
  • We are here to help, just let us know what you need
You'll need to register in order to view the content of the threads and start contributing to our community.  It's free and simple.

-- Big Mike, Site Administrator

(If you already have an account, login at the top of the page)

 
Search this Thread
 

Invalid instrument

(login for full post details)
  #1 (permalink)
Mondrakete
Germany
 
 
Posts: 24 since Feb 2011
Thanks: 1 given, 0 received

Hi,

does anybody know how to work around that NT-bug?

The strategy 'xxx' has called the Add() method with an invalid instrument. Either 'TBP_Daily ##-##' does not exist in the Instrument Manager or the specified exchange has not been configured.

That's the message that comes up when I try to run a multiple timeframe script using (successfully) imported futures data
within selfcreated instruments.

NT Support said this is a current NT-limitation and has to do with the name of the instrument.
However, the above error came up when trying suggestions of the support.

How do you guys handle this?

Thanks in advance!

Reply With Quote

Can you help answer these questions
from other members on futures io?
Is there inherently more opportunity in smaller markets?
Traders Hideout
Experience with AGN (Introducing Broker)
Brokers
TD Sequential for NT or MW?
Platforms and Indicators
TradingView help in improving Anchored Vwap
Platforms and Indicators
1 min chart v-shape scan help please
ThinkOrSwim
 
 
(login for full post details)
  #2 (permalink)
 bukkan 
Calcutta, India
 
Experience: Intermediate
Platform: ArthaChitra
 
Posts: 278 since Jun 2009
Thanks: 161 given, 269 received

configure the instrument properly. particularly make sure the you have assigned the proper exchange. in the indicator make sure the string name matches with the instrument name exactly.

likely error, you have marked the instrument as a stock in the instrument manager.

Reply With Quote
 
(login for full post details)
  #3 (permalink)
 Fat Tails 
Berlin, Europe
 
Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker: Interactive Brokers
Trading: Keyboard
 
Fat Tails's Avatar
 
Posts: 9,858 since Mar 2010
Thanks: 4,238 given, 26,770 received



Mondrakete View Post
Hi,

does anybody know how to work around that NT-bug?

The strategy 'xxx' has called the Add() method with an invalid instrument. Either 'TBP_Daily ##-##' does not exist in the Instrument Manager or the specified exchange has not been configured.

That's the message that comes up when I try to run a multiple timeframe script using (successfully) imported futures data
within selfcreated instruments.

NT Support said this is a current NT-limitation and has to do with the name of the instrument.
However, the above error came up when trying suggestions of the support.

How do you guys handle this?

Thanks in advance!

The name TPB_Daily ##-## is really strange. ##-## is used to identify continuous futures contracts. But I do not know any futures contract with the symbol TPB or TPB_Daily. Also NinjaTrader does not have such a thing as Symbol_Daily, so no wonder that it is not working.

What data do you want to add for which contract or stock?

Reply With Quote
 
(login for full post details)
  #4 (permalink)
Mondrakete
Germany
 
 
Posts: 24 since Feb 2011
Thanks: 1 given, 0 received

The instrument is self created.
It contains historical daily data of a continuous futures contract successfully imported from a txt-File.
The symbol is used for backtesting only.
Here are the settings that I made in the instrument manager:
type: future
Exchange: CBOE, also tried default, both didn't work
currency: US-Dollar
instrument name: TBP_DAILY

When referencing the future instrument within a script according to NT support the date must be included .
In my case this would be TBP_Daily ##-##.

@ bukkan: What's the proper instrument configuration in my case?
Which role does the exchange selection play?

Reply With Quote
 
(login for full post details)
  #5 (permalink)
 Fat Tails 
Berlin, Europe
 
Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker: Interactive Brokers
Trading: Keyboard
 
Fat Tails's Avatar
 
Posts: 9,858 since Mar 2010
Thanks: 4,238 given, 26,770 received

If you call the instrument TBP, the continuous futures contract would be referenced as TBP ##-##. To add that instrument you would use

 
Code
Add ("TBP ##-##", PeriodType.Day, 1);
I still do not see, how to use that TBP_Daily.

By the way, continuous futures contracts cannot be used for backtesting, as the data streams are synthetically spliced and do not reflect anything. The correct contract for backtesting would be a mergebackadjusted contract, because

-> it automatically compensates for gains and losses on rolling positions (just need to add transaction cost and slippage once per month)
-> profits and losses encountered are exactly those that you would have experienced when trading the front month

Backtesting on a continuous futures contract distorts all (!) profits and losses and also does not account for rollover gains or losses.

Reply With Quote
The following user says Thank You to Fat Tails for this post:
 
(login for full post details)
  #6 (permalink)
 bukkan 
Calcutta, India
 
Experience: Intermediate
Platform: ArthaChitra
 
Posts: 278 since Jun 2009
Thanks: 161 given, 269 received

Mondrakete,
rename the text file as TBP_Daily ##-##.txt (mind the space) and then re-import the same.

Reply With Quote
 
(login for full post details)
  #7 (permalink)
Mondrakete
Germany
 
 
Posts: 24 since Feb 2011
Thanks: 1 given, 0 received

@ bukkan
I just did it like that. But I called it in the script as weekly data since it's multi time frame.
I am able to call the instrument when viewing the imported data within charts. So, data are successfully imported into the instrument.
However, when I try to add those instruments within Initialize() the script compiles, but gives an error message
when executing it. NT Support told me this is due to a current limitation that has to do with the name of the custom instrument. However, their suggestions didn't work eighter till now. May be there is still another error I'm not aware of at the moment-what about the exchange, what would be a "wrong" setting? May be it's the symbol map settings. May be it's the setting as continious contract. I don't know.

@ Fat Tails
In this case it is a backadjusted-merged continious contract.
I will also test with nonadjusted merged contracts. For doing so, I will exit on day before rollover and entry again
after rollover. Those imported data within custom instruments are for backtesting huge data histories.
Adding transactions costs once a month only makes sence if rollover takes place once a month, right?
There are quite a few futures that are traded with 4 front months only.

Reply With Quote
 
(login for full post details)
  #8 (permalink)
 bukkan 
Calcutta, India
 
Experience: Intermediate
Platform: ArthaChitra
 
Posts: 278 since Jun 2009
Thanks: 161 given, 269 received

I created a dummy file and tested the same. seems its case sensitive. use TBP_DAILY ##-## as the instrument name instead of TBP_Daily ##-##

Reply With Quote
The following 2 users say Thank You to bukkan for this post:
 
(login for full post details)
  #9 (permalink)
Mondrakete
Germany
 
 
Posts: 24 since Feb 2011
Thanks: 1 given, 0 received


bukkan View Post
I created a dummy file and tested the same. seems its case sensitive. use TBP_DAILY ##-## as the instrument name instead of TBP_Daily ##-##

Thank you very much. That was it.
Now it works.

Reply With Quote
 
(login for full post details)
  #10 (permalink)
 Fat Tails 
Berlin, Europe
 
Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker: Interactive Brokers
Trading: Keyboard
 
Fat Tails's Avatar
 
Posts: 9,858 since Mar 2010
Thanks: 4,238 given, 26,770 received



Mondrakete View Post
@ Fat Tails In this case it is a backadjusted-merged continious contract.
I will also test with nonadjusted merged contracts. For doing so, I will exit on day before rollover and entry again
after rollover. Those imported data within custom instruments are for backtesting huge data histories.
Adding transactions costs once a month only makes sence if rollover takes place once a month, right?
There are quite a few futures that are traded with 4 front months only.

Correct.

I had CL in mind, because I had rolled it today.

Of course, index futures are only rolled once per quarter.

Reply With Quote


futures io Trading Community Platforms and Indicators NinjaTrader > Invalid instrument


Last Updated on June 17, 2011


Upcoming Webinars and Events
 

NinjaTrader Indicator Challenge!

Ongoing
 

Our 12-year anniversary w/ $$,$$$ prizes (check soon)

August
     



Copyright © 2021 by futures io, s.a., Av Ricardo J. Alfaro, Century Tower, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada), info@futures.io
All information is for educational use only and is not investment advice.
There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
no new posts