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

OnBarUpdate Stops Updating

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

    OnBarUpdate Stops Updating

    Occassionally the OnBarUpdate simply stops. Nothing in the Log file. My strategy isn't disabled. Is there a common reason for this sort of thing.

    #2
    Which instrument?
    What time of day?
    What is the bar type of the chart?

    These questions are a bit rhetorical, but there is a
    big difference, for ex, between Gold and Silver
    futures, or the ES vs Cattle futures.

    But, yeah, if you're talking about ES in the mid-morning,
    you may have a problem.

    -=o=-

    Since we're talking Strategy, you might want to add some
    debugging prints to make sure you print something for
    every bar processed.

    -=o=-

    The most common explanation is a pretty easy one:
    There are simply very few to no ticks happening.

    I mean, if there is very little buy/sell activity, which can
    happen during off hours, esp for certain instruments,
    then OnBarUpdate() might fire much less often, esp on
    tick based bar charts, such as Tick, Range, Renko, etc.

    Just my 2˘.

    Comment


      #3
      Thanks for your response.

      It IS ES -- Range Charts. This can happen any time of day, but it's not due to lack of ticks. Price movement continues. My tick counter stays stuck at last number. The only bars I don't process are the ones following the end of my bar updates.

      Comment


        #4
        Hello Doctor JR,

        Thank you for your post.

        I agree with bltdavid's suggestion of adding debugging prints.

        In order to better understand how the code is working, it will be necessary to use Print to see how the conditions are evaluating.

        Below is a link to a forum post that demonstrates using prints to understand behavior and includes a link to a video recorded using the Strategy Builder to add prints.



        The prints should include the time of the bar and should print all values from all variables and all hard coded values in all conditions that must evaluate as true for an action to be triggered. It is very important to include a text label for each value and for each comparison operator in the print to understand what is being compared in the condition sets.

        Let me know if you need any assistance creating a print.

        Save the output from the output window to a text file and provide this with your reply.

        I'll be happy to assist with analyzing the output.
        Gaby V.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by fx.practic, 10-15-2013, 12:53 AM
        5 responses
        5,404 views
        0 likes
        Last Post Bidder
        by Bidder
         
        Started by Shai Samuel, 07-02-2022, 02:46 PM
        4 responses
        95 views
        0 likes
        Last Post Bidder
        by Bidder
         
        Started by DJ888, Yesterday, 10:57 PM
        0 responses
        8 views
        0 likes
        Last Post DJ888
        by DJ888
         
        Started by MacDad, 02-25-2024, 11:48 PM
        7 responses
        159 views
        0 likes
        Last Post loganjarosz123  
        Started by Belfortbucks, Yesterday, 09:29 PM
        0 responses
        8 views
        0 likes
        Last Post Belfortbucks  
        Working...
        X