Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Multiple Time Frame Reference with stratgey

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

    Multiple Time Frame Reference with stratgey

    I want to use the previous daily high / low as reference values

    PreviousHigh (daily)= x value
    Previous Low (daily) = y value

    Then run a strategy on a the a shorter time frame use those points as references for breakouts.

    How would you go about coding the longer time frame?

    #2
    Hello fiddy,

    Thank you for your post.

    You can use the PriorDayOHLC() indicator method to pull the previous day high and low. For information on PriorDayOHLC() please visit the following link: http://www.ninjatrader.com/support/h...r_day_ohlc.htm

    Please let me know if I may be of further assistance.

    Comment


      #3
      What can you do if you want something earlier than the day prior.
      ie if you want to use the most recent day which meets certain characteristics that you set

      Comment


        #4
        Hello Fiddy,

        Thank you for your post.

        You could use the CurrentDayOHL() method for the current day's Open, High and Low: http://www.ninjatrader.com/support/h...nt_day_ohl.htm

        Please let me know if I may be of further assistance.

        Comment


          #5
          What is you what an the OHLC of something 40days ago

          Comment


            #6
            Hello Fiddy,

            Thank you for your response.

            You would use the following for PriorDayOHLC() with barsInProgress index of 39:
            Code:
            PriorDayOHLC().PriorOpen[39]
            PriorDayOHLC().PriorHigh[39]
            PriorDayOHLC().PriorLow[39]
            PriorDayOHLC().PriorClose[39]
            For information on PriorDayOHLC() please visit the following link: http://www.ninjatrader.com/support/h...r_day_ohlc.htm

            Please let me know if I may be of further assistance.

            Comment


              #7
              Hello Fiddy.

              Correction to my last post:
              You would use the following for PriorDayOHLC() with barsAgo index of 39:

              Comment


                #8
                How would you get the bars ago reference to increase each day you get further away from your reference day on a onbarupdate

                Comment


                  #9
                  Hello fiddy,

                  Thank you for your response.

                  Create a ToDay() check like the following:
                  Code:
                  if (ToDay(Time[0]) == 20130930) //Check that the date is September 30th, 2013
                  {
                  //Print September 29th High and Low
                  Print("9-29-13 High: " + PriorDayOHLC().PriorHigh[0]);
                  Print("9-29-13 Low: " + PriorDayOHLC().PriorLow[0]);
                  }
                  For information on ToDay() please visit the following link: http://www.ninjatrader.com/support/h.../nt7/today.htm

                  For information on PriorDayOHL() please visit the following link: http://www.ninjatrader.com/support/h...r_day_ohlc.htm

                  Please let me know if you have any questions.

                  Comment

                  Latest Posts

                  Collapse

                  Topics Statistics Last Post
                  Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                  0 responses
                  639 views
                  0 likes
                  Last Post Geovanny Suaza  
                  Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                  0 responses
                  366 views
                  1 like
                  Last Post Geovanny Suaza  
                  Started by Mindset, 02-09-2026, 11:44 AM
                  0 responses
                  107 views
                  0 likes
                  Last Post Mindset
                  by Mindset
                   
                  Started by Geovanny Suaza, 02-02-2026, 12:30 PM
                  0 responses
                  569 views
                  1 like
                  Last Post Geovanny Suaza  
                  Started by RFrosty, 01-28-2026, 06:49 PM
                  0 responses
                  572 views
                  1 like
                  Last Post RFrosty
                  by RFrosty
                   
                  Working...
                  X