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 charlesugo_1, 05-26-2026, 05:03 PM
            0 responses
            55 views
            0 likes
            Last Post charlesugo_1  
            Started by DannyP96, 05-18-2026, 02:38 PM
            1 response
            142 views
            0 likes
            Last Post NinjaTrader_ChelseaB  
            Started by CarlTrading, 05-11-2026, 05:56 AM
            0 responses
            160 views
            0 likes
            Last Post CarlTrading  
            Started by CarlTrading, 05-10-2026, 08:12 PM
            0 responses
            96 views
            0 likes
            Last Post CarlTrading  
            Started by Hwop38, 05-04-2026, 07:02 PM
            0 responses
            276 views
            0 likes
            Last Post Hwop38
            by Hwop38
             
            Working...
            X