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.
    Chris L.NinjaTrader Customer Service

    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.
        Chris L.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Jeremytang, 07-14-2018, 06:45 PM
        21 responses
        439 views
        0 likes
        Last Post mav8rick  
        Started by LeonK, Yesterday, 09:26 PM
        1 response
        8 views
        0 likes
        Last Post bltdavid  
        Started by NicholasJoannette, Yesterday, 03:01 PM
        2 responses
        11 views
        0 likes
        Last Post NicholasJoannette  
        Started by rach1994, Yesterday, 12:20 PM
        1 response
        35 views
        0 likes
        Last Post bltdavid  
        Started by litamm89, Yesterday, 11:00 AM
        5 responses
        22 views
        1 like
        Last Post rafael_delima86  
        Working...
        X