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
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.
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!
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.
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