Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Questions about multi-timeframe

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

    Questions about multi-timeframe


    Hi,

    Would you please help to check why my multi-time frame strategy is not work?
    My bar zero is MSFT 1 minute. My bar one is 1 Day. ( AddDataSeries(BarsPeriodType.Day, 1)
    but if I change bar one to 10 minute, ( AddDataSeries(BarsPeriodType.Minute, 10)

    Thanks.



    Attached Files

    #2
    Hello heiheilau,

    Thanks for your post.

    Please clarify the following so we may accurately assist.

    What specifically is not working in regards to your strategy?

    Are you wanting to EnterLong() when the close price of the primary data series (Closes[0][0]) is greater than the previous close price of the secondary added data series (Closes[1][1])?

    If so, please see the attached example script which demonstrates this.

    See this help guide for detailed information about working with Multi-timeframe scripts: https://ninjatrader.com/support/help...nstruments.htm

    Also, see the SampleMultiTimeFrame example script which comes default with NinjaTrader. To view the script, open a New > NinjaScript Editor window, open the Strategies folder, and select the SampleMultiTimeFrame script.

    I look forward to assisting further.
    Attached Files
    <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
      Thanks. After adding below scripts. It is work now for both Day series and Minute series. Thanks again

      if (CurrentBars[0] < BarsRequiredToTrade || CurrentBars[1] < BarsRequiredToTrade)
      return;if (CurrentBars[0] < BarsRequiredToTrade || CurrentBars[1] < BarsRequiredToTrade)
      return;

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by CarlTrading, 03-31-2026, 09:41 PM
      1 response
      47 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Started by CarlTrading, 04-01-2026, 02:41 AM
      0 responses
      23 views
      0 likes
      Last Post CarlTrading  
      Started by CaptainJack, 03-31-2026, 11:44 PM
      0 responses
      33 views
      1 like
      Last Post CaptainJack  
      Started by CarlTrading, 03-30-2026, 11:51 AM
      0 responses
      51 views
      0 likes
      Last Post CarlTrading  
      Started by CarlTrading, 03-30-2026, 11:48 AM
      0 responses
      42 views
      0 likes
      Last Post CarlTrading  
      Working...
      X