Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

deactivate strategy

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

    deactivate strategy

    I built a crossover strategy using strategy builder. I then now want the strategy to stop taking trades when the P&L reaches $2000 for example. Can someone please help me out?
    Thanks!

    #2
    Hello Sharkclub,

    Thanks for your post.

    You could implement a Daily Profit Limit or a Daily Loss Limit within your NinjaScript strategy.

    The Strategy Builder custom series can be used with offsets to do math and subtract the total PnL from yesterday's PnL to get the current PnL and provided an example of how to set a Daily Loss Limit using the Strategy Builder. You could implement similar logic in your script to add a Daily Profit Limit to your strategy.

    Please see the example script, DailyLossLimitBuilderExample, in the forum post linked below for how this would be accomplished.

    https://ninjatrader.com/support/foru...limit-examples
    <span class="name">Brandon H.</span><span class="title">NinjaTrader Customer Service</span><iframe name="sig" id="sigFrame" src="/support/forum/core/clientscript/Signature/signature.php" frameborder="0" border="0" cellspacing="0" style="border-style: none;width: 100%; height: 120px;"></iframe>

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Geovanny Suaza, 02-11-2026, 06:32 PM
    0 responses
    649 views
    0 likes
    Last Post Geovanny Suaza  
    Started by Geovanny Suaza, 02-11-2026, 05:51 PM
    0 responses
    370 views
    1 like
    Last Post Geovanny Suaza  
    Started by Mindset, 02-09-2026, 11:44 AM
    0 responses
    109 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by Geovanny Suaza, 02-02-2026, 12:30 PM
    0 responses
    573 views
    1 like
    Last Post Geovanny Suaza  
    Started by RFrosty, 01-28-2026, 06:49 PM
    0 responses
    576 views
    1 like
    Last Post RFrosty
    by RFrosty
     
    Working...
    X