Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

Error on calling 'OnBarUpdate' method on bar 0

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

    #16
    I have made the changes and still have the same out of range errors.....
    Last edited by elliot5; 07-27-2016, 01:30 PM.

    Comment


      #17
      Hello everington_f,

      Please provide your updated script so I may investigate further.
      Zachary G.NinjaTrader Customer Service

      Comment


        #18
        WIth platformsupport now. Regards

        Comment


          #19
          Hello everington_f,

          I am not experiencing any out of range run-time errors with the updated script that you have provided me.

          Please completely remove the strategy and then re-add it. Once the strategy has been re-added, test once more.

          If you are still running into this run-time error:

          Can you please provide additional details on how you are testing this script on your end?

          Are you adding this strategy on a chart or through the Strategies tab of the Control Center?

          If on a chart, what are the settings that you have set in the Data Series window? You can access this by right-clicking the chart and selecting Data Series.

          Can you provide what instrument you are testing on? Can you provide the parameters that you are using for your strategy?
          Zachary G.NinjaTrader Customer Service

          Comment


            #20
            Added on a chart JPM daily 390 minutes US Equities RTH.... this time looked like it was going to work but then gave the error again after about a 20 second pause - parameters are .
            on price change
            lookback 256
            bars required 50
            immediate submit
            entries per direction 1
            unique entries

            Comment


              #21
              I have it working now having run the strategies from the strategies tab. Do you know why running from charts is problematic? Regards

              Comment


                #22
                Hello everington_f,

                I am not seeing any run-time errors occur when testing the strategy on a chart.

                What I would suggest is adding a print statement before each of your conditional statements. This way, we can narrow down what conditional statement is causing the run-time error as the print will be able to print out first before the line of code that causes the error to occur executes.

                As an example, you can place
                Code:
                Print("About to run line 125");
                before line 125. If an error appears right after that, we're able to narrow down what section's causing the error.

                Make sure that the NinjaScript Output window (New -> NinjaScript Output) is open before testing.
                Zachary G.NinjaTrader Customer Service

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by DanielSanMartin, Yesterday, 02:37 PM
                2 responses
                12 views
                0 likes
                Last Post DanielSanMartin  
                Started by DJ888, 04-16-2024, 06:09 PM
                4 responses
                12 views
                0 likes
                Last Post DJ888
                by DJ888
                 
                Started by terofs, Today, 04:18 PM
                0 responses
                11 views
                0 likes
                Last Post terofs
                by terofs
                 
                Started by nandhumca, Today, 03:41 PM
                0 responses
                7 views
                0 likes
                Last Post nandhumca  
                Started by The_Sec, Today, 03:37 PM
                0 responses
                3 views
                0 likes
                Last Post The_Sec
                by The_Sec
                 
                Working...
                X