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 GussJ, 03-04-2020, 03:11 PM
            11 responses
            3,229 views
            0 likes
            Last Post xiinteractive  
            Started by andrewtrades, Today, 04:57 PM
            1 response
            14 views
            0 likes
            Last Post NinjaTrader_Manfred  
            Started by chbruno, Today, 04:10 PM
            0 responses
            7 views
            0 likes
            Last Post chbruno
            by chbruno
             
            Started by josh18955, 03-25-2023, 11:16 AM
            6 responses
            441 views
            0 likes
            Last Post Delerium  
            Started by FAQtrader, Today, 03:35 PM
            0 responses
            12 views
            0 likes
            Last Post FAQtrader  
            Working...
            X