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 Geovanny Suaza, 02-11-2026, 06:32 PM
      0 responses
      558 views
      0 likes
      Last Post Geovanny Suaza  
      Started by Geovanny Suaza, 02-11-2026, 05:51 PM
      0 responses
      324 views
      1 like
      Last Post Geovanny Suaza  
      Started by Mindset, 02-09-2026, 11:44 AM
      0 responses
      101 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by Geovanny Suaza, 02-02-2026, 12:30 PM
      0 responses
      545 views
      1 like
      Last Post Geovanny Suaza  
      Started by RFrosty, 01-28-2026, 06:49 PM
      0 responses
      547 views
      1 like
      Last Post RFrosty
      by RFrosty
       
      Working...
      X