Open - CSC Bars - 33 CSC Bars – Early Session Price Action Filter
This script detects when the first three bars of the RTH (Regular Trading Hours) session all move in the same direction — either all bullish or all bearish.
It’s a tool for price action traders who want to develop structured opening strategies by observing clean directional agreement at the session start. The indicator highlights the third bar when the sequence confirms directional bias.
🔍 How It Works:
Monitors the first three bars after the RTH session begins.
If all three bars are bullish, it highlights the third bar (same for bearish sequences).
No projections, signals, or entries—purely a visual tool to observe and study opening behavior.
🎯 Use Case:
This script is designed to help traders build and test opening-based frameworks by identifying potential trend bias early in the day.
Note: This is an open-source utility script with a simple function. It does not generate signals or predictions and is intended to assist with observation and discretionary strategy building.
Forecasting
VWAP Bounce & SqueezeIt includes:
VWAP
20/50 EMA
Volume spike and candle body simulating Bookmap/DOM
custom confluence detection for VWAP, EMA, candle structure
15 minute Opening Range
signals for long and short opportunities
automated risk/reward boxes
automated trailing stop suggestions
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.
🎨 Volume Tuy Chinh - Super High Red//@version=5
indicator("🎨 Volume Tuy Chinh - Super High Red", overlay=false)
avgLength = input.int(20, "So nen tinh volume trung binh")
threshold = input.float(2.0, "Nguong volume sieu cao (x lan)")
avgVol = ta.sma(volume, avgLength)
isSuperHigh = volume > avgVol * threshold
plot(volume, style=plot.style_columns, color=isSuperHigh ? color.red : color.gray, title="Volume Tuy chinh")
P&F Screener Dashboard w/ Trade Ideas + Alerts + TargetsThis advanced screener and dashboard script is designed for active traders who want to:
1. Monitor multiple optionable stocks simultaneously.
2. Identify Point & Figure-based breakouts and breakdowns.
3. Automatically calculate and visualize breakout/breakdown targets.
4. Highlight when targets are hit.
5. Get trade idea suggestions (e.g., vertical spreads).
6. Display a scanner-style dashboard with market trend context.
7. Generate alerts and chart markers to stay ahead of price action.
The script combines technical analysis (P&F logic, moving averages) with strategy design (target projection, trade suggestions) into a single streamlined workspace.
Designed for use with your preferred watchlist—simply customize the symbols and you're ready to trade smarter.
Candlestick Patterns (5m)Candlestick Patterns (5 m) Indicator
This Pine Script v6 indicator automatically scans true 5‑minute bars (via request.security) and highlights four of the most reliable reversal and indecision patterns directly on any chart. It’s designed to help scalpers and swing traders quickly spot turning points without manual pattern-drawing.
Key Features
Multi‑Timeframe Detection: Always uses 5 min data, regardless of your chart’s timeframe.
Four Core Patterns:
Hammer (▲): Bullish reversal with a long lower wick and small body.
Bullish Engulfing (↑): Two‑bar reversal where a green candle fully engulfs the prior red.
Doji (✕): Market indecision when open and close are nearly identical.
Dark Cloud Cover (↓): Bearish reversal closing below the midpoint of the previous green candle.
Customizable Inputs:
Toggle each pattern on/off.
Adjust body‑size thresholds (as % of range) and wick‑to‑body multipliers for hammers and dojis.
Choose whether to use barmerge.lookahead_on (real‑time signals) or …_off (no repaint).
Non‑Repainting Logic: Default lookahead is off so you only see confirmed signals at bar close.
How It Works
Fetch 5 m OHLC: The script pulls 5 min open, high, low, and close values.
Compute Pattern Criteria: Body/range ratios and price relationships determine when a pattern qualifies.
Plot Shapes: Each pattern draws a distinct shape (triangle, arrow, cross) above or below the bar.
Use Cases
Scalping: Quickly identify sharp reversals on high‑volatility moves.
Validation: Combine with moving averages, volume filters, or trendlines to confirm high‑probability setups.
Backtesting: Adjust sensitivity inputs and backtest clusters of signals over historical 5 min data.
Paste this description into your indicator’s comments or TradingView description field to explain its purpose and settings to other users—or bookmark it as a quick reference when you tune the inputs.
Oath KeeperOath Keeper - Advanced Money Flow & Market Dynamics Indicator
A sophisticated indicator that analyzes market dynamics through money flow patterns, volume analysis, and liquidation detection to identify high-probability trading opportunities.
Core Features:
• Smart Money Flow Analysis: Proprietary calculation of institutional money movement
• Volume-Enhanced Signals: Multi-timeframe volume confirmation
• Liquidation Detection: Identifies potential forced liquidation events
• Advanced Signal Classification: Regular, Super, and Fakeout signals
Signal Types:
1. Regular Signals (Green/Purple Circles)
• Volume-confirmed momentum shifts
• Money flow threshold breaches
• Institutional participation confirmation
2. Super Signals (Green/Purple Squares)
• Deep oversold/overbought reversals
• High-volume rejection patterns
• Liquidation event confirmation
3. Fakeout Signals (Red X)
• Rapid sentiment shifts
• Trap detection
• False breakout warnings
Visual Components:
• Dynamic Money Flow Line (White/Purple)
• Order Flow Clouds (Green/Red with high transparency)
• Reference Levels (20, 50, 80)
• Multi-type Signal Markers
• Color-coded momentum visualization
Interpretation Guide:
• Green Cloud: Bullish money flow dominance
• Red Cloud: Bearish money flow dominance
• Circle Markers: Standard reversals
• Square Markers: High-conviction moves
• X Markers: Potential trap zones
Best Practices:
• Most effective on 1H+ timeframes
• Use with major trading pairs
• Wait for candle close confirmation
• Combine with support/resistance levels
• Monitor volume confirmation
• Use multiple timeframe analysis
This indicator helps traders identify institutional money flow, potential liquidation events, and market reversals by analyzing volume patterns and money flow dynamics, providing multiple confirmation layers for trade decisions.
Note: Performance varies with market conditions and timeframes. Always employ proper risk management.
📊 Wyckoff - Spring + UT + Khang cu//@version=5
indicator("📊 Wyckoff - Spring + UT + Khang cu", overlay=true)
// === Tham so nguoi dung ===
lookback = input.int(50, "Tim ho tro/khang cu trong X nen", minval=5)
rangePerc = input.float(0.005, "Nguong gan ho tro/khang cu (%)", step=0.001)
volMultiplier = input.float(1.5, "Nguong Volume cao", step=0.1)
wickRatio = input.float(2.0, "Ty le bong/than", step=0.1)
avgVolLength = input.int(20, "So nen tinh volume trung binh", minval=1)
showLabel = input.bool(true, "Hien thi nhan")
showResLine = input.bool(true, "Hien thi duong khang cu")
// === Tinh toan volume va vung gia ===
avgVol = ta.sma(volume, avgVolLength)
resistance = ta.highest(high, lookback)
support = ta.lowest(low, lookback)
candleBody = math.abs(close - open)
upperWick = high - math.max(open, close)
lowerWick = math.min(open, close) - low
// === Phat hien UpThrust (UT) ===
isNearRes = high >= resistance * (1 - rangePerc)
isUT = upperWick > wickRatio * candleBody and close < open and volume > avgVol * volMultiplier and isNearRes
// === Phat hien Spring ===
isNearSup = low <= support * (1 + rangePerc)
isSpring = lowerWick > wickRatio * candleBody and close > open and volume > avgVol * volMultiplier and isNearSup
// === Hien thi nhan tren bieu do ===
plotshape(isUT and showLabel, title="UT", location=location.abovebar, color=color.red, style=shape.labeldown, text="UT", textcolor=color.white)
plotshape(isSpring and showLabel, title="Spring", location=location.belowbar, color=color.green, style=shape.labelup, text="Spring", textcolor=color.white)
// === To mau nen: do cho UT + Spring, xam cho nen khac ===
barcolor(isUT or isSpring ? color.rgb(255, 0, 0) : color.new(color.gray, 60))
// === Ve duong khang cu ===
var line resLine = na
if (showResLine)
if na(resLine)
resLine := line.new(x1=bar_index, y1=resistance, x2=bar_index + 1, y2=resistance, extend=extend.right, color=color.orange, style=line.style_dashed)
else
line.set_xy1(resLine, bar_index, resistance)
line.set_xy2(resLine, bar_index + 1, resistance)
Volumen Extremo + SRThis indicator detects high-impact trading moments by combining:
Volume spikes (3x or 5x above average)
Strong candle bodies
Dynamic support/resistance zones (based on recent highs/lows)
It highlights key turning points in the market—whether due to whale take-profits, institutional exits, or breakout confirmations.
🔺 Green/Red Arrows:
Appear when volume is 3× the average and the candle has a significant body
→ Confirms strong market conviction (buy/sell)
🌟 Fuchsia Star:
Appears when volume exceeds 5× average with a large-bodied candle
→ Signals extreme moves, whale actions or liquidation spikes
🟩 Support Line (green):
Dynamic recent lowest price (lookback configurable)
→ Identifies zones where buyers previously stepped in
→ Identifies zones where buyers previously stepped in
🟥 Resistance Line (red):
Dynamic recent highest price (lookback configurable)
→ Shows zones where sellers previously dominated
Alerts Included:
Bullish breakout with volume
Bearish rejection with volume
Volume explosion alerts for extreme moves
Don't guide yourself by man uptrend if it doesn't have exceptional volume.
By Teo Mariscal
🌀 Choppy Market Detector Only [Phil Vo]🔀 New Tool: Filters Out Chop So You Can Focus on Clean Moves
Choppy Market Detector – Spot the No-Trade Zones Like a Pro
When price just dances around, faking both sides — that's chop. And chop kills.
This tool is designed to visually alert you when the market is indecisive and not worth your risk.
🧠 What It Does:
* Detects low momentum, tight-range candles, and lack of trend.
* Highlights these choppy areas with a gray background zone — so you can instantly identify danger zones.
* Also shows gray dot markers below candles for additional visual confirmation.
📊 How to Use It:
1. When you see a gray background, it's time to pause or reduce trade frequency.
2. Avoid entering trades blindly inside this zone — wait for a breakout and retest with confirmation.
3. Use this tool alongside EMA/VWAP, SMC, or your current edge to filter out bad conditions.
✅ Perfect For:
* Scalpers who want to preserve capital.
* Traders who get shaken out by noise and want to avoid overtrading.
🔧 Pro Tips:
* Combine this with a reversal zone detector or volume spike alert to know when momentum is picking back up.
* Use this during the first 2 hours after open and pre-market sessions — that's where chop is most common.
🔒 This tool is for educational use only. Not financial advice. Always backtest and use discipline before trading.
StochDL 355This is a Stochastic indicator marking Regular and Hidden Divergence which I liked from the script of Dev Lucem who called his indicator "Plain Stochastic Divergence". I call this indicator StochDL to give Dev Lucem credit for his original contribution. I noticed in his original script that the %K and %D calculation could be improved which I changed to be: period K and period D should be calculated to be %K. Then smooth K and %K should be smoothed to get %D.
His script nicely identifies regular and hidden divergence for %K. However, I then added script to also identify regular and hidden divergence for %D. The "top Spot" and "Bottom Spot" mark when the divergence is complete. It is not my intention to claim that I solely generated this indicator, however, I have altered and added content to make this indicator unique from the original.
I use these arrows for to alert me that there is divergence. I then use other indicators to confirm a change of trend has taken place.
Global M2/M3 Liquidity IndexThis Indicator takes M3 data from 20 of the largest Central banks. M3 data is not available for USA and CHINA and has been substituted with M2.
Overall M3 captures far more than M2 and is therefore a superior model when attempting to track global liquidity.
This indicator also allows the data to be pushed forward to adjust for the lagged effect global liquidity has on markets.
The recommended lag is 90 days.
Multi-Factor Reversal AnalyzerMulti-Factor Reversal Analyzer – Quantitative Reversal Signal System
OVERVIEW
Multi-Factor Reversal Analyzer is a comprehensive technical analysis toolkit designed to detect market tops and bottoms with high precision. It combines trend momentum analysis, price action behavior, wave oscillation structure, and volatility breakout potential into one unified indicator.
This indicator is not a random mix of tools — each module is carefully selected for a specific purpose. When combined, they form a multi-dimensional view of the market, merging trend analysis, momentum divergence, and volatility compression to produce high-confidence signals.
Why Combine These Modules?
Module Combination Ideas & How to Use Them
Factor A: Trend Detector + Gold Zone
Concept:
• The Trend Detector (light yellow histogram) evaluates market strength:
• Histogram trending downward or staying below 50 → bearish conditions;
• Trending upward or staying above 50 → bullish conditions.
• The Gold Zone identifies areas of volatility compression — typically a prelude to explosive market moves.
Practical Application:
• When the Gold Zone appears and the Trend Detector is bearish → likely downside move;
• When the Gold Zone appears and the Trend Detector is bullish → likely upside breakout.
• Note: The Gold Zone does not mean the bottom is in. It is not a buy signal on its own — always combine it with other modules for directional bias.
Factor B: PAI + Wave Trend
Concept:
• PAI (Price Action Index) is a custom oscillator that combines price momentum with volatility dispersion, displaying strength zones:
• Green area → bullish dominance;
• Red area → bearish pressure.
• Wave Trend offers smoothed crossover signals via the main and signal lines.
Practical Application:
• When PAI is in the green zone and Wave Trend makes a bullish crossover → potential reversal to the upside;
• When PAI is in the red zone and Wave Trend shows a bearish crossover → potential start of a downtrend.
Factor C: Trend Detector + PAI
Concept:
• Combines directional trend strength with price action strength to confirm setups via confluence.
Practical Application:
• Trend Detector histogram bottoms out + PAI enters the green zone → high chance of upward reversal;
• Histogram tops out + PAI in the red zone → increased likelihood of downside continuation.
Multi-Factor Confluence (Advanced Use)
• When Trend Detector, PAI, and Wave Trend all align in the same direction (bullish or bearish), the directional signal becomes significantly more reliable.
• This setup is especially useful for trend-following or swing trade entries.
KEY FEATURES
1. Multi-Layer Reversal Logic
• Combines trend scoring, oscillator divergence, and volatility squeezes for triangulated reversal detection.
• Helps traders distinguish between trend pullbacks and true reversals.
2. Advanced Divergence Detection
• Detects both regular and hidden divergences using pivot-based confirmation logic.
• Customizable lookback ranges and pivot sensitivity provide flexible tuning for different market styles.
3. Gold Zone Volatility Compression
• Highlights pre-breakout zones using custom oscillation models (RSI, harmonic, Karobein, etc.).
• Improves anticipation of breakout opportunities following low-volatility compressions.
4. Trend Direction Context
• PAI and Trend Score components provide top-down insight into prevailing bias.
• Built-in “Straddle Area” highlights consolidation zones; breakouts from this area often signal new trend phases.
5. Flexible Visualization
• Color-coded trend bars, reversal markers, normalized oscillator plots, and trend strength labels.
• Designed for both visual discretionary traders and data-driven system developers.
USAGE GUIDELINES
1. Applicable Markets
• Suitable for stocks, crypto, futures, and forex
• Supports reversal, mean-reversion, and breakout trading styles
2. Recommended Timeframes
• Short-term traders: 5m / 15m / 1H — use Wave Trend divergence + Gold Zone
• Swing traders: 4H / Daily — rely on Price Action Index and Trend Detector
• Macro trend context: use PAI HTF mode for higher timeframe overlays
3. Reversal Strategy Flow
• Watch for divergence (WT/PAI) + Gold Zone compression
• Confirm with Trend Score weakening or flipping
• Use Straddle Area breakout for final trigger
• Optional: enable bar coloring or labels for visual reinforcement
• The indicator performs optimally when used in conjunction with a harmonic pattern recognition tool
4. Additional Note on the Gold Zone
The “Gold Zone” does not directly indicate a market bottom. Since it is displayed at the bottom of the chart, it may be misunderstood as a bullish signal. In reality, the Gold Zone represents a compression of price momentum and volatility, suggesting that a significant directional move is about to occur. The direction of that move—upward or downward—should be determined by analyzing the histogram:
• If histogram momentum is weakening, the Gold Zone may precede a downward move.
• If histogram momentum is strengthening, it may signal an upcoming rebound or rally.
Treat the Gold Zone as a warning of impending volatility, and always combine it with trend indicators for accurate directional judgment.
RISK DISCLAIMER
• This indicator calculates trend direction based on historical data and cannot guarantee future market performance. When using this indicator for trading, always combine it with other technical analysis tools, fundamental analysis, and personal trading experience for comprehensive decision-making.
• Market conditions are uncertain, and trend signals may result in false positives or lag. Traders should avoid over-reliance on indicator signals and implement stop-loss strategies and risk management techniques to reduce potential losses.
• Leverage trading carries high risks and may result in rapid capital loss. If using this indicator in leveraged markets (such as futures, forex, or cryptocurrency derivatives), exercise caution, manage risks properly, and set reasonable stop-loss/take-profit levels to protect funds.
• All trading decisions are the sole responsibility of the trader. The developer is not liable for any trading losses. This indicator is for technical analysis reference only and does not constitute investment advice.
• Before live trading, it is recommended to use a demo account for testing to fully understand how to use the indicator and apply proper risk management strategies.
CHANGELOG
v1.0: Initial release featuring integrated Price Action Index, Trend Strength Scoring, Wave Trend Oscillator, Gold Zone Compression Detection, and dual-type divergence recognition. Supports higher timeframe (HTF) synchronization, visual signal markers, and diversified parameter configurations.
TRAMA - Trend Regularity Adaptive Moving AverageThe TRAMA Line is an advanced, adaptive moving average that adjusts its speed based on market volatility. It’s designed to react quickly to price momentum shifts while filtering out noise — making it perfect for scalping, intraday, and swing trading.
What Makes It Special:
📊 Adaptive Sensitivity: Speeds up during high momentum, slows down during consolidation.
🎯 More responsive than traditional EMAs or SMAs, giving early signals without excessive false alarms.
🔄 Works great as a dynamic trend filter — price staying above = uptrend, below = downtrend.
🧠 Based on price movement regularity, which helps detect clean pullbacks and trend continuations.
In Your Indicator:
TRAMA acts as the main trend line to detect:
Trend direction
Pullbacks
Reversals
Combined with MACD, RSI, and ATR, it helps determine whether a move is likely to continue or reverse.
ORB Strat with ATR calculated TargetsThis is a script That puts the ORB high and low from 10 15 30 or 60 minute TF and once broken to the upside or the downside will place targets calculated based on 4 10 minute candle ATRs.
The ORB H and L will only appear at 10 am EST
Global M2 sandboxThis indicator aggregates global sources of liquidity to use as a proxy for the global money supply and allows an offsetting number of days to be implemented to use as a leading indicator.
// EUROZONE Data
EUM2D = request.security("ECONOMICS:EUM2*FX:EURUSD", "D", close, lookahead=barmerge.lookahead_on)
// North America Data
USM2D = request.security("ECONOMICS:USM2", "D", close, lookahead=barmerge.lookahead_on)
CAM2D = request.security("ECONOMICS:CAM2*FX_IDC:CADUSD", "D", close, lookahead=barmerge.lookahead_on)
// Non-EU Europe Data
CHM2D = request.security("ECONOMICS:CHM2*FX_IDC:CHFUSD", "D", close, lookahead=barmerge.lookahead_on)
GBM2D = request.security("ECONOMICS:GBM2*FX:GBPUSD", "D", close, lookahead=barmerge.lookahead_on)
FIPOP = request.security("ECONOMICS:FIM2/FX_IDC:USDFIM", "D", close, lookahead=barmerge.lookahead_on)
RUM2D = request.security("ECONOMICS:RUM2*FX_IDC:RUBUSD", "D", close, lookahead=barmerge.lookahead_on)
// Pacific Data
NZM2D = request.security("ECONOMICS:NZM2*FX_IDC:NZDUSD", "D", close, lookahead=barmerge.lookahead_on)
// Asia Data
CNM2D = request.security("ECONOMICS:CNM2*FX_IDC:CNYUSD", "D", close, lookahead=barmerge.lookahead_on)
TWM2D = request.security("ECONOMICS:TWM2*FX_IDC:TWDUSD", "D", close, lookahead=barmerge.lookahead_on)
HKM2D = request.security("ECONOMICS:HKM2*FX_IDC:HKDUSD", "D", close, lookahead=barmerge.lookahead_on)
INM2D = request.security("ECONOMICS:INM2*FX_IDC:INRUSD", "D", close, lookahead=barmerge.lookahead_on)
JPM2D = request.security("ECONOMICS:JPM2*FX_IDC:JPYUSD", "D", close, lookahead=barmerge.lookahead_on)
PHM2D = request.security("ECONOMICS:PHM2*FX_IDC:PHPUSD", "D", close, lookahead=barmerge.lookahead_on)
SGM2D = request.security("ECONOMICS:SGM2*FX_IDC:SGDUSD", "D", close, lookahead=barmerge.lookahead_on)
// Latin America Data
BRM2D = request.security("ECONOMICS:BRM2*FX_IDC:BRLUSD", "D", close, lookahead=barmerge.lookahead_on)
COM2D = request.security("ECONOMICS:COM2*FX_IDC:COPUSD", "D", close, lookahead=barmerge.lookahead_on)
MXM2D = request.security("ECONOMICS:MXM2*FX_IDC:MXNUSD", "D", close, lookahead=barmerge.lookahead_on)
// Middle East Data
AEM2D = request.security("ECONOMICS:AEM2*FX_IDC:AEDUSD", "D", close, lookahead=barmerge.lookahead_on)
TRM2D = request.security("ECONOMICS:TRM2*FX_IDC:TRYUSD", "D", close, lookahead=barmerge.lookahead_on)
// Africa Data
ZAM2D = request.security("ECONOMICS:ZAM2*FX_IDC:ZARUSD", "D", close, lookahead=barmerge.lookahead_on)
// Calculate Global Money Supply M2
total = (EUM2D + USM2D + CAM2D + CHM2D + GBM2D + FIPOP + RUM2D + NZM2D + CNM2D + TWM2D + HKM2D + INM2D + JPM2D + PHM2D + SGM2D + BRM2D + COM2D + MXM2D + AEM2D + TRM2D + ZAM2D) / 1000000000000
RSI Forecast [Titans_Invest]RSI Forecast
Introducing one of the most impressive RSI indicators ever created – arguably the best on TradingView, and potentially the best in the world.
RSI Forecast is a visionary evolution of the classic RSI, merging powerful customization with groundbreaking predictive capabilities. While preserving the core principles of traditional RSI, it takes analysis to the next level by allowing users to anticipate potential future RSI movements.
Real-Time RSI Forecasting:
For the first time ever, an RSI indicator integrates linear regression using the least squares method to accurately forecast the future behavior of the RSI. This innovation empowers traders to stay one step ahead of the market with forward-looking insight.
Highly Customizable:
Easily adapt the indicator to your personal trading style. Fine-tune a variety of parameters to generate signals perfectly aligned with your strategy.
Innovative, Unique, and Powerful:
This is the world’s first RSI Forecast to apply this predictive approach using least squares linear regression. A truly elite-level tool designed for traders who want a real edge in the market.
⯁ SCIENTIFIC BASIS LINEAR REGRESSION
Linear Regression is a fundamental method of statistics and machine learning, used to model the relationship between a dependent variable y and one or more independent variables 𝑥.
The general formula for a simple linear regression is given by:
y = β₀ + β₁x + ε
Where:
y = is the predicted variable (e.g. future value of RSI)
x = is the explanatory variable (e.g. time or bar index)
β0 = is the intercept (value of 𝑦 when 𝑥 = 0)
𝛽1 = is the slope of the line (rate of change)
ε = is the random error term
The goal is to estimate the coefficients 𝛽0 and 𝛽1 so as to minimize the sum of the squared errors — the so-called Random Error Method Least Squares.
⯁ LEAST SQUARES ESTIMATION
To minimize the error between predicted and observed values, we use the following formulas:
β₁ = /
β₀ = ȳ - β₁x̄
Where:
∑ = sum
x̄ = mean of x
ȳ = mean of y
x_i, y_i = individual values of the variables.
Where:
x_i and y_i are the means of the independent and dependent variables, respectively.
i ranges from 1 to n, the number of observations.
These equations guarantee the best linear unbiased estimator, according to the Gauss-Markov theorem, assuming homoscedasticity and linearity.
⯁ LINEAR REGRESSION IN MACHINE LEARNING
Linear regression is one of the cornerstones of supervised learning. Its simplicity and ability to generate accurate quantitative predictions make it essential in AI systems, predictive algorithms, time series analysis, and automated trading strategies.
By applying this model to the RSI, you are literally putting artificial intelligence at the heart of a classic indicator, bringing a new dimension to technical analysis.
⯁ VISUAL INTERPRETATION
Imagine an RSI time series like this:
Time →
RSI →
The regression line will smooth these values and extend them n periods into the future, creating a predicted trajectory based on the historical moment. This line becomes the predicted RSI, which can be crossed with the actual RSI to generate more intelligent signals.
⯁ SUMMARY OF SCIENTIFIC CONCEPTS USED
Linear Regression Models the relationship between variables using a straight line.
Least Squares Minimizes the sum of squared errors between prediction and reality.
Time Series Forecasting Estimates future values based on historical data.
Supervised Learning Trains models to predict outputs from known inputs.
Statistical Smoothing Reduces noise and reveals underlying trends.
⯁ WHY THIS INDICATOR IS REVOLUTIONARY
Scientifically-based: Based on statistical theory and mathematical inference.
Unprecedented: First public RSI with least squares predictive modeling.
Intelligent: Built with machine learning logic.
Practical: Generates forward-thinking signals.
Customizable: Flexible for any trading strategy.
⯁ CONCLUSION
By combining RSI with linear regression, this indicator allows a trader to predict market momentum, not just follow it.
RSI Forecast is not just an indicator — it is a scientific breakthrough in technical analysis technology.
⯁ Example of simple linear regression, which has one independent variable:
⯁ In linear regression, observations ( red ) are considered to be the result of random deviations ( green ) from an underlying relationship ( blue ) between a dependent variable ( y ) and an independent variable ( x ).
⯁ Visualizing heteroscedasticity in a scatterplot against 100 random fitted values using Matlab:
⯁ The data sets in the Anscombe's quartet are designed to have approximately the same linear regression line (as well as nearly identical means, standard deviations, and correlations) but are graphically very different. This illustrates the pitfalls of relying solely on a fitted model to understand the relationship between variables.
⯁ The result of fitting a set of data points with a quadratic function:
_______________________________________________________________________
🥇 This is the world’s first RSI indicator with: Linear Regression for Forecasting 🥇_______________________________________________________________________
_________________________________________________
🔮 Linear Regression: PineScript Technical Parameters 🔮
_________________________________________________
Forecast Types:
• Flat: Assumes prices will remain the same.
• Linreg: Makes a 'Linear Regression' forecast for n periods.
Technical Information:
ta.linreg (built-in function)
Linear regression curve. A line that best fits the specified prices over a user-defined time period. It is calculated using the least squares method. The result of this function is calculated using the formula: linreg = intercept + slope * (length - 1 - offset), where intercept and slope are the values calculated using the least squares method on the source series.
Syntax:
• Function: ta.linreg()
Parameters:
• source: Source price series.
• length: Number of bars (period).
• offset: Offset.
• return: Linear regression curve.
This function has been cleverly applied to the RSI, making it capable of projecting future values based on past statistical trends.
______________________________________________________
______________________________________________________
⯁ WHAT IS THE RSI❓
The Relative Strength Index (RSI) is a technical analysis indicator developed by J. Welles Wilder. It measures the magnitude of recent price movements to evaluate overbought or oversold conditions in a market. The RSI is an oscillator that ranges from 0 to 100 and is commonly used to identify potential reversal points, as well as the strength of a trend.
⯁ HOW TO USE THE RSI❓
The RSI is calculated based on average gains and losses over a specified period (usually 14 periods). It is plotted on a scale from 0 to 100 and includes three main zones:
• Overbought: When the RSI is above 70, indicating that the asset may be overbought.
• Oversold: When the RSI is below 30, indicating that the asset may be oversold.
• Neutral Zone: Between 30 and 70, where there is no clear signal of overbought or oversold conditions.
______________________________________________________
______________________________________________________
⯁ ENTRY CONDITIONS
The conditions below are fully flexible and allow for complete customization of the signal.
______________________________________________________
______________________________________________________
🔹 CONDITIONS TO BUY 📈
______________________________________________________
• Signal Validity: The signal will remain valid for X bars .
• Signal Sequence: Configurable as AND or OR .
📈 RSI Conditions:
🔹 RSI > Upper
🔹 RSI < Upper
🔹 RSI > Lower
🔹 RSI < Lower
🔹 RSI > Middle
🔹 RSI < Middle
🔹 RSI > MA
🔹 RSI < MA
📈 MA Conditions:
🔹 MA > Upper
🔹 MA < Upper
🔹 MA > Lower
🔹 MA < Lower
📈 Crossovers:
🔹 RSI (Crossover) Upper
🔹 RSI (Crossunder) Upper
🔹 RSI (Crossover) Lower
🔹 RSI (Crossunder) Lower
🔹 RSI (Crossover) Middle
🔹 RSI (Crossunder) Middle
🔹 RSI (Crossover) MA
🔹 RSI (Crossunder) MA
🔹 MA (Crossover) Upper
🔹 MA (Crossunder) Upper
🔹 MA (Crossover) Lower
🔹 MA (Crossunder) Lower
📈 RSI Divergences:
🔹 RSI Divergence Bull
🔹 RSI Divergence Bear
📈 RSI Forecast:
🔮 RSI (Crossover) MA Forecast
🔮 RSI (Crossunder) MA Forecast
______________________________________________________
______________________________________________________
🔸 CONDITIONS TO SELL 📉
______________________________________________________
• Signal Validity: The signal will remain valid for X bars .
• Signal Sequence: Configurable as AND or OR .
📉 RSI Conditions:
🔸 RSI > Upper
🔸 RSI < Upper
🔸 RSI > Lower
🔸 RSI < Lower
🔸 RSI > Middle
🔸 RSI < Middle
🔸 RSI > MA
🔸 RSI < MA
📉 MA Conditions:
🔸 MA > Upper
🔸 MA < Upper
🔸 MA > Lower
🔸 MA < Lower
📉 Crossovers:
🔸 RSI (Crossover) Upper
🔸 RSI (Crossunder) Upper
🔸 RSI (Crossover) Lower
🔸 RSI (Crossunder) Lower
🔸 RSI (Crossover) Middle
🔸 RSI (Crossunder) Middle
🔸 RSI (Crossover) MA
🔸 RSI (Crossunder) MA
🔸 MA (Crossover) Upper
🔸 MA (Crossunder) Upper
🔸 MA (Crossover) Lower
🔸 MA (Crossunder) Lower
📉 RSI Divergences:
🔸 RSI Divergence Bull
🔸 RSI Divergence Bear
📉 RSI Forecast:
🔮 RSI (Crossover) MA Forecast
🔮 RSI (Crossunder) MA Forecast
______________________________________________________
______________________________________________________
🤖 AUTOMATION 🤖
• You can automate the BUY and SELL signals of this indicator.
______________________________________________________
______________________________________________________
⯁ UNIQUE FEATURES
______________________________________________________
Linear Regression: (Forecast)
Signal Validity: The signal will remain valid for X bars
Signal Sequence: Configurable as AND/OR
Condition Table: BUY/SELL
Condition Labels: BUY/SELL
Plot Labels in the Graph Above: BUY/SELL
Automate and Monitor Signals/Alerts: BUY/SELL
Linear Regression (Forecast)
Signal Validity: The signal will remain valid for X bars
Signal Sequence: Configurable as AND/OR
Condition Table: BUY/SELL
Condition Labels: BUY/SELL
Plot Labels in the Graph Above: BUY/SELL
Automate and Monitor Signals/Alerts: BUY/SELL
______________________________________________________
📜 SCRIPT : RSI Forecast
🎴 Art by : @Titans_Invest & @DiFlip
👨💻 Dev by : @Titans_Invest & @DiFlip
🎑 Titans Invest — The Wizards Without Gloves 🧤
✨ Enjoy!
______________________________________________________
o Mission 🗺
• Inspire Traders to manifest Magic in the Market.
o Vision 𐓏
• To elevate collective Energy 𐓷𐓏
Market Sessions by BASSWELLThis TradingView indicator visually highlights major global trading sessions (Tokyo, London, New York) directly on intraday charts. It provides a clear, color-coded display of session activity and key statistics to help traders better understand session dynamics and overlaps.
✅ Key Features:
Visual Session Boxes: Draws background boxes for each session with configurable colors.
Session Names: Displays the name of each session as a label above the session box.
Open/Close Lines: Optionally shows dashed lines at session open and close prices.
Average Price Line: Plots the average session price as a dotted line.
Tick Range Display: Calculates and shows the high-low range in ticks.
Time Zone Support: Fully timezone-aware via IANA definitions (e.g. "Europe/London").
Overlap Handling: Automatically dims older sessions when a new one starts for visual clarity.
🔧 Configurable Parameters:
Show/hide each session individually.
Set session times and timezones.
Customize label visibility and box contents.
Adjust session colors with transparency.
Includes basic visual styling for better chart readability.
⚠️ Note: Works only on intraday timeframes. Daily/weekly/monthly charts are not supported.
Opening Price LevelsOpening Price Levels
This simple and effective indicator automatically draws horizontal lines at the opening price of each major period:
Year
Quarter
Month
Week
Day
Each line extends until the end of its respective period, helping you quickly identify and react to key institutional price levels and market structure shifts.
🔧 Features:
Toggle visibility for each timeframe (Year, Quarter, Month, Week, Day)
Clean visual presentation using plot.style_linebr, ensuring no overlapping or vertical jumps
Automatically adapts to your chart’s timeframe and session settings
This tool is great for both discretionary and systematic traders who want to add more context and structure to their analysis.
Opening Price Levels (by Period)This indicator draws clean horizontal lines at the opening prices of key time periods: Year, Quarter, Month, Week, and Day.
Each line is plotted only within its own time range, so there's no visual clutter or vertical jumps between periods.
Perfect for traders who want to:
Identify and react to institutional levels.
Track price behavior relative to major opens.
Keep charts clean and easy to read.
Features:
✅ Toggle visibility for each period (Year, Quarter, Month, Week, Day).
🎯 Accurate open levels, aligned with your chart's timeframe and session settings.
✨ Clean segments — each line only spans its original period.
Global Liquidity IndexGlobal Liquidity Index
This indicator tracks worldwide liquidity by aggregating global M2 money supply, the U.S. Treasury General Account (TGA), the Federal Reserve’s Reverse Repo (RRP) facility, and major central bank balance sheets. It offers insight into the overall liquidity environment, often a key driver of risk asset performance.
Global Liquidity IndexGlobal Liquidity Index
This indicator tracks worldwide liquidity by aggregating global M2 money supply, the U.S. Treasury General Account (TGA), the Federal Reserve’s Reverse Repo (RRP) facility, and major central bank balance sheets. It offers insight into the overall liquidity environment, often a key driver of risk asset performance.
Gold Price with Time ShiftOverview
The "Gold Price with Time Shift" indicator allows you to visualize the Gold price (XAUUSD) with a customizable time shift, enabling you to lag or lead the data by a specified number of bars. Whether you're analyzing historical trends or projecting Gold’s price into the future, this indicator provides a flexible tool to align Gold price movements with other market indicators or events.
Features
Customizable Time Shift: Shift the Gold price backward (lag) or forward (lead) by a user-defined number of bars. Positive values lag the data, while negative values project it into the future.
Future Projection: When leading the Gold price (negative time shift), the indicator extends the chart into the future, displaying the last known price as a flat projection for easy comparison.
Daily Timeframe: Fetches Gold price data on a daily timeframe, ensuring consistency for long-term analysis.
User-Friendly Inputs: Easily adjust the Gold ticker and time shift via the settings panel to suit your analysis needs.
Indian Market Price LevelsScript to mark levels in Indian market to look for levels in market that including supports and resistance in the market