OPEN-SOURCE SCRIPT

Support/Resistance

Supertrend with EMA Cloud and Support/Resistance
Purpose: This script provides a comprehensive tool for technical analysis by combining multiple indicators, including Supertrend, EMA Cloud, support and resistance levels, and candlestick patterns.

Inputs:
atrPeriod: ATR (Average True Range) length for Supertrend calculation.

factor: Multiplier factor for Supertrend.

bcolor: Boolean to control bar color based on trend.

emaLength: Length for EMA calculation.

left: Number of bars to the left for pivot point calculation.

right: Number of bars to the right for pivot point calculation.

Supertrend Calculation:
The ta.supertrend function calculates the Supertrend, which helps identify the market trend and potential entry/exit points.

Direction: Determines if the market is in an uptrend or downtrend based on Supertrend values.

EMA Calculation:
EMAs are calculated on the closing, high, and low prices using the specified emaLength.

Trend Determination: Compares the closing price with the EMA to determine bullish or bearish trends.

Plot EMA Cloud:
Plots EMAs for high and low prices and fills the area between them with colors based on the trend:

Green for bullish trend.

Red for bearish trend.

Support and Resistance Calculation:
Uses pivot points to identify potential support and resistance levels:

hih: Pivot high values.

lol: Pivot low values.

top: Resistance level based on pivot high.

bot: Support level based on pivot low.

Plots these levels on the chart with distinct colors.

Engulfing Candle Detection:
Identifies and colors bullish and bearish engulfing candles in black.

Bullish Engulfing: When a candle completely engulfs the previous candle's body upwards.

Bearish Engulfing: When a candle completely engulfs the previous candle's body downwards.

Bar Colors Based on Trend:
Colors the bars green for an uptrend and red for a downtrend based on Supertrend direction and user preference (bcolor).

Example Visualization:
Supertrend: Visual indication of market trend with buy and sell signals.

EMA Cloud: Colored cloud between high and low EMAs, changing colors based on trend direction.

Support and Resistance: Horizontal lines indicating potential levels of support and resistance.

Candlestick Patterns: Highlights significant engulfing patterns for additional trading insights.
Exponential Moving Average (EMA)Support and Resistance

Skrip sumber terbuka

Dalam semangat sebenar TradingView, penulis telah menerbitkan kod Pine ini sebagai sumber terbuka supaya pedagang dapat memahami dan mengesahkannya. Sorakan kepada penulis! Anda boleh menggunakan perpustakaan ini secara percuma, tetapi penggunaan semula kod dalam penerbitan ini adalah dikawal oleh Peraturan dalaman. Anda boleh menyukainya untuk menggunakannya pada carta.

Ingin menggunakan skrip ini pada carta?

Penafian