Angle of tangent line to SMA
Angle of tangent line to SMA
05 Mar 2014, 14:45
Hi
I'm trying to find out how to get the angel of the SMA slope, but my problem is that it's hard to find what the x-coordinate should be because they don't have a pip value like the y-coordinate does . Any suggestions on how I can do this
Her is the code i have tried:
protected override void OnStart() { double y = 1;//SMA LastValue difference to last bar. double x = 1;// Don't know :/ var rad = Math.Atan(y / x); var deg = rad * 180 / Math.PI; Print(deg); }
Replies
Old Account
05 Mar 2014, 19:42
Sorry, I posted it in Indicator Development Support by mistake and i wasn't able to delete it.
@Old Account
Old Account
08 Mar 2014, 17:30
I think if I were to calculate the angle like the Ray chart tool I will need to know the scale to see the distanse in pips one hour is equal to.
Are there any ways to do that ?
@Old Account
Spotware
05 Mar 2014, 15:20
Please stop posting duplicating themes. You need to wait until somebody will answer to your question.
@Spotware