Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Pivots Indicator

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

    Pivots Indicator

    In the Pivots Indicator, there is a line drawn based off of the following syntax;

    pp = (currentHigh + currentLow + currentClose) / 3;

    I would like this line to be drawn at the opening price of the current 1440 minute bar. How would I change this code to reflect that? Thanks in advance.

    Best regards,

    Dolfan

    #2
    Hello,

    Thank you for the post.

    I wanted to check, are you asking to replace one of the values in the equation with the 1440 bar open, or just in general the whole equation would be replaced with the value of the open?

    I look forward to being of further assistance.
    JesseNinjaTrader Customer Service

    Comment


      #3
      Jesse,

      I will seek to replace all the data that places the current lines, but I want to bite off one piece at a time as I learn how to program the indicators. The first line being the start of the day seems to be the easiest (at least to me) so I am starting there. So I am guessing the whole line would be rewritten to reflect the opening price of the day or 1440 minute bar. Is that a correct assumption?

      Dolfan

      Comment


        #4
        Hello,

        Correct, if you only want the opening price of that bar, the whole line would be replaced or at least the part of that line which is the equation.

        To reference the Current 1440 minute bars opening value assuming the Primary series is the 1440 minute series, it would look like the following:

        Code:
        pp = Open[0];
        Open would reference the Primary series, the CurrentBar or 0 bars ago would be used, so Open[0]



        I look forward to being of further assistance.
        JesseNinjaTrader Customer Service

        Comment


          #5
          Trouble with that is, these lines will be drawn on a 16 minute chart.

          Dolfan

          Comment


            #6
            Hello,

            Thank you for the reply.

            This would add another level of complexity to the item.

            You could potentially add a secondary series of 1440 minutes to the indicator, but the majority of its logic relies on the indicator getting Daily bars or Intrabar data for the time requested. You can note this logic in the method GetBarsNow() inside the pivots indicator.

            Because this indicator was developed specifically around getting this data, I would be unsure if adding the secondary series or modifying the existing method would be correct. This would likely be something you would have to test and confirm the results are accurate to your trading needs.

            I would suggest to edit the existing method in the indicator as it already works based on using this method. You could experiment with getting different data from the bars request, but the results may not work or may be incorrect based on the logic that is currently in the file.

            If you want to create your own calculations not using the pivot specifically, it may be easier to create a new indicator and begin with the simple parts like adding a secondary series of 1440 minutes, and reference that value. you could then add more complexity to the script as you test.

            I look forward to being of further assistance.
            JesseNinjaTrader Customer Service

            Comment


              #7
              You just bummed me out because my spreadsheet calculations will make it a great deal more complicated. I was hoping for an easy in with the first line but....<sigh> I guess not.

              Dolfan

              Comment


                #8
                OK Jesse, what I THINK I need...

                I understand that the build process for an indicator or strategy will include several components. Being a mechanical engineer, I see things in how they are assembled or broken down. Is there a part of the forum or tutorials that CLEARLY illustrates how a strategy goes together as in block #1 is labeled thus and this is what goes into it. Block #2 is labeled thus and this is what goes into it. Block #3 is labeled thus..... and so on. Once this structure becomes clear to me, I should be able to make progress. Please enlighten me. Thanks!

                Best regards,

                Dolfan

                Comment


                  #9
                  Hello,

                  I am unsure of a tutorial series that goes through each override as you have asked, but each override or "block" of code is fully described in the helpguide section with that code blocks name. I.E. OnBarUpdate: http://ninjatrader.com/support/helpG...ub=OnBarUpdate

                  All strategies are created equal in the sense that they all share the same base structure, you can see this structure by simply creating a new empty strategy. All strategies will follow this pattern, but you can of course add additional overrides to the script which would allow it to access other parts of the platform or data.

                  We have many working samples on the forum that you can import and test, NinjaTrader its self does not provide any complete strategies as that relies on what you want to do with your personal trading goals. You can find the samples listed here: http://ninjatrader.com/support/forum...ead.php?t=3220

                  These are all good to use to explore specific concepts. Personally I use these as a toolbox, if I need to remember a specific concept, the code for that is outlined in the sample for me to review.

                  You can also view the scripts users have uploaded in the sharing section, often users will use different approached or other unsupported code to accomplish goals. This section would be better to review experimental item or concepts you may want to test:


                  Additionally if you have not watched the strategy videos on our youtube page, these are very good at explaining the core processes strategies will use in the platform. https://www.youtube.com/playlist?lis...56536A44DD7105

                  I look forward to being of further assistance.
                  JesseNinjaTrader Customer Service

                  Comment


                    #10
                    Given this part of your message...

                    "Additionally if you have not watched the strategy videos on our youtube page, these are very good at explaining the core processes strategies will use in the platform. https://www.youtube.com/playlist?lis...56536A44DD7105"...

                    and the fact that I would like to work in NT8, is there a different set of videos I should refer to or will this get me where I am going?

                    Comment


                      #11
                      Hello Dolfan,

                      Thanks for your reply.

                      As you know NinjaTrader8 is in beta so do not as yet have the same level of recordings available, however you can find what we do have here: https://www.youtube.com/playlist?lis...Hri63MgcyJvvAH

                      and: https://www.youtube.com/playlist?lis...wcvUJSTB5vDBcC
                      Paul H.NinjaTrader Customer Service

                      Comment

                      Latest Posts

                      Collapse

                      Topics Statistics Last Post
                      Started by trilliantrader, Today, 03:01 PM
                      0 responses
                      2 views
                      0 likes
                      Last Post trilliantrader  
                      Started by pechtri, 06-22-2023, 02:31 AM
                      9 responses
                      122 views
                      0 likes
                      Last Post NinjaTrader_ChelseaB  
                      Started by frankthearm, 04-18-2024, 09:08 AM
                      16 responses
                      67 views
                      0 likes
                      Last Post NinjaTrader_Clayton  
                      Started by habeebft, Today, 01:18 PM
                      1 response
                      8 views
                      0 likes
                      Last Post NinjaTrader_ChelseaB  
                      Started by benmarkal, Today, 12:52 PM
                      2 responses
                      19 views
                      0 likes
                      Last Post benmarkal  
                      Working...
                      X