Support Board
Date/Time: Sun, 22 Dec 2024 23:19:06 +0000
Custom Indicator based on sc.VolumeAtPriceForBars
View Count: 1631
[2015-05-09 16:47:17] |
User911705 - Posts: 89 |
I am trying to figure out if the following is a) possible and b) would it be a tremendous drain on computer performance. I want to create what I call a "rolling vpoc" (vpoc is just the mode or high volume point. The trick is I don't want the vpoc just for a given bar, I want to calculate the vpoc for the last 'n' bars, and each new bar, look back 'n' bars and recalculate. A concrete example: let's say I have a 30min chart, and want a 100 period rolling vpoc. On each bar, the calculation would find the vpoc for the most recent 100 bars, or 3000 minutes. Each new bar would look back 3000 minutes. A rolling lookback window if you will. I have the code to find the vpoc for a given bar, and thought perhaps I could modify it by adding loops to examine prior bars, but that's as far as my limited skills take me. Thanks for your advice. |
[2015-05-09 16:57:30] |
crazybears - Posts: 314 |
Hi did you try to set VbP indicator to 100 bar in the 30 min chart ? |
[2015-05-09 18:31:51] |
SgtJ - Posts: 154 |
Either what crazybears said or use the visible bars setting. In the newer versions of sc you can use the VaP study to create just the lines, as well as having the VaP options. Still hoping sc doesn't remove the "VaP lines study" just b/c.
|
[2015-05-09 20:39:21] |
User911705 - Posts: 89 |
Thanks guys. I'm brand new to SC, so I might be missing something. I'm looking at the VbP indicator, and what it does is like most all other vol@price type indicators. That is, the period of the profile can be set, but it's not a sliding window, it's a fixed period. I'm struggling to describe this better. Hard to put into words, but a very easy concept. Let's say, for example, I wanted to do a vpoc with a 3 bar look back. At the close of the bar, the prior 3 bars would be consolidated and the vpoc found for those 3 bars. Then, on the close of the next bar, the same thing would occur, take the most current 3 bars, consolidate the volume data, and find the vpoc. The way it's usually done is that every 3 bars would plot a profile. That's not what I need. That's why I call it a "sliding window". If you think this is possible, I'd sure appreciate your advice on what settings to use to do this. I did try 100 bars on a 30min chart, but it plotted a profile every 100 bars, not the sliding window effect. |
[2015-05-09 21:04:22] |
Sierra Chart Engineering - Posts: 104368 |
You can do what you want. Here is a screenshot of the chart and of the Tool Values window which shows the relevant Input settings of the Volume by Price study configured the way you need: http://www.sierrachart.com/image.php?l=1431205390298.png You can programmatically access the point of control using the point of control Subgraph, sc.Subgraph[1], from the Volume by Price study. 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: 2015-05-09 21:04:41
|
[2015-05-09 22:18:49] |
SgtJ - Posts: 154 |
Re sliding window, it seems the only way to do it is as mentioned above re using the visible bars option in "volume graph period type". Set your chart window to the number of current bars you want to see...in this case I chose 3. Date Time Of Last Edit: 2015-05-09 22:20:03
|
visbars.png / V - Attached On 2015-05-09 22:18:08 UTC - Size: 32.12 KB - 404 views |
[2015-05-09 23:17:24] |
Sierra Chart Engineering - Posts: 104368 |
Also have a look at post #5.
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 |
[2015-05-10 01:56:54] |
User911705 - Posts: 89 |
Dear Sierra, I've been with you only a handful of days and I just get more and more impressed!!! Thank you so much for replying quickly and on a weekend no less. What you've shown in post #5 appears to be just what I need. Since I'm just learning and trying to remember everything, can you please verify the following: I assume that using such a rolling vpoc (as I call it) calculation in a trading system would require using the replay method to do the backtest. Since this indicator only plots the most recent profile, I assume that's the only value that would show up in a bar by bar backtest. Please correct me if I have this wrong. |
[2015-05-10 04:16:06] |
Sierra Chart Engineering - Posts: 104368 |
Yes this is correct: . Since this indicator only plots the most recent profile, I assume that's the only value that would show up in a bar by bar backtest. We verified this now by using Trade >> Auto Trade System Bar Base Back Test. And setting the bar processing increment to 10. You can do the same thing and observe 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 |
[2015-05-10 21:31:25] |
User911705 - Posts: 89 |
Many thanks for wonderful support!
|
To post a message in this thread, you need to log in with your Sierra Chart account: