OmniTrader Forum - OmniTrader General Discussion
Considering a MA gradient

^ Top
Rean

Posts: 105

Joined: 8/30/2013
Location: Johannesburg, South Africa

User Profile
 
Subject : Considering a MA gradient
Posted : 10/27/2022 4:25 AM
Post #48734

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).
^ Top
Barry Cohen

Posts: 6338

Joined: 1/19/2004

User Profile
 
Subject : RE: Considering a MA gradient
Posted : 10/27/2022 11:17 AM
Post #48736 - In reply to #48734

I'm not sure what you mean by gradient. How would that be defined?
^ Top
Rean

Posts: 105

Joined: 8/30/2013
Location: Johannesburg, South Africa

User Profile
 
Subject : RE: Considering a MA gradient
Posted : 10/28/2022 12:00 AM
Post #48737 - In reply to #48734

I've attached an image to illustrate. The greater the angle, the greater the strength of the trend.
Attached file : Moving Average Angle.jpg (44KB - 186 downloads)

^ Top
Barry Cohen

Posts: 6338

Joined: 1/19/2004

User Profile
 
Subject : RE: Considering a MA gradient
Posted : 10/28/2022 9:07 AM
Post #48740 - In reply to #48737

If you can define it, you probably can write it, but there isn't any kind of existing function for gradient.


https://www.omnitrader.com/currentclients/otforum/thread-view.asp?threadid=16579&posts=4