• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

High/Low of the bar - which came first?

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

    High/Low of the bar - which came first?

    Hello,

    When analyzing time weighted bars I need to figure out did High came first or was Low made first. My plan is to add 2nd data series with shorter time frame and do analysis there. Can anyone suggest an indicator that might be already developed to do it? Any other (better) way to do it?

    Thanks,
    redduke

    #2
    Hello RedDuke,

    Thanks for writing in to our support forums.

    I am unaware of a pre-made indicator that reports if the the high price is reached before the low.

    You may use a second data series as you mention, and then parse this data series to find the if the lowest value within that range came before the highest value within that range. Alternately, you may create an indicator with CalculateOnBarClose set to false to calculate on each tick, and you may check for the highest and lowest bar within a given interval of time.

    A reference sample is available to show you how to add a data series: http://ninjatrader.com/support/forum...ead.php?t=7299

    Documentation on using and referencing multiple data series: https://ninjatrader.com/support/help...nstruments.htm

    Documentation on HighestBar(): https://ninjatrader.com/support/help...highestbar.htm

    Documentation on LowestBar(): https://ninjatrader.com/support/help.../lowestbar.htm

    Documentation on ToTime(): https://ninjatrader.com/support/help...nt7/totime.htm

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

    Comment


      #3
      Shorter Data Series should be the first data Series and
      so on.

      Comment


        #4
        Totally get how to do it, just curious if anyone already did it and can share a code..

        Comment


          #5
          It should not be that difficult. On the first tick of a New Bar ( Higher Time Frame ) you reset two sets of Variables one for Time and the other for Price One set for Higher Highs and the other set for Lower Lows. On each lower Low record the price for further comparison and time the same for the higher Highs. When the HTF bar closes Compare the Time of the Higher High to the time of the lower low.

          A second way to do it is to Wait for an HTF close and look back to the begining of the HTF bar on the lower time frame using Lowest Low and again for Highest High and Compare the times.

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by Hanstanz, Today, 04:44 AM
          0 responses
          9 views
          0 likes
          Last Post Hanstanz  
          Started by juniortut, Today, 04:38 AM
          0 responses
          5 views
          0 likes
          Last Post juniortut  
          Started by rojiinko, Today, 03:58 AM
          0 responses
          4 views
          0 likes
          Last Post rojiinko  
          Started by mreanuzlazx, Today, 01:30 AM
          0 responses
          4 views
          0 likes
          Last Post mreanuzlazx  
          Started by xinepev, Today, 12:33 AM
          0 responses
          4 views
          0 likes
          Last Post xinepev
          by xinepev
           
          Working...
          X