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

Multi-instrument chart not updating when BarsInProgress !=0

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

    Multi-instrument chart not updating when BarsInProgress !=0

    I have some indicators that show values based on an ADDed dataseries. So I have a primary instrument data series in the price panel and a secondary instrument data series in the indicator panel.

    When BarsInProgresss==0 everything occurs as expected and the chart updates to show the current values of all instruments and derived variables.

    When BarsInProgress==1 I can tell from diagnostics written to the output window that Closes[1][0] IS updating, but its new value does not appear on the chart until the next update where BarsInProgress==0.

    This seems like a bug, although an effective workaround is to make this the last line of the OnBarUpdate() method:

    Code:
    if(!Historical && BarsInProgress==1) ChartControl.Refresh();
    (The first qualifier prevents unnecessary refreshes during backfill that would cause excessive chart loading time.)

    #2
    Hi Ricam,

    Unfortunately I did not see an issue so far. I tried restricting the session template hours for the primary instrument but got no updates to either as expected.

    I'm not sure how to setup a test to see what you are seeing. Can you please share a script example you're using and any details needed to setup the same scenario here.
    Last edited by NinjaTrader_RyanM1; 05-18-2011, 02:13 PM.
    Ryan M.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by frankthearm, Yesterday, 09:08 AM
    11 responses
    41 views
    0 likes
    Last Post frankthearm  
    Started by junkone, Today, 11:37 AM
    0 responses
    7 views
    0 likes
    Last Post junkone
    by junkone
     
    Started by quantismo, 04-17-2024, 05:13 PM
    5 responses
    35 views
    0 likes
    Last Post NinjaTrader_Gaby  
    Started by proptrade13, Today, 11:06 AM
    1 response
    6 views
    0 likes
    Last Post NinjaTrader_Clayton  
    Started by love2code2trade, 04-17-2024, 01:45 PM
    4 responses
    34 views
    0 likes
    Last Post love2code2trade  
    Working...
    X