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

Reset input parameters when NT Starts or Closes

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

    Reset input parameters when NT Starts or Closes

    Hi,

    I have an input parameter that I want save its value, but only until I close NT. If I restart NT I want that value to be cleared.

    Is there a closing event for NT, or a chart closing event, or a starting event that I can use to clear that parameter?

    Thanks,
    will.

    #2
    Originally posted by dontpanic View Post
    Hi,

    I have an input parameter that I want save its value, but only until I close NT. If I restart NT I want that value to be cleared.

    Is there a closing event for NT, or a chart closing event, or a starting event that I can use to clear that parameter?

    Thanks,
    will.
    You can apply the attribute for xml serialization to ignore the parameter, or you can reset it with the OnTermination() event handler.

    Comment


      #3
      I used set() in serialize to set the value to null, and that does the trick,

      thanks.

      Comment


        #4
        Hi Will,

        Thank you for posting.

        Glad to hear you were able to get a solution.

        Thank you Koganam for posting a solution!

        Let us know if we can be of further assistance.
        Cal H.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by bortz, 11-06-2023, 08:04 AM
        54 responses
        2,110 views
        0 likes
        Last Post rene69851  
        Started by SugarDefenderCLICK, Today, 07:16 PM
        0 responses
        3 views
        0 likes
        Last Post SugarDefenderCLICK  
        Started by DawnTreader, 05-08-2024, 05:58 PM
        24 responses
        102 views
        0 likes
        Last Post DawnTreader  
        Started by rwlink3z8, Today, 06:17 PM
        0 responses
        3 views
        0 likes
        Last Post rwlink3z8  
        Started by diegomezhur, Today, 05:33 PM
        0 responses
        3 views
        0 likes
        Last Post diegomezhur  
        Working...
        X