Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Convert strategy to Multi time frame

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

    Convert strategy to Multi time frame

    Hey fellas -

    I have a perfectly working strategy on a single timeframe (400 Tick) but I want to slightly modify it to enter and roll stops using a lower timeframe (200 Tick). From my limited understanding of the Help, are these the only steps that need to be taken?

    1. Add both Data Series (400 and 200 Tick).

    2. Specify the 200 tick data series for my EnterLong/EnterShort orders.

    3. Specify the 200 tick data series for my SetStopLess orders.

    Is that all that needs to be done?

    Also, I'm assuming that the Strategy Analyzer can only show 1 chart and I guess it's the Primary?

    Thanks in advance.

    #2
    Hello PN720,

    Yes, you would need to add an additional series of 200 tick. Then you would want to include a condition that BarsInProgress is 1 to the condition set that triggers the order submission.

    Below is a public link to the help guide on BarsInProgress.
    https://ninjatrader.com/support/help...inprogress.htm

    As well as a link to the reference sample that demonstrates adding a series to a script.
    https://ninjatrader.com/support/help...ipt_strate.htm


    Set methods (such as SetStopLoss()) will always reference the primary series. If you want the historical data to fill orders using the 200 tick series, you would need to use Exit methods like ExitLongStop() and supply the BarsInProgress 1.
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Hi,
      A couple of follow up questions :

      1. From the sample code, the comments say that the secondary data series must be smaller than the first. Is this true? I was considering reversing my approach and running the strategy on the 200 tick chart as primary and only specifying entry criteria on the 400 tick chart.

      2. Do I need to add the same chart indicators to both data series?

      Comment


        #4
        Hello PN720,

        The example is specifically using the secondary series for intra-bar granularity. To be intra-bar the secondary series must be of a smaller interval than the primary.

        But that is not required for adding a secondary series. You can add any bar type or interval size you would like for your purposes.

        You can use the secondary series for the input series of an indicator if you would like. By default any called will use the primary series for its input unless a different series is provided.

        There is a reference sample that demonstrates this. Below is a public link.
        https://ninjatrader.com/support/help...ries_as_an.htm
        Chelsea B.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by wftrrdt, Today, 05:01 AM
        0 responses
        2 views
        0 likes
        Last Post wftrrdt
        by wftrrdt
         
        Started by wellbeingcbd, Today, 04:41 AM
        0 responses
        1 view
        0 likes
        Last Post wellbeingcbd  
        Started by piydasuknu, Today, 03:45 AM
        0 responses
        3 views
        0 likes
        Last Post piydasuknu  
        Started by ajdfkgjiojjhfihjg, Today, 03:20 AM
        0 responses
        3 views
        0 likes
        Last Post ajdfkgjiojjhfihjg  
        Started by keravitahere, Today, 01:56 AM
        0 responses
        2 views
        0 likes
        Last Post keravitahere  
        Working...
        X