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 NullPointStrategies, Today, 05:17 AM
      0 responses
      52 views
      0 likes
      Last Post NullPointStrategies  
      Started by argusthome, 03-08-2026, 10:06 AM
      0 responses
      130 views
      0 likes
      Last Post argusthome  
      Started by NabilKhattabi, 03-06-2026, 11:18 AM
      0 responses
      70 views
      0 likes
      Last Post NabilKhattabi  
      Started by Deep42, 03-06-2026, 12:28 AM
      0 responses
      44 views
      0 likes
      Last Post Deep42
      by Deep42
       
      Started by TheRealMorford, 03-05-2026, 06:15 PM
      0 responses
      48 views
      0 likes
      Last Post TheRealMorford  
      Working...
      X