Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

how to calcuate the highest closing price and lowest closing price for a time period

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

    how to calcuate the highest closing price and lowest closing price for a time period

    I have been unable to find anything related to the highest closing price and lowest closing price for a time frame. I see a lot of highest high and lowest low, but not closing prices. Where can i find those or how do i calculate those for a time period, say 15 minutes?

    #2
    Did you look at the HighestBar and LowestBar functions?

    Comment


      #3
      From what I read that is for highest/lowest price for a bar. I am looking for the highest/lowest closing price... no wicks included.

      Comment


        #4
        Originally posted by ageeholdings View Post
        From what I read that is for highest/lowest price for a bar. I am looking for the highest/lowest closing price... no wicks included.
        Uh, I think you read it wrong ... look again.

        You pass the preferred data series which supplies
        the prices that are to be compared -- this is the
        first argument.

        -=o=-

        Why can't you pass the 'Close' data series as the
        first argument -- doesn't that make it do what you
        want?

        Comment


          #5
          Hello agreeholdings,

          Thanks for your notes.

          Zigfried and bltdavid have provided some great information about how to accomplish this.

          You could consider using HighestBar() and LowestBar() and passing in the Close series into the HighestBar()/LowestBar() for the 'ISeries<double> series' argument.

          HighestBar(): https://ninjatrader.com/support/help...highestbar.htm
          LowestBar(): https://ninjatrader.com/support/help.../lowestbar.htm

          <span class="name">Brandon H.</span><span class="title">NinjaTrader Customer Service</span><iframe name="sig" id="sigFrame" src="/support/forum/core/clientscript/Signature/signature.php" frameborder="0" border="0" cellspacing="0" style="border-style: none;width: 100%; height: 120px;"></iframe>

          Comment


            #6
            Thanks for the feedback... how would i incorporate that into strategy builder?

            Comment


              #7
              Hello agreeholdings,

              Thanks for your notes.

              HighestBar() and LowestBar() are located in the condition builder under the Misc folder (ex: Misc folder > Highest bar).

              After selecting 'Highest bar' or 'Lowest bar' you could set the 'Series 1' property to use the Close price by clicking on the 'Series 1' field, and setting the 'Price type' drop-down menu to 'Close'. Back in the HighestBar() you could set the Period you would like to use. By default the Period is set to 10 (Bars ago).

              If you want to calculate this value for a certain time frame, you would need to unlock the script from the Strategy Builder by clicking the 'Unlock code' button and manually program the logic into your script.

              Below is a reference sample demonstrating calculating the highest high or lowest low for a specified time range. You could study the reference sample and implement similar logic in your script to get the highest close or lowest close for a specified time range.

              SampleGetHighLowByTimeRange: https://ninjatrader.com/support/help...eRange_NT8.zip
              <span class="name">Brandon H.</span><span class="title">NinjaTrader Customer Service</span><iframe name="sig" id="sigFrame" src="/support/forum/core/clientscript/Signature/signature.php" frameborder="0" border="0" cellspacing="0" style="border-style: none;width: 100%; height: 120px;"></iframe>

              Comment


                #8
                So this is what i have come up with, but this seems like the 30 minute window will be a rolling 30 minute period, correct? If so, how do i lock it down to the 9:30-10:00 time frame and have trades execute based on crossing that high close and low close for the rest of the trading day?​
                Attached Files

                Comment


                  #9
                  Hello agreeholdings,

                  Thanks for your notes.

                  As stated in post # 7, you would have to unlock the code from the Strategy Builder and manually program logic in your script similar to the SampleGetHighLowByTimeRange to get the highest or lowest close price for a specified time range.

                  You may study the SampleGetHighLowByTimeRange sample script linked on post # 7 to learn how to get the highest high or lowest low for a specified time range and then implement similar logic in your script to get the highest close and lowest close for a specified time range.
                  <span class="name">Brandon H.</span><span class="title">NinjaTrader Customer Service</span><iframe name="sig" id="sigFrame" src="/support/forum/core/clientscript/Signature/signature.php" frameborder="0" border="0" cellspacing="0" style="border-style: none;width: 100%; height: 120px;"></iframe>

                  Comment


                    #10
                    Thank you... so it isn't possible to put into strategy builder?

                    Comment


                      #11
                      Hello ageeholdings,

                      Thanks for your notes.

                      That is correct.

                      This logic would need to be manually programmed into the script as stated in post # 7 and post # 9.
                      <span class="name">Brandon H.</span><span class="title">NinjaTrader Customer Service</span><iframe name="sig" id="sigFrame" src="/support/forum/core/clientscript/Signature/signature.php" frameborder="0" border="0" cellspacing="0" style="border-style: none;width: 100%; height: 120px;"></iframe>

                      Comment

                      Latest Posts

                      Collapse

                      Topics Statistics Last Post
                      Started by gyilaoliver, Today, 08:28 AM
                      7 responses
                      15 views
                      0 likes
                      Last Post gyilaoliver  
                      Started by Darkslide_Tom, 03-23-2025, 11:08 PM
                      3 responses
                      17 views
                      0 likes
                      Last Post NinjaTrader_Gaby  
                      Started by rtwave, 03-13-2025, 04:09 PM
                      4 responses
                      29 views
                      0 likes
                      Last Post NinjaTrader_Gaby  
                      Started by MiCe1999, 12-01-2024, 09:01 PM
                      4 responses
                      45 views
                      0 likes
                      Last Post Leeroy_Jenkins  
                      Started by coopgrafik, Today, 07:57 AM
                      1 response
                      7 views
                      0 likes
                      Last Post NinjaTrader_LuisH  
                      Working...
                      X