Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

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 funk10101, Today, 12:02 AM
          1 response
          10 views
          0 likes
          Last Post NinjaTrader_LuisH  
          Started by GLFX005, Today, 03:23 AM
          1 response
          6 views
          0 likes
          Last Post NinjaTrader_Erick  
          Started by nandhumca, Yesterday, 03:41 PM
          1 response
          13 views
          0 likes
          Last Post NinjaTrader_Gaby  
          Started by The_Sec, Yesterday, 03:37 PM
          1 response
          11 views
          0 likes
          Last Post NinjaTrader_Gaby  
          Started by vecnopus, Today, 06:15 AM
          0 responses
          1 view
          0 likes
          Last Post vecnopus  
          Working...
          X