Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Indicator on chart not saving with workspace or in chart templates

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

    Indicator on chart not saving with workspace or in chart templates

    Hi, I have an indicator, which is a simple input of price levels via the GUI. The code takes the manual input values, places them in an array and then plots them if the date of the current time matches the date input.

    Everything seems to work fine, except the values are not saved when saving the workspace (all the manual inputs lost each restart of Ninja). I've also tried saving with the levels input via the chart template function, but nothing is saved.

    My guess is there is a simple solution via serialization of the input values or some java script which should fix this easily. Code is attached.

    Thanks.
    Attached Files

    #2
    Hello mohawkTrader,

    This indicator can't save because you forgot to add [XmlIgnore] on your brush property, a brush cannot be saved and requires using a second property to help save it. When making brush user inputs I would suggest to create a new indicator and under the user inputs page of the wizard add the user inputs that you want then click generate code. That will make the brush property and its helper property and add the correct attributes to each property.

    Comment


      #3
      Thanks!

      Problem solved.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by cmoran13, 04-16-2026, 01:02 PM
      0 responses
      43 views
      0 likes
      Last Post cmoran13  
      Started by PaulMohn, 04-10-2026, 11:11 AM
      0 responses
      25 views
      0 likes
      Last Post PaulMohn  
      Started by CarlTrading, 03-31-2026, 09:41 PM
      1 response
      162 views
      1 like
      Last Post NinjaTrader_ChelseaB  
      Started by CarlTrading, 04-01-2026, 02:41 AM
      0 responses
      98 views
      1 like
      Last Post CarlTrading  
      Started by CaptainJack, 03-31-2026, 11:44 PM
      0 responses
      158 views
      2 likes
      Last Post CaptainJack  
      Working...
      X