Login Page - Create Account

Support Board


Date/Time: Mon, 16 Jun 2025 16:46:59 +0000



Color bars alert is giving wrong output

View Count: 371

[2025-04-27 02:00:01]
Trade with ICE - Posts: 28
I don't know what im doing wrong here, but I think the formula is straightforward: color the candle that crosses the subgraph value.

I have HIGH/LOW FOR TIME PERIOD study that im referencing. ID8.SG1 and SG2
A COLOR BAR BASED ON ALERT CONDITON STUDY with alert:
=OR(CrossFromBelow(C, ID8.SG1), CrossFromAbove(C, ID8.SG1))

simply saying color the candle if it crosses the subgraph value but its not coloring the right candles.
Date Time Of Last Edit: 2025-04-27 02:20:03
imageScreenshot 2025-04-26 185117.png / V - Attached On 2025-04-27 01:59:23 UTC - Size: 24.06 KB - 116 views
imageScreenshot 2025-04-26 184223.png / V - Attached On 2025-04-27 02:19:57 UTC - Size: 21.43 KB - 113 views
[2025-04-27 02:22:34]
Trade with ICE - Posts: 28
i forgot to include what candle it is coloring... here you go.
Date Time Of Last Edit: 2025-04-27 02:23:26
imageScreenshot 2025-04-26 192105.png / V - Attached On 2025-04-27 02:22:25 UTC - Size: 15.41 KB - 115 views
imageScreenshot 2025-04-26 192309.png / V - Attached On 2025-04-27 02:23:20 UTC - Size: 25.1 KB - 111 views
[2025-04-28 16:10:53]
John - SC Support - Posts: 40440
The issue is that your "High/Low for Time Period" only covers that specific time. Since you are looking for a crossover event outside of that time frame, it will not occur, as the values for those lines do not exist beyond the specified time. Or, if you prefer, they do exist, but the values are zero, which is why you see the bars colored at the start and end of the High/Low for Time Period period.

You should use the "High/Low for Time Period - Extended" in order to have the line extended out further. Then you can see if a crossover event occurs beyond the given timeframe. Refer to the following:
High/Low for Time Period - Extended
For the most reliable, advanced, and zero cost futures order routing, use the Teton service:
Sierra Chart Teton Futures Order Routing
[2025-04-29 23:19:01]
Trade with ICE - Posts: 28
Yea High Low for Time Period - Extended will not give the same value I wanted because I just wanted the high and low value of a specific time period. :(
[2025-04-30 14:28:45]
John - SC Support - Posts: 40440
High/Low for Time Period - Extended does what you want. It lets you set the time period for the High/Low, and then it extends that line forward in time. This allows you to check the crossover outside of the period that develops the High and Low.
For the most reliable, advanced, and zero cost futures order routing, use the Teton service:
Sierra Chart Teton Futures Order Routing

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

Login

Login Page - Create Account