Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

combing strategies into groups in strategy builder

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

    combing strategies into groups in strategy builder

    i got positive results on backtests on individual strategies in a 5 minute timeframe. so, i'd like to add them to one 5 minute strategy. i put them as condition groups in the strategy builder. and, selected "any" for if conditions are met. then, within the group selected "all". so, on backtesting it should show results for all of them. however, on the results it shows the amount of trades of maybe 1 and half strategies. any suggestions?
    Attached Files

    #2
    Hello SteveReiza,

    Thanks for your post.

    When you have multiple condition groups within the same Set in a Strategy Builder strategy and set the 'of the following conditions are met drop-down to 'If Any', the Set would be triggered anytime one of the condition groups in the Set becomes true.

    If you have set the condition group to 'If All' then all the conditions in that condition group would have to become true.

    If the expected trade(s) are not appearing, this would indicate that the condition to place the order is not evaluating as true or the order is being ignored for other reasons.

    To understand why the script is behaving as it is, such as placing orders or not placing orders or drawing objects when expected, it is necessary to add prints to the script that print the values used for the logic of the script to understand how the script is evaluating.

    In the strategy add prints (outside of any conditions) that print the values of every variable used in every condition that places an order along with the time of that bar.

    Prints will appear in the NinjaScript Output window (New > NinjaScript Output window).

    Also, enable TraceOrders which will let you know if any orders are being ignored and not being submitted when the condition to place the orders is evaluating as true.

    Below is a link to a forum post that demonstrates how to use prints to understand behavior.


    Further, we should keep in mind that when backtesting a strategy there is no intrabar granularity so actions cannot happen intrabar. All logic is process at the close of a bar and actions can only happen at the close of the bar.

    ​Please review the help guide document on the differences on real-time vs backtest (historical):


    Additional information may be found in this NinjaTrader Forum post:
    https://ninjatrader.com/support/forum/forum/ninjatrader-8/strategy-development/100192-comparing-real-time-historical-and-replay-performance?t=102504​​​
    <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


      #3
      alright, thanks for the reply and info. i decided to keep them separate strategies instead of combining them so no worries.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Geovanny Suaza, 02-11-2026, 06:32 PM
      0 responses
      558 views
      0 likes
      Last Post Geovanny Suaza  
      Started by Geovanny Suaza, 02-11-2026, 05:51 PM
      0 responses
      324 views
      1 like
      Last Post Geovanny Suaza  
      Started by Mindset, 02-09-2026, 11:44 AM
      0 responses
      101 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by Geovanny Suaza, 02-02-2026, 12:30 PM
      0 responses
      545 views
      1 like
      Last Post Geovanny Suaza  
      Started by RFrosty, 01-28-2026, 06:49 PM
      0 responses
      547 views
      1 like
      Last Post RFrosty
      by RFrosty
       
      Working...
      X