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

adding Pivots to the Pivots indicator? Help

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

    adding Pivots to the Pivots indicator? Help

    Hello guys so im modifying the pivot point indicator and adding extra pivot levels to it, but this indicator is not your regular indicator it apparently it has custom techniques to plot.
    and i have made already some modification to it without success

    so what has to be changed to add extra lines to this indicator?

    thank you
    Last edited by michel; 08-12-2011, 01:57 AM.

    #2
    michel, unfortuntatelty we would not be familiar with the custom code you attempt to modify, but there are several Pivot variations in the sharing that would contain more than the default levels :

    http://www.ninjatrader.com/support/f...=pivots&desc=1
    BertrandNinjaTrader Customer Service

    Comment


      #3
      so i have done these things already

      step 1
      did a replace all strings that matched "Pivots" with "MyPivots" I check the Match case to make sure i dont change other strings

      **checked it was working ok

      step 2
      add brushes 2 brushes in the

      #region Variables
      private SolidBrush[] brushes = { new SolidBrush(Color.Black), new SolidBrush(Color.Black), new SolidBrush(Color.Black), new SolidBrush(Color.Black), new SolidBrush(Color.Black), new SolidBrush(Color.Black), new SolidBrush(Color.Black) };

      step 3
      initialize r4 and s4
      private double r4 = 0;
      private double s4 = 0;

      step 4
      add 2 plots in Initialize()
      Add(new Plot(Color.Blue, "R4"));
      Add(new Plot(Color.Red, "S4"));

      in OnBarUpdate()

      step 5
      add 2 new equations
      s4 = pp - 3 * (currentHigh - currentLow);
      r4 = pp + 3 * (currentHigh - currentLow);

      step 6
      add 2 lines ( don't know exactly what they do)
      R4.Set(r4);
      S4.Set(s4);

      step 7
      added 2 dataseries? in #region Properties

      /// <summary>
      /// </summary>
      [Browsable(false)]
      [XmlIgnore]
      public DataSeries R4
      {
      get { return Values[7]; }
      }

      /// <summary>
      /// </summary>
      [Browsable(false)]
      [XmlIgnore]
      public DataSeries S4
      {
      get { return Values[8]; }
      }

      after all this steps nothing is plotting

      any clues?


      so correction...... i added those lines and is working!
      Last edited by michel; 08-12-2011, 02:23 AM. Reason: is working...

      Comment


        #4
        Any error messages you would notice in the Control Center Log tab as the indicator is run? Can you please attach your script so we could give it a quick run here?

        Thanks,
        BertrandNinjaTrader Customer Service

        Comment


          #5
          Actually it worked!

          i did the same steps before but no success

          i just did it again as i was writing this threat and to my surprised it worked!, but that was after i posted this thread

          well.... keep for the record that this is how you modify this pivot indicator

          cheers
          Last edited by michel; 08-12-2011, 02:51 AM.

          Comment


            #6
            We're happy to hear you could resolve it!
            BertrandNinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by goodknight777, Today, 11:39 AM
            1 response
            7 views
            0 likes
            Last Post NinjaTrader_Jim  
            Started by Malik_demoacct, Today, 08:31 AM
            0 responses
            19 views
            0 likes
            Last Post Malik_demoacct  
            Started by tonynt, Today, 11:50 AM
            0 responses
            5 views
            0 likes
            Last Post tonynt
            by tonynt
             
            Started by Welovethelibrary, Today, 11:44 AM
            0 responses
            3 views
            0 likes
            Last Post Welovethelibrary  
            Started by MohammedAmine, Today, 10:44 AM
            1 response
            7 views
            0 likes
            Last Post NinjaTrader_Kate  
            Working...
            X