Support Board
Date/Time: Fri, 27 Dec 2024 08:05:07 +0000
Post From: Slope of an MA
[2020-10-30 14:53:59] |
Sawtooth - Posts: 4143 |
Is there way to write an alert condition based on the slope of a moving average?
For an alert when the line changes color based on up-slope/down-slope, see Examples #8 and #9:Study/Chart Alerts And Scanning: Alert Formula Examples Example 8 works best if there are no segments of equal value. Example 9 works best if there is no more than one segment of equal value. For an alert when the line has more than one sequential segment of equal value, you'd need to create a persistent variable with either the Spreadsheet Formula study or the Spreadsheet System/Alert study, using a formula like this example: Spreadsheet Example Formulas and Usage: Formula that Matches the Slope Coloring of a Study Subgraph Line ...then use another formula to find the transitions from 1 to -1, and -1 to 1. Date Time Of Last Edit: 2020-10-30 15:24:00
|