Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

muti time frame strategy

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

    muti time frame strategy

    Hi how can i build a muti time frame strategy using strategy builder? or is there any other ways to build a muti time frame strategy for auto trading? (for example when price is above 20 day moving average and cross above 15 min moving average, enter long) thanks!

    #2
    Hello,

    This is only possible if you manually code it:
    DenNinjaTrader Customer Service

    Comment


      #3
      Hi Ben, i tried to follow the instructions but it failed to work. Would you be kind enough to provide a code sample for two stochastic oscillators working for 1 minute and 1 day time frame? thank you in advance!!

      Comment


        #4
        light7801,

        Unfortunately we do not have a reference sample of this exact case for you. If you need help please post what you currently have and we can give you pointers. Unfortunately we cannot custom program it for you though.
        Josh P.NinjaTrader Customer Service

        Comment


          #5
          Hi, the following is my coding to reflect the idea of my multi-time frame strategy. i bold the added codes. i want to have a second Stochastic with the same index but different time frame(day). However this code doesn't work. I am a newbie for this but please kindly advise what's wrong. Thanks a lot!!!


          protectedoverridevoid Initialize()
          {
          Add(PeriodType.day, 1);
          CalculateOnBarClose = false;
          }
          protectedoverridevoid OnBarUpdate()
          {
          // Condition set 1
          if (CrossAbove(Stochastics(7, 14, 3).D, 20, 1)
          && Stochastics((BarsArray[1],7)[0], (BarsArray[1],14)[0],(BarsArray[1], 3)[0]).D[0] >= 20)
          {
          EnterLong(DefaultQuantity, "");
          }
          }

          Comment


            #6
            light7801, you just need to make sure the Stochastics arguments line up correctly. Please try this code:
            Code:
            if (CrossAbove(Stochastics(7, 14, 3).D, 20, 1) &&
                Stochastics(BarsArray[1], 7, 14, 3).D[0] >= 20)
            AustinNinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

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