Login Page - Create Account

Support Board


Date/Time: Sun, 24 Nov 2024 08:05:01 +0000



Post From: [Programming Help] Simple Alert for Swing High/Low Study

[2024-06-24 19:54:49]
John - SC Support - Posts: 36238
This gets a little complicated since the "Swing High and Low" is not a continuous line. It's just a point at which the data changes direction.

The best way to do this would be to use the "Spreadsheet System/Alert" study and in cell K3 enter the following to get the Swing High information:
=ID0.SG4@$3 > MOSTRECENTNONZEROVALUE(ID1.SG1@$3:ID1.SG1@$2000)

This will give you indicators where the Last of each bar is greater than the most recent Swing High. You could then set an alert on the Inputs of the study to get an alert notification which will occur when the current bar's last/close is greater than the most recent Swing High. Refer to the following:
https://www.sierrachart.com/index.php?page=doc/SpreadsheetFunctions.html#MOSTRECENTNONZEROVALUE_Function

Working with Spreadsheets: References to Study Subgraph Columns when using the Spreadsheet Study

Working with Spreadsheets: Relative and Absolute References

You could then reverse this for the Swing Low and put that in the L column.

You can ignore the headers for cells K, L, M, and N in relation to trading with the Spreadsheet System/Alert, since you are not using this for those.
For the most reliable, advanced, and zero cost futures order routing, use the Teton service:
Sierra Chart Teton Futures Order Routing