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.
Script de código aberto

Dentro do verdadeiro espírito TradingView, o autor deste script publicou ele como um script de código aberto, para que os traders possam compreender e checar ele. Um viva ao autor! Você pode usá-lo gratuitamente, mas a reutilização deste código em uma publicação é regida pelas Regras da Casa. Você pode favoritá-lo para usá-lo em um gráfico.

Aviso legal

As informações e publicações não devem ser e não constituem conselhos ou recomendações financeiras, de investimento, de negociação ou de qualquer outro tipo, fornecidas ou endossadas pela TradingView. Leia mais em Termos de uso.

Quer usar esse script no gráfico?