How to code slope in a MA

 

I would like to code slope of a moving average. i.e. enter a trade when a moving average is greater that 40 degrees.


Can any one show me how to code this task?



Thanks In Advance,

ajone92

 
How you will measure slop of moving average if scale of chart will be changed? I think it is a bad idea.
 

most time, you do not need slope, only need a delte for a period of time.

if you need slope, reference to :


'How to get the angle of a moving average?'

Reason: