Login Page - Create Account

Support Board


Date/Time: Fri, 29 Nov 2024 16:48:49 +0000



How to develop a study that runs on a different time frame than the chart it is added to?

View Count: 463

[2023-02-02 16:56:39]
tarik medjber - Posts: 13
Hi, is there a way in custom code to develop a study to run at a different timeframe to the chart it is applied to. E.g. Study is applied to a 15min chart but in the inputs of the study, the user has set the study to calculate every 1 second, then you visually can see the study updating faster than the main charts updating (with new bars). Basically for every 15min bar, the study will develop 900 new data points (15 * 60).
[2023-02-02 18:39:37]
John - SC Support - Posts: 36350
Studies update at the Chart Update Interval, not when a bar is closed (or a new bar starts). Therefore if you have something that needs to occur intrabar, then you can make this happen regardless of the time frame of the chart bars. Refer to the following:
General Settings Window: Chart Update Interval (Global Settings >> General Settings >> General >> Update Intervals)
For the most reliable, advanced, and zero cost futures order routing, use the Teton service:
Sierra Chart Teton Futures Order Routing
[2023-02-02 18:55:20]
tarik medjber - Posts: 13
Thanks for replying.

Thats not quite what I'm looking for. It helps but I'd like a study to be updated based on a users input into the study.

Lets say they input 1, which means they want a new index or subgraph index to be added to their study every one second with the latest value that the study has created. If a study was running on a 15 min chart, a new index would be added ever new bar right? (I know the study is calculated intrabar but the final subgraph value is only set once the bar closes).

Just like using the Study/Price overlay, I can bring a study from a 1 second chart into a 15min chart and itll update based on the 1 second data BUT the study only create a new index every time the 15min chart closes, I want the study to run as it would in the 1 second chart (faster than the 15min chart) but attached to the 15min chart. if that makes sense?

This study in question won't be added to the chart graph by the way. It'll be underneath.
[2023-02-02 19:14:05]
tarik medjber - Posts: 13
https://www.sierrachart.com/image.php?Image=1675365134280.png

Hopefully this screenshot worked.

here is an example of a study that is doing what i want to do with my own study.
[2023-02-02 22:59:40]
John - SC Support - Posts: 36350
We think we understand what you are asking for, the Time and Sales... studies show this kind of functionality, where all the data is changing separate from the main price graph.

In the end, what this entails is rewriting all of the Subgraph data for each update.
For the most reliable, advanced, and zero cost futures order routing, use the Teton service:
Sierra Chart Teton Futures Order Routing
[2023-02-03 06:30:14]
tarik medjber - Posts: 13
Ahh wow okay, so in this case for every 1 second, the study loops back round and moves each subgraph indexes value to the previous index to make room for the latest one. That seems like a lot of work. Manual looping is definitely needed then. Thanks John.

To post a message in this thread, you need to log in with your Sierra Chart account:

Login

Login Page - Create Account