Login Page - Create Account

Support Board


Date/Time: Thu, 28 Mar 2024 20:15:45 +0000



Slope of an MA

View Count: 3513

[2017-08-21 13:34:12]
User28914 - Posts: 87
Is there way to write an alert condition based on the slope of a moving average?
[2017-08-21 15:55:19]
Sawtooth - Posts: 3952
Do you mean a slope direction change, or a slope value change?
[2017-08-21 19:38:13]
Sierra Chart Engineering - Posts: 104368
Yes. Use the Study Angle Study:
Study Angle
Sierra Chart Support - Engineering Level

Your definitive source for support. Other responses are from users. Try to keep your questions brief and to the point. Be aware of support policy:
https://www.sierrachart.com/index.php?l=PostingInformation.php#GeneralInformation

For the most reliable, advanced, and zero cost futures order routing, *change* to the Teton service:
Sierra Chart Teton Futures Order Routing
[2020-10-29 21:15:29]
AwsM. - Posts: 4
Hi,
I am trying to use the Study Angle, I expect when the direction of a MA changes (up or down) the Angle(SG1) of the study will pass the Zero line(SG2), ie. the angle of the MA is zero, that is not what I am getting. In the attached screenshot I have a Hull MA and the Study Angle, the SG1 of the Angle does not reflect directly the real angle of the MA relative to the zero line.

http://www.sierrachart.com/image.php?Image=1604005854808.png
[2020-10-30 14:17:48]
John - SC Support - Posts: 30444
What you are describing is not the way this works. What you are describing is actually the derivative of the study at that point. This study uses the Length Input to create a line and determine the slope of that line between the two points. Refer to the information here:
Study Angle
For the most reliable, advanced, and zero cost futures order routing, use the Teton service:
Sierra Chart Teton Futures Order Routing
[2020-10-30 14:53:59]
Sawtooth - Posts: 3952
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
[2020-10-30 18:05:00]
Ackin - Posts: 1863
User854674)

Custom Studies: Slope Tick / Slope Angle

https://www.sierrachart.com/UserControlPanel.php?page=StudyStore&SCDLLName=zyp_download_free
imageSlope tick angle.png / V - Attached On 2020-10-30 17:59:28 UTC - Size: 25.7 KB - 783 views
[2020-10-30 19:41:45]
AwsM. - Posts: 4
John - SC Support
Thank you. I changed the length to 1 and it gave me what I want.

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

Login

Login Page - Create Account