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 cmtjoancolmenero, Yesterday, 03:58 PM
            11 responses
            41 views
            0 likes
            Last Post cmtjoancolmenero  
            Started by FrazMann, Today, 11:21 AM
            0 responses
            5 views
            0 likes
            Last Post FrazMann  
            Started by geddyisodin, Yesterday, 05:20 AM
            8 responses
            52 views
            0 likes
            Last Post NinjaTrader_Gaby  
            Started by DayTradingDEMON, Today, 09:28 AM
            4 responses
            27 views
            0 likes
            Last Post DayTradingDEMON  
            Started by George21, Today, 10:07 AM
            1 response
            22 views
            0 likes
            Last Post NinjaTrader_ChristopherJ  
            Working...
            X