Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Pivots indicator not working with Daily data

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

    Pivots indicator not working with Daily data

    Good afternoon.

    My Pivots indicator works well with futures data (NinjaTrader Continuum.) However, when attempting to plot it on an intraday range chart of IDEALPRO (Interactive Brokers) EURUSD spot forex data with 'HLC Calculation mode' set to 'Daily bars' I get an error message: "Insufficient historical data to calculate pivots," despite the fact that a daily chart of the EURUSD is open and displays 365 daily bars.

    As Interactive Brokers does not offer historical tick data for the spot forex market the chart needs to rely on daily bars to calculate the Pivots.

    I have read through this thread: Pivots Indicator Daily HLC calc (Possible Bug) - NinjaTrader Support Forum​, which describes a similar problem but with futures instruments and followed the steps recommended in it, including those outlined in the message timestamped as 03-29-2023 11:36 AM, without results.

    I'd be grateful if you could let me know what could be causing this behaviour and how to address it. Snapshots below.

    Thanks and regards,
    Aaron

    The error message as it appears on the chart:
    Click image for larger version

Name:	image.png
Views:	166
Size:	6.8 KB
ID:	1321614

    ​The properties window for the Pivots indicator is as follows:
    Click image for larger version

Name:	image.png
Views:	127
Size:	60.1 KB
ID:	1321615

    #2
    Hello Aaronk,

    Thank you for the message.

    It looks like you have the Pivots Indicator plotting off of a 20 Range data series and not a Daily chart.
    • Click image for larger version

Name:	image.png
Views:	134
Size:	96.2 KB
ID:	1321623

    If you have multiple data series on that chart > Click the "Input series" box > Select the desired data series instead > Click OK

    Please let us know if we may provide any further assistance.​

    Comment


      #3
      Hello again.

      I see... I'm trying to get the Pivots indicator plotted on a 20 Range chart, but using data data. This is because Interactive Brokers does not provide historical tick data for spot forex instruments; --in other words, at any point in time, the 20 Range chart only has data in it for the current session; --there's no data from yesterday's session, which I could use to plot Pivots based on intraday data.

      I may be missing something, so apologies in advance, but am I right in thinking that you are suggesting above adding a second, Daily data series to the chart to enable the calculations of the Pivot indicator based on Daily bars and setting the 'Input series' to that daily chart? Would this help the Pivots indicator plot on the 20 Range bar?

      Thanks in advance!
      Aaron

      Comment


        #4
        Hello aaronk,

        Thank you for the update.

        Yes, I'm suggesting to add a 2nd data series to the window > Make it a Daily data series > Make it Transparent to "hide" > Then use the hidden data series for the indicator.

        Here is an example of how you could set up the two data series:
        • Click image for larger version

Name:	image.png
Views:	153
Size:	107.6 KB
ID:	1321649
        Then here is an example of how to change the "Input series" of an Indicator so that it is basing it off the Daily data series instead of Range data series in this example:
        • Click image for larger version

Name:	image.png
Views:	109
Size:	105.7 KB
ID:	1321650
        Finally, here is an example of what the setup above currently looks like on my PC. I activated "Auto Scale" on the Pivots indicator so that is why it is stretching to show all of the levels.
        • Unfortunately, I do not have access to an Interactive Brokers connection with real-time data at the moment to do a direct apples-to-apples test to demonstrate how it would behave without access to the historical tick data.
        • This is me connected to the "NinjaTrader" connection type for data through NinjaTrader Brokerage:
          • Click image for larger version

Name:	image.png
Views:	112
Size:	45.5 KB
ID:	1321651

        Please let us know if we may provide any further assistance.

        Comment


          #5
          Good morning and thank you for this, Clayton.

          I have followed the instructions above.

          I plotted the two data series as explained (see first screenshot below) with the pivot levels configured as suggested. I noticed, however, that the pivot levels did not correspond to the expected daily pivots; --those based on yesterday's high, low and close.

          I then plotted, in a separate chart and for comparison (see second screenshot below) a single daily data series with the 'Pivot range' parameter set to Weekly. As can be seen from the screenshots, the two sets of values are the same.

          This suggests that the solution outlined above plots the weekly pivots on a 20 Range chart, instead of the daily pivots, --based on yesterday's high, low and close--, which is what was intended.

          ​Please do let me know if I'm doing something wrong. Assuming that I'm not (big assumption!) is there a way of plotting the daily pivots on a 20 Range chart with no intraday data from yesterday's session in it?

          Thanks again and regards,
          Aaron


          Click image for larger version

