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 cmoran13, Yesterday, 01:02 PM
      0 responses
      29 views
      0 likes
      Last Post cmoran13  
      Started by PaulMohn, 04-10-2026, 11:11 AM
      0 responses
      21 views
      0 likes
      Last Post PaulMohn  
      Started by CarlTrading, 03-31-2026, 09:41 PM
      1 response
      160 views
      1 like
      Last Post NinjaTrader_ChelseaB  
      Started by CarlTrading, 04-01-2026, 02:41 AM
      0 responses
      95 views
      1 like
      Last Post CarlTrading  
      Started by CaptainJack, 03-31-2026, 11:44 PM
      0 responses
      148 views
      2 likes
      Last Post CaptainJack  
      Working...
      X