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

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.
    JesseNinjaTrader Customer Service

    Comment


      #3
      Thanks!

      Problem solved.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by fx.practic, 10-15-2013, 12:53 AM
      5 responses
      5,403 views
      0 likes
      Last Post Bidder
      by Bidder
       
      Started by Shai Samuel, 07-02-2022, 02:46 PM
      4 responses
      95 views
      0 likes
      Last Post Bidder
      by Bidder
       
      Started by DJ888, Yesterday, 10:57 PM
      0 responses
      7 views
      0 likes
      Last Post DJ888
      by DJ888
       
      Started by MacDad, 02-25-2024, 11:48 PM
      7 responses
      159 views
      0 likes
      Last Post loganjarosz123  
      Started by Belfortbucks, Yesterday, 09:29 PM
      0 responses
      8 views
      0 likes
      Last Post Belfortbucks  
      Working...
      X