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 Point Previous Data Plotting

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

    Pivot Point Previous Data Plotting

    How do I enable Ninja Trader 8 to show pivot point data for all previous sessions instead of one day at a time? Here is an example from the Think or Swim platform compared to NT8.

    I'm trying to pick a platform I'll be using to trade.
    Attached Files

    #2
    Hello HUNTER_TACTICS,

    Welcome to the ninjaTrader support forum.

    The NT8 pivots indicator will only draw the currently focused day's pivots meaning that if you scroll back in the chart you should see the prior day pivots displayed. There is currently no option to display all pivots without scrolling but I could put that in as a feature request.

    The alternative would be if you wanted to do this yourself you could as the Pivots indicator source code is included with NinjaTrader. you could duplicate the indicator and change how it renders the data to your liking.



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

    Comment


      #3
      Yes, unfortunately, I don't know how to code properly. I was just looking at the codes from NT8 and TOS, but they are not alike. TOS has a code that says "input showOnlyToday = Yes;". I'm assuming you type No. But for NT8 it's different but I'm still willing to code

      ACTION:
      I duplicated the Pivot Point file and now I have the option to edit the section.
      ________________

      Which field should I make changes to enable previous data visibility or can you paste the code so I can apply it to a section of your choosing; NinjaTrader_Jesse?
      Last edited by HUNTER_TACTICS; 08-01-2018, 10:28 AM. Reason: more input

      Comment


        #4
        Hello HUNTER_TACTICS,

        Thank you for the reply.

        Without making some heavy changes to the indicator there wouldn't be a way to just enable the rendering for past days in the same way that it currently renders. You can, however, have it display the underlying plots in addition to the lines. This wouldn't draw text for prior days unless you scroll back, but you can visualize the values without scrolling back.

        If you locate the OnRender override in the script:
        Code:
        protected override void OnRender(ChartControl chartControl, ChartScale chartScale)
        {
        	// Set text to chart label color and font
        	TextFormat	textFormat			= chartControl.Properties.LabelFont.ToDirectWriteTextFormat();
            .....
        and then add the base call like the following:

        Code:
        protected override void OnRender(ChartControl chartControl, ChartScale chartScale)
        {
        	[B]base.OnRender(chartControl, chartScale);[/B]
        	// Set text to chart label color and font
        	TextFormat	textFormat			= chartControl.Properties.LabelFont.ToDirectWriteTextFormat();
        And then Right click -> Compile, this would enable the plots. You would need to remove it from the chart and re-add it to see the change. Additionally, due to how the pivots is created, you may need to comment out the attribute at the top of the class to make the indicator usable:

        Code:
        //[TypeConverter("NinjaTrader.NinjaScript.Indicators.PivotsTypeConverter")]
        public class PivotsCustom : Indicator
        This does break the properties for the indicator so they no longer hide depending on what is selected and are instead just visible when configuring it. To avoid breaking the properties, a full duplication would be needed meaning that the type converter and other items in the bottom of the file would need duplicated and renamed to be unique.


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

        Comment


          #5
          I applied the base code however I received an error. On rows 451, 478, 486?

          Update:

          I guess I fixed row 451 with the other code, however the other I'm unsure of the other rows.
          Attached Files
          Last edited by HUNTER_TACTICS; 08-01-2018, 12:01 PM. Reason: Update

          Comment


            #6
            Hello HUNTER_TACTICS,

            Thank you for the reply.

            Yes, in this case, the enums and type converter at the bottom of the file would need to be commented out as well. It sounded like you had already done this from your reply where you duplicated the indicator, in case you had not you would need to remove lines 450 - 490 from the new file in addition to what I had noted in my last reply.

            After removing the PivotsTypeConverter, HLCCalculationMode, and PivotRange from the bottom the file should be able to compile.

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

            Comment


              #7
              Jesse, I have no idea what I'm doing. I don't know how to code.

              Comment


                #8
                How long would a feature request take to be approved and applied? I hope I don't have to wait until NT9.

                Comment


                  #9
                  Originally posted by HUNTER_TACTICS View Post
                  Jesse, I have no idea what I'm doing. I don't know how to code.
                  if you click on the indicator it will show prior pivots (1 click only, double click will take you to indicator setting) click on chart again makes prior pivots disappear
                  Attached Files

                  Comment


                    #10
                    Originally posted by nkhoi View Post
                    if you click on the indicator it will show prior pivots (1 click only, double click will take you to indicator setting) click on chart again makes prior pivots disappear
                    Yeah, I spotted that before I posted this thread. That why I thought deleting one of the codes would enable me to see all of them with the colors and labels. But it's not that simple. - This should definitely be an option to turn off or on.

                    Comment


                      #11
                      Hello HUNTER_TACTICS,

                      I have put in a feature request but there is no timeframe or guarantee that feature request will be implemented. The tracking ID is: SFT-2387. If implemented, it would show up in the change log under that id.

                      For the time being, either duplicating and editing the indicator or selecting the plot to have the plot markers display as nkhoi mentioned would be the only ways to display the lines without scrolling.

                      I look forward to being of further assistance.
                      Last edited by NinjaTrader_Jesse; 08-01-2018, 02:24 PM.
                      JesseNinjaTrader Customer Service

                      Comment


                        #12
                        Hey Jesse,

                        Can you attach or create another feature request to the development team about adding various options for pivot point?

                        Heres an example from Trading View Pivot Point Options.

                        I believe Ninja Trader can be the best platform for all traders!
                        Attached Files
                        Last edited by HUNTER_TACTICS; 08-10-2018, 12:24 PM.

                        Comment


                          #13
                          Hello HUNTER_TACTICS,

                          I have put in a feature request for this. the tracking ID is SFT-1063.

                          I look forward to being of further assistance.
                          Last edited by NinjaTrader_Jesse; 08-06-2018, 11:34 AM.
                          JesseNinjaTrader Customer Service

                          Comment


                            #14
                            Originally posted by HUNTER_TACTICS
                            Hey Jesse,

                            I did it, Could use some work but its better than nothing. Thanks for the help guys!
                            Where can I download this version of pivot point indicator please?

                            Comment


                              #15
                              Hello Hunter_Tactics,

                              You will find daily, weekly, monthly, quarterly and annual pivot points as needed in our library

                              Daily pivots are calculated using the high, low and close from the previous day’s session, locating intraday support and resistance points.


                              Download of all 120 library indicators is free for members.

                              The pivots also plot for the prior days. Additionally you will find a few more options which may be unselected if not needed:

                              - allows for displaying narrow and wide pivots for R3 and S3
                              - comes with levels R4 and S4
                              - has an option to display midpivots
                              - draws the central pivot and the directional pivot
                              - displays the pivot range
                              - allows for displaying Fibonacci pivots or Jackson Zones

                              As a little bonus our indicator will calculate pivots correctly all the time. This is not the case for the in-built NinjaTrader pivots indicator, which displays false values for Globex pivots (CME, NYMEX) on regular working days after Martin-Luther-King Day, President's Day, Memorial Day, Independence Day, Labor Day and Thanksgiving).

                              A chart of the library version of the daily pivots is attached.
                              Attached Files

                              Comment

                              Latest Posts

                              Collapse

                              Topics Statistics Last Post
                              Started by Waxavi, Today, 02:10 AM
                              1 response
                              16 views
                              0 likes
                              Last Post NinjaTrader_LuisH  
                              Started by Kaledus, Today, 01:29 PM
                              5 responses
                              13 views
                              0 likes
                              Last Post NinjaTrader_Jesse  
                              Started by Waxavi, Today, 02:00 AM
                              1 response
                              12 views
                              0 likes
                              Last Post NinjaTrader_LuisH  
                              Started by alifarahani, Today, 09:40 AM
                              5 responses
                              23 views
                              0 likes
                              Last Post NinjaTrader_Jesse  
                              Started by gentlebenthebear, Today, 01:30 AM
                              3 responses
                              17 views
                              0 likes
                              Last Post NinjaTrader_Jesse  
                              Working...
                              X