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 Jonker, 04-27-2024, 01:19 PM
    3 responses
    23 views
    0 likes
    Last Post NinjaTrader_Manfred  
    Started by businessman1929, 04-29-2024, 01:28 PM
    2 responses
    22 views
    0 likes
    Last Post businessman1929  
    Started by bltdavid, 03-27-2023, 05:32 AM
    18 responses
    347 views
    0 likes
    Last Post ETFVoyageur  
    Started by NM_eFe, Today, 05:15 PM
    0 responses
    5 views
    0 likes
    Last Post NM_eFe
    by NM_eFe
     
    Started by vitaly_p, Today, 05:09 PM
    0 responses
    7 views
    0 likes
    Last Post vitaly_p  
    Working...
    X