Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Error in trace logs and cannot move chart

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

    Error in trace logs and cannot move chart

    Here are steps to reproduce it.
    1. open chart and add eurchf with 30 minutes and 100 days history
    2. add eurchf with daily bars and 100 days history.
    3. add the indicator (breakout) as new panel mapping to the 30 minute timeframe.

    once indicator is loaded, move the scroll bar back scrolling and at some point the chart freezes .
    i will send the logs from ninjatrader


    2022-04-14 15:54:41:059 Gui.Chart.ChartPanel.OnRender: System.ApplicationException: parameter for RoundUpTo125 infinity.
    at NinjaTrader.Gui.Tools.Extensions.RoundUpTo125(Doub le value)
    at NinjaTrader.Gui.Chart.Direct2DForm.GetYAxisStepSiz eIndicator(Double yMinVal, Double yMaxVal, Double yPixels, Double maxLabelHeight, Boolean isFractionalPrice)
    at NinjaTrader.Gui.Chart.Direct2DForm.GetPanelYAxisSt epSize(ChartPanel panel, ScaleJustification scaleJustification, Double horGridInterval, Boolean barsOnPanelAndScale)
    at NinjaTrader.Gui.Chart.Direct2DForm.RecalculateYAxi sLabels(ScaleJustification scaleJustification, RenderTarget renderTarget)
    at NinjaTrader.Gui.Chart.Direct2DForm.RenderInit()
    2022-04-14 15:54:41:096 ERROR: Chart rendering failed. There is likely a problem with a chart object's OnRender method. D2D error = 'HRESULT: [0x88990016], Module: [SharpDX.Direct2D1], ApiCode: [D2DERR_PUSH_POP_UNBALANCED/PushPopUnbalanced], Message: The push and pop calls were unbalanced. '
    2022-04-14 15:58:55:747 Server.HdsClient.Connect: type=IS server='is-us-nt-001.ninjatrader.com' port=31658 system='NT' useSsl=True
    2022-04-14 15:58:55:894 Server.HdsClient.ProcessStartupInfo.Info0: Commissions=0 InstrumentLists=0 MasterInstruments=0 Messages=3 Risks=0 RolloverCollection=0 TradingHours=0
    2022-04-14 15:58:55:903 Server.HdsClient.ProcessStartupInfo.Info1: Commissions=0.00ms InstrumentLists=0.00ms MasterInstruments=0.00ms Messages=9.49ms Risks=0.00ms RolloverCollection=0.00ms TradingHours=0.00ms
    Attached Files

    #2
    Hello junkone,

    Are you able to reproduce this on a second computer? D2D errors can sometimes mean an issue with the graphics card (like having multiple graphic cards) or other computer hardware issues.

    Are you able to reproduce this with the SMA or any other indicator that is included with NinjaTrader?

    If this specific script is the only script that can reproduce, the first step to debugging is to reduce the code and identify the specific line that is causing the error.

    You can use Print() above each line to see which line is the last line to execute before the error appears.


    As a note, the try and catches you have can cause undesired behavior with NinjaTrader. Instead of trying to keep the script running using try and catches, lets create a copy of the script as a test script, and copy over only the code absolutely necessary to reproduce the behavior.

    In a new test script add lines 78 through 79 to State.Configure. Then add lines 115 through 118 to OnBarUpdate(). Then add lines 122 through 124 and line 139.

    With just this these few lines of code are you able to reproduce the error?
    Chelsea B.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Geovanny Suaza, 02-11-2026, 06:32 PM
    0 responses
    650 views
    0 likes
    Last Post Geovanny Suaza  
    Started by Geovanny Suaza, 02-11-2026, 05:51 PM
    0 responses
    370 views
    1 like
    Last Post Geovanny Suaza  
    Started by Mindset, 02-09-2026, 11:44 AM
    0 responses
    109 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by Geovanny Suaza, 02-02-2026, 12:30 PM
    0 responses
    574 views
    1 like
    Last Post Geovanny Suaza  
    Started by RFrosty, 01-28-2026, 06:49 PM
    0 responses
    577 views
    1 like
    Last Post RFrosty
    by RFrosty
     
    Working...
    X