Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Unable to save workspace with indicator

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

    Unable to save workspace with indicator

    Hi,
    when i like save workspace with my own indicator, i'm getting this error


    2018-11-01 21:44:53:779|3|4|Could not save indicator 'PHPivots:' There was an error reflecting type 'NinjaTrader.NinjaScript.Indicators.PHPivots'.


    But indicator is running propertly in chart and this error in log doesn't tell anythink where is error, any idea how to debug/solve this issue?

    Best regards
    Patrik.

    #2
    Hello patriczek,

    This error would generally stem from the script not being able to be saved or what is known as serialized. This is often caused by the public properties you have used but can also come from other complex scenarios.

    I would suggest doing some general tests to find what part of the script is causing this to happen.

    A good first test would be to comment out all the custom logic you created including public properties, just make the script into a shell that does nothing. Then reapply the script and see if it can be saved. This helps to know that the script structure is valid. After doing this, uncomment just the public properties and where you set their defaults. Reapply the script and test again after doing this change, is there a problem saving or does the script save?

    You could continue doing these types of tests until you locate a specific part of the script that fails. If it is not apparent why that code is failing, we could review that together to see why that would be. You can see this type of error in some complex inheritance situations along with some public properties. The error is fairly general so some troubleshooting will be needed to isolate what the cause is.

    I look forward to being of further assistance.

    Comment


      #3
      Hi Jesse

      i just finish debugging, i had public dictionary when i switched this dict to private all was repaired and work well.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by sjsj2732, Yesterday, 04:31 AM
      0 responses
      24 views
      0 likes
      Last Post sjsj2732  
      Started by NullPointStrategies, 03-13-2026, 05:17 AM
      0 responses
      282 views
      0 likes
      Last Post NullPointStrategies  
      Started by argusthome, 03-08-2026, 10:06 AM
      0 responses
      280 views
      0 likes
      Last Post argusthome  
      Started by NabilKhattabi, 03-06-2026, 11:18 AM
      0 responses
      131 views
      1 like
      Last Post NabilKhattabi  
      Started by Deep42, 03-06-2026, 12:28 AM
      0 responses
      90 views
      0 likes
      Last Post Deep42
      by Deep42
       
      Working...
      X