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

PivotPoints indicator alteration

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

    PivotPoints indicator alteration

    Hi,

    I would like to change the default PivotPoints indicator a bit so it also shows historical pivot points and not just the current day. Anybody know how to go about?

    Thanks!

    #2
    Hi siroki, for that item I would suggest looking into this shared collection of indicators - http://www.ninjatrader.com/support/f...d=4&linkid=343

    They would already offer that alternation per default.
    BertrandNinjaTrader Customer Service

    Comment


      #3
      Alternatively you can also use one of these indicators.



      They are preset to show historical pivots as lines. Depending on your session template you will be able to display regular session (floor) or full session (Globex) pivots.

      Comment


        #4
        I really like to use the standard shipped pivot indicator because I think the other ones come with too much 'overhead' stuff i don't need. There must be something in the script that makes it only show it for the current day right?

        If I could just take that piece of code away it should show for every day. I just need some direction on where to look. Thanks!
        Last edited by siroki; 05-17-2014, 04:18 AM.

        Comment


          #5
          Originally posted by siroki View Post
          I really like to use the standard shipped pivot indicator because I think the other ones come with too much 'overhead' stuff i don't need. There must be something in the script that makes it only show it for the current day right?

          If I could just take that piece of code away it should show for every day. I just need some direction on where to look. Thanks!

          The standard pivots are fine, if you use them with Kinetick data, and if you only wish to display GLOBEX pivots, but

          -> they do not allow you to display floor pivots
          -> they do not allow you display correct pivots after a holiday
          -> they will not display correct pivots with datafeeds such as Rithmic or CQG

          Most retail traders use false pivots and some of the options that come with the enhanced indicators are just there to avoid mistakes

          -> prior day high, low and close are needed to visually check whether high, low and close have been selected correctly

          Options, which are not needed, such as midpivots or VWAP can be simply switched off or set to transparent. And you can display levels for the prior days, if you wish.
          Last edited by Harry; 05-17-2014, 05:04 AM.

          Comment


            #6
            Thanks for your reply. Appreciate your in-depth answer. I solely trade forex so I think the standard pivots will do just fine.

            I'm going to work my way around by just drawing a horizontal line in my strategy for each pivot point based on the standard pivot points indicator.

            Comment


              #7
              Ok, I give up. I will use anaPivotV42

              Comment


                #8
                Originally posted by siroki View Post
                Thanks for your reply. Appreciate your in-depth answer. I solely trade forex so I think the standard pivots will do just fine.

                I'm going to work my way around by just drawing a horizontal line in my strategy for each pivot point based on the standard pivot points indicator.
                You are correct. For FOREX the standard pivot indicator will do fine. If you use it with intraday data, the outcome will depend on the selected session template.

                Comment


                  #9
                  Originally posted by siroki View Post
                  Ok, I give up. I will use anaPivotV42
                  You can also use it to display Jackson Zones, Fibonacci pivots or Camarilla pivots.
                  Let me know, if you have any questions.

                  Comment


                    #10
                    Originally posted by siroki View Post
                    Thanks for your reply. Appreciate your in-depth answer. I solely trade forex so I think the standard pivots will do just fine.

                    I'm going to work my way around by just drawing a horizontal line in my strategy for each pivot point based on the standard pivot points indicator.
                    If you must insist on your original position, open up the indicator, and rem out the necessary portions of the custom Plot(), to match this:
                    Code:
                                    using (GraphicsPath    path = new GraphicsPath()) 
                                    {
                                        if (brush.Color != plot.Pen.Color)    
                                            brush = new SolidBrush(plot.Pen.Color);
                    
                                        for (int idx = this.LastBarIndexPainted; idx >= Math.Max(this.FirstBarIndexPainted, this.LastBarIndexPainted - Width); idx--)
                                        {
                                            if (idx - Displacement < 0 || idx - Displacement >= Bars.Count || (!ChartControl.ShowBarsRequired && idx - Displacement < BarsRequired))
                                                continue;
                                            else if (!series.IsValidPlot(idx))
                                                continue;
                    
                    //                        if (idx < firstBarIdxToPaint)
                    //                            break;
                    
                                            double    val = series.Get(idx);
                                            int        x    = ChartControl.GetXByBarIdx(BarsArray[0], idx);
                                            int        y    = ChartControl.GetYByValue(this, val);
                    
                                            if (lastX >= 0)
                                            {
                    //                            if (y != lastY) // Problem here is, that last bar of old day has date of new day
                    //                                y = lastY;
                                                path.AddLine(lastX - plot.Pen.Width / 2, lastY, x - plot.Pen.Width / 2, y);
                                            }
                                            lastX    = x;
                                            lastY    = y;
                                        }
                    
                                        graphics.SmoothingMode = SmoothingMode.AntiAlias;
                                        graphics.DrawPath(plot.Pen, path);
                                        graphics.SmoothingMode = oldSmoothingMode;
                                        graphics.DrawString(plot.Name, ChartControl.Font, brush, lastX, lastY - textHeight / 2, stringFormatFar);
                                    }

                    Comment

                    Latest Posts

                    Collapse

                    Topics Statistics Last Post
                    Started by mjairg, 07-20-2023, 11:57 PM
                    3 responses
                    213 views
                    1 like
                    Last Post PaulMohn  
                    Started by TheWhiteDragon, 01-21-2019, 12:44 PM
                    4 responses
                    544 views
                    0 likes
                    Last Post PaulMohn  
                    Started by GLFX005, Today, 03:23 AM
                    0 responses
                    3 views
                    0 likes
                    Last Post GLFX005
                    by GLFX005
                     
                    Started by XXtrader, Yesterday, 11:30 PM
                    2 responses
                    12 views
                    0 likes
                    Last Post XXtrader  
                    Started by Waxavi, Today, 02:10 AM
                    0 responses
                    7 views
                    0 likes
                    Last Post Waxavi
                    by Waxavi
                     
                    Working...
                    X