• 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

Get Maximum of series

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

    Get Maximum of series

    Hi everybody
    How can i get maximum value of a special series (for example ZN 5 years), in a special period.
    Then i want to determine where the input is greater than this maximum for 3 ticks (for example)

    #2
    Hello amiralimadadi,

    Thank you for your note.

    You could pass the Ten Year series to the MAX method, which will return the highest value in that series.

    See,

    https://ninjatrader.com/support/help...aximum_max.htm

    If you wanted to get the MAX value of the previous 20 bars, starting from 100 bars ago, you specify the int BarsAgo, for example,

    Code:
    MAX(High, 20)[100];
    The helpguide shows how to save this value to a double variable, which you could then use to check against the close on the current bar, ie Close[0]+3*TickSize to check if the current close is greater.

    Please let us know if you need further assistance.
    Alan P.NinjaTrader Customer Service

    Comment


      #3
      Hello gplatis,

      Yes, NT7 has the max method as well.
      https://ninjatrader.com/support/help...aximum_max.htm

      Please let us know if you need further assistance.
      Alan P.NinjaTrader Customer Service

      Comment


        #4
        Thanks. It was so helpful. but i need max value in a special time period. for example from 7:20 to 8:20 us central time.

        Comment


          #5
          Hello amiralimadadi,

          Thanks for your reply.

          In that case, we recommend that you set a time condition to test for the 8:20 period and when true to then search for the MAX as previously advised with a period look back that would cover the start time of 7:20. For example (using 1 minute bars):

          if (ToTime(Time[0]) == 082000)
          {
          todaysHigh = MAX(High, 60)[0]; //look back 1 hour
          }
          Paul H.NinjaTrader Customer Service

          Comment


            #6
            Thanks
            I would like to know how to convert between time zones in ninja. i want to do this for a special time zone.
            for example "central standard time". i want to convert local time to this time zone then get maximum in the period of 7:20 to 8:20

            Comment


              #7
              Hello amiralimadadi,

              Thanks for your reply.

              Please review the helpguide section here:

              https://ninjatrader.com/support/help...oniterator.htm This shows all of the method and properties available to use.

              https://ninjatrader.com/support/help...beginlocal.htm this shows an example of getting the exchange trading time and adjusting to the local PC time
              Paul H.NinjaTrader Customer Service

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by guvenators, Today, 05:18 PM
              1 response
              13 views
              0 likes
              Last Post NinjaTrader_ShawnB  
              Started by LANwarr1or, Today, 03:00 PM
              2 responses
              8 views
              0 likes
              Last Post LANwarr1or  
              Started by Newtrader101, Today, 02:53 PM
              2 responses
              10 views
              0 likes
              Last Post Newtrader101  
              Started by JuanPabloQuevedo, Today, 02:53 PM
              2 responses
              9 views
              0 likes
              Last Post JuanPabloQuevedo  
              Started by samir, Today, 03:16 PM
              2 responses
              14 views
              0 likes
              Last Post samir
              by samir
               
              Working...
              X