OPEN-SOURCE SCRIPT

Support and Resistance with Buy/Sell Signals

209
Swing Highs and Lows:

The script identifies swing highs and lows using the ta.highest and ta.lowest functions over a user-defined swing_length period.

Swing highs are treated as resistance levels.

Swing lows are treated as support levels.

Buy Signal:

A buy signal is generated when the price closes above the resistance level (ta.crossover(close, swing_high)).

Sell Signal:

A sell signal is generated when the price closes below the support level (ta.crossunder(close, swing_low)).

Plotting:

Support and resistance levels are plotted on the chart.

Buy and sell signals are displayed as labels on the chart.

Background Highlighting:

The background is highlighted in green for buy signals and red for sell signals (optional).

إخلاء المسؤولية

لا يُقصد بالمعلومات والمنشورات أن تكون، أو تشكل، أي نصيحة مالية أو استثمارية أو تجارية أو أنواع أخرى من النصائح أو التوصيات المقدمة أو المعتمدة من TradingView. اقرأ المزيد في شروط الاستخدام.