Welcome to NexusFi: the best trading community on the planet, with over 150,000 members Sign Up Now for Free
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 for basic access, or support us by becoming an Elite Member -- see if you qualify for a discount below.
-- Big Mike, Site Administrator
(If you already have an account, login at the top of the page)
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.
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.
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?
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?
If you call the instrument TBP, the continuous futures contract would be referenced as TBP ##-##. To add that instrument you would use
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.
@ 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.