Consolidation sort out

hansgust

Newbie
Messages
4
Likes
0
Hi
I’m trying to create a trading system, and I have come to the point to sort out consolidation periods. And I mean consolidation periods with very small movements.

To sort out those movements I’m trying to calculate the angel of a moving average. And sort out when the angel is flat. I found the atan function in metastock, but I can’t find out how it works. Any tips? Our other calculations that show the angel of moving averages?

Best regards
 
Won't the angle of the MA depend entirely on the compression ratio you set for the window, i.e. the number of bars you're showing?

By the way, there is a metastock subforum where other people may give you more useful info. I'm a TradeStation user.
 
couldn't you figure it out in excel?

if you said now = T(0), and 20 periods ago = T(20) (e.g. 5 periods ago = T(5), and so on)

then set MA @ T(20) = 0, and record the change per period, approximating it to a triangle

T(1) - T(20) = adjacent of triangle

19 = opposite (the "length" of the data points, 20 - 1)

=> angle of MA = [90 - (Tan^-1(19/(T(1) - T(20)))] * -1

something like that anyway, the idea is to draw an imaginary right angled triangle between the MA line and the x axis. Of course the sample size you chose for the "opposite" would depend on all sorts, the smaller the length the more volatility you'll get.

good luck.
 
a second thoughtt is to draw a tangent to the MA at the point you want to measure it, make a triangle, and so on.

Far more accurate, but I don't know how you'd draw a tangent without good old pencil and paper. Maybe someone else can help.

OR, on second thoughts, just make your "opposite" length 1
 
Top