Login Page - Create Account

Support Board


Date/Time: Tue, 26 Nov 2024 20:30:53 +0000



[Programming Help] - Multi timeframe alert condition

View Count: 376

[2023-10-20 04:59:12]
User145575 - Posts: 20
Greetings.. I have two different range bar charts: one with a 10 tick range per bar, the other with 3 tick range per bar. So obviously, a 10T bar maps to (or "contains") at least 3-4 of the 3T bars (and sometimes many more than that if price is ranging around).
On the 3T chart I use a Color Bar On Alert Condition study, and I would like to overlay that alert on the 10T chart, anytime the 10T bar contains[ a 3T bar that produced that alert.
I've tried using Study/Price Overlay, and it seems that depending on Data Copy Mode (either "use latest value" or "use earliest value"), it will color the 10T bar only if the first or last contained 3T bar had the color alert. I've tried with different settings on Draw Zeros, and some other settings too, but haven't been able to get it to work as I'd like it.
Just to be clear.. For example, if a 10T bar maps to six 3T bars, and if any one of those 3T bars had the alert, I'd like that containing 10T bar to get the overlay too.
Please let me know if this is a clear question, and if you think it's possible somehow. Thank you in advance.
[2023-10-20 15:33:23]
John - SC Support - Posts: 36307
The problem is that what you are trying to do is to capture an Intrabar condition, which does not work, as the condition is not true for the entire bar.

The only way to do this would be to create a custom study so that you can apply the condition when you want. Refer to the information at the following link:
How to Build an Advanced Custom Study from Source Code
For the most reliable, advanced, and zero cost futures order routing, use the Teton service:
Sierra Chart Teton Futures Order Routing
[2023-10-20 16:56:47]
User145575 - Posts: 20
Hi John, thanks for confirming that.

I have some comfort writing ACSIL studies, but I'm scratching my head wondering how to determine which 10T bar contains which 3T bars. I guess the most obvious would be to compare the start and end timestamps of the 10T bar (using BaseDateTimeIn and BaseDataEndDateTime) to the same on the smaller bars. That should work... But if you know of a cleaner way, please let me know!

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

Login

Login Page - Create Account