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

Closing position on strategy exit

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

    Closing position on strategy exit

    Hey guys when you unclick a strategy is there a method where you could place the "Exitlong()" statement to exit the position when the strategy is disabled?

    Thanks,
    EliteTraderNYC

    #2
    Hi EliteTraderNYC,

    Thanks for your post.

    Yes, you can trigger exit orders when disabling.

    The OnTermination() is the method that triggers when a script disables.
    http://www.ninjatrader.com/support/h...ermination.htm
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Great! Thanks

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by pibrew, Today, 06:10 PM
      0 responses
      4 views
      0 likes
      Last Post pibrew
      by pibrew
       
      Started by pibrew, 04-28-2024, 06:37 AM
      2 responses
      17 views
      0 likes
      Last Post pibrew
      by pibrew
       
      Started by Philippe56140, 04-27-2024, 02:35 PM
      7 responses
      56 views
      0 likes
      Last Post kevinenergy  
      Started by arunkumar3, 08-25-2023, 12:40 PM
      3 responses
      169 views
      0 likes
      Last Post Trader2024!  
      Started by DJ888, 04-26-2024, 10:57 PM
      2 responses
      17 views
      0 likes
      Last Post DJ888
      by DJ888
       
      Working...
      X