Name:	image.png
Views:	131
Size:	114.0 KB
ID:	1321677
          Click image for larger version

Name:	image.png
Views:	106
Size:	135.3 KB
ID:	1321678

          Comment


            #6
            Hello Aaronk,

            Thank you for the message.

            Instead of using a Daily Data Series, use a 1440 minute data series with your desired Trading Hours Template applied to the chart to refine the hours you want to be looked at.
            • Right-click on your chart > Switch the Daily data series to a 1440 minute (There are 1440 minutes in a day)
            • Now, choose the Trading Hours Template that plots the hours of the day you want to be considered > Click OK
              • You would also want to put the same trading hours template on the other data series so you don't see that time plotted while it isn't for the pivots
            Now, you should be able to set the "HLC Calculation mode" to "Calculated from intraday bars" and then switch the Pivot Range to Daily.


            Please let us know if we may provide any further assistance.

            Comment


              #7
              Thanks again for this, Clayton.

              I've now switched to a 1440-minute data series instead of a daily one, and set the Trading Hours Template to 'Forex' on both the 1440-minute and the 20 Range data series. I've set the 'HLC calculation mode' parameter to 'Calculated from intraday data' and the 'Pivot range' parameter to Daily.

              Outcome is that the Pivots indicator plots its values on the 20 Range chart. However, the values don't appear to be correct. Please see screenshot below. On the left-hand side is the 20 Range chart and on the right-hand side, --for reference--, is a 15-minute chart of the same instrument with Pivots calculated from intraday data. The values differ.

              Click image for larger version

Name:	image.png
Views:	104
Size:	194.8 KB
ID:	1321719​​
              If I zoom into the data on the 20 Range chart by clicking on the x axis (bottom of the chart) and dragging it left, the pivots' horizontal lines disappear but the price markers for the pivot levels remain on the y axis.

              Any thoughts on what could explain the difference in the Pivot values between the two charts above and how to address the matter of the disappearing pivot lines?

              I appreciate your support with this.

              Thanks and regards,
              Aaron








              Attached Files

              Comment


                #8
                Hello aaronk,

                Thank you for the update.

                You are comparing the pivots of a 1440 minute chart to a 15 minute chart with your example.

                It is expected for pivots on a 1440-minute chart to differ from the pivots on a 15-minute chart. This is because pivots are calculated based on the high, low, and close of the time period set on the chart.
                • When using a 1440-minute chart (essentially equivalent to a daily chart), the calculations will consider the daily high, low, and close values.
                • On a 15-minute chart, the calculations will consider these values for every 15-minute period, leading to different pivot points.

                The formula for calculating pivots typically includes:
                • Pivot Point (PP) = (High + Low + Close) / 3
                • Support and Resistance levels are then calculated based on the PP and range from the High and Low.

                Because the high, low, and close values vary between time frames, the pivot values will also vary.

                If you notice significant discrepancies beyond what’s expected from the time frame change, it could be due to the data provider, incorrect chart settings, or issues with the data loading properly.

                Please ensure that both charts are configured properly with the same instrument, chart interval, and Trading Hours template.


                Please let us know if we may provide any further assistance.
                Last edited by NinjaTrader_Clayton; 10-17-2024, 11:42 AM.

                Comment


                  #9
                  Hello again, Clayton.

                  I understand that there may be differences in the pivot values when calculated from daily data and from intraday data, due to a variety of reasons.

                  Thank you for your support with this. It's been very helpful.

                  Regards,
                  Aaron

                  Comment

                  Latest Posts

                  Collapse

                  Topics Statistics Last Post
                  Started by argusthome, 03-08-2026, 10:06 AM
                  0 responses
                  103 views
                  0 likes
                  Last Post argusthome  
                  Started by NabilKhattabi, 03-06-2026, 11:18 AM
                  0 responses
                  52 views
                  0 likes
                  Last Post NabilKhattabi  
                  Started by Deep42, 03-06-2026, 12:28 AM
                  0 responses
                  34 views
                  0 likes
                  Last Post Deep42
                  by Deep42
                   
                  Started by TheRealMorford, 03-05-2026, 06:15 PM
                  0 responses
                  37 views
                  0 likes
                  Last Post TheRealMorford  
                  Started by Mindset, 02-28-2026, 06:16 AM
                  0 responses
                  74 views
                  0 likes
                  Last Post Mindset
                  by Mindset
                   
                  Working...
                  X