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が提供または保証する金融、投資、取引、またはその他の種類のアドバイスや推奨を意図したものではなく、またそのようなものでもありません。詳しくは利用規約をご覧ください。

チャートでこのスクリプトを利用したいですか?