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

Pivot Indicator

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

    Pivot Indicator

    Hi,

    How can I know how many ticks there are until the next pivot line up and down from the current price, from the PIVOT indicator?


    Thanks, Alejandro

    #2
    Hello ahrt|,

    Thanks for your post.

    You would subtract the value of the pivot lines from the current price, then divide the difference by the TickSize.

    For example:

    int PPticks = Convert.ToInt32((Close[0] - Pivots(PivotRange.Daily, HLCCalculationMode.CalcFromIntradayData, 0, 0, 0, 20).PP[0]) / TickSize); // An example of the PP pivot point value.

    Reference: https://ninjatrader.com/support/help.../?ticksize.htm

    Please let us know if we can be of further assistance.
    Paul H.NinjaTrader Customer Service

    Comment


      #3
      Thank you Paul

      Comment


        #4
        Hi Paul,

        In the example that I am sending you, you can see that the price is 26410 and R1 is 26404, the difference is -6 ticks.

        With this instruction
        int R1ticks = Convert.ToInt32 ((Close [0] - Pivots (PivotRange.Daily, HLCCalculationMode.CalcFromIntradayData, 0, 0, 0, 20) .R1 [0]) / TickSize); // An example of the R1 pivot point value.
        I get -41

        What am I doing wrong?




        Thanks, Alejandro

        Comment


          #5
          Hello Alejandro,

          Thanks for your reply.

          Please verify that the pivots shown on the chart are set the same way as the indicator is using them, ie: make sure that the Pivots indicator is set to:
          • HLCCalculationMode.CalcFromIntradayData
          • PivotRange.Daily
          I suspect the HLCCalculation mode is set to daily bars and should be set to Calculate from intraday data, to match the indicator you are creating (or vice versa depending on your needs).
          Paul H.NinjaTrader Customer Service

          Comment


            #6
            Hi Paul,

            You were right, HLCCalculation mode was set to daily bars.

            Thanks for your help

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by pmachiraju, 11-01-2023, 04:46 AM
            8 responses
            147 views
            0 likes
            Last Post rehmans
            by rehmans
             
            Started by mattbsea, Today, 05:44 PM
            0 responses
            5 views
            0 likes
            Last Post mattbsea  
            Started by RideMe, 04-07-2024, 04:54 PM
            6 responses
            33 views
            0 likes
            Last Post RideMe
            by RideMe
             
            Started by tkaboris, Today, 05:13 PM
            0 responses
            4 views
            0 likes
            Last Post tkaboris  
            Started by GussJ, 03-04-2020, 03:11 PM
            16 responses
            3,282 views
            0 likes
            Last Post Leafcutter  
            Working...
            X