Distance From Moving Average is designed to help traders visualize the deviation of the current price from a specified moving average. Users can select from four different types of moving averages: Simple Moving Average (SMA), Exponential Moving Average (EMA), Weighted Moving Average (WMA), and Hull Moving Average (HMA).
Key Features: User-Friendly Input Options:
Choose the type of moving average from a dropdown menu. Set the length of the moving average, with a default value of 200. Custom Moving Average Calculations:
The script computes the selected moving average using the appropriate mathematical formula, allowing for versatile analysis based on individual trading strategies. Distance Calculation:
The indicator calculates the distance between the current price and the chosen moving average, providing insight into market momentum. A positive value indicates that the price is above the moving average, while a negative value shows it is below. Visual Representation:
The distance is plotted on the chart, with color coding: Lime: Indicates that the price is above the moving average (bullish sentiment). Red: Indicates that the price is below the moving average (bearish sentiment). Customization:
Users can further customize the appearance of the plotted line, enhancing clarity and visibility on the chart. This indicator is particularly useful for traders looking to gauge market conditions and make informed decisions based on the relationship between current prices and key moving averages.
نص برمجي مفتوح المصدر
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
For quick access on a chart, add this script to your favorites — learn more here.
لا يُقصد بالمعلومات والمنشورات أن تكون، أو تشكل، أي نصيحة مالية أو استثمارية أو تجارية أو أنواع أخرى من النصائح أو التوصيات المقدمة أو المعتمدة من TradingView. اقرأ المزيد في شروط الاستخدام.
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
For quick access on a chart, add this script to your favorites — learn more here.
لا يُقصد بالمعلومات والمنشورات أن تكون، أو تشكل، أي نصيحة مالية أو استثمارية أو تجارية أو أنواع أخرى من النصائح أو التوصيات المقدمة أو المعتمدة من TradingView. اقرأ المزيد في شروط الاستخدام.