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

Need more Camarilla pivot levels in NT8

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

    Need more Camarilla pivot levels in NT8

    Hi, currently there're eight levels (S4 to R4) offered in Camarilla Pivots indicator. I'd like to see S5, S6 and R5 and R6, also. The formulas are as follows:


    R6 = R5 + 1.168 *(R5-R4)
    R5 = (H/L)*C

    S5 = C - (R5-C)
    S6 = C - (R6-C)

    *H, L, C are prior session High, Low and Close

    If they can be added into current indicator, it'll be very helpful. Thanks!

    #2
    Hello tamago168,

    Welcome to the NinjaTrader forums!

    It would be possible for you to make a copy of the script and modify the code to your liking.

    Are you asking for development help for creating your custom script or are you wanting a feature request for our development to consider this for a future release?

    Below is a link to a forum post with helpful information about getting started with NinjaScript.
    https://ninjatrader.com/support/foru...040#post786040
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Hi Chelsea,

      For the short-term, I need help with script modification so that I can use it immediately. For the longer-term, it will be nice to have this as built-in as I found, at least for U.S. equities, smart monies use R6, which I'm watching the most, as a strong resistance level. Thanks!

      PS. On TradingView, there're scripts created for these extra levels, but they normally label them as H6, H5, L5 and L6, respectively. The following is the source code used on TradingView

      //Camarilla Pivots
      H5 = (DPhigh / DPlow) * DPclose
      H4 = DPclose + DPrange * 1.1/2
      H3 = DPclose + DPrange * 1.1/4
      H2 = DPclose + DPrange * 1.1/6
      H1 = DPclose + DPrange * 1.1/12

      L1 = DPclose - DPrange * 1.1/12
      L2 = DPclose - DPrange * 1.1/6
      L3 = DPclose - DPrange * 1.1/4
      L4 = DPclose - DPrange * 1.1/2
      H6 = H5 + 1.168 * (H5 - H4)
      L5 = DPclose - (H5 - DPclose)
      L6 = DPclose - (H6 - DPclose)

      Comment


        #4
        Hello tamago168,

        Create a copy of the script by right-clicking the code, and selecting Save as.

        Add plots with the AddPlot() method.
        https://ninjatrader.com/support/help...t8/addplot.htm

        This will add plot series to the Values collection that hold values for each bar on the chart for each plot in the order the plots are added with AddPlot().
        https://ninjatrader.com/support/help...nt8/values.htm

        Set the Values[plot index][bars ago index] to the calculated value.

        I can answer any specific questions you have.

        This thread will remain open for any community members that would like to create this as a convenience to you.

        You can also contact a professional NinjaScript Consultant who would be eager to create or modify this script at your request or assist you with your script. The NinjaTrader Ecosystem has affiliate contacts who provide educational as well as consulting services. Please let me know if you would like our NinjaTrader Ecosystem team follow up with you with a list of affiliate consultants who would be happy to create this script or any others at your request or provide one on one educational services.
        Chelsea B.NinjaTrader Customer Service

        Comment


          #5
          Getting to know C# is too overwhelming for me. I believe there're more users like me who would like to see additional Camarilla levels, otherwise there wouldn't be so many of them (used for different strategies) on TradingView. Hopefully someone can provide an enhanced script here.

          Comment


            #6
            I made a copy of indicator Camarilla Pivots, and removed R1, R2, S1 and S2, added R5, R6, S5 and S6, and renamed them from 1 to 4. Compiled it. However, only the original R3 (now R1), R4 (now R2), S3 (now S1) and S4 (now S2) are shown. The added 4 levels are not rendered. Can you please tell me what I missed? Thanks

            Comment


              #7
              Hello tamago168,
              I am not sure what you did when you're facing issues, let me share a copy of Camarilla Pivots (6 levels) so you can work around with it.
              It will plot and not render, you can modify as required.
              Attached Files

              Comment


                #8
                Originally posted by s.kinra View Post
                Hello tamago168,
                I am not sure what you did when you're facing issues, let me share a copy of Camarilla Pivots (6 levels) so you can work around with it.
                It will plot and not render, you can modify as required.
                I'll try it after U.S. markets close today. Thanks!

                Comment


                  #9
                  Hello tamago168,

                  Are you removing calls to AddPlot()?

                  This will change the order of the plots in the Values collection. Are you changing the indexes for these in the logic?
                  Chelsea B.NinjaTrader Customer Service

                  Comment


                    #10
                    Originally posted by s.kinra View Post
                    Hello tamago168,
                    I am not sure what you did when you're facing issues, let me share a copy of Camarilla Pivots (6 levels) so you can work around with it.
                    It will plot and not render, you can modify as required.
                    I zipped the file you provided, and tried to import to NT8, but was told it was created in an older version. Do you have one for NT8? Thanks!

                    Comment


                      #11
                      Originally posted by NinjaTrader_ChelseaB View Post
                      Hello tamago168,

                      Are you removing calls to AddPlot()?

                      This will change the order of the plots in the Values collection. Are you changing the indexes for these in the logic?
                      Chelsea,

                      I have no knowledge of C#. All I was able to do is making a copy of built-in indicator, replacing CAM point formulas and compiling it. And, hope it would work. Apparently, it does not work. I have no idea how to follow your AddPlot(), index, etc. Do you have step by step guide after a copy is modified and compiled? Thanks

                      Comment


                        #12
                        Hello tamago168,
                        The file I shared is for NT8, you don't need to manually zip it, simply paste this file in C:\Users\xxx\Documents\NinjaTrader 8\bin\Custom\Indicators then open nijascript editor and hit F5.

                        Comment


                          #13
                          Let me also share the zip file so you can import normally.
                          Attached Files

                          Comment


                            #14
                            Kinra,

                            You're so awesome! The zip method still got the error message. But putting the cs file in the directory you specified works perfectly. This script also plots prior sessions' pivots, which a lot of users, I found, were looking for.

                            This indicator does not have two more levels, one above R6 and one below S6. I found them very powerful on U.S. equities. Did you intentionally exclude them? The formulas are

                            R7 = R6 + 1.168 * (R6 - R4)
                            S7 = close - (R7 - close)

                            If you find them indeed powerful as I mention, hopefully they can be added. But anyway, thank you very much for your help!

                            Comment


                              #15
                              Hello tamago168,
                              I never used 7th level, you can always add it as required. Zip should also work normally, I suspect you already had pasted the .cs file first & then trying to import so it might give error as you should compile first & then the import would surely ask you to replace the files. If I get some time today I'll add this level also. Hope it helps!

                              Comment

                              Latest Posts

                              Collapse

                              Topics Statistics Last Post
                              Started by mbrandau, Yesterday, 05:33 PM
                              1 response
                              66 views
                              0 likes
                              Last Post NinjaTrader_ChelseaB  
                              Started by RT001, Yesterday, 05:19 PM
                              2 responses
                              60 views
                              0 likes
                              Last Post NinjaTrader_ChelseaB  
                              Started by salaksi1, Yesterday, 04:48 PM
                              1 response
                              65 views
                              0 likes
                              Last Post NinjaTrader_ChelseaB  
                              Started by KirkHammett, Yesterday, 04:35 PM
                              1 response
                              51 views
                              0 likes
                              Last Post NinjaTrader_ChelseaB  
                              Started by HaveGunsWillTravel, Yesterday, 04:15 PM
                              1 response
                              50 views
                              0 likes
                              Last Post NinjaTrader_ChelseaB  
                              Working...
                              X