SuperTrend Volume+Alerts+Diver [filatovlx]
**Title:** SuperTrend Volume+Alerts+Divergence Indicator
**Description:** We present to you a unique indicator for traders that combines the powerful features of SuperTrend with volume analysis and divergence detection! This indicator will be an indispensable tool for every trader looking to enhance their trading decisions' effectiveness.
**Key Features:**
1. **Volume-Based Signals:** The indicator analyzes trading volumes and signals significant market changes. Use color coding (green, fuchsia, and blue) for quick visualization of market conditions.
2. **Divergence Detection:** The unique function of detecting divergences across multiple indicators (MACD, RSI, CCI, etc.) will help you identify potential trend reversals, which is critical for successful trading.
3. **Flexible Settings:** The indicator allows you to customize parameters such as ATR period, volume type, and signal display according to your individual preferences and trading style.
4. **Aesthetic and Informative Interface:** Clear graphical elements, such as candles and labels, make the indicator intuitive and easy to use.
5. **Notifications:** Set alerts for important events, such as divergence detection or buy/sell signals, so you never miss an opportunity.
**Who is it for:**
- Traders of all levels: from beginners to professionals.
- Those seeking reliable tools for market analysis and increasing the profitability of their trades.
- Investors looking to enhance their skills and strategies.
**Conclusion:** Don’t miss the opportunity to improve your trading effectiveness with the SuperTrend Volume Alerts + Divergence Indicator! Join the community of successful traders who are already using this powerful tool to achieve their financial goals.
Название: SuperTrend Volume Alerts + Divergence Indicator
Описание: Представляем вам уникальный индикатор для трейдеров, который сочетает в себе мощные функции SuperTrend и анализ объемов, а также выявление дивергенций! Этот индикатор будет незаменимым инструментом для каждого трейдера, желающего повысить эффективность своих торговых решений.
Ключевые особенности:
1. Сигналы на основе объемов: Индикатор анализирует объемы торгов и сигнализирует о значительных изменениях на рынке. Используйте цветовые обозначения (зеленый, фуксия и синий) для быстрой визуализации состояния рынка.
2. Дивергенция: Уникальная функция обнаружения дивергенций по нескольким индикаторам (MACD, RSI, CCI и др.) поможет вам распознать потенциальные развороты тренда, что является критически важным для успешной торговли.
3. Гибкие настройки: Индикатор позволяет настраивать параметры, такие как период ATR, тип объемов и отображение сигналов, под ваши индивидуальные предпочтения и стиль торговли.
4. Эстетичный и информативный интерфейс: Четкие графические элементы, такие как свечи и метки, делают индикатор интуитивно понятным и легким в использовании.
5. Уведомления: Установите оповещения о важных событиях, таких как обнаружение дивергенций или сигналы на покупку/продажу, чтобы не пропустить ни одной возможности.
Кому подойдет:
• Трейдерам всех уровней: от новичков до профессионалов.
• Тем, кто ищет надежные инструменты для анализа рынка и повышения прибыльности своих сделок.
• Инвесторам, которые хотят улучшить свои навыки и стратегии.
Заключение: Не упустите возможность повысить свою торговую эффективность с помощью индикатора SuperTrend Volume Alerts + Divergence! Присоединяйтесь к сообществу успешных трейдеров, которые уже используют этот мощный инструмент для достижения своих финансовых целей.
Indicateurs d'étendue
Offence vs Defence Intraday HistogramThe "Offence vs Defence Intraday Histogram" script is designed to analyze market sentiment by comparing the performance of offensive and defensive ETFs within a single trading day. This script provides a cumulative histogram that highlights the net impact of offensive and defensive ETF movements, helping traders identify significant shifts and trends within a trading day.
How It Works:
ETF Selection: The script focuses on three offensive ETFs (XLK, XLC, XLY) and three defensive ETFs (XLU, XLV, XLP) to represent market sentiment.
Percentage Change Calculation: The script calculates the percentage change for each ETF compared to the previous bar.
Smoothing with EMA: A 50-period Exponential Moving Average (EMA) is applied to the percentage changes to smooth out short-term volatility and provide a clearer trend.
Offence vs Defence Difference: The script calculates the difference between the smoothed offensive and defensive values.
Cumulative Difference: The cumulative difference is calculated throughout the trading day and resets at the start of each new trading day.
Histogram Plotting: The cumulative difference is plotted as a histogram, with green bars indicating an increasing cumulative difference and red bars indicating a decreasing cumulative difference.
Significance Labels: Color-coded labels are added to highlight significant values, with thresholds set for minor, moderate, and significant leads for both offensive and defensive ETFs.
Key Features:
Intraday sentiment analysis using offensive and defensive ETFs.
Cumulative histogram to visualize net impact within a trading day.
EMA smoothing to reduce noise and highlight trends.
Color-coded histogram bars for easy interpretation.
Labels indicating significant leads in offensive or defensive ETFs.
This script helps traders and investors better understand market sentiment and make more informed decisions based on the intraday performance of offensive and defensive sectors.
Order Block Detectorit gives all sale and buy zones where 0rders have been punched. It gives good signals in the form of circles, only thing is that we have to mark zones where more number of circles have been formed.
Leading Sell SignalExplanation
RSI Calculation & Peak Detection:
The script calculates the RSI value for the close prices using ta.rsi(close, rsiPeriod). It then checks if there is a peak by comparing previous RSI values using rsiValue and rsiValue . This correctly refers to the historical values of the RSI.
Sell Signal Conditions:
The sell signal is triggered when the RSI is above the specified overbought level, a peak is detected, and the MACD histogram confirms a decline.
NadarayaОбъяснение стратегии:
Индикатор Nadaraya-Watson Envelope: Используется для определения границ, внутри которых находится трендовая область.
RSI (Relative Strength Index): Используется для фильтрации сигналов, чтобы избежать входа в перегретые или перепроданные рынки.
Вход в длинную позицию: Когда цена пересекает вверх нижнюю линию оболочки (NWE) и RSI находится ниже уровня перепродаж (Oversold).
Выход из длинной позиции: Когда цена пересекает вниз верхнюю линию оболочки (NWE) или RSI достигает уровня перегрева (Overbought).
Вход в короткую позицию: Когда цена пересекает вниз верхнюю линию оболочки (NWE) и RSI находится выше уровня перегрева (Overbought).
Выход из короткой позиции: Когда цена пересекает вверх нижнюю линию оболочки (NWE) или RSI достигает уровня перепродаж (Oversold).
RSI Deviation & Correlation by DINVESTORQOverview:
This indicator analyzes the Relative Strength Index (RSI) over 252 days, calculating its mean (average) and standard deviation. Based on this, it sets an upper and lower threshold to determine overbought and oversold conditions.
Additionally, it calculates the correlation between RSI and price using a moving average, helping traders understand if RSI is moving in sync with price trends.
Key Features:
✅ RSI Deviation Bands
Upper Limit = RSI Avg + (2 × SD × 2.5)
Lower Limit = RSI Avg - (2 × SD × 2.5)
✅ Trading Signals:
Sell Signal: RSI crosses above the upper limit
Buy Signal: RSI drops below the lower limit
✅ RSI-Price Correlation Moving Average
Uses 50-day correlation between RSI and price
Helps confirm trend strength
✅ Customizable Parameters
RSI Length (Default: 252 Days)
Correlation Period (Default: 50 Days)
✅ Chart Visuals:
Plots RSI (blue), Upper Band (red), Lower Band (green)
Plots RSI-Price Correlation (orange)
Buy/Sell signals appear on chart
TradingView Indicator: RSI Deviation & Correlation Indicator
Overview:
This indicator analyzes the Relative Strength Index (RSI) over 252 days, calculating its mean (average) and standard deviation. Based on this, it sets an upper and lower threshold to determine overbought and oversold conditions.
Additionally, it calculates the correlation between RSI and price using a moving average, helping traders understand if RSI is moving in sync with price trends.
Key Features:
✅ RSI Deviation Bands
Upper Limit = RSI Avg + (2 × SD × 2.5)
Lower Limit = RSI Avg - (2 × SD × 2.5)
✅ Trading Signals:
Sell Signal: RSI crosses above the upper limit
Buy Signal: RSI drops below the lower limit
✅ RSI-Price Correlation Moving Average
Uses 50-day correlation between RSI and price
Helps confirm trend strength
✅ Customizable Parameters
RSI Length (Default: 252 Days)
Correlation Period (Default: 50 Days)
✅ Chart Visuals:
Plots RSI (blue), Upper Band (red), Lower Band (green)
Plots RSI-Price Correlation (orange)
Buy/Sell signals appear on chart
Pine Script for TradingView:
pinescript
Copy
Edit
//version=5
indicator("RSI Deviation & Correlation Indicator", overlay=false)
// User Inputs
length = input.int(252, title="RSI Period")
corr_length = input.int(50, title="Correlation Period")
// RSI Calculation
rsi_value = ta.rsi(close, length)
// Calculate Mean and Standard Deviation of RSI
rsi_avg = ta.sma(rsi_value, length)
rsi_sd = ta.stdev(rsi_value, length) * 2.5
// Define Upper and Lower Limits
upper_limit = rsi_avg + (rsi_sd * 2)
lower_limit = rsi_avg - (rsi_sd * 2)
// Buy and Sell Signals
buy_signal = rsi_value < lower_limit
sell_signal = rsi_value > upper_limit
// Correlation Moving Average between RSI and Price
rsi_price_correlation = ta.correlation(rsi_value, close, corr_length)
// Plot RSI with Bands
plot(rsi_value, title="RSI", color=color.blue)
plot(upper_limit, title="Upper Limit", color=color.red, linewidth=2)
plot(lower_limit, title="Lower Limit", color=color.green, linewidth=2)
plot(rsi_avg, title="Average RSI", color=color.gray, linewidth=2)
// Display Buy/Sell Signals on Chart
plotshape(buy_signal, location=location.bottom, color=color.green, style=shape.labelup, title="BUY Signal", size=size.small)
plotshape(sell_signal, location=location.top, color=color.red, style=shape.labeldown, title="SELL Signal", size=size.small)
// Plot Correlation Moving Average
plot(rsi_price_correlation, title="RSI-Price Correlation", color=color.orange, linewidth=2)
// Alerts for Buy/Sell
alertcondition(buy_signal, title="BUY Alert", message="RSI is below the Lower Limit - BUY Signal")
alertcondition(sell_signal, title="SELL Alert", message="RSI is above the Upper Limit - SELL Signal")
How to Use in TradingView:
1️⃣ Open TradingView and go to the Pine Editor
2️⃣ Paste the above Pine Script
3️⃣ Click Add to Chart
4️⃣ Adjust RSI Length and Correlation Period if needed
5️⃣ Buy/Sell alerts will trigger when conditions match
Trading Strategy:
📉 Sell (Short Entry) when RSI crosses above the upper limit
📈 Buy (Long Entry) when RSI drops below the lower limit
📊 Confirm trends with RSI-Price Correlation:
+1 means RSI and price are moving together
-1 means RSI and price are diverging
Final Notes:
Works best on higher timeframes (Daily, Weekly)
Helps filter overbought/oversold false signals
Can be combined with other indicators (MACD, Bollinger Bands, etc.)
High-Probability Sell Signal IndicatorThe code checks for a bearish RSI divergence on an overbought RSI, confirms high volume on the sell signal bar, and requires a bearish candlestick pattern (engulfing, dark cloud cover, or shooting star) to be present. When all conditions align on a confirmed daily bar close, it plots a “SELL” label above that bar and triggers an alert. This multifaceted approach – combining oscillator divergence, volume, and price action patterns – helps ensure the sell signals are high-probability and reduces the chance of false alarms
BB Indicator by Ibrahim v2this indicator was made for scalping and quick trades. i will update more as time goes on
BTC Bollinger Band Reversion Bot### **BTC Bollinger Band Reversion Strategy** 📊
This strategy is designed to **identify potential reversals** in Bitcoin’s price by leveraging **Bollinger Bands, RSI confirmation, and volume filtering**. It helps traders spot **overbought and oversold conditions**, allowing them to enter high-probability trades.
---
### **🔹 Strategy Logic:**
1️⃣ **BUY Signal (Long Entry) 🚀**
- Price **touches or drops below the lower Bollinger Band** (indicating oversold conditions).
- RSI (14) **falls below 30** (confirming oversold momentum).
- Volume **is above the 20-period average** (to avoid false signals).
2️⃣ **SELL Signal (Short Entry) 🔻**
- Price **touches or moves above the upper Bollinger Band** (indicating overbought conditions).
- RSI (14) **rises above 70** (confirming overbought momentum).
- Volume **is above the 20-period average** (to confirm strength).
---
### **🔹 Why This Works?**
✅ **Mean Reversion Concept:** Assets tend to revert to their average price after extreme movements.
✅ **RSI Confirmation:** Ensures signals are backed by actual momentum shifts.
✅ **Volume Filter:** Reduces false signals caused by low liquidity.
✅ **Color-Coded Alerts:** Enhances readability for quick decision-making.
This strategy is ideal for **scalping or swing trading**, depending on the timeframe used. 📈
Would you like me to tweak it further or add stop-loss/take-profit levels? 🚀
Zero Lag Trend Signals (Improved with MACD)Fixed Buy/Sell Signals: Now clearly visible with "BUY" (Green) and "SELL" (Red) labels.
Improved Moving Line Colors: Adjusted to show trends better.
Added High Timeframe Confirmation: More accurate trend filtering.
Filtered Out Weak Signals: Using ATR & VWMA.
EMA BY RouzzyIt works by indicating the crossing of the trend, both bullish and bearish, and indicating the market trend.
*Green indicates bullish movement
*Red indicates downward movement
*Blue indicates the market trend
Works with any section and any market.
I hope it helps you a lot and you enjoy it.
FX:EURUSD OANDA:XAUUSD FX:US30 OANDA:EURUSD TVC:DXY
Squat Ratio IndicatorThe Squat Ratio is a market indicator that measures the relationship between volume and price movement to identify potential reversals or strong trends. It helps traders assess whether a price movement is supported by sufficient volume.
Formula for Squat Ratio
\text{Squat Ratio} = \frac{\text{Current Bar Volume}}{\text{Average Volume of Previous Bars}} \times \frac{\text{Current Bar Range}}{\text{Average Range of Previous Bars}}
Where:
• Current Bar Volume = Volume of the current price bar
• Average Volume = Average volume over a chosen period (e.g., 10 or 20 bars)
• Current Bar Range = (High - Low) of the current bar
• Average Range = Average of the past price ranges
How to Interpret Squat Ratio
1. High Squat Ratio (>1)
• Indicates that price movement is happening with higher volume than usual but is not breaking out significantly.
• Suggests potential accumulation (buyers stepping in) or distribution (sellers offloading).
• Could signal a trend reversal or strong breakout soon.
2. Low Squat Ratio (<1)
• Suggests that the price is moving with low volume, meaning the current move may lack strength.
• Often seen in weak trends or consolidation phases.
Using Squat Ratio in Nifty Trading
• If Nifty moves up with a high Squat Ratio, it may indicate strong buying interest and the potential for a breakout.
• If Nifty falls with a high Squat Ratio, it could mean strong selling pressure and a possible trend reversal.
• It can be used with other indicators like RSI, VWAP, and Delta for better trade confirmation.
EMA Dual + Pivot Points con Etiquetasindicador de doble Ema editable que incluye los puntos pivote estándar editables a la temporalidad del mercado con ello se determina la entrada y salida de las operaciones
Refined MACD Heikin Ashi Indicator v1.2 with ATR VisualsRefined MACD Heikin Ashi Indicator v1.2
Overview
This advanced MACD-based trading indicator integrates Heikin Ashi trend confirmation with MACD crossovers, enhanced by ATR-based stop-loss and take-profit levels. It provides buy and sell signals (triangles) derived from Heikin Ashi and MACD double confirmation, while ATR-based take-profit and stop-loss markers act as optional trade management tools.
🚀 Works on both regular and Heikin Ashi candles
🔹 Recommended for manual entries with LuxAlgo Smart Money Concepts – an exceptional supply & demand indicator for confluence trading.
Key Features
✅ Dual Confirmation System – Combines Heikin Ashi trend shifts & MACD crossovers for reliable entry/exit signals.
✅ Buy & Sell Triangles – Standalone signals based on HA & MACD confirmation for precise trade execution.
✅ ATR-Based Risk Management (Optional) –
Potential Take-Profit & Stop-Loss Levels calculated dynamically based on market volatility.
✅ Multi-Timeframe Adaptability – Works across all timeframes for strategic trading.
✅ Compatible with Regular Candles – The indicator processes Heikin Ashi values internally, allowing seamless use on any chart type.
✅ Great for Manual Trading – Best when used alongside LuxAlgo Smart Money Concepts for supply & demand confluence.
How It Works
🔹 MACD & Heikin Ashi Confirmation for Entries & Exits –
Bullish Entry (Buy Signal) – Green Triangle appears when both Heikin Ashi and MACD confirm an uptrend.
Bearish Exit (Sell Signal) – Red Triangle appears when Heikin Ashi and MACD confirm a downtrend.
🔹 ATR-Based Stop-Loss & Take-Profit (Optional) –
Red Dots – Suggested Stop-Loss levels based on ATR.
Green Dots – Suggested Take-Profit targets based on ATR.
🔹 No Need for Heikin Ashi Chart – The indicator calculates Heikin Ashi values internally, meaning it works on any chart type.
🔹 Enhanced Manual Trading – Combine with LuxAlgo Smart Money Concepts for precision trading.
Who is This For?
📌 Trend Traders – Identify high-probability trend reversals.
📌 Swing Traders – ATR-based targets help manage risk effectively.
📌 Multi-Timeframe Analysts – Works across different timeframes for better trade confirmation.
📌 Smart Money Traders – Use alongside LuxAlgo Smart Money Concepts for supply & demand insights.
How to Use
1️⃣ Add to Chart – Works on stocks, crypto, forex, and more.
2️⃣ Adjust Settings – Customize MACD lengths, ATR multipliers, and styling.
3️⃣ Follow Buy & Sell Triangles for Entries/Exits – These signals work independently based on Heikin Ashi & MACD double confirmation.
4️⃣ Use ATR-Based SL/TP as Optional Trade Management – The red and green dots can help plan potential exit points, but they are not required to follow the trade signals.
5️⃣ Optimize with Multi-Timeframe Analysis – Works best when viewed across different timeframes for confirmation.
6️⃣ Boost Accuracy – Combine with LuxAlgo Smart Money Concepts for refined entry/exit points based on institutional supply & demand zones.
Customization Options
MACD Fast Length (default: 10)
MACD Slow Length (default: 26)
MACD Signal Length (default: 9)
ATR Multiplier for Stop-Loss (default: 1.8)
ATR Multiplier for Take-Profit (default: 3)
Example Use Case:
Side by side on 4H and 15M charts, showing:
✅ Green & Red Triangles marking potential good buy/sell entries & exits.
✅ ATR-based Stop-Loss (Red Dots) and Take-Profit (Green Dots) acting as optional trade management tools.
✅ Supply & Demand Zones from LuxAlgo Smart Money Concepts providing high-probability manual trade setups.
DonChan426indicator(title="DonChan426", shorttitle="DonChan426", overlay=true, timeframe="", timeframe_gaps=true)
length7 = input.int(4, minval=1, title="MA7")
length1 = input.int(26, minval=1, title="Upper Channel")
length2 = input.int(26, minval=1, title="Lower Channel")
offset_bar = input.int(0,minval=0, title ="Offset Bars")
Albin's Stradegy //@version=5
indicator("SMA Crossover Signal", overlay=true)
/**
* This indicator identifies trade signals based on the crossover of two simple moving averages (SMA) and the relative position of the price to a longer-term SMA.
*
* - It calculates the 5-period, 20-period, and 50-period SMAs.
* - A 'BUY SIGNAL' is displayed when the 5-period SMA crosses above the 20-period SMA, but only if the price is above the 50-period SMA (bullish trend confirmation).
* - A 'SELL SIGNAL' is displayed when the 5-period SMA crosses below the 20-period SMA, but only if the price is below the 50-period SMA (bearish trend confirmation).
* - The background color changes dynamically: green when the price is above the 50-period SMA, red when it is below.
*/
BoqorreIndicator: Yesterday's High/Low Only
This custom TradingView indicator visually marks the high and low of the previous trading day on your chart, providing a clear reference for market conditions. It displays two key levels:
Yesterday's High (Green Line): Representing the highest price reached during the previous day, this level can often act as a resistance point.
Yesterday's Low (Red Line): Showing the lowest price of the previous day, this level may act as a support area.
Key Features:
Lines: The indicator draws dotted lines that extend to the right by 72 bars and infinitely to the left, making it easy to track these important levels.
Labels: Labels are placed directly at the high and low levels to give immediate clarity. The "Yesterday's High" label appears above the green line, while the "Yesterday's Low" label appears beneath the red line.
Previous Daily High/Low Labels: Additional labels are placed for both the previous daily high and low, positioned slightly above and below the respective lines for further clarity and context.
Benefits:
Helps traders identify key support and resistance zones based on the previous day's price action.
Improves technical analysis by visually marking significant price levels, making it easier to spot potential breakout or breakdown points.
The indicator is automatically updated daily, and the lines are drawn dynamically as soon as a new trading day begins.
Whether you're looking to track market movements, identify potential reversal points, or just need a reference for market structure, this indicator will add value to your charting setup
Trend Lines by Pivots (Enhanced)### **📌 Detailed Explanation of the TradingView Indicator Code**
This **Pine Script v5** indicator automatically **detects trend lines** based on pivot highs and pivot lows. It helps traders visualize **support and resistance levels** using dynamic trend lines.
---
## **🔹 How the Indicator Works**
The indicator identifies **key pivot points** in price action and then **draws trend lines** connecting them. It works as follows:
1. **Detects Pivot Highs and Lows**:
- A **pivot high** is a local maximum where the price is higher than surrounding bars.
- A **pivot low** is a local minimum where the price is lower than surrounding bars.
2. **Stores the Last Two Pivot Points**:
- The script remembers the last **two pivot highs** and **two pivot lows**.
- These points are used to **draw resistance and support lines** dynamically.
3. **Plots Resistance and Support Lines**:
- The script continuously **updates** and **extends** the trend lines to the right as new pivots are found.
- **Red Line (Resistance):** Connects the last two pivot highs.
- **Green Line (Support):** Connects the last two pivot lows.
---
## **🔹 Code Breakdown**
### **1️⃣ Inputs for User Customization**
```pinescript
leftLen = input.int(2, "Left Pivot Length")
rightLen = input.int(2, "Right Pivot Length")
highLineColor = input.color(color.red, "Resistance Line Color")
lowLineColor = input.color(color.green, "Support Line Color")
```
- **leftLen & rightLen:** Define how many bars on the left and right should be used to confirm a pivot.
- **highLineColor:** Sets the color of the resistance trend line (default: **red**).
- **lowLineColor:** Sets the color of the support trend line (default: **green**).
---
### **2️⃣ Detect Pivot Highs & Lows**
```pinescript
pivotHigh = ta.pivothigh(leftLen, rightLen)
pivotLow = ta.pivotlow(leftLen, rightLen)
```
- `ta.pivothigh(leftLen, rightLen)`: Detects a **pivot high** if it's the highest price in a certain range.
- `ta.pivotlow(leftLen, rightLen)`: Detects a **pivot low** if it's the lowest price in a certain range.
---
### **3️⃣ Store the Last Two Pivot Points**
#### **🔺 Storing Resistance (Pivot Highs)**
```pinescript
var float lastPivotHigh1 = na
var int lastPivotHighIndex1 = na
var float lastPivotHigh2 = na
var int lastPivotHighIndex2 = na
```
- These variables store **the last two pivot highs** and their **bar indices** (position on the chart).
#### **🔻 Storing Support (Pivot Lows)**
```pinescript
var float lastPivotLow1 = na
var int lastPivotLowIndex1 = na
var float lastPivotLow2 = na
var int lastPivotLowIndex2 = na
```
- These variables store **the last two pivot lows** and their **bar indices**.
---
### **4️⃣ Update Pivot Points When New Ones Are Found**
#### **Updating Resistance (Pivot Highs)**
```pinescript
if not na(pivotHigh)
lastPivotHigh2 := lastPivotHigh1
lastPivotHighIndex2 := lastPivotHighIndex1
lastPivotHigh1 := pivotHigh
lastPivotHighIndex1 := bar_index - rightLen
```
- If a new **pivot high** is found:
- The **previous pivot** becomes `lastPivotHigh2`.
- The **new pivot** becomes `lastPivotHigh1`.
- The index (`bar_index - rightLen`) marks where the pivot occurred.
#### **Updating Support (Pivot Lows)**
```pinescript
if not na(pivotLow)
lastPivotLow2 := lastPivotLow1
lastPivotLowIndex2 := lastPivotLowIndex1
lastPivotLow1 := pivotLow
lastPivotLowIndex1 := bar_index - rightLen
```
- Similar to pivot highs, this section updates **pivot lows** dynamically.
---
### **5️⃣ Create and Update Trend Lines**
#### **🔺 Drawing the Resistance Line**
```pinescript
var line highLine = na
if not na(lastPivotHigh2) and not na(lastPivotHigh1)
if na(highLine)
highLine := line.new(lastPivotHighIndex2, lastPivotHigh2, lastPivotHighIndex1, lastPivotHigh1, color=highLineColor, extend=extend.right)
else
line.set_xy1(highLine, lastPivotHighIndex2, lastPivotHigh2)
line.set_xy2(highLine, lastPivotHighIndex1, lastPivotHigh1)
line.set_color(highLine, highLineColor)
```
- If **two pivot highs** exist:
- **First time:** Creates a new **resistance line** connecting them.
- **Updates dynamically:** Adjusts the line when a new pivot appears.
#### **🔻 Drawing the Support Line**
```pinescript
var line lowLine = na
if not na(lastPivotLow2) and not na(lastPivotLow1)
if na(lowLine)
lowLine := line.new(lastPivotLowIndex2, lastPivotLow2, lastPivotLowIndex1, lastPivotLow1, color=lowLineColor, extend=extend.right)
else
line.set_xy1(lowLine, lastPivotLowIndex2, lastPivotLow2)
line.set_xy2(lowLine, lastPivotLowIndex1, lastPivotLow1)
line.set_color(lowLine, lowLineColor)
```
- Same logic applies for **support levels**, creating or updating a **green trend line**.
---
## **🔹 How to Use This Indicator**
1. **Apply the script in TradingView**:
- Open **Pine Script Editor** → Paste the code → Click **"Add to Chart"**.
2. **Interpret the Lines**:
- **Red line (Resistance):** Price may struggle to break above it.
- **Green line (Support):** Price may bounce off it.
3. **Trading Strategy**:
- **Breakout Strategy:**
- If the price **breaks resistance**, expect a bullish move.
- If the price **breaks support**, expect a bearish move.
- **Reversal Trading:**
- Look for **bounces off support/resistance** for potential reversals.
---
## **🔹 Key Features of This Indicator**
✅ **Automatically detects pivot highs and lows.**
✅ **Draws real-time trend lines for support and resistance.**
✅ **Updates dynamically with new price action.**
✅ **Customizable settings for pivot sensitivity and colors.**
This indicator is useful for **trend traders, breakout traders, and support/resistance traders**. 🚀
Let me know if you need **further improvements or additional features!** 😊
Yearly AVWAP with Buy & Sell Signals (30% TP)Setup Conditions:
Works Best for Investment Plans. Keep the chart on Daily timeframe for better clarity.
Buy Conditions :
1. Always plan buy quantities in small, and invest once a Week or Month
2. Green arrows are shown in the buy zone, not necessarily buy everyday.
Sell Conditions :
1. Be aggressive in selling, sell signals are provided usually ahead of the major drawdown.