aamonkey

Moving Average Slope [aamonkey]

This indicator tries to identify ranging and trending markets.

It measures the angle of a Moving Average in order to filter out ranging markets.

The idea is to only enter a trend following trade if the slope is steep enough.


In order to create this indicator, I used a strategy script from bennef called "Trend Angle BF" and slightly modified it to transform it from an entry/exit indicator to a filter.

The calculations are based on Evergrets "Jurik MA" and angle calculation by KyJ.
ملاحظات الأخبار: Thx to @ahancock I removed redundant code
ملاحظات الأخبار: Updated picture
نص برمجي مفتوح المصدر

قام مؤلف هذا النص البرمجي بنشره وجعله مفتوح المصدر، بحيث يمكن للمتداولين فهمه والتحقق منه، وهو الأمر الذي يدخل ضمن قيم TradingView. تحياتنا للمؤلف! يمكنك استخدامه مجانًا، ولكن إعادة استخدام هذا الكود في منشور تحكمه قواعد الموقع. يمكنك جعله مفضلاً لاستخدامه على الرسم البياني.

هل تريد استخدام هذا النص البرمجي على الرسم البياني؟

التعليقات

Hello there ,
can you please elaborate why do you divide by atr in line 14?
thank you
ang=rad2degree*atan((_src - _src)/atr(14))
+8 رد
avirub dinceremre
@dinceremre, It is really strange, since dividing by ATR does not have any relation to angle calculation..
+2 رد
Looks good - I like the idea of being able to adjust the filter lines so you can determine at what steepness you enter.
+5 رد
very helpful ..cheers !
+2 رد
aamonkey mycotoxin
@mycotoxin, Glad I can help :D
+1 رد
Good one! thanks!
+1 رد
I've added your code for the moving average slope angle formula to my robot here:

Thanks!
+1 رد
Thank You !!
which library do you use for the atr function?
+1 رد
aamonkey blissfulAnalyst
@blissfulAnalyst, you can't use any libraries as far as I know. It is all included in pine.
رد
very good! thank you!!
+1 رد