sobiswas

EMA bridge and dashboard with color coding.


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精神,该脚本的作者将其开源发布,以便交易者可以理解和验证它。为作者喝彩!您可以免费使用它,但在出版物中重复使用此代码受网站规则的约束。 您可以收藏它以在图表上使用。

免责声明

这些信息和出版物并不意味着也不构成TradingView提供或认可的金融、投资、交易或其它类型的建议或背书。请在使用条款阅读更多信息。

想在图表上使用此脚本?