Login Page - Create Account

Support Board


Date/Time: Sun, 02 Feb 2025 10:08:19 +0000



Post From: Question on Formula based on average of last 5 bars to be more than 1.2 times of usual

[2019-08-26 12:23:33]
John - SC Support - Posts: 37656
You would need to add the test for each bar individually to the AND. For example, here is the above formula with a test for the bar at -5:

=AND(ID3.SG1[0:-5])>(ID3.SG1[-6:-20]),BARTIME>=TIME(9,00,0),BARTIME<=TIME(16,30,0), ID3.SG1[-5] > 3)

That you can have more than 2 test items in AND function. Refer to the documentation for AND here:
Study/Chart Alerts And Scanning: OR and AND Functions

Also note on that page the statement that if the alert is getting too long and/or complex you may want to use the Spreadsheet Alert study instead.
For the most reliable, advanced, and zero cost futures order routing, use the Teton service:
Sierra Chart Teton Futures Order Routing