Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

SampleMultiInstrument getting in the way

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    SampleMultiInstrument getting in the way

    I'm trying to run my custom strategy and I can't run it because the SampleMultiInstrument strategy won't compile because on line 39 it has

    Add("ES 12-08", PeriodType.Minute, 1);

    and the error I'm getting is

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

    And I'm just trying to run data back to 6/1 to 6/9 so I'm stuck...

    Later...

    Well, I figured out that if I added the 12/08 ES instrument manager I'd get past it. Still, probably not a good idea to hard-code things like that in your sample scripts, especially since you can't move forward with your own strategies without fixing it.

    #2
    Had that same problem, although it didn't stop my compilation, just keeps kicking out that error in the log file every time I load my strats.

    Ross

    Comment


      #3
      To clarify:
      - that issue definitely will not prevent you from compiling, since the error message is a runtime error message thrown in the NT logs
      - it's a hard coded sample to illustrate how you would add future+their expriy in your custom strategy which you could edit
      - we will amend the sample with next update.

      Thanks

      Comment


        #4
        Well, when I try to back test a strategy, nothing happens, and I see this error in the log so I assume the reason my back testing is not doing anything is because of this error.

        I am on the free version of Ninja, using ZenFire (also a demo acct). Does the Zen demo account not support back testing? I can see live data just fine with it.

        Comment


          #5
          Where are you attempting to backtest your strategy shodson? Have you tried the per default installed 'SampleMACrossOver' strategy? You would need to be connected live to do this from the Chart or the Strategies tab.

          BertrandNinjaTrader Customer Service

          Comment


            #6
            Originally posted by NinjaTrader_Dierk View Post
            To clarify:
            - that issue definitely will not prevent you from compiling, since the error message is a runtime error message thrown in the NT logs
            - it's a hard coded sample to illustrate how you would add future+their expriy in your custom strategy which you could edit
            - we will amend the sample with next update.

            Thanks
            That is exactly what I'm saying: it's a runtime and not a compile. Please try this:
            - edit SampleMultiInstrument
            - right click->Save as: set a name of your choice
            - edit that freshly created custom strategy and set an instrument of your liking
            - backtest that strategy

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by DJ888, 04-16-2024, 06:09 PM
            6 responses
            18 views
            0 likes
            Last Post DJ888
            by DJ888
             
            Started by Jon17, Today, 04:33 PM
            0 responses
            1 view
            0 likes
            Last Post Jon17
            by Jon17
             
            Started by Javierw.ok, Today, 04:12 PM
            0 responses
            6 views
            0 likes
            Last Post Javierw.ok  
            Started by timmbbo, Today, 08:59 AM
            2 responses
            10 views
            0 likes
            Last Post bltdavid  
            Started by alifarahani, Today, 09:40 AM
            6 responses
            41 views
            0 likes
            Last Post alifarahani  
            Working...
            X