Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

Max Loss and Max Profit Limit in dollars

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

    Max Loss and Max Profit Limit in dollars

    Hello,

    Is it possible to write a script that would disable the system after a max loss or max profit has been hit? Is so, can you provide an example of how to do so. Thanks.

    #2
    Hello AdeptistJune,

    Thanks for your post.

    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.

    Please see the example scripts located in the forum post linked below for how this could be accomplished. There are scripts demonstrating this for both the Strategy Builder and an unlocked sciprt.
    https://ninjatrader.com/support/foru...limit-examples

    Let us know if we may assist further.
    Brandon H.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by cre8able, Today, 03:20 PM
    0 responses
    2 views
    0 likes
    Last Post cre8able  
    Started by Fran888, 02-16-2024, 10:48 AM
    3 responses
    45 views
    0 likes
    Last Post Sam2515
    by Sam2515
     
    Started by martin70, 03-24-2023, 04:58 AM
    15 responses
    114 views
    0 likes
    Last Post NinjaTrader_Jesse  
    Started by The_Sec, Today, 02:29 PM
    1 response
    7 views
    0 likes
    Last Post NinjaTrader_Jesse  
    Started by jeronymite, 04-12-2024, 04:26 PM
    2 responses
    31 views
    0 likes
    Last Post NinjaTrader_BrandonH  
    Working...
    X