Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Trap ExitOnClose

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

    Trap ExitOnClose

    Hi

    I have code that executes when I exit a trade (exit long or short). However, it doesn't execute if the trade is exited on ExitOnClose(). The same goes for a trade exiting at a stop loss.

    My question is can I trap for the ExitOnClose()event happening and have my code run. The same goes for stop losses.?

    I know that I could just create a scripted exit based on the time, but don't want to reinvent the wheel if I can simply trap for the event when it triggers.

    Rigsby

    #2
    Hello,

    Are you already using OnExecution?:
    DenNinjaTrader Customer Service

    Comment


      #3
      Originally posted by NinjaTrader_Ben View Post
      Hello,

      Are you already using OnExecution?:
      http://www.ninjatrader-support.com/H...Execution.html

      Cool, thanks for the tip...

      I've just started with Ninja, and so haven't read all the documentation. I am also coming from a standard C and C++ background having never used C#, though it's very easy to follow and use (so far).

      Also, I am not a trader... LOL, so am still trying to get my head round some of the lingo.

      Cheers
      Rigsby

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by charlesugo_1, 05-26-2026, 05:03 PM
      0 responses
      51 views
      0 likes
      Last Post charlesugo_1  
      Started by DannyP96, 05-18-2026, 02:38 PM
      1 response
      142 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Started by CarlTrading, 05-11-2026, 05:56 AM
      0 responses
      160 views
      0 likes
      Last Post CarlTrading  
      Started by CarlTrading, 05-10-2026, 08:12 PM
      0 responses
      96 views
      0 likes
      Last Post CarlTrading  
      Started by Hwop38, 05-04-2026, 07:02 PM
      0 responses
      275 views
      0 likes
      Last Post Hwop38
      by Hwop38
       
      Working...
      X