Moving Average angle calculation - page 2

 

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.

 
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:
angleofma.mq4  4 kb
 
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

 
VladiRozen:

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

 

HI there,

I am interested in this discussion.  A trendline provides a direction.  We visually see this direction on the chart. How do we measure the direction?

If I wanted to enter a trade when the direction of the trend was >30 degrees, and exit the trade when the direction of the trend was <30 degrees, what type of indicator could I use?  For a given timeframe, e.g. 5 minute chart, and say the trend was the 55 EMA..

Hope to get a reply from someone

Reason: