# Moving Average angle calculation - page 2

2269

Hate math :(

Did some angle calc back then - lots of them :(, for harmonic patterns, hopes this helps http://www.teacherschoice.com.au/Maths_Library/Trigonometry/solve_trig_ASS.htm

when you change the timeframe, your angle calc may no longer valid :(

why your angle variable is an integer, isn't it supposed to be a double ?

this comment is my 222

1636

angle only a viasual effect, the realty is the change of price and time.

you can draw a 45o angel with screen scale no care the change of price and time.

109

DxdCn:

angle only a viasual effect, the realty is the change of price and time.

But you can simulate a fixed size window inside the indicator, like: High[ArrayMaximum(High, WindowSizeInBars, i)]
Here is my attempt I have done a month ago:
Files:
180

RaptorUK:
LOL . . . if you want to leave logic aside then any garbage answer is as good as any other as they will all be logically wrong . . .

Thanks to you all, Guys!

I have been enlightened!

Since we can't calculate MA angle, c/z it's relative, thus there is only one thing not relative on the charts, and that is PRICE CHANGE!

24

hey everybody!

i would like to calc the angle of Moving Average 10.

i tried this:

double MAShift1 = iMA(NULL, 0, MA, 0, MODE_SMA, PRICE_CLOSE, 3);

double MAShift3 = iMA(NULL, 0, MA, 0, MODE_SMA, PRICE_CLOSE, 7);

double test = (SignalPeriod-0.0)/WindowBarsPerChart();

int angle = MathArctan(MathTan(((MAShift1-MAShift3)/(WindowPriceMax()- WindowPriceMin()))/((test-0.0)/WindowBarsPerChart())))*180/3.14;

it seem to be calculating wrong angles, i get answers without any sense,

i want to check whats the angle between 3 and 7 shifts back.

thanks.

moving average is good

but I did not trust only on moving average again, you have to  learn more better in order to attain a lot in the forex trade profit atmosphere