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

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

    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 Haiasi, 04-25-2024, 06:53 PM
      2 responses
      16 views
      0 likes
      Last Post Massinisa  
      Started by Creamers, Today, 05:32 AM
      0 responses
      5 views
      0 likes
      Last Post Creamers  
      Started by Segwin, 05-07-2018, 02:15 PM
      12 responses
      1,786 views
      0 likes
      Last Post Leafcutter  
      Started by poplagelu, Today, 05:00 AM
      0 responses
      3 views
      0 likes
      Last Post poplagelu  
      Started by fx.practic, 10-15-2013, 12:53 AM
      5 responses
      5,407 views
      0 likes
      Last Post Bidder
      by Bidder
       
      Working...
      X