Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Strategy Builder - Max daily loss and max profit stops

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

    Strategy Builder - Max daily loss and max profit stops

    Hi,

    I am using the Strategy Builder to build a strategy and run into some issues while trying to define a max daily loss and max profit. How do I use the builder to create a condition in which it stops trading if I reach a predetermined max daily loss or profit (which I can enter as input so they can be selected each time)?

    Also, is there a way to set a limit on the number of daily trades? Something like a trade count that will prevent the strategy from executing more trades if a predefined limit is reached?

    Thanks
    David

    #2
    Hello David, thanks for writing in.

    We have a reference sample here demonstrating how to hold a strategy once a certain cumulative profit is reached:

    https://ninjatrader.com/support/help...nce_user_d.htm

    The StopStrategy method can not be called from the builder, so you will need to incorporate this condition in your entry order conditions. Something like

    if(condition to trade && SystemPerformance.AllTrades.TradesPerformance.Curr ency.CumProfit < 1000 || SystemPerformance.AllTrades.Tra desPerformance.Currency.CumProfit > -400)
    {
    //perform the trade.
    }

    You would need to unlock the script and write by hand to count the number of trades that happened, that can not be done from the builder.

    Please let me know if I can assist any further.

    Comment


      #3
      Chris,

      Thanks!

      If I unlock the script and make changes by hand as suggested above, will I be able to go back and continue with the Builder or will I be on my own at that point?

      Thanks
      David

      Comment


        #4
        Hello David, thanks for your reply.

        The script would not be editable in the builder after unlocking, it must be coded by hand after unlocking.

        Kind regards.

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Mindset, 04-21-2026, 06:46 AM
        0 responses
        90 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by M4ndoo, 04-20-2026, 05:21 PM
        0 responses
        137 views
        0 likes
        Last Post M4ndoo
        by M4ndoo
         
        Started by M4ndoo, 04-19-2026, 05:54 PM
        0 responses
        68 views
        0 likes
        Last Post M4ndoo
        by M4ndoo
         
        Started by cmoran13, 04-16-2026, 01:02 PM
        0 responses
        120 views
        0 likes
        Last Post cmoran13  
        Started by PaulMohn, 04-10-2026, 11:11 AM
        0 responses
        69 views
        0 likes
        Last Post PaulMohn  
        Working...
        X