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

Errors

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

    Errors

    Hi Everyone,

    I got these errors on the log while viewing a indicator on chart.Anyone help me to resolve these errors.

    NinjaScript Chart rendering failed. There is likely a problem with a chart object's OnRender method. D2D error = 'Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index'

    Default A direct X error has occurred while rendering the chart: HRESULT: [0x88990001], Module: [SharpDX.Direct2D1], ApiCode: [D2DERR_WRONG_STATE/WrongState], Message: Unknown

    NinjaScript Chart rendering failed. There is likely a problem with a chart object's OnRender method. D2D error = 'HRESULT: [0x88990001], Module: [SharpDX.Direct2D1], ApiCode: [D2DERR_WRONG_STATE/WrongState], Message: Unknown'

    #2
    Hello,

    Thanks for opening the thread.

    I would first advise to start troubleshooting by commenting out any NinjaTrader drawing tools so you can focus on your rendering code. If the issue goes away after commenting out the drawing tools, we will want to look into this further on our end, so please let us know if that is the case.

    NinjaScript Chart rendering failed. There is likely a problem with a chart object's OnRender method. D2D error = 'Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index'
    These referencing errors are similar to the referencing errors that can be received in OnBarUpdate(). When referencing Series objects in OnRender(), it is advised to use the GetValueAt() and IsValidDataPointAt() methods to properly reference the Series. This is advised because OnRender() and OnBarUpdate() are not synchronized and direct references would not be guaranteed.

    Default A direct X error has occurred while rendering the chart: HRESULT: [0x88990001], Module: [SharpDX.Direct2D1], ApiCode: [D2DERR_WRONG_STATE/WrongState], Message: Unknown

    NinjaScript Chart rendering failed. There is likely a problem with a chart object's OnRender method. D2D error = 'HRESULT: [0x88990001], Module: [SharpDX.Direct2D1], ApiCode: [D2DERR_WRONG_STATE/WrongState], Message: Unknown'
    These errors are related to DirectX programming errors where the Chart fails to render. They typically have to do with calling SharpDX methods out of order or improperly. I would advise to simplify and double check your rendering implementation to troubleshoot further.

    As these errors are to do with DirectX implementations through SharpDX, the MSDN resources for DirectX rendering may prove to be valuable resources for Development and debugging.

    Error codes: https://msdn.microsoft.com/en-us/lib...(v=vs.85).aspx

    DirectX programming guide: https://msdn.microsoft.com/en-us/lib...(v=vs.85).aspx

    Best practices for SharpDX rendering can be found here: http://ninjatrader.com/support/helpG...arpDXResources

    Please let me know if I may be of further assistance.
    Last edited by NinjaTrader_Jim; 08-17-2017, 08:22 AM.
    JimNinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by tkaboris, Today, 08:01 AM
    0 responses
    1 view
    0 likes
    Last Post tkaboris  
    Started by BarzTrading, Today, 07:25 AM
    1 response
    10 views
    1 like
    Last Post NinjaTrader_Clayton  
    Started by EB Worx, 04-04-2023, 02:34 AM
    7 responses
    161 views
    0 likes
    Last Post VFI26
    by VFI26
     
    Started by Mizzouman1, Today, 07:35 AM
    1 response
    9 views
    0 likes
    Last Post NinjaTrader_Gaby  
    Started by Radano, 06-10-2021, 01:40 AM
    20 responses
    616 views
    0 likes
    Last Post NinjaTrader_BrandonH  
    Working...
    X