Support Board
Date/Time: Fri, 07 Feb 2025 17:52:04 +0000
[User Discussion] - Request for simple "Alert code"
View Count: 853
[2016-05-25 06:38:04] |
EuropeanTrader - Posts: 290 |
Hello, can anyone please create a study collection or some sort of alert - dot on a barchart where there would be 2 consecutive closes in one direction? So for example, if day 1 is down close and day 2 is down close- there should be a blue dot or something below that day 2 bar. And if day 1 closes up and day 2 closes up as well, there should be a red dot above day 2 bar. Obviously if consecutive closes continue, dots would continue to show as long as there are "Two consecutive closes in one direction". Here is an example of 2 consec. down closes: http://www.sierrachart.com/image.php?Image=1464158168534.png and here with 2 conse. up closes: http://www.sierrachart.com/image.php?Image=1464158245197.png Thank you very much if anyone is capable to write such an alert !! |
[2016-05-25 13:42:58] |
Sawtooth - Posts: 4173 |
Try this: Add two instances of the Color Bar Based On Alert Condition study, one for each color/direction. Use these formulas on the Alerts tab of the respective study: Two consecutive up closes: =AND(C>C[-1],C[-1]>C[-2]) Two consecutive down closes: =AND(C<C[-1],C[-1]<C[-2]) Choose your Draw Style and color. |
[2016-05-25 13:55:47] |
jackw - Posts: 57 |
Attached is a study collection that will give you your blue/red dots.
|
![]() |
[2016-05-25 15:49:19] |
EuropeanTrader - Posts: 290 |
Thank you to both of you! I really appreciate it. |
To post a message in this thread, you need to log in with your Sierra Chart account: