Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Pivots & Session Times

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

    Pivots & Session Times

    I've read most all the posts on this topic including "How are the Pivot indicator values calculated?", and I thought I understood it, but I'm still not getting the correct pivot numbers, unless I input HLC manually.

    I'm trying to calculate levels for the full session Dow Mini (YM). In the Central Time Zone session start is 3:30 PM and session end is 3:15 PM the following day. My data vendor does not supply daily data, so I have the indicator set to calculate from intraday data. The resulting pivot level values are not correct. When I go into Market Replay mode, it looks to me like its doing the recalculation sometime around 7:00 AM each day.

    Does anybody have an idea as to what is going on and how I might fix it?

    Thanx in advance.

    Bob

    #2
    Hello,

    The pivots are figured on the data displayed on the chart. So if you change your session times to cut out bars your pivots will change.

    What are you comparing your pivots to? Or are you figuring them off of the chart data? You cannot compare them to any other data as your data is different. You must figure them off of the historical data you have within your chart.

    Please do an internet search for pivot calculations generally.
    DenNinjaTrader Customer Service

    Comment


      #3
      I've been trading with pivots for over 15 years. Over those years I've been able to successfully code various pivot modifications in Tradestation, eSignal, & Sierra Charts. I know what pivots are and I know what the resultant values should be.

      I am new to Ninja, but from everything I've read I'm doing exactly as I should, but the resultant values are not correct. The only thing that I can think might be happening is that the current NT code for pivots has a problem dealing with time calculations that transcend midnight. This has been an issue with code that I've developed for other platforms, but I'm not familiar enough with NT code to determine whether that might be the cause or not.

      Anybody have any ideas?

      Thanx in advance.

      Bob

      Comment


        #4
        Pivots...

        I don't know about other exchanges, but CME and CBOT are adjusting final settlement prices based on Fair Value if I am not mistaken.
        That means the last price traded on that day might not be daily closing price.
        So there is NO WAY to calculate correct Pivot Points from intraday data because of that. You have to use daily bars (if your data provider supports them) or use User Defined OHLC.
        Last edited by roonius; 01-08-2009, 08:41 PM.

        Comment


          #5
          My suspicions were correct - or at least I think so???

          For those who might have had similar issues with the NT Pivots indicator take a look at this: http://www.ninjatrader-support2.com/...tid=-1&lpage=1

          Thank you Harry. This fixed it for me and even more!

          Comment


            #6
            Pivot Point Solution

            thanks Harry. This works.

            Comment


              #7
              Pivots from intraday data

              Only discoverd this thread today. I am using (cheap) data from IB. As far as my experience goes, Pivots calculated form daily data and from intraday data are identical, that means you can use either of them! Only thing to pay attention to: If calculated from intraday the last price quoted at 15:15 CT needs to be a bar close within the intraday chart. Impossible to calculate Pivots from a 60 min intraday chart, as the 15:15 value can be found nowhere. For smaller time intervals, say 30 min or smaller, Pivots can be calculated accurately from intraday charts, if the session is correctly chosen (I am referring to my indicator, which also automatically adjusts to summer time).

              If you have any example - say for ES - where the last price traded is not identical to the settlement price, please let me know!



              Originally posted by roonius View Post
              I don't know about other exchanges, but CME and CBOT are adjusting final settlement prices based on Fair Value if I am not mistaken.
              That means the last price traded on that day might not be daily closing price.
              So there is NO WAY to calculate correct Pivot Points from intraday data because of that. You have to use daily bars (if your data provider supports them) or use User Defined OHLC.

              Comment


                #8
                Using Harry's Pivot Code to Plot Overnight High and Low

                Harry, your NinjaScript pivots code is far and away the best pivot code I've seen offered in these forums. I've tried to adapt your script to plot the overnight high and low for the mini Dow Jones contract with limited success. I was wondering whether you might be able to offer some help.

                Essentially, what I did was to modify the script so that the "currentHigh" and "currentLow" values were the only ones that were plotted. I then set the "S_End_CME_Index" user defined value to 08:30 and the "S_Start_CME_Index" user defined value to 15:30. It seems to work OK if I remember to remove and then re-apply the indicator after the market opens. But then again on Mondays it doesn't seem to work correctly at all.

                Can you help me adapt your code so that the overnight high and low plots correctly on Mondays and you don't have to remove and then re-apply the indicator for other days?

                Comment


                  #9
                  Plotting Overnight Highs and Low

                  I understand your question and I agree that the indicator does not always plot the high and low of the overnight session, if you use it the way you indicate. This seems to happen on some days,for example today, which is Monday, but also last Tuesday. I will check whether there is a solution to the problem and then come back to you.

                  Originally posted by TrendTracker View Post
                  Harry, your NinjaScript pivots code is far and away the best pivot code I've seen offered in these forums. I've tried to adapt your script to plot the overnight high and low for the mini Dow Jones contract with limited success. I was wondering whether you might be able to offer some help.

                  Essentially, what I did was to modify the script so that the "currentHigh" and "currentLow" values were the only ones that were plotted. I then set the "S_End_CME_Index" user defined value to 08:30 and the "S_Start_CME_Index" user defined value to 15:30. It seems to work OK if I remember to remove and then re-apply the indicator after the market opens. But then again on Mondays it doesn't seem to work correctly at all.

                  Can you help me adapt your code so that the overnight high and low plots correctly on Mondays and you don't have to remove and then re-apply the indicator for other days?

                  Comment


                    #10
                    Plotting Overnight Highs and Low

                    Harry - that would be great!

                    I look forward to seeing what you come up with.

                    Comment


                      #11
                      Modified indicator for testing

                      Hi TrendTracker,

                      I slightly modified the CMICurrentDayOHL indicator. There was a small inconsistency in the ConvertTime subroutine, which I hope to have eliminated in this version. I would appreciate, if you tested the modified indicator attached.
                      Attached Files

                      Comment


                        #12
                        Modified indicator for testing

                        Hi Harry,

                        I have it imported and I set begin time to 15:30 and end time to 8:30. So far it looks good, but I suppose the true test is how it deals with Mondays and days after a holiday. When I get some time I'll try importing modified data to simulate both conditions.

                        Thank you very much for the tweak! I'll let you know how it turns out.

                        Comment


                          #13
                          Hi TrendTracker,

                          just updated my Pivot Family (attached). This is what I changed:

                          - Small modification for your problem of overnight highs and lows. Because the CurrentDayOHL indicator is not designed to display the current high and low out of period (after the session end), it starts drawing a new line after the overnight session ends, but should display correct values. I think you can also try the PivotsDaily_V7, as it includes Prior High and Low!

                          - All lines slightly extended to the right, so they show as if they were in "CalculateOnBarClose = False" mode, although the indicators are always set to "CalculateOnBarClose=true".

                          - Option to plot or not to plot the line labels.

                          - Logic of CurrentDayOHL, etc. changed. For all instruments not defined within the indicators (the predefined instruments comprise forex and futures only), the Local_Session mode needs to be selected and session times entered in local user's time to the Local fields within the indicator.

                          I greatly would appreciate, if you find some time to test this updated set of indicators, before I put it in the indicator section.
                          Attached Files

                          Comment


                            #14
                            Hi Harry,

                            Yes, absolutely!

                            I was able to import data to simulate Monday trading and tested your last set of files. They worked just fine. No problems at all.

                            I'll install your new files and then test them this week.

                            Comment


                              #15
                              Hello,

                              I have inserted the new pivot indicator.

                              The re is something wrong with R1,R2 etc

                              They are way above the proper position.Aprox 20 pips!!!

                              I have entered user defined numbres.

                              Do you see any mistake ?




                              Thank you

                              B

                              Comment

                              Latest Posts

                              Collapse

                              Topics Statistics Last Post
                              Started by helpwanted, Today, 03:06 AM
                              1 response
                              12 views
                              0 likes
                              Last Post sarafuenonly123  
                              Started by Brevo, Today, 01:45 AM
                              0 responses
                              9 views
                              0 likes
                              Last Post Brevo
                              by Brevo
                               
                              Started by aussugardefender, Today, 01:07 AM
                              0 responses
                              5 views
                              0 likes
                              Last Post aussugardefender  
                              Started by pvincent, 06-23-2022, 12:53 PM
                              14 responses
                              242 views
                              0 likes
                              Last Post Nyman
                              by Nyman
                               
                              Started by TraderG23, 12-08-2023, 07:56 AM
                              9 responses
                              387 views
                              1 like
                              Last Post Gavini
                              by Gavini
                               
                              Working...
                              X