Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Output when a Stop or Profit target hit

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

    Output when a Stop or Profit target hit

    Is there a way to have an output if your profit target was hit and a different output if your stop is hit on a 5 minute chart, then you can take in consideration of the last trade outcome on your next?
    Basically I want to have a value of lets say 1 if the profit target of the last trade hit or 2 if the stop hit.

    Could this be done in the strategy builder or would it have to be done via ninjascript?

    Thanks!​

    #2
    Hello pattersp,

    An addon could do this if you mean detecting when a manual trade closes and what order that trade was closed with. A strategy wouldn't be able to see any manual trades but it would know when one of its own trades closed and have the event for that .

    For manually placed trades you would need to use an indicator and the addon framework: https://ninjatrader.com/support/help...ount_class.htm

    For a strategy you can use OnExecutionUpdate: https://ninjatrader.com/support/help...xecutionUpdate

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by CarlTrading, 03-31-2026, 09:41 PM
    1 response
    41 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 04-01-2026, 02:41 AM
    0 responses
    20 views
    0 likes
    Last Post CarlTrading  
    Started by CaptainJack, 03-31-2026, 11:44 PM
    0 responses
    29 views
    1 like
    Last Post CaptainJack  
    Started by CarlTrading, 03-30-2026, 11:51 AM
    0 responses
    46 views
    0 likes
    Last Post CarlTrading  
    Started by CarlTrading, 03-30-2026, 11:48 AM
    0 responses
    37 views
    0 likes
    Last Post CarlTrading  
    Working...
    X