Determining Trends
-
What would be the easiest way say when a moving average is moving up or down? Like moving average period 21, candle 0 above candle 1, candle 1 above candle 2. etc. Is there an easier way to write this? Maybe like a angle or something? If MA 21 above angle of 5 degrees or something along those lines?
Thanks,
-
I think you can compare the MA value of the last bar (1) and the bar bevore (2). Then calculate the difference and you've got your angle...
-
Thank you, hilavoku. That's along the lines of what I would like to do, could you show me an example of how this would work?
Thanks again,
-
If we try to measure the angle of a MA line, we will get different values depending on the zoom level of the chart

-
When you use the difference of a specific timeframe than zoom has no influence. The difference of the bar-close stays the same.
Hint: Take the formula block. There you can directly calculate the difference between two values

-
Angles may not be the best way to do this. Instead, would it be possible to take candle 1 close minus candle 2 close and divide the result by candle 1 to get a percentage? Would this be able to be used in conditions (EMA 21 greater than 5% between last two closed candles?
Thank you,
-
Open[1] can be used instead of Close[2]. To make calculations -> "Formula" block. In "Adjust" field you can adjust the value if needed. You can write there things like "+0.0010", "+10pips", "*5%", "*5/100" or others...
I think that also oscillators can be used to determine trends, but maybe MA(fast) vs MA(slow) is the best method.
-
Don't make it to complicated. You don't need to calculate the 'size' of the bar o something else. Remember your math lessons at school and how to calc the slope of a graph. All you need is really the difference of two bar closes. slope=close*-close*. And you need to be aware of the scale of the x-axis which means you must stay in the same timeframe.