Composite Scaled EMA LevelsComposite Scaled EMA Levels Indicator
This TradingView Pine Script indicator calculates a “composite EMA” that compares the closing price of the current asset with that of the XU100 index and scales the EMA values to the XU100 level. It then visualizes these computed levels as horizontal lines on the chart with corresponding labels.
Key Components:
Inputs and Data Retrieval:
Length Input: The user defines a parameter length (default is 10) which determines over how many bars the horizontal line is drawn.
Data Collection:
The daily closing price of the current symbol (current_close) is retrieved using request.security().
The daily closing price of the XU100 index (xu100) is also retrieved.
A ratio is computed as current_close / xu100. This ratio serves as the basis for calculating the composite EMAs.
EMA Calculations:
The indicator computes Exponential Moving Averages (EMAs) on the ratio for specific periods.
In the provided version, the script calculates EMAs for three periods (34, 55, and 233), though you can easily expand this to other periods if needed.
Each computed EMA (for instance, EMA34, EMA55, EMA233) is then scaled by multiplying it with the XU100 index’s close, converting it to a price level that is meaningful on the chart.
Drawing Horizontal Lines:
Instead of using the standard plot() function, the script uses line.new() to draw horizontal lines representing the scaled EMA values over the last “length” bars.
Before drawing new lines, any existing lines and labels are deleted to ensure that only the most current values are shown.
Adding Labels to Lines:
The script creates a label for each EMA using label.new(), placing the label at the current bar (i.e., the rightmost position on the chart) using label.style_label_left so that the text appears to the right of the line.
The label displays the name of the composite EMA (e.g., "Composite EMA 34") along with its current scaled value.
Visualization:
The horizontal lines and labels provide a visual reference for the composite EMA levels. These lines help traders see critical support/resistance levels derived from the relationship between the current asset and the XU100 index.
Colors are assigned for clarity (for example, the EMA lines in this version use green).
Summary:
The Composite Scaled EMA Levels indicator is designed to help traders analyze the relationship between an asset’s price and the broader market index (XU100) by calculating a ratio and then applying EMAs on that ratio. By scaling these EMAs back to price levels and displaying them as horizontal lines with clear labels on the chart, the indicator offers a visual tool to assess trend direction and potential support or resistance levels. This can assist in making informed trading decisions based on composite trend analysis.
Đường Trung bình trượt
Liquidity Trendline With Signals [StratifyTrade]combo of a trendline + indicators with signals of trades.
MA Smoothed RSI For LoopMA Smoothed RSI For Loop
Introduction
The MA Smoothed RSI For Loop is a refined momentum indicator that enhances the classic Relative Strength Index (RSI) through advanced smoothing techniques and intelligent visual cues. By applying a moving average smoothing process within a for loop structure and integrating upper and lower threshold logic, this tool enables traders to detect trends with greater clarity and robustness. It is specifically built for traders who seek high-confidence signals through smoothed momentum analysis and contextual visual feedback.
Key Features
For Loop RSI Smoothing: Applies iterative moving average smoothing to the RSI using a for loop, reducing false signals and improving overall trend accuracy.
Threshold-Based Trend Detection: Incorporates upper and lower RSI thresholds to filter out weak signals and confirm strong momentum-driven trends.
Customizable Moving Averages: Supports a variety of moving average types (such as SMA, EMA, WMA) and lengths for tailored responsiveness.
Dynamic Color Feedback: Colors adapt based on RSI position and momentum, making it easy to interpret strength, reversal zones, or trend continuations.
Real-Time Trend Table: Trend Direction (uptrend/downtrend), Strength of Trend (based on RSI slope and threshold behavior) and Duration (number of bars in the current trend phase).
Weighted Loop Control: Allows users to apply weights during the smoothing loop, fine-tuning the indicator’s sensitivity.
How It Works
The indicator begins by computing the RSI from price data. It then enters a for loop where the RSI is repeatedly smoothed with a chosen moving average. This recursive process stabilizes the signal, minimizing the effects of short-term noise.
Upper and lower RSI thresholds are applied to define meaningful zones of momentum. Only when the smoothed RSI crosses and sustains beyond these thresholds is a trend considered significant. The direction and persistence of these movements are visually encoded using dynamic color schemes and captured numerically in the trend table.
This dual-layered method smoothing and threshold filtering provides a robust structure for identifying and monitoring meaningful price momentum.
Use Case
In the example described above we have one long and short positions early triggered once the momentum signal crossed its related threshold up in the case of bullish trend and down for the bearish one.
Conclusion
The MA Smoothed RSI For Loop offers a sophisticated approach to trend analysis by blending smoothed RSI logic with threshold-based confirmation and rich visual interpretation.
Disclaimer
This indicator is designed for educational and informational use only. It should not be construed as financial advice or a recommendation to trade. Always perform your own analysis and consult a qualified financial advisor before making investment decisions. Use at your own risk.
DEMA SuperTrendDEMA SuperTrend
Introduction
The DEMA SuperTrend is a sophisticated trend-following indicator that integrates the speed and smoothness of the Double Exponential Moving Average (DEMA) with the classic SuperTrend methodology. Designed for traders seeking a more responsive alternative to standard trend indicators, the DEMA SuperTrend helps identify the prevailing market direction with minimal lag. It plots directly on the price chart, making it intuitive and accessible for real-time analysis across various timeframes and trading instruments.
Key Features
DEMA-Based Smoothing: Enhances traditional SuperTrend signals by applying DEMA, reducing signal lag and improving responsiveness to market changes.
Dynamic Trend Visualization: Clearly marks uptrend and downtrend phases with adaptive bands that follow price action.
Customizable Inputs: Users can tailor the ATR period, multiplier, and DEMA length to suit their strategy and trading style.
Visual Themes: Custom color schemes and line styles offer a personalized charting experience, supporting better clarity and decision-making.
How It Works
The DEMA SuperTrend calculates the Average True Range (ATR) to measure market volatility and applies a multiplier to determine the band offset. Instead of using a standard moving average, it employs the Double Exponential Moving Average to smooth the price series. The result is a responsive overlay that adjusts more quickly to market shifts compared to the traditional SuperTrend.
Uptrend: Triggered when the price closes above the DEMA-adjusted upper band.
Downtrend: Triggered when the price closes below the DEMA-adjusted lower band.
Band Switching: When a crossover occurs, the indicator switches the band to the opposite side of the price, signaling a potential change in trend direction.
Visual cues and color-coded zones on the chart enhance interpretability, making it easier for traders to react promptly to shifts in momentum.
Conclusion
The DEMA SuperTrend indicator combines the best of both worlds—robust trend-following logic and advanced smoothing—offering traders a powerful tool for identifying and tracking market trends with enhanced accuracy. Its versatility, responsiveness, and customization features make it suitable for both intraday and swing trading strategies.
Disclaimer
This indicator is intended for educational and informational purposes only. It does not constitute financial advice or a recommendation to buy or sell any financial instrument. Users should conduct their own research and risk assessment before making trading decisions.
Buy Sell Ma20 with Volume_[Longtien]Strategy Name: Buy/Sell MA20 with Volume
This strategy uses TradingView’s built-in Technical Rating signals on the 15-minute timeframe, combining them with volume analysis and ATR-based dynamic stop loss.
Buy (Long): When the technical rating > 0.6 and volume is above its 20-period average.
Sell (Short): When the technical rating < -0.6 and volume is above its 20-period average.
Exits use dynamic ATR-based trailing stop and loss.
You can switch between signal sources: Moving Averages, Oscillators, or All.
ScalpSwing Pro SetupScript Overview
This script is a multi-tool setup designed for both scalping (1m–5m) and swing trading (1H–4H–Daily). It combines the power of trend-following , momentum , and mean-reversion tools:
What’s Included in the Script
1. EMA Indicators (20, 50, 200)
- EMA 20 (blue) : Short-term trend
- EMA 50 (orange) : Medium-term trend
- EMA 200 (red) : Long-term trend
- Use:
- EMA 20 crossing above 50 → bullish trend
- EMA 20 crossing below 50 → bearish trend
- Price above 200 EMA = uptrend bias
2. VWAP (Volume Weighted Average Price)
- Shows the average price weighted by volume
- Best used in intraday (1m to 15m timeframes)
- Use:
- Price bouncing from VWAP = reversion trade
- Price far from VWAP = likely pullback incoming
3. RSI (14) + Key Levels
- Shows momentum and overbought/oversold zones
- Levels:
- 70 = Overbought (potential sell)
- 30 = Oversold (potential buy)
- 50 = Trend confirmation
- Use:
- RSI 30–50 in uptrend = dip buying zone
- RSI 70–50 in downtrend = pullback selling zone
4. MACD Crossovers
- Standard MACD with histogram & cross alerts
- Shows trend momentum shifts
- Green triangle = Bullish MACD crossover
- Red triangle = Bearish MACD crossover
- Use:
- Confirm swing trades with MACD crossover
- Combine with RSI divergence
5. Buy & Sell Signal Logic
BUY SIGNAL triggers when:
- EMA 20 crosses above EMA 50
- RSI is between 50 and 70 (momentum bullish, not overbought)
SELL SIGNAL triggers when:
- EMA 20 crosses below EMA 50
- RSI is between 30 and 50 (bearish momentum, not oversold)
These signals appear as:
- BUY : Green label below the candle
- SELL : Red label above the candle
How to Trade with It
For Scalping (1m–5m) :
- Focus on EMA crosses near VWAP
- Confirm with RSI between 50–70 (buy) or 50–30 (sell)
- Use MACD triangle as added confluence
For Swing (1H–4H–Daily) :
- Look for EMA 20–50 cross + price above EMA 200
- Confirm trend with MACD and RSI
- Trade breakout or pullback depending on structure
Alpha Conviction Engine PRO: 70% ConfluenceOnly fires signals when 70%+ of key strategies align
Includes both bullish and bearish logic across:
MA crossover & pullbacks (50/200)
Fibonacci retracements
Bollinger Band breakout/reversion
Volume Profile structure (POC, VAH, VAL)
ATR breakouts
Quant-style conviction (volume spikes, range expansion)
Rogue ORB PRORogue ORB Pro is a precision-engineered Opening Range Breakout (ORB) indicator built for active intraday traders who need real signals, not noise.
This tool identifies high-probability breakout entries from the opening range, enhanced with optional ATR-based stop loss levels, deviation targets, cooldown filters, and a relative volume gate to filter weak setups.
🔍 Key Features:
Opening Range High/Low: Drawn from a user-defined time window and locked for the day
Deviations: Automatically plots target zones above and below the OR range (e.g. 1, 2 deviations)
Pre-Market Levels: Automatically draws pre market high and low lines at the end of pre market session
Buy/Sell Signals: Triggered on breakout of the OR High/Low with configurable breakout logic (touch or close)
ATR Stop Loss Line: Dynamically drawn at a fixed ATR distance from breakout candle, with optional SL label
Cooldown Period: Prevents back-to-back signals by enforcing a user-defined bar delay between entries, can help with overtrading
Volume Filter: Optional relative volume filter that requires breakout candles to exceed a custom volume threshold
VWAP Overlay: Visual VWAP for directional bias and confluence
MTF RSI & SMA Crossover [OB/OS Filtered Signals]MTF RSI & SMA Crossover
This custom indicator combines the power of Multi-Timeframe (MTF) RSI, Simple Moving Average (SMA), and overbought/oversold (OB/OS) conditions to provide precise buy and sell signals based on the crossovers of the RSI and its SMA. The indicator includes the following features:
MTF RSI: The Relative Strength Index (RSI) is calculated on a customizable timeframe, giving traders the ability to analyze price momentum across different timeframes.
SMA of RSI: The RSI is smoothed using a Simple Moving Average (SMA), helping to filter out market noise and identify clearer trend reversals.
Overbought/Oversold Filter: Signals are only triggered when the RSI has been in an overbought (above 70) or oversold (below 30) condition, improving the reliability of potential trend reversals.
Buy/Sell Signals:
Buy signals occur when the RSI crosses above its SMA after being oversold, indicating potential upward momentum.
Sell signals occur when the RSI crosses below its SMA after being overbought, indicating potential downward momentum.
Customizable Label Colors: Choose your own colors for the "BUY" and "SELL" labels to match your chart's design and preferences.
Alerts: Set alerts for buy and sell signals, ensuring you don't miss a potential trade.
This indicator is ideal for traders who want to capture trend reversals and momentum shifts while filtering out false signals by using overbought and oversold conditions. Customize the settings to suit your trading style and strategy.
[HM] Champion-Indicator🚀 Champion-Indicator – Ultimate Multi-Strategy Trading System 📊
A powerful all-in-one indicator combining Trend, Cross, Median, Curve Cloud, Hull MA, and SMAs for superior market analysis.
🔹 Overview:
The Champion-Indicator is a versatile, multi-component trading tool designed to provide traders with a holistic view of market trends, momentum, and key levels. It integrates 6 powerful technical strategies into one seamless overlay, making it ideal for swing traders, day traders, and long-term investors.
🔹 Key Features & Components:
1️⃣ Champion Trend (ATR-Based SuperTrend)
Identifies trend direction using ATR volatility adjustments.
Buy/Sell signals with clear visual alerts.
Customizable periods, multipliers, and calculation methods.
Trend highlighter for easy visualization.
2️⃣ Champion Cross (EMA Crossover System)
Dual EMA crossover (Fast & Slow) with dynamic cloud fill.
Bullish (Green Cloud) when Fast EMA > Slow EMA.
Bearish (Red Cloud) when Fast EMA < Slow EMA.
Adjustable transparency, lengths, and offsets.
3️⃣ Median Channel (Dynamic Support/Resistance)
Plots a median basis line (average of highest/lowest prices).
Helps identify mean reversion and channel breakouts.
4️⃣ Curve Mid Cloud (Volatility-Based Zones)
Displays dynamic mid-range cloud based on price extremes.
Useful for spotting consolidation zones and potential reversals.
5️⃣ Hull Moving Average (Smoothed Trend Filter)
Faster & smoother than traditional MAs.
Changes color based on momentum direction (Aqua = Up, Purple = Down).
6️⃣ SMA Trend & Bias (Long/Short-Term Bias)
Short-term SMA (20) for trend confirmation.
Long-term SMA (200) for overall market bias.
🔹 Input Settings (Customizable):
Component Key Parameters Default Values
Champion Trend ATR Period, Multiplier, Signal Toggles 10, 3.0, On
Champion Cross Fast/Slow EMA Lengths, Cloud Transparency 8, 24, 70%
Median Channel Lookback Period 28
Curve Mid Cloud Curve Length, Factor, Transparency 50, 2.5, 70%
Hull MA HMA Length 20
SMAs Trend SMA (20), Bias SMA (200) 20, 200
🔹 How to Use:
🟢 Enter Long when:
SuperTrend turns Green + EMA Cloud is Green + Price > Median Basis.
Hull MA turns Aqua (confirming uptrend).
🔴 Enter Short when:
SuperTrend turns Red + EMA Cloud is Red + Price < Median Basis.
Hull MA turns Purple (confirming downtrend).
📉 SMA Bias (200-period) acts as a long-term filter (trade in direction of SMA).
Signal Strength + TABI Visualizer (v7.8)// © dotcom880 (Based on original TABI by renderingnature1 & v4 Buy/Hold Entry Finder by runescapeyttanic)
// Indicator Purpose: Visualizes TABI RSI model in a separate pane. Plots Buy/Sell signals
// based on v4 Buy Logic + TABI Overbought Logic, with added "Super" levels for
// higher conviction signals (Super Buy = Buy + Deep RSI, Super Sell = Overheated).
// Version: 7.8 (Indicator Pane - Confidence Levels)
Uday Samant Scalping SetupThis Is scalping setup use for Bank nifty options buying...
Price always moves around VWAP, Fractal give us potential reversal signal.
In this setup take entry next to fractal and Target at VWAP or 20 EMA which ever next to fractal.
karontemassimi e minimi con medie mobili 9-21-200, per eliminare il tempo nella ricerca dei punti chiave.
15 ORB Breakout-Retest with Pivot Points Standard1. 15 Minute Opening Range Breakout
2. Entry on Successful Breakout and Retest Confirmation
3. Pivot Points Standard
4. 21 EMA Trend table on different time frames
Stochastic M1+M5 with EMA + 4H FilterThis indicator combines multi-timeframe Stochastic signals (M1 + M5) and an EMA trend check, while also filtering out noise near 4-hour highs/lows. It delays repeat signals if a weak profit move or recent trade just occurred. Ideal for short-term XAUUSD monitoring, it plots clear “Strong Bull” or “Strong Bear” signals on your chart and offers optional alerts for timely entries.
📈 Dual SMA with Alerts & Trend ColorsFast SMA reacts quicker to price changes.
Slow SMA shows longer-term trend direction.
Trend coloring visually indicates upward or downward direction of each SMA.
Alerts are fully configured and ready to use.
Multi-EMA Overlay//@version=5
indicator("Multi-EMA Overlay", overlay=true)
// Define EMAs
ema5 = ta.ema(close, 5)
ema7 = ta.ema(close, 7)
ema9 = ta.ema(close, 9)
ema20 = ta.ema(close, 20)
ema50 = ta.ema(close, 50)
ema100 = ta.ema(close, 100)
ema200 = ta.ema(close, 200)
ema500 = ta.ema(close, 500)
// Plot EMAs
plot(ema5, title="EMA 5", color=color.orange, linewidth=1)
plot(ema7, title="EMA 7", color=color.red, linewidth=1)
plot(ema9, title="EMA 9", color=color.maroon, linewidth=1)
plot(ema20, title="EMA 20", color=color.blue, linewidth=1)
plot(ema50, title="EMA 50", color=color.green, linewidth=1)
plot(ema100, title="EMA 100", color=color.teal, linewidth=1)
plot(ema200, title="EMA 200", color=color.purple, linewidth=2)
plot(ema500, title="EMA 500", color=color.gray, linewidth=2)
Trap Zone 2 minTrap Zone 2 Min — Visual Detection of Trap and Expansion Zones
This indicator is designed to clearly identify key price zones on lower timeframes, particularly the 2-minute chart. It's ideal for scalpers and intraday traders looking for structured, high-probability setups.
Trap Zone (No Trade Zone)
A central shaded area where trading is discouraged.
Marks potential liquidity traps or manipulation zones.
Calculated using recent highs, lows, and moving averages (MA20 and MA200).
Zones + and -
Positioned two times the size of an EB (Elephant Bar) above and below the trap zone.
Represent the first expansion level.
Useful for identifying potential long or short entries based on price breakout direction.
Zones ++ and --
Extend from the first + or - level to the next line outward.
Represent a second expansion layer, often aligning with price continuation or reaction zones.
Helpful for profit-taking or adjusting risk.
Zones +++ and ---
The most extreme levels plotted.
Serve as final take-profit areas or potential reversal zones.
Additional Features
Optional display of MA20 and MA200.
Configurable ADR (Average Daily Range) labels.
Full visual customization for better chart integration.
Best For
Scalpers and intraday traders.
Identifying and reacting to structured market zones.
Mapping price expansions and potential reversal points.
Combined EMA/Smiley & DEM System## 🔷 General Overview
This script creates an advanced technical analysis system for TradingView, combining multiple Exponential Moving Averages (EMAs), Simple Moving Averages (SMAs), dynamic Fibonacci levels, and ATR (Average True Range) analysis. It presents the results clearly through interactive, real-time tables directly on the chart.
---
## 🔹 Indicator Structure
The script consists of two main parts:
### **1. EMA & SMA Combined System with Fibonacci**
- **Purpose:**
Provides visual insights by comparing multiple EMA/SMA periods and identifying significant dynamic price levels using Fibonacci ratios around a calculated "Golden" line.
- **Components:**
- **Moving Averages (MAs)**:
- 20 EMAs (periods from 20 to 400)
- 20 SMAs (also from 20 to 400)
- **Golden Line:**
Calculated as the average of all EMAs and SMAs.
- **Dynamic Fibonacci Levels:**
Key ratios around the Golden line (0.5, 0.618, 0.786, 1.0, 1.272, 1.414, 1.618, 2.0) dynamically adjust based on market conditions.
- **Fibonacci Labels:**
Labels are shown next to Fibonacci lines, indicating their numeric value clearly on the chart.
- **Table (Top Right Corner):**
- Displays:
- **Input:** EMA/SMA periods sorted by their current average price levels.
- **AVG:** The average of corresponding EMA & SMA pairs.
- **EMA & SMA Values:** Individual EMA/SMA values clearly marked.
- **Dynamic Highlighting:** Highlights the row whose average (EMA+SMA)/2 is closest to the current price, helping identify immediate price action significance.
- **Sorting Logic:**
Each EMA/SMA pair is dynamically sorted based on their average values. Color coding (red/green) is used:
- **Green:** EMA/SMA pairs with shorter periods when their average is lower.
- **Red:** EMA/SMA pairs with longer periods when their average is lower.
- **Star (⭐):** Represents the "Golden" average clearly.
---
### **2. DEM System (Dynamic EMA/ATR Metrics)**
- **Purpose:**
Provides detailed ATR statistics to assess market volatility clearly and quickly.
- **Components:**
- **Moving Averages:**
- SMA lines: 25, 50, 100, 200.
- **Bollinger Bands:**
- Based on 20-period SMA of highs and standard deviation of lows.
- **ATR Analysis:**
- ATR calculations for multiple periods (1-day, 10, 20, 30, 40, 50).
- **ATR Premium:** Average ATR of all calculated periods, providing an overarching volatility indicator.
- **ATR Table (Bottom Right Corner):**
- Displays clearly structured ATR values and percentages relative to the current close price:
- Columns: **ATR Period**, **Value**, and **% of Close**.
- Rows: Each specific ATR (1D, 10, 20, 30, 40, 50), plus ATR premium.
- The ATR premium is highlighted in yellow to signify its importance clearly.
---
## 🔹 Key Features and Logic Explained
- **Dynamic EMA/SMA Sorting:**
The script computes the average of each EMA/SMA pair and sorts them dynamically on each bar, highlighting their relative importance visually. This allows traders to easily interpret the strength of current support/resistance levels based on moving averages.
- **Closest EMA/SMA Pair to Current Price:**
Calculates the absolute difference between the current price and all EMA/SMA averages, highlighting the closest one for quick reference.
- **Fibonacci Ratios:**
- Dynamically calculated Fibonacci levels based on the "Golden" EMA/SMA average give clear visual guidance for potential targets, supports, and resistances.
- Labels are continuously updated and placed next to levels for clarity.
- **ATR Volatility Analysis:**
- Provides immediate insight into market volatility with absolute and relative (percentage-based) ATR values.
- ATR premium summarizes volatility across multiple timeframes clearly.
---
## 🔹 Practical Use Case:
- Traders can quickly identify support/resistance and critical price zones through EMA/SMA and Fibonacci combinations.
- Useful in assessing immediate volatility, guiding stop-loss and take-profit levels through detailed ATR metrics.
- The dynamic highlighting in tables provides intuitive, real-time decision support for active traders.
---
## 🔹 How to Use this Script:
1. **Adjust EMA & SMA Lengths** from indicator settings if different periods are preferred.
2. **Monitor dynamic Fibonacci levels** around the "Golden" average to identify possible reversal or continuation points.
3. **Check EMA/SMA table:** Rows highlighted indicate immediate significance concerning current market price.
4. **ATR table:** Use volatility metrics for better risk management.
---
## 🔷 Conclusion
This advanced Pine Script indicator efficiently combines multiple EMAs, SMAs, dynamic Fibonacci retracement levels, and volatility analysis using ATR into a comprehensive real-time analytical tool, enhancing traders' decision-making capabilities by providing clear and actionable insights directly on the TradingView chart.
Moving Averages & RSIThis TradingView Pine Script plots multiple moving averages (EMAs, SMAs) and multi-timeframe RSI values for trend analysis.
It includes a regime filter based on sector and index trends (e.g., SPX, XLF, XLK) to highlight market conditions.
Bullish and bearish RSI divergences are detected and visually flagged on the chart.
Several UI tables display RSI values, sector info, market trend status, and share float, with optional watermark labeling.
5 MACD+EMA Setups - Single AlertThis is a trading strategy that is based on the use of the EMA and MACD indicators. It has 5 setups.
Buy Sell Signal with SMA, EMA and Stoch RSIThis indicator indicates when to buy and when to sell using the EMA and SMA and rsi.
Oil/gas ratio MAOil/Gas Ratio-Based Equivalent Price
This indicator calculates the gas-equivalent price based on the current oil price and a defined oil/gas ratio. It helps identify relative overvaluation or undervaluation of natural gas compared to oil.
Features:
- Choose between a static or dynamic (SMA-based) oil/gas ratio
- Displays the fair value of gas derived from oil prices
- Works with any oil ticker symbol (e.g. BRENT, USOIL, etc.)
Useful for traders analyzing intermarket relationships and looking for relative value signals between energy commodities.
RSI/Consecutive Days//@version=5
indicator("RSI/Consecutive Days", overlay=false)
// RSI parameters
rsiLength = input.int(14, title="RSI Periyodu")
rsiSource = input.source(close, title="RSI Kaynağı")
rsi = ta.rsi(rsiSource, rsiLength)
// Counter
var int counter30 = 0
var int counter70 = 0
// Counter Update
if rsi < 30
counter30 := counter30 - 1
else
counter30 := 0
if rsi > 70
counter70 := counter70 + 1
else
counter70 := 0
//Plot
plot(counter30, title="RSI < 30 Gün Sayısı", style=plot.style_columns, color=color.new(color.red, 0))
plot(counter70, title="RSI > 70 Gün Sayısı", style=plot.style_columns, color=color.new(color.green, 0))
//0 Line
hline(0, "0 Çizgisi", color=color.gray, linestyle=hline.style_dotted)