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 Geovanny Suaza, 02-11-2026, 06:32 PM
            0 responses
            647 views
            0 likes
            Last Post Geovanny Suaza  
            Started by Geovanny Suaza, 02-11-2026, 05:51 PM
            0 responses
            369 views
            1 like
            Last Post Geovanny Suaza  
            Started by Mindset, 02-09-2026, 11:44 AM
            0 responses
            108 views
            0 likes
            Last Post Mindset
            by Mindset
             
            Started by Geovanny Suaza, 02-02-2026, 12:30 PM
            0 responses
            572 views
            1 like
            Last Post Geovanny Suaza  
            Started by RFrosty, 01-28-2026, 06:49 PM
            0 responses
            573 views
            1 like
            Last Post RFrosty
            by RFrosty
             
            Working...
            X