Support Board
Date/Time: Fri, 28 Feb 2025 13:28:59 +0000
[Programming Help] - Overlaying Pivot Points
View Count: 1681
[2021-08-07 13:56:00] |
Botan626 - Posts: 294 |
To explain less, I attached a chartbook. I want to see pivot points as solid lines for 2021-07-19 only, and I want to use daily chart as a source chart. What settings should I use to achieve that? If I set "Fill Blanks with Last Value" setting to Yes, lines are plotted to the end of the chart. Update: chartbook and spreadsheet, capable of doing this, are in the post #46. Date Time Of Last Edit: 2021-08-15 10:43:21
|
![]() |
[2021-08-09 06:18:47] |
|
There is no support at all for this.
Sierra Chart Support - Engineering Level Your definitive source for support. Other responses are from users. Try to keep your questions brief and to the point. Be aware of support policy: https://www.sierrachart.com/index.php?l=PostingInformation.php#GeneralInformation For the most reliable, advanced, and zero cost futures order routing, *change* to the Teton service: Sierra Chart Teton Futures Order Routing Date Time Of Last Edit: 2021-08-09 06:20:33
|
[2021-08-09 06:51:47] |
Botan626 - Posts: 294 |
There is no support at all for this.
Any chance it could be added? |
[2021-08-09 07:01:23] |
Botan626 - Posts: 294 |
Another question. Why, when I overlaying pivot points from intraday chart to range chart for a specific day, lines are not solid? Again, if I set "Fill Blanks with Last Value" setting to Yes, lines are plotted to the end of the chart, which I don't want. http://www.sierrachart.com/image.php?Image=1628492579186.png This is a bug? You can see it in the attached chartbook. Date Time Of Last Edit: 2021-08-09 07:04:24
|
![]() |
[2021-08-09 17:22:08] |
Sawtooth - Posts: 4177 |
You have two questions, yet your two example chartbooks use the same name, so that makes it difficult for others to help. In both cases, you'll need to set 'Fill Blanks With Last Value' to Yes. When overlaying from a Daily chart: To avoid the lines to the end of the chart, a workaround is to use formulas in the Spreadsheet Study study to limit the plotting to a specific day. There is no setting to avoid this. When overlaying from a 60 min chart to a range chart: It doesn't display to the end of the chart for me. It only displays each day's pivots, as expected. But if you want to limit the plotting to certain days or times of day, a workaround is to use formulas in the Spreadsheet Study study. Maybe if it were known the full extent of what you are trying to do that a better solution could be offered. |
[2021-08-09 18:28:53] |
Botan626 - Posts: 294 |
Thanks for your reply, tomgilb. You have two questions, yet your two example chartbooks use the same name, so that makes it difficult for others to help.
To the 1st Q Sierra Chart Engineering clearly answered, that it's not supported, so you could ignore that Q. In both cases, you'll need to set 'Fill Blanks With Last Value' to Yes.
To avoid the lines to the end of the chart
It doesn't display to the end of the chart for me
Why in the 1st case lines are plotted to the end of the chart for you, and in the 2nd case not with 'Fill Blanks With Last Value' set to Yes? They are plotted to the end of the chart for me, no matter what source chart I use. Source intraday chart with 1-0-0 Days-Mins-Secs Per Bar setting: http://www.sierrachart.com/image.php?Image=1628533345722.png Source intraday chart with 0-60-0 Days-Mins-Secs Per Bar setting: http://www.sierrachart.com/image.php?Image=1628532446521.png So, this is a bug in a study? To avoid the lines to the end of the chart, a workaround is to use formulas in the Spreadsheet Study study to limit the plotting to a specific day.
But if you want to limit the plotting to certain days or times of day, a workaround is to use formulas in the Spreadsheet Study study.
I absolutely don't feel like defining formulas, and I need to have a quick way to change that specific day, which I can achieve by changing date range in the source chart. Maybe if it were known the full extent of what you are trying to do that a better solution could be offered.
All I want is to see pivot points as solid lines on the chart for a specific day, no matter what source chart is (1-0-0 or 0-60-0). I thought that is the purpose of Study/Price Overlay study. I'm very surprised there are problems doing it. Date Time Of Last Edit: 2021-08-09 18:33:10
|
[2021-08-09 20:29:11] |
Sawtooth - Posts: 4177 |
All I want is to see pivot points as solid lines on the chart for a specific day, no matter what source chart is (1-0-0 or 0-60-0).
In order for the overlayed pivot lines to not plot to the end of the chart, the source chart's pivot point study's 'Number Of Days To Calculate' must be greater than 1. However, with this setting, you'll see the overlayed pivot lines on more than one day.I thought that is the purpose of Study/Price Overlay study. I'm very surprised there are problems doing it.
The purpose of the Study/Price Overlay study is to overlay everything the source chart outputs. The problem is with the source chart's Pivot Points study's output.I need to have a quick way to change that specific day, which I can achieve by changing date range in the source chart.
This doesn't solve the problem of the source chart's pivot points study output.Bottom line is that you can't quickly do what you want the way you want. You would need to use a spreadsheet study workaround... ...Unless you can use the display of more than one day's overlaid pivots. |
[2021-08-09 21:19:37] |
Botan626 - Posts: 294 |
In order for the overlayed pivot lines to not plot to the end of the chart, the source chart's pivot point study's 'Number Of Days To Calculate' must be greater than 1. However, with this setting, you'll see the overlayed pivot lines on more than one day.
Can't confirm it. 'Number Of Days To Calculate' = 2, 'Fill Blanks With Last Value' = No, result for 1-0-0: http://www.sierrachart.com/image.php?Image=16285435945.png result for 0-60-0: http://www.sierrachart.com/image.php?Image=1628543666982.png The purpose of the Study/Price Overlay study is to overlay everything the source chart outputs. The problem is with the source chart's Pivot Points study's output.
I don't know where the problem is, but it definitely should not be this way and it definitely could be improved. You would need to use a spreadsheet study workaround...
Would I be able to use 1 spreadsheet for multiple charts with different symbols and timeframes? What if I would need to change a specific date I need just for 1 chart? ...Unless you can use the display of more than one day's overlaid pivots.
I don't want to see pivots for more than 1 day. Date Time Of Last Edit: 2021-08-09 21:20:16
|
[2021-08-10 01:06:22] |
Sawtooth - Posts: 4177 |
Can't confirm it. 'Number Of Days To Calculate' = 2, 'Fill Blanks With Last Value' = No,
'Fill Blanks With Last Value' must always be Yes when the duration of the destination chart's bars is less than the duration of the source chart's bars.I don't know where the problem is, but it definitely should not be this way and it definitely could be improved.
Agreed, but Sierra Chart is so flexible that there is usually a workaround.Would I be able to use 1 spreadsheet for multiple charts with different symbols and timeframes?
Yes, you can use one same-named spreadsheet file on all charts. Each chart would have its own spreadsheet sheet.This assumes all charts are in the same chartbook. If each symbol uses its own chartbook, each will require an uniquely named spreadsheet file, but it can be copied to each chartbook. What if I would need to change a specific date I need just for 1 chart?
Since each chart would have its own sheet, each sheet could have its own specific date entry.The basic concept is to use columns K-Z on the spreadsheet to plot the pivot point lines from the overlay study where a formula would filter all but one date. Then the Study/Price Overlay study would be hidden, since the spreadsheet study would be doing its filtered display of the pivot point lines. I'm not going to say that this workaround won't seem complicated, but it is possible, and it puts you in control. If you want to try building this yourself, I can help you. If you want me to build it for you for a fee, contact me here: https://www.sawtoothtrade.com/contact.html |
[2021-08-10 08:42:56] |
Botan626 - Posts: 294 |
'Fill Blanks With Last Value' must always be Yes when the duration of the destination chart's bars is less than the duration of the source chart's bars.
Again, with 'Fill Blanks With Last Value' set to Yes, lines are plotted to the end of the chart, regardless of any other settings. Sierra Chart is so flexible that there is usually a workaround
I strongly believe there shouldn't be a need for a workaround for basic use cases. I choose intraday chart period 'Days-Mins-Secs Per Bar' 1-0-0 or 0-60-0, define date range on a source chart and just want to plot pivots on a destination chart for 1 day. What's abnormal about it? In 1st case lines are not plotted at all, in 2nd case lines are dashed, with 'Fill Blanks With Last Value' set to Yes lines are plotted to the end of the chart in both cases. I consider both cases as code flaws or bugs. Yes, you can use one same-named spreadsheet file on all charts. Each chart would have its own spreadsheet sheet. This assumes all charts are in the same chartbook.
Yes, all charts are in the same chartbook. So I'll have to create spreadsheet once, then copy it for all charts with unique symbols? Would I still need a source chart with pivot points indicator? I hide and destroy these source charts, they give pivots for just 1 current day. Would I be able to do the same for spreadsheets? |
[2021-08-10 14:22:09] |
Sawtooth - Posts: 4177 |
So I'll have to create spreadsheet once, then copy it for all charts with unique symbols?
You'd add the Spreadsheet Study study to one of the charts, (preferably Chart#1 for clarity), then write the formulas and set the Draw Styles and colors, then create a Study Collection of the spreadsheet study, then apply the study collection to each chart. The pivot points study would need to be the same ID# on all source charts. Would I still need a source chart with pivot points indicator? I hide and destroy these source charts, they give pivots for just 1 current day. Would I be able to do the same for spreadsheets?
You'll need a source chart with the pivot points study for each symbol. You can hide/destroy them.There would only be one spreadsheet window but it cannot be hidden/destroyed. It could be minimized and/or detached. Question: Do you always only want the current day's pivots displayed? If so, this simplifies things, and it would automatically only display the current day's pivots. IOW, no daily setup/config. It would be possible for the spreadsheet to always use the current day unless you optioned a cell to use a specific date. |
[2021-08-10 16:45:24] |
Botan626 - Posts: 294 |
Thanks for your explanations, tomgilb. Do you always only want the current day's pivots displayed?
Only 2 charts have source charts not destroyed, so I can quickly change date range for them to set a specific day for pivots, all other charts have source charts destroyed and they give pivots data for current day only. I'm reading documentation about Spreadsheet Study now and will try to do, what you suggested me. Date Time Of Last Edit: 2021-08-10 16:46:12
|
[2021-08-10 17:55:29] |
Sawtooth - Posts: 4177 |
Only 2 charts have source charts not destroyed, so I can quickly change date range for them to set a specific day for pivots, all other charts have source charts destroyed and they give pivots data for current day only.
This is what you are doing now and it doesn't work.You will have to modify what you do to display what you want. The spreadsheet study will replace the overlay study, and filter the display to a single day. The source charts will have many days loaded, not just the day you want. The overlay study will be hidden, and the spreadsheet study will display the selected date. The way you will change the specific day will be editing a cell on the spreadsheet. |
[2021-08-10 19:50:51] |
Botan626 - Posts: 294 |
I found a reason, why pivot lines were not solid on a destination chart for a specific day with 0-60-0 'Days-Mins-Secs Per Bar' setting. That's because on a source chart draw styles were Dash, though line styles were all solid. With 'Fill Blanks With Last Value' set to Yes lines are plotted to the end of the chart, but if set to No, then they are plotted for a single day only, 'Number Of Days To Calculate' = 1 in the source chart. But 'Copy Source Data to Latest Corresponding Destination Bar' setting doesn't work properly. If set to Yes, the 1st range bar candle is correct, but it omits the last one. If set to No, the 1st range bar candle is 1 candle earlier, but last candle is correct. Date Time Of Last Edit: 2021-08-10 19:54:22
|
[2021-08-10 20:24:20] |
Botan626 - Posts: 294 |
But I still want to build pivots for a specific single day only, using 1-0-0 'Days-Mins-Secs Per Bar' setting on a source chart. I managed to build a spreadsheet, which has only output data from Study/Price Overlay study, which overlays pivots from source chart. I set 'Number of Rows' to 2 in the Study/Price Overlay study and 'Number Of Days To Calculate' = 1 in the source chart Then I hided Study/Price Overlay study, so original pivot lines are not visible at all. For now, I only want to plot pivots for current day. You said it would automatically. How? Please take a look at attached chartbook. Date Time Of Last Edit: 2021-08-10 21:02:17
|
![]() |
[2021-08-10 21:58:13] |
Sawtooth - Posts: 4177 |
You are trying to filter the output before the spreadsheet gets it. You already know this doesn't work. The spreadsheet needs all of the days, and it will do the filtering. Each spreadsheet row is a chart bar, with the current bar in row 3 and earlier bars in rows below. So you will need at least enough Number of Rows to display every bar of the current day. If you eventually want to display the pivots in a previous day, and you don't want to scroll the chart into the past and use Replay, you will need enough Number of Rows to reach back to the first bar of that previous day. For now, leave it at the default 1000 rows. All formulas go in columns K-Z, and only in row 3. I only want to plot pivots for current day. You said it would automatically. How? Start with this: In these cells: Column titles: O2: S3 P2: S2 Q2: S1 R2: PP S2: R1 T2: R2 U2: R3 Formulas: K3: leave blank for now L3: leave blank for now M3: leave blank for now N3: leave blank for now O3: =ID3.SG12@3 P3: =ID3.SG4@3 Q3: =ID3.SG3@3 R3: =ID3.SG13@3 S3: =ID3.SG1@3 T3: =ID3.SG2@3 U3: =ID3.SG8@3 where ID3 is the Study/Price Overlay study. Set the Draw Styles to Ignore on SG1 to SG4. Set the Draw Styles to Dash on SG5 to SG11. Set the colors on SG4 to SG10. Confirm this will display the 7 pivot lines, in order from S3 to R3. Date Time Of Last Edit: 2021-08-10 22:46:51
|
[2021-08-10 22:21:58] |
Botan626 - Posts: 294 |
Set the Draw Styles to Dash on SG4 to SG10.
I think you meant SG5 to SG11. Confirm this will display the 7 pivot lines, in order from S3 to R3.
I confirm it. But lines are not dashed. Please take a look at updated chartbook. I didn't know I can rename column titles. Before your last post I figured out to put '=ID3.SG13@3' in the K3 cell, and set draw style to 'Line From End Of Chart Left To Right', so I saw one line, but didn't know, how to set a date for it. Date Time Of Last Edit: 2021-08-10 22:25:12
|
![]() |
[2021-08-10 22:38:48] |
Sawtooth - Posts: 4177 |
I think you meant SG5 to SG11
Yes, sorry.I didn't know I can rename column titles.
Row 2 of the Formula Columns K-Z can be edited.set draw style to 'Line From End Of Chart Left To Right'
Please set the Draw Styles of SG5 to SG11 to Dash.I saw one line, but didn't know, how to set a date for it.
We will get to that. You are getting ahead of me. Stay with me here.Please also send me the latest Pivots.scss spreadsheet file. |
[2021-08-10 22:46:33] |
Botan626 - Posts: 294 |
Row 2 of the Formula Columns K-Z can be edited.
Where could I read about it? Didn't see that info. Please set the Draw Styles of SG5 to SG11 to Dash.
They are set to Dash in the chartbook I attached in the previous post. We will get to that. You are getting ahead of me. Stay with me here.
Sorry, if I didn't say it clear, but this: Before your last post I figured out to put '=ID3.SG13@3' in the K3 cell, and set draw style to 'Line From End Of Chart Left To Right', so I saw one line, but didn't know, how to set a date for it.
I did before I saw your post #17. I removed all these settings thereafter. I'm only following your instructions now.Pivots.scss is attached. Date Time Of Last Edit: 2021-08-10 22:55:10
|
![]() ![]() |
[2021-08-10 23:49:21] |
Sawtooth - Posts: 4177 |
Now let's find the current day using these formulas: K3: =IF(INT(A3)>INT(A4),K4+1,K4) This finds the date change and increments the previous count starting at the first date in column A. (Column A contains the SerialDateTime where the integer is the number of days since Dec 30, 1899, and the decimal is the portion of each day.) Spreadsheet Functions: Serial DateTime Values L3: =MAX(K3:OFFSET(K3,$J$30-2,0)) This finds the max count of days in column A. J30 is the Number of Rows in the spreadsheet, which follows the setting of the same name. O3: =IF(L3=$K$3,ID3.SG12@3,0) This compares the max number of rows to the latest count of days, and if they are equal, it is the current day so show the line, else 0. Edit all of the formulas in O3 to U3 to include the IF portion, retaining each ID#.SG#. This will always automatically find the current day, and only display the pivots for that day. Spreadsheet Functions: Available Functions |
[2021-08-11 00:08:10] |
Botan626 - Posts: 294 |
L3:=MAX(K3:OFFSET(K3,$J$30-2,0))
I'm getting this error: #REF! [ MAX ] MAX(K7:OFFSET(K7,$J$30-2,0)) = #REF! (error)
[ : ] K7:OFFSET(K7,$J$30-2,0) = #REF! (error) [ K7 ] K7 = K7 (reference) [ OFFSET ] OFFSET(K7,$J$30-2,0) = K5 (reference) [ K7 ] K7 = K7 (reference) [ - ] $J$30-2 = -2 (number, integer) [ $J$30 ] J30 = (no value) [ 2 ] 2 = 2 (number, integer) [ 0 ] 0 = 0 (number, integer) Date Time Of Last Edit: 2021-08-11 08:52:53
|
[2021-08-11 00:14:42] |
Sawtooth - Posts: 4177 |
Send me the latest chartbook and spreadsheet file
|
[2021-08-11 00:20:23] |
Botan626 - Posts: 294 |
There was an #REF! error, because I set 'Output Additional Values in Columns I and J' to No. I'm editing formulas in O3 to U3 now. |
[2021-08-11 00:33:12] |
Botan626 - Posts: 294 |
It will show pivots for the range bar, if it's last on a chart with the date for the previous day. How can I fully recalculate spreadsheet? It shows obsolete numbers in columns K-U even after chart reload and recalculate. Date Time Of Last Edit: 2021-08-11 00:37:06
|
![]() ![]() |
To post a message in this thread, you need to log in with your Sierra Chart account: