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 NM_eFe, Today, 10:13 AM
        0 responses
        4 views
        0 likes
        Last Post NM_eFe
        by NM_eFe
         
        Started by hdge4u, Yesterday, 12:23 PM
        1 response
        10 views
        0 likes
        Last Post hdge4u
        by hdge4u
         
        Started by 1001111, Today, 09:45 AM
        0 responses
        12 views
        0 likes
        Last Post 1001111
        by 1001111
         
        Started by DTSSTS, 01-28-2024, 12:07 PM
        11 responses
        561 views
        0 likes
        Last Post bmo111
        by bmo111
         
        Started by Torontobluejays, Today, 08:43 AM
        0 responses
        3 views
        0 likes
        Last Post Torontobluejays  
        Working...
        X