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

Daily Pivot Points

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

    Daily Pivot Points

    I'm trying to plot pivot points for each day on my chart, having each set of pivots for each individual day. This is the formula for the points.

    PP = (H + L + C) / 3
    R1 = (2*PP) - L
    R2 = PP + (H - L)
    R3 = H + 2*(PP-L)
    S1 = (2*PP) - H
    S2 = PP - (H - L)
    S3 = L - 2*(H - PP)

    So I would use the open, close, high, and low on the daily chart and I would want to plot them on my 15 min chart. Please point me in the direction of how I could develop this indicator.

    #2
    Kashix, the Pivots indicator that comes with NinjaTrader is very close to what you're looking to do here, so I would suggest modifying that so suit your needs.

    The equations the pivots indicator uses are as follows:
    Code:
    pp                = (currentHigh + currentLow + currentClose) / 3;
    s1                = 2 * pp - currentHigh;
    r1                = 2 * pp - currentLow;
    s2                = pp - (currentHigh - currentLow);
    r2                = pp + (currentHigh - currentLow);
    s3                = pp - 2 * (currentHigh - currentLow);
    r3                = pp + 2 * (currentHigh - currentLow);
    To create a copy that you can start changing, go to Tools -> Edit NinjaScript -> Indicator -> double left click on Pivots -> right-click the editor window and select "save as" and then rename it. From here you can modify it however you want. When you are done making the changes, right-click the editor window and select "compile" and you will be able to use it on charts and such.

    Please let me know if you have any other questions.
    AustinNinjaTrader Customer Service

    Comment


      #3
      Is there an index of Ninjatrader command lines that I could look at? I want to draw a short line segment for each of those points. How would I do that?

      Comment


        #4
        kashix, the help guide can be found here - http://www.ninjatrader.com/support/h...nt7/index.html.

        For the NinjaScript methods, you can navigate to NinjaScript -> Language Reference and browse through everything.

        Again, I would highly recommend trying to modify the current pivots indicator for your needs, as 98% of the code has already been written for you.
        AustinNinjaTrader Customer Service

        Comment


          #5
          Hi Austin,

          I have very specific requirement with respet to Pivots. I would like to calculate Pivots a little different than just HLC of previous day. I want it them to be a rolling average. For example Calculate the pivots for a number of days. say 2 or 5 in effect being a rolling average by always using most recent 2 or 5 days of pivot range

          Comment


            #6
            mcorbett, you would then need to custom code this modded version - there's unfortunately no default indicator available for this task.
            BertrandNinjaTrader Customer Service

            Comment


              #7
              Originally posted by NinjaTrader_Bertrand View Post
              mcorbett, you would then need to custom code this modded version - there's unfortunately no default indicator available for this task.

              Where can I have this simple task done ?

              Comment


                #8
                You could for example contact any NinjaScript consultant for this custom coding project work -

                BertrandNinjaTrader Customer Service

                Comment


                  #9
                  modification of pivots indicator

                  Hi all, I would like plot half levels between default pivots. I tried modify default pivots indicator. I attached my changes, but after compile and adding to chart it didnot plot anything. can you help me find what is missing in syntax, please?
                  Attached Files

                  Comment


                    #10
                    Welcome to our forums, do you get any errors in the log tab if you apply you custom indicator to a chart?

                    I would suggest you check also into our sharing section, there are several user modded Pivot scripts posted that would implement midpoints as well - http://www.ninjatrader.com/support/f...=pivots&desc=1
                    BertrandNinjaTrader Customer Service

                    Comment


                      #11
                      thank you, my friend helps me make modify pivotMid, which draws mid levels, it can be used as second indicator common with default pivots indicator
                      Attached Files

                      Comment


                        #12
                        Thanks for sharing it with us here.
                        BertrandNinjaTrader Customer Service

                        Comment


                          #13
                          as for #10 : there was strange, it didnot write any error , but it was drawing nothing
                          Last edited by Libri; 01-16-2012, 09:36 AM.

                          Comment


                            #14
                            There is a pivot indicator here.



                            Has the following features:

                            -> pivots for ETH and RTH sessions (futures)
                            -> midpivots
                            -> CME and Nymex holiday calendar
                            -> wide and narrow floor pivots
                            -> Jackson Zones
                            -> Fibonacci Pivots
                            -> Camarilla Pivots
                            -> shows pivot range as colored area

                            If you are interested there is also a rolling pivot indicator available that plot the pivot for a rolling N-Day session.

                            Comment


                              #15
                              Originally posted by NinjaTrader_Austin View Post
                              Kashix, the Pivots indicator that comes with NinjaTrader is very close to what you're looking to do here, so I would suggest modifying that so suit your needs.

                              The equations the pivots indicator uses are as follows:
                              Code:
                              pp = (currentHigh + currentLow + currentClose) / 3;
                              s1 = 2 * pp - currentHigh;
                              r1 = 2 * pp - currentLow;
                              s2 = pp - (currentHigh - currentLow);
                              r2 = pp + (currentHigh - currentLow);
                              s3 = pp - 2 * (currentHigh - currentLow);
                              r3 = pp + 2 * (currentHigh - currentLow);
                              To create a copy that you can start changing, go to Tools -> Edit NinjaScript -> Indicator -> double left click on Pivots -> right-click the editor window and select "save as" and then rename it. From here you can modify it however you want. When you are done making the changes, right-click the editor window and select "compile" and you will be able to use it on charts and such.

                              Please let me know if you have any other questions.
                              Hello,

                              I did what you said, I took the code and just renamed it without any modifications. Anyway when I try to compile it, I get the errors :

                              The namespace '<global namespace>' already contains a definition for 'HLCCalculationMode'
                              The namespace '<global namespace>' already contains a definition for 'PivotRange'
                              The namespace 'NinjaTrader.NinjaScript.Indicators' already contains a definition for 'PivotsTypeConverter'
                              Type 'PivotsTypeConverter' already defines a member called 'GetPropertiesSupported' with the same parameter types
                              Type 'PivotsTypeConverter' already defines a member called 'GetProperties' with the same parameter types
                              Cannot implicitly convert type 'NinjaTrader.NinjaScript.Indicators.Pivots' to 'NinjaTrader.NinjaScript.Indicators.PivotsMyPIVOTS '

                              Thanks​

                              Comment

                              Latest Posts

                              Collapse

                              Topics Statistics Last Post
                              Started by ms52390, 06-20-2024, 03:48 PM
                              2 responses
                              14 views
                              0 likes
                              Last Post ms52390
                              by ms52390
                               
                              Started by ccrone2024, Today, 05:13 AM
                              0 responses
                              5 views
                              0 likes
                              Last Post ccrone2024  
                              Started by ttodua, Today, 03:40 AM
                              0 responses
                              6 views
                              0 likes
                              Last Post ttodua
                              by ttodua
                               
                              Started by ttodua, Today, 03:18 AM
                              0 responses
                              5 views
                              0 likes
                              Last Post ttodua
                              by ttodua
                               
                              Started by TraderKnG, Today, 01:30 AM
                              0 responses
                              13 views
                              0 likes
                              Last Post TraderKnG  
                              Working...
                              X