Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Strategy Analyzer with a multi-time frame strategy

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

    Strategy Analyzer with a multi-time frame strategy

    I am looking to get some clarification on settings within Strategy Analyzer when running a backtest in a multi-time frame strategy.

    My strategy contains three Bars objects. The primary is 3 minutes. The remaining are 6 and 15 minutes.

    I have code in my primary bars that requires a look back of 60 bars.
    3 min. x 60 bars = 180 minutes.

    To get the most granular results, both my open and closing code uses the primary bars to get best outcome. I use the following settings in the Strategy Analyzer:

    Price based on: Last
    Type: Minute
    Value: 3
    Bars required to trade: 60
    Trading Hours: US Equities RTH


    The other time periods have code that references them, as well. The part of the strategy that has the longest look back is in the 15 minute time frame.
    15 min. x 60 bars = 900 minutes.

    Basically, my strategy requires a look back analysis of 3 trading days of data get results for the final fourth day. (390 min./day)


    So the questions are:

    1) What is referenced by "Bars required to trade" in the Strategy Analyzer settings?
    A) The settings of "type" and "value" in Strategy Analyzer settings?
    B) The primary bars in the strategy?
    c) All of the Bars objects in the strategy?

    2) If the setting refers to the "type" and "value" setting, should I make sure that my "Bars required to trade" look back setting exceeds 900 minutes total?
    It seems as if I do need to load 4 days worth of data under "Time Frame" in the Strategy Analyzer settings to get a valid trade. That does make sense, but I end up with results for more than just the one trading day that I am looking for.

    It would be very helpful if there were separate settings under "Time Frame" for days of data needed to load, and the day(s) of trade results that you want to see.

    3) Could you add the additional setting for day(s) of trade results that you want to see?


    Thanks in advance.
    Last edited by ArmKnuckle; 07-21-2016, 12:22 PM.

    #2
    Hello ArmKnuckle,

    Thank you for writing in.

    Bars required to trade is the number of historical bars required before the strategy starts processing order method called in the OnBarUpdate() method.

    In a multi-series strategy this restriction applies only for the primary Bars object. This means your can run into situations where the primary bars required to trade have been reached, but the additional bars required have not. Should your strategy logic intertwine calculations across different Bars objects please ensure all Bars objects have met the BarsRequiredToTrade requirement before proceeding. This can be done via checks on the CurrentBars array.

    For more information about Bars required to trade, please take a look at this help guide link: https://ninjatrader.com/support/help...redtotrade.htm

    I will be submitting a feature request for an additional setting to allow you to specify the days of trade results you wish to see and the amount of days of data needed to load.

    Please, let us know if we may be of further assistance.
    Zachary G.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by jclose, Today, 09:37 PM
    0 responses
    5 views
    0 likes
    Last Post jclose
    by jclose
     
    Started by WeyldFalcon, 08-07-2020, 06:13 AM
    10 responses
    1,413 views
    0 likes
    Last Post Traderontheroad  
    Started by firefoxforum12, Today, 08:53 PM
    0 responses
    11 views
    0 likes
    Last Post firefoxforum12  
    Started by stafe, Today, 08:34 PM
    0 responses
    11 views
    0 likes
    Last Post stafe
    by stafe
     
    Started by sastrades, 01-31-2024, 10:19 PM
    11 responses
    169 views
    0 likes
    Last Post NinjaTrader_Manfred  
    Working...
    X