|
Rean
 Veteran
 Posts: 105
Joined: 8/30/2013
Location: Johannesburg, South Africa
User Profile |
Is there a way to base files on the gradient of a moving average. For example, only consider a signal when the gradient of the SMA(20) is greater than 15% (or whatever number).
|
|
Barry Cohen
 Sage
      Posts: 6338
Joined: 1/19/2004
User Profile |
I'm not sure what you mean by gradient. How would that be defined?
|
|
Rean
 Veteran
 Posts: 105
Joined: 8/30/2013
Location: Johannesburg, South Africa
User Profile |
I've attached an image to illustrate. The greater the angle, the greater the strength of the trend.
[Edited by Rean on 10/28/2022 12:43 AM]
Attached file : Moving Average Angle.jpg (44KB - 108 downloads)
|
|
Barry Cohen
 Sage
      Posts: 6338
Joined: 1/19/2004
User Profile |
If you can define it, you probably can write it, but there isn't any kind of existing function for gradient.
|