Summary: This is a custom moving average indicator script that calculates and plots different Exponential Moving Averages (EMAs) based on user-defined input values. The script also displays MACD and RSI, and provides a table that displays the current trend of the market in a color-coded format.
Explanation: - The script starts by defining the name of the indicator and the different inputs that the user can customize. - The inputs include bridge values for three different EMAs (high, close, and low), and four other EMAs (5, 50, 100, and 200). - The script assigns values to these inputs using the `ta.ema()` function. - Additionally, the script calculates EMAs for higher timeframes (3m, 5m, 15m, and 30m). - The script then plots the EMAs on the chart using different colors and line widths. - The script defines conditions for going long or short based on the crossover of two EMAs. - It plots triangles above or below bars to indicate the crossover events. - The script also calculates and displays the RSI and MACD of the asset. - Finally, the script creates a table that displays the current trend of the market in a color-coded format. The table can be positioned on the top, middle, or bottom of the chart and on the left, center, or right side of the chart.
Parameters: - i_ema_h: Bridge value for high EMA (default=34) - i_ema_c: Bridge value for close EMA (default=34) - i_ema_l: Bridge value for low EMA (default=34) - i_ema_5: Value for 5-period EMA (default=5) - i_ema_50: Value for 50-period EMA (default=50) - i_ema_100: Value for 100-period EMA (default=100) - i_ema_200: Value for 200-period EMA (default=200) - i_f_ema: Value for fast EMA used in MACD calculation (default=9) - i_s_ema: Value for slow EMA used in MACD calculation (default=21) - fastInput: Value for fast length used in MACD calculation (default=7) - slowInput: Value for slow length used in MACD calculation (default=14) - tableYposInput: Vertical position of the table (options: top, middle, bottom; default=middle) - tableXposInput: Horizontal position of the table (options: left, center, right; default=right) - bullColorInput: Color of the table cell for a bullish trend (default=green) - bearColorInput: Color of the table cell for a bearish trend (default=red) - neutColorInput: Color of the table cell for a neutral trend (default=white) - neutColorLabelInput: Color of the label for neutral trend in the table (default=fuchsia)
Usage: To use this script, simply copy and paste it into the Pine Editor on TradingView. You can then customize the input values to your liking or leave them at their default values. Once you have added the script to your chart, you can view the EMAs, MACD, RSI, and trend table on the chart. The trend table provides a quick way to assess the current trend of the market at a glance.
진정한 TradingView 정신에 따라, 이 스크립트의 저자는 트레이더들이 이해하고 검증할 수 있도록 오픈 소스로 공개했습니다. 저자에게 박수를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 출판물에서 이 코드를 재사용하는 것은 하우스 룰에 의해 관리됩니다. 님은 즐겨찾기로 이 스크립트를 차트에서 쓸 수 있습니다.