Login Page - Create Account

Support Board


Date/Time: Sun, 29 Mar 2020 21:51:17 +0000



[Programming Help] - Alert formula (Compare current bar with past X bars)

[2019-08-26 11:23:45]
User383849 - Posts: 12 | Ending Date: 2020-07-23
Hi! I want a formula to alert me when I get a huge volume candle that's 5x bigger than the past 20 bars.

Is there a shorter way / simpler function or I need to use the AND operator and compare the current bar with previous bars 20 times like this:

AND(SG1[0] > SG1[-1]*5,
SG1[0] > SG1[-2]*5,
SG1[0] > SG1[-3]*5,
.
.
.
SG1[0] > SG1[-20]*5)

Thanks! :)
[2019-08-26 22:48:38]
Ackin - Posts: 666 | Ending Date: 2020-09-04
Hi,
another way: the condition can also be met by comparing the second largest volume in the range. How to do it in alert but I do not know (there is no loop possible). ACSIL or spreadsheet.

you can download ACSIL study for free from our CZ/SK forum
(just Study in dll file, not code).

Study name: Compare Huge volume
- ask alert
- bid alert
- vol alert
- ratio ticksize alert



More information:
https://www.sierrachart.com/SupportBoard.php?ThreadID=20360#P187316
Date Time Of Last Edit: 2020-01-23 20:49:08
[2019-08-26 23:29:19]
tomgilb - Posts: 2427 | Ending Date: 2020-03-31
Try this:
=V>MAX(V[-1:-20])*5

Here's the documentation:
https://www.sierrachart.com/index.php?page=doc/StudyChartAlertsAndScanning.php#ReferencingARangeOfData
[2019-08-26 23:38:46]
Ackin - Posts: 666 | Ending Date: 2020-09-04
tomgilb)
Nice ...
[2019-08-27 07:33:44]
User383849 - Posts: 12 | Ending Date: 2020-07-23
tomgilb, it works. Simple and elegant. Thanks!
Ackin, thanks for helping out as well!
Date Time Of Last Edit: 2019-08-27 07:34:25

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

Login

Login Page - Create Account