Login Page - Create Account

Support Board


Date/Time: Fri, 07 Feb 2025 15:04:11 +0000



COLOR BAR BASED ON ALERT CONDITION ALERT SYNTAX STRUCTURE QUESTION

View Count: 580

[2022-06-16 23:44:00]
jmftattoo - Posts: 97
I have made a color bar alert and am using it currently but am wondering how to write it in a shorter, cleaner manner. If anyone could lend a hand that would be helpful.
alert syntax is as follows.

"= V > MAX (V[-1], V[-1], V[-2], V[-3], V[-4], V[-5], V[-6], V[-7], V[-8], V[-9], V[-10], V[-11], V[-12], V[-13], V[-14], V[-15], V[-16], V[-17], V[-18], V[-19], V[-20],V[-21], V[-22], V[-23], V[-24], V[-25], V[-26], V[-27], V[-28], V[-29], V[-30], V[-31], V[-32], V[-33], V[-34], V[-35], V[-36], V[-37], V[-38], V[-39], V[-40], V[-41],V[-42], V[-43], V[-44], V[-45], V[-46], V[-47], V[-48], V[-49], V[-50], V[-51], V[-52], V[-53], V[-54], V[-55], V[-56], V[-57], V[-58], V[-59], V[-60]) "

Obviously this is long and drawn out, I am trying to be shown the highest volume FP in the last 60 bars. this is working, would like to have it streamlined, not sure how to though.
when I simply write =V>MAX (V[-60]) I do not get the same alerts showing as the above formula.
[2022-06-17 14:09:15]
John - SC Support - Posts: 37808
There is not another way to write this. The MAX function does not take a range of values (i.e. MAX(V[-1]:V[-60]) does not work).
For the most reliable, advanced, and zero cost futures order routing, use the Teton service:
Sierra Chart Teton Futures Order Routing
[2022-06-17 14:31:35]
User431178 - Posts: 582
Easiest to use intermediate study to get the max value, then refer to that in the alert formula.
Example attached using Highest High/Lowest Low Over N Bars
attachmentHighestVolume.Cht - Attached On 2022-06-17 14:30:47 UTC - Size: 4.46 KB - 314 views
[2022-06-17 17:26:34]
jmftattoo - Posts: 97
amazing. Thank you for sharing! I actually am using your number bar candles already that you sent in this example. I love them.
Easiest to use intermediate study to get the max value, then refer to that in the alert formula.
Example attached using Highest High/Lowest Low Over N Bars

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

Login

Login Page - Create Account