Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Pivot Indicator

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

    #16
    Hello Andrew,
    To assist you further can you upload a screenshot of the settings which you are using to backtest the strategy.

    I look forward to assisting you further.
    JoydeepNinjaTrader Customer Service

    Comment


      #17
      can i email it? it is giving me an upload error. i put it in a .rtf file.

      Comment


        #18
        sorry, got it.
        Attached Files

        Comment


          #19
          Hello Andrew,
          Please email it to support[AT]ninjatrader[DOT]com

          Also, please send the code so that I can test it at my end.

          Please append Attn:Joydeep in the subject line of the email and give a reference of this thread in the body of the email.

          I look forward to assisting you further.
          JoydeepNinjaTrader Customer Service

          Comment


            #20
            Hello Andrew,
            Please make sure you have enough historical data for the backtest.
            • In Control Center menu bar goto Tools>Historical Data Manager>Edit tab
            • Look for the instrument VZ and please make sure you have enough data.


            If you have a subscription for Kinetick please make sure you are pulling the data while backtesting it.
            • In Control Center menu bar goto Tools>Options>Data tab
            • Please make sure Get data from server (if available) is checked.
            JoydeepNinjaTrader Customer Service

            Comment


              #21
              it's all there.

              Comment


                #22
                Hello Andrew,
                This is to confirm I have got your email and has replied back to you.
                JoydeepNinjaTrader Customer Service

                Comment


                  #23
                  i did not receive a reply. does this just mean you received the email?

                  Comment


                    #24
                    Hello,

                    I was able to locate Joydeep email he sent you - please see below

                    Hello Andrew,

                    Unfortunately I cannot replicate the issue. If I backtest it using the settings as shown in the attached screenshot I can get the trades from February.



                    Please make sure you have enough data ( both intraday and daily) for the backtest.

                    You can download data using the download feature in NinjaTrader.

                    In Control Center menu bar goto Tools>Historical Data manager>Download
                    http://www.ninjatrader.com/support/h...l?download.htm
                    I'm also sending you another email to confirm you are receiving our responses. Please check your spam folder and ensure you have added support[at]ninjatrader[dot]com to your list of trusted contacts.

                    We have members monitoring these forums over the weekend, so let us know if you have further questions.
                    Attached Files
                    MatthewNinjaTrader Product Management

                    Comment


                      #25
                      Another question now that I'm back at my PC after a week or two off:

                      why does this code
                      (all variables are defined as doubles)
                      Stock is AAPL
                      __________________________________________________ ___________________

                      protected override void OnBarUpdate()


                      pivotPoint = Pivots(PivotRange.Daily, HLCCalculationMode.DailyBars, 0, 0, 0, 20).PP[0];
                      resistance1 = Pivots(PivotRange.Daily, HLCCalculationMode.DailyBars, 0, 0, 0, 20).R1[0];
                      resistance2 = Pivots(PivotRange.Daily, HLCCalculationMode.DailyBars, 0, 0, 0, 20).R2[0];
                      support1 = Pivots(PivotRange.Daily, HLCCalculationMode.DailyBars, 0, 0, 0, 20).S1[0];
                      support2 = Pivots(PivotRange.Daily, HLCCalculationMode.DailyBars, 0, 0, 0, 20).S2[0];


                      high = High[0];
                      low = Low[0];
                      close = Close[0];
                      myPivot = ((High[0] + Low[0] + Close[0]) / 3);


                      Print(Time[0].ToString() + " R2: " + resistance2.ToString() + " R1: " + resistance1.ToString() + " PP: " + pivotPoint.ToString() + " S1: " + support1.ToString() + " S2: " + support2.ToString());

                      Print(Time[0].ToString() + " High: " + high.ToString() + " Low: " + low.ToString() + " Close: " + close.ToString() + " PP: " + myPivot.ToString());

                      __________________________________________________ ____________________


                      Output this printed result: ??

                      8/2/2012 4:00:00 PM R2: 607.79 R1: 607.79 PP: 607.79 S1: 607.79 S2: 607.79
                      8/2/2012 4:00:00 PM High: 610.69 Low: 600.25 Close: 607.79 PP: 606.243333

                      (the bottom line is correct, FYI....)


                      thanks in advance,

                      Andrew
                      Last edited by alabell; 08-06-2012, 11:07 AM.

                      Comment


                        #26
                        Hello Andrew,
                        To assist you further may I know what timeframe you are applying the indicator.

                        I look forward to assisting you further.
                        JoydeepNinjaTrader Customer Service

                        Comment


                          #27
                          i have added no "timeframe bars" so that the default is being be driven by the backtest UI.


                          where am using


                          Last
                          Day
                          1

                          aha, I think I see what is missing, the last for a day bar on close is in fact the closing price.

                          but i will still ask for the correct code to insert so that my "Pivots" data (PP, s1, s2, r1, r2) are able to pick up all of the correct data.

                          Regards,

                          Andrew

                          Comment


                            #28
                            Hello Andrew,
                            The code is correct.

                            If I run it on a daily bar I get this print
                            8/6/2012 2:00:00 PM R2: 624.66 R1: 624.66 PP: 624.66 S1: 624.66 S2: 624.66
                            8/6/2012 2:00:00 PM High: 624.87 Low: 615.26 Close: 624.66 PP: 621.596666666667
                            If I run it on a 5 minute bar I get this print
                            8/6/2012 11:30:00 AM R2: 621.5 R1: 618.6 PP: 615.08 S1: 612.18 S2: 608.66
                            8/6/2012 11:30:00 AM High: 624.69 Low: 624.12 Close: 624.2 PP: 624.336666666667
                            If you are running it on daily bars then please make sure to set the PivotRangeType to Weekly or Monthly. Like:
                            pivotPoint = Pivots(PivotRange.Monthly, HLCCalculationMode.DailyBars, 0, 0, 0, 20).PP[0];
                            Please let me know if I can assist you any further.
                            JoydeepNinjaTrader Customer Service

                            Comment


                              #29
                              This does not make sense to me; I want today's pivot points to stay the same all day, based on yesterday's (H+L+C)/3 and then be able to say "if the stock crosses above or below this level on a one minute bar, buy or sell."

                              so I basically want today's pivots based on yesterdays H,L and C. but the data im comparing it to should be, let's say, one minute, and i can not get this to function.


                              Why would monthly have anything to do with this approach?

                              Comment


                                #30
                                Hello Andrew,
                                In case you are applying the indicator on a one minute bar then the code

                                Code:
                                myPivot = ((High[0] + Low[0] + Close[0]) / 3);
                                gives the value of the last running bar, and not yesterdays pivot values.

                                to calculate the pivot value of yesterdays data please use the below code

                                Code:
                                myPivot = (this.PriorDayOHLC().PriorClose[0] + this.PriorDayOHLC().PriorHigh[0] + this.PriorDayOHLC().PriorLow[0]) / 3;
                                JoydeepNinjaTrader Customer Service

                                Comment

                                Latest Posts

                                Collapse

                                Topics Statistics Last Post
                                Started by NullPointStrategies, Today, 05:17 AM
                                0 responses
                                52 views
                                0 likes
                                Last Post NullPointStrategies  
                                Started by argusthome, 03-08-2026, 10:06 AM
                                0 responses
                                130 views
                                0 likes
                                Last Post argusthome  
                                Started by NabilKhattabi, 03-06-2026, 11:18 AM
                                0 responses
                                70 views
                                0 likes
                                Last Post NabilKhattabi  
                                Started by Deep42, 03-06-2026, 12:28 AM
                                0 responses
                                43 views
                                0 likes
                                Last Post Deep42
                                by Deep42
                                 
                                Started by TheRealMorford, 03-05-2026, 06:15 PM
                                0 responses
                                48 views
                                0 likes
                                Last Post TheRealMorford  
                                Working...
                                X