TradingView
LukkVal
3 мар 2021 г., 10:17

Moving Average Slope to determine market direction 

Euro Fx/U.S. DollarFXCM

Описание

Moving Average Slope is a straightforward but also a handy indicator.

By inserting this moving average, it is possible to glance at the direction of the trend.

When the moving average has an increasing angle, it will turn green; vice versa, it will be colored red.

It is a trend indicator; I recommend leaving the period at 20 because it includes the last four trading weeks.







If you found this indicator useful, please like it
Комментарии
jaideeptungare1982
Does this repent?
KiomarsRakei
How to use it for EMA?
revolution05
Hey question about line 8: x = out'1'> out'5';
This reads to me as comparing SMA 1 to SMA 5... where am I wrong on this as it doesn't make sense to me in identifying the slop of teh 20mA (line 3)

I'm looking at using the slope (positive or negative) of a MA in a bigger "if" equation and this is the closest thing i've found to using pine script built in language instead of a manual slope calculation. So thank you for your script and hopeful reply

** I found this in the pinescript manual - I assumed the square brackets were a form of data entry to the current function but it is this"[]
Series subscript. Provides access to previous values of series expr1. expr2 is the number of bars back, and must be numerical. Floats will be rounded down.**

Since i am using the 200ma than only 5 bars back is not accurate for me so my search continues!
Ещё