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, 05-11-2026, 05:56 AM
      0 responses
      59 views
      0 likes
      Last Post CarlTrading  
      Started by CarlTrading, 05-10-2026, 08:12 PM
      0 responses
      34 views
      0 likes
      Last Post CarlTrading  
      Started by Hwop38, 05-04-2026, 07:02 PM
      0 responses
      198 views
      0 likes
      Last Post Hwop38
      by Hwop38
       
      Started by CaptainJack, 04-24-2026, 11:07 PM
      0 responses
      363 views
      0 likes
      Last Post CaptainJack  
      Started by Mindset, 04-21-2026, 06:46 AM
      0 responses
      282 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Working...
      X