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
    Brandon H.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by lightsun47, Today, 03:51 PM
    0 responses
    5 views
    0 likes
    Last Post lightsun47  
    Started by 00nevest, Today, 02:27 PM
    1 response
    10 views
    0 likes
    Last Post 00nevest  
    Started by futtrader, 04-21-2024, 01:50 AM
    4 responses
    46 views
    0 likes
    Last Post futtrader  
    Started by Option Whisperer, Today, 09:55 AM
    1 response
    14 views
    0 likes
    Last Post bltdavid  
    Started by port119, Today, 02:43 PM
    0 responses
    10 views
    0 likes
    Last Post port119
    by port119
     
    Working...
    X