TTM Squeeze Range Lines (with Forward Extension) By Gautam KumarThis TTM Squeeze Range Lines script helps visualize breakout levels by marking the recent squeeze’s high and low, making it easier to identify potential trade setups. Each signal line is extended for visibility, showing possible entry levels after a squeeze.
Interpreting the LinesLight blue background marks periods when the TTM squeeze is active (tight volatility).
Green line is drawn at the highest price during the squeeze, extended forward—this is commonly used as the breakout level for long entries.
Red line shows the lowest price during the squeeze, indicating the bottom of the range—potential stop loss positioning or an invalidation level.
When the squeeze background disappears, the horizontal lines will have just appeared and extended forward for several bars after the squeeze ends.
If the price breaks above the green line (the squeeze high), it signals a possible momentum breakout, which traders often use as a long entry.
The red line can be used for placing stop losses or monitoring failed breakouts if price falls below this level.
Best Practices
Combine these levels with volume and momentum confirmation for strong entries.
Adjust the extension length (number of bars forward) from the settings menu to fit your preference.
For systematic trading, use these breakout signals alongside chart pattern or histogram confirmation.
This makes it easy to visualize strong entry zones based on the end of squeeze compression, supporting both discretionary and automated swing trading approaches
Indikatoren und Strategien
VERITAS originale## **The Fundamental Characteristics of Moving Averages: Theoretical Principles and Strategic Applications**
### **The Non-Parallelism Principle: Mathematical Foundation**
The first fundamental principle governing moving averages establishes that **any moving average can never be parallel to its linear regression**. This is not coincidental or anomalous, but a direct consequence of the mathematical nature of moving averages.
**Theoretical explanation:** A moving average is a low-pass filter that removes high-frequency components from price data, while a linear regression represents the optimal linear trend over the considered period. Since the moving average maintains trace of oscillations around the trend (albeit attenuated), while the regression completely eliminates these oscillations to provide only the general direction, the two curves can never be identical or parallel.
**Crucial implication:** This characteristic certifies that **moving averages always have a curvilinear pattern** relative to their regression. The curvature is not an imperfection in the calculation, but the manifestation of the intrinsic dynamics of market data filtered through the moving average.
### **System Energy: Derivation from Curvature**
It is precisely this curvilinear characteristic that allows us to determine fundamental parameters such as **system energy**.
**Physical basis:** In physics, the potential energy of a curvilinear system is proportional to the deviation from the equilibrium trajectory (represented by the linear regression). In our context:
- **Potential energy** = Distance between moving average and its regression
- **Kinetic energy** = Speed of approach or separation between the two curves
- **Total system energy** = Sum of potential and kinetic energy
**Practical application:** When the moving average moves away from its regression, it accumulates potential energy that must be released. When it approaches rapidly, it manifests kinetic energy that can lead to overshooting the equilibrium point.
### **The Hierarchical Rolling Principle**
The second fundamental principle establishes that **curves roll around each other starting from longer periods toward shorter ones**. This phenomenon has deep roots in dynamical systems theory.
**Theoretical explanation:** Moving averages with longer periods have greater inertia and resistance to change (analogous to mass in physics). When a trend change occurs, it propagates first in long-period averages (which represent the dominant forces of the system), then progressively diffuses toward shorter-period averages.
**Propagation mechanism:**
1. **Macro level** (long averages): Change in direction of principal forces
2. **Medium level** (intermediate averages): Signal transmission
3. **Micro level** (short averages): Final manifestation of the change
### **Derived Strategic Formations**
This hierarchical rolling allows us to identify **important formations** for the strategy:
**Rolling Confluence:** When multiple averages of different periods simultaneously begin the rolling process, a high-probability reversal zone is created.
**Alignment Cascade:** The temporal sequence with which averages roll provides information about the strength and persistence of the imminent movement.
**Dynamic Resistance Zones:** Points where rolling encounters resistance indicate critical levels where opposing forces temporarily balance.
### **Strategic Implications**
These theoretical principles translate into concrete operational advantages:
1. **Energy predictability:** We can quantify the energy accumulated in the system and predict the strength of future movements
2. **Entry timing:** Hierarchical rolling provides a temporal sequence to optimize entry points
3. **Risk management:** Understanding system energy allows proper position sizing
The combination of these two principles - non-parallelism and hierarchical rolling - transforms moving averages from simple trend indicators into sophisticated tools for energetic and dynamic analysis of financial markets.
TMC Strategy - Simplified Buy/Sell Signals//@version=5
indicator("TMC Strategy - Simplified Buy/Sell Signals", overlay=true)
// Input parameters
emaLength = input.int(20, title="EMA Length")
rsiLength = input.int(10, title="RSI Length")
macdFast = input.int(12, title="MACD Fast Length")
macdSlow = input.int(26, title="MACD Slow Length")
macdSignal = input.int(9, title="MACD Signal Length")
// Calculate indicators
ema = ta.ema(close, emaLength)
rsi = ta.rsi(close, rsiLength)
= ta.macd(close, macdFast, macdSlow, macdSignal)
// Trend condition
uptrend = close > ema
downtrend = close < ema
// Momentum condition
rsiBullish = rsi > 50
rsiBearish = rsi < 50
// MACD condition
macdBullish = ta.crossover(macdLine, signalLine)
macdBearish = ta.crossunder(macdLine, signalLine)
// Buy and Sell Signals
buySignal = uptrend and rsiBullish and macdBullish
sellSignal = downtrend and rsiBearish and macdBearish
// Plot Buy and Sell Signals
plotshape(series=buySignal, title="Buy Signal", location=location.belowbar, color=color.green, style=shape.labelup, text="BUY", size=size.small)
plotshape(series=sellSignal, title="Sell Signal", location=location.abovebar, color=color.red, style=shape.labeldown, text="SELL", size=size.small)
// Optional: Plot EMA for visual reference
plot(ema, title="EMA", color=color.blue, linewidth=2)
Dynamic Sessions - Asia, London, New YorkThis indicator lets you set trading sessions (custom sessions) and print them out as dynamic polyboxes instead of traditional rectangles which lets you identify strong moves and trends easier.
Multi-Market Trend-Pullback Alerts (EMA20/50 + RSI) [v6]//@version=6 replaces 5
Some functions (like label.delete) need to be called as methods
Minor syntax tightening around string concatenation and label management
All alertcondition() and table logic still works, but must be explicitly version 6 compatible
Market Bias (CEREBR)Market Bias (CEREBR) — quick read of who’s in control
What it does, in one line:
It builds a clean, smoothed Heikin-Ashi view (optionally from a higher timeframe) and an oscillator that says: bullish, bearish, or cooling off. You use it to decide directional bias and to avoid trading against that bias.
What you see on the chart
Smoothed HA candles (optional): green = bullish bias, red = bearish bias.
A soft fill band around the HA body:
Brighter = bias is strengthening.
Faded = bias is weakening.
(In Data Window) “Bias High / Low / Average” = the smoothed HA range and midline.
If you only look at one thing: green means look for longs, red means look for shorts. Faded color = be picky or trim.
How to use it (simple playbook)
Pick your higher timeframe (HTF) for the bias.
On a 4H chart, try HTF = 12H or 1D.
Rule: HTF must be equal to or higher than your chart TF.
Trade with the bias at real levels.
Longs only when the bias is green.
Shorts only when the bias is red.
Take entries at location: Volume Profile v3.2 levels (VAH/VAL/POC/LVNs) or Anchored VWAP.
Quality check (optional but strong):
Before clicking, glance at CVDv1.
Green bias + CVD Alignment OK and no Absorption = better odds.
If CVD shows Absorption against you, skip or wait for a retest.
When to pass:
Color flips every other bar (chop) → do less.
Color is fading (weakening) into your entry → size down or wait.
Timeframe guidance
Scalps (1–5m): HTF = 15m/30m. Use bias to filter direction; enter on pullbacks at AVWAP/VA edges.
Intraday (15m–1H): HTF = 4H. Buy dips in green / sell pops in red at VP levels.
Swing (2H–4H): HTF = 12H/1D. First pullback after a fresh flip is usually the best.
Position (1D–1W): HTF = 1W. Hold while color stays consistent; reduce on weakening near HVNs.
Entries, exits, and stops
Entry with trend:
Bias green, price pulls back to AVWAP / VAL / prior HA mid, then holds.
Click the long. Reverse for shorts in red.
Exit / reduce:
When “Trend Weakens” alert fires, or color fades while hitting your POC/HVN target.
Hard exit on opposite flip (green→red or red→green) if your idea was pure trend-follow.
Stops:
Behind structure/level (not just on color).
If the next bar flips bias against you and CVD also disagrees, cut it early.
Inputs that matter (keep these simple)
Timeframe (HA Market Bias): your HTF. Must be ≥ chart TF.
Period (default 100): smoothing for the base OHLC. Higher = steadier.
Smoothing (default 100): extra smoothing for the HA feed. Higher = fewer flips.
Oscillator Period (default 7): affects how fast strengthening/weakening shows in the fill color. Lower = quicker.
Tip: If you see too many flips, raise Period/Smoothing or pick a higher HTF. If it feels slow, lower them one notch.
Alerts (plain meaning)
Bullish Trend Switch: bias turned bearish → bullish.
Bullish Trend Strengthens / Weakens: same direction, momentum building / cooling.
Bearish Trend Switch: bullish → bearish.
Bearish Trend Strengthens / Weakens: same idea for shorts.
Use “Switch” to prepare for new setups; use “Strengthens/Weakens” to add/trim or tighten risk.
How it works (one paragraph, no math)
The script smooths price, builds Heikin-Ashi values on your chosen HTF, smooths those again, and doesn’t repaint on closed bars. From the HA open/close difference it creates a simple bias oscillator: above zero = bullish, below zero = bearish. The fill brightness tells you if that bias is getting stronger or weaker right now.
Good combos (optional, but recommended)
Volume Profile v3.2 : use VAH/VAL/POC/LVNs as your battleground.
Anchored VWAP : use reclaims/rejections for timing.
CVDv1 : sanity-check flow quality before entry.
FAQ (quick)
Does it repaint?
No on closed bars. HTF values are requested with a safe offset.
Best starting setup?
4H chart, HTF = 1D, Period/Smoothing 100/100, Oscillator 7.
Can I hide the HA candles?
Yes—toggle “Show HA Candles.” Keep only the bias fill if you want a cleaner price chart.
Short disclaimer
Educational tool, not advice. Markets carry risk. Test first, size small, and trade with your plan.
Quant Trend + Donchian (Educational, Public-Safe)What this does
Educational, public-safe visualization of a quant regime model:
• Trend : EMA(64) vs EMA(256) (EWMAC proxy)
• Breakout : Donchian channel (200)
• Volatility-awareness : internal z-scores (not plotted) for concept clarity
Why it’s useful
• Shows when trend & breakout align (clean regimes) vs conflict (chop)
• Helps explain why volatility-aware systems size up in smooth trends and scale down in noise
How to read it
• EMA64 above EMA256 with price near/above Donchian high → trend-following alignment
• EMA64 below EMA256 with price near/below Donchian low → bearish alignment
• Inside channel with EMAs tangled → range/chop risk
Notes
• Indicator is educational only (no orders).
• Built entirely with TradingView built-ins.
• For consistent visuals: enable “Indicator values on price scale” and disable “Scale price chart only” in Settings → Scales .
LBR Oscillator with Signals & AlertsLinda Bradford Raschke MacD indicator. Has alerts and can be used in the pine screener on different timeframes.
My VWAPThe script is a VWAP (Volume Weighted Average Price) indicator overlaying on the price chart.
Users can set the anchor period: Session, Week, Month, Year, Earnings, Dividends, Splits, etc.
VWAP is calculated using the chosen price source (default hlc3) and resets on a new anchor period.
Optional bands around VWAP can be based on standard deviation or percentage of VWAP.
A fast EMA (default 3-period) is plotted alongside VWAP for trend analysis.
The area between EMA and VWAP is colored green if EMA > VWAP, red if EMA < VWAP.
The script checks for volume data, as VWAP requires volume to function.
Buy/sell signals are generated when the EMA crosses above or below VWAP.
Corporate events (earnings, dividends, splits) can trigger a VWAP reset when used as anchors.
Bands plotting is coded but commented out, making the indicator customizable and visually intuitive.
AI MTF Session DayTrader (Non-Repainting) • v1.0.7Feature Details
Timeframes 5m, 15m, 1h (MTF confirm default = 1h)
Markets OANDA: Forex & XAUUSD, COINBASE: BTCUSD
Sessions Asian, London, New York (shaded + filterable)
Engine Trend (EMA/HMA/Supertrend) + RSI/MACD/Stoch combos
Filters ATR range vs. rolling median TR + optional ADX
Risk Dynamic ATR stops + 1R / 1.5R / 2R targets
Presets Forex Fast • Gold Momentum • BTC Intraday
Backtest Optional, non-peeking, partials & stats table
Bitcoin Halving Strategy
A systematic, data-driven trading strategy based on Bitcoin's 4-year halving cycles. This strategy capitalizes on historical price patterns that emerge around halving events, providing clear entry and exit signals for both accumulation and profit-taking phases.
🎯 Strategy Overview
This automated trading system identifies optimal buy and sell zones based on the predictable Bitcoin halving cycle that occurs approximately every 4 years. By analyzing historical data from all previous halvings (2012, 2016, 2020, 2024), the strategy pinpoints high-probability trading opportunities.
📊 Key Features
Automated Signal Generation: Buy signals at halving events and DCA zones, sell signals at profit-taking peaks
Multi-Phase Analysis: Tracks Accumulation, Profit Taking, Bear Market, and DCA phases
Visual Dashboard: Real-time performance metrics, phase countdown, and position tracking
Backtesting Enabled: Comprehensive historical performance analysis with configurable parameters
Risk Management: Built-in position sizing, slippage control, and optional short trading
⚙️ Strategy Logic
Buy Signals:
At halving event (Week 0)
DCA zone entry (Week 135 post-halving)
Sell Signals:
Profit-taking zone (Week 80 post-halving)
Optional short position entry for advanced traders
📈 Performance Highlights
Captures major bull run profits while avoiding prolonged bear markets
Clear visual indicators for all phases and transitions
Customizable timing parameters for personalized risk tolerance
Professional dashboard with live P&L, win rate, and drawdown metrics
🛠️ Customization Options
Adjustable phase timing (profit start/end, DCA timing)
Position sizing control
Enable/disable short trading
Visual customization (colors, labels, zones)
Table positioning and transparency
⚠️ Risk Disclosure
Past performance does not guarantee future results. This strategy is based on historical halving cycle patterns and should be used as part of a comprehensive trading plan. Always conduct your own research and consider your risk tolerance before trading.
💡 Ideal For
Long-term Bitcoin investors seeking systematic entry/exit points
Swing traders capitalizing on multi-month trends
Portfolio managers implementing cycle-based allocation strategies
Episodic Pivot -AparnaEpisodic pivot when volume are 5x of SMA 14 and price is 10% higher than previous close
3/4-Bar GRG / RGR Pattern (Conditional 4th Candle)This indicator can be used to identify the Green-Red-Green or Red-Green-Red pattern.
It is a price action indicator where a price action which identifies the defeat of buyers and sellers.
If the buyers comprehensively defeat the sellers then the price moves up and if the sellers defeat the buyers then the price moves down.
In my trading experience this is what defines the price movement.
It is a 3 or 4 candle pattern, beyond that i.e, 5 or more candles could mean a very sideways market and unnecessary signal generation.
How does it work?
Upside/Green signal
Say candle 1 is Green, which means buyers stepped in, then candle 2 is Red or a Doji, that means sellers brought the price down. Then if candle 3 is forming to be Green and breaks the closing of the 1st candle and opening of the 2nd candle, then a green arrow will appear and that is the place where you want to take your trade.
Here the buyers defeated the sellers.
Sometimes candle 3 falls short but candle 4 breaks candle 1's closing and candle 2's opening price. We can enter on candle 4.
Important - We need to enter the trade as soon as the price moves above the candle 1 and 2's body and should not wait for the 3rd or 4th candle to close. Ignore wicks.
I have restricted it to 4 candles and that is all that is needed. More than that is a longer sideways market.
I call it the +-+ or GRG pattern.
Stop loss can be candle 2's mid for safe traders (that includes me) or candle 2's body low for risky traders.
Back testing suggests that body low will be useless and result in more points in loss because for the bigger move this point will not be touched, so why not get out faster.
Downside/Red signal
Say candle 1 is Red, which means sellers stepped in, then candle 2 is Green or a Doji, that means buyers took the price up. Then if candle 3 is forming to be Red and breaks the closing of the 1st candle and opening of the 2nd candle then a Red arrow will appear and that is the place where you want to take your trade.
Sometimes candle 3 falls short but candle 4 breaks candle 1's closing and candle 2's opening price. We can enter on candle 4.
We need to enter the trade as soon as the price moves below the candle 1 and 2's body and should not wait for the 3rd or 4th candle to close.
I have restricted it to 4 candles and that is all that is needed. More than that is a longer sideways market.
I call it the -+- or RGR pattern.
Stop loss can be candle 2's mid for safe traders ( that includes me) or candle 2's body high for risky traders.
Back testing suggests that body high will be useless and result in more points in loss because for the bigger move this point will not be touched, so why not get out faster.
Important Settings
You can enable or disable the 4th candle signal to avoid the noise, but at times I have noticed that the 4th candle gives a very strong signal or I can say that the strong signal falls on the 4th candle. This is mostly a coincidence.
You can also configure how many previous bars should the signal be generated for. 10 to 30 is good enough. To backtest increase it to 2000 or 5000 for example.
Rest are self explanatory.
Pointers
If after taking the trade, the next candle moves in your direction and closes strong bullish or bearish, then move SL to break even and after that you can trail it.
If a upside trade hits SL and immediately a down side trade signal is generated on the next candle then take it. Vice versa is true.
Trades need to be taken on previous 2 candle's body high or low combined and not the wicks.
The most losses a trader takes is on a sideways day and because in our strategy the stop loss is so small that even on a sideways day we'll get out with a little profit or worst break even.
Hold targets for longer targets and don't panic.
If last 3-4 days have been sideways then there is a good probability that day will be trending so we can hold our trade for longer targets. Target to hold the trade for whole day and not exit till the day closes.
In general avoid trading in the middle of the day for index and stocks. Divide the day into 3 parts and avoid the middle.
Use Support/Resistance, 10, 20, 50, 200 EMA/SMA, Gaps, Whole/Round numbers(very imp) for identifying targets.
Trail your SL.
For indexes I would use 5 min and 15 min timeframe.
For commodities and crypto we can use higher timeframe as well. Look for signals during volatile time durations and avoid trading the whole day. Signal usually gives good targets on those times.
If a GRG or RGR pattern appears on a daily timeframe then this is our time to go big.
Minimum Risk to Reward should be 1:2 and for longer targets can be 1:4 to 1:10.
Trade with small lot size. Money management will happen automatically.
With small lot size and correct Risk-Re ward we can be very profitable. Don't trade with big lot size.
Stay in the market for longer and collect points not money.
Very imp - Watch market and learn to generate a market view.
Very imp - Only 4 candles are needed in trading - strong bullish, strong bearish, hammer, inverse hammer and doji.
Go big on bearish days for option traders. Puts are better bought and Calls are better sold.
Cluster of green signals can lead to bigger move on the upside and vice versa for red signals.
Most of this is what I learned from successful traders (from the top 2%) only the indicator is mine.
ES/NQ Price Action Sync See when ES & NQ move in syncSee when ES & NQ move in sync — revealing real market momentum at a glance.”
⚖️ ES/NQ Price Action Sync
Discover when the market moves as one.
This indicator tracks when S&P 500 Futures (ES1!) and Nasdaq Futures (NQ1!) align in momentum — helping you spot broad-market confirmation or early divergence in real time.
🧠 Concept
The ES/NQ relationship often reveals the market’s underlying strength or hesitation. When both indices turn bullish or bearish together with meaningful movement, that’s a sign of true market alignment.
When they disagree — expect mixed momentum and possible reversals.
⚙️ Features
✅ Highlights new bullish and bearish syncs on chart
✅ Dynamic info table showing % change and direction for each index
✅ Optional triangle markers for clean visual cues
✅ Alert conditions for new sync events
✅ Adjustable lookback and minimum-move filters
💡 How to Use
Use this as a market-context tool, not a direct buy/sell signal.
When both indices sync, intraday trends often hold better; when they diverge, momentum may fade.
Combine it with your own system or higher-time-frame analysis for confirmation.
📊 Why Traders Love It
Simple idea — powerful insight.
This tool helps traders instantly see when “the market machine” is running in harmony… or pulling in opposite directions.
⚠️ Disclaimer:
This script is for educational and analytical purposes only.
It does not provide financial advice or trading signals. Always perform your own research before making trading decisions.
Candle Open-Close DifferenceThis script gives you the different price/points for each candle open and close.
IDX Utility Set [zidaniee]Purpose
This indicator is not a technical analysis tool. It’s a companion overlay designed to guide your analysis of the uniquely structured Indonesia Stock Exchange (IDX).
Core Features
Centered Ticker Display – Clean, readable ticker shown at the center of the chart.
Company Name – Displays the listed company’s full name.
Active Timeframe – Shows the currently selected timeframe.
Additional Features
ATH & ATL Markers – Labels the All-Time High (ATH) and All-Time Low (ATL) and shows the percentage distance from the latest price to each level, so you can quickly gauge upside/downside room.
IDX Fraction (Tick) Levels – Visualizes Indonesia’s price-fraction (tick) brackets. This matters because tick size changes by price range—very useful for scalpers and fast traders.
ARA/ARB Levels (Realtime) – Plots Auto-Reject Upper (ARA) and Auto-Reject Lower (ARB) levels in real time. Levels refresh in line with IDX trading hours 09:00–16:00 WIB (UTC+7), so your view stays consistent both during and outside market hours. This feature already complies with the latest rules and adjustments set by the Indonesia Stock Exchange (IDX).
Suspension Status – Shows SUSPENDED if the stock is halted/suspended, helping you avoid unnecessary analysis. The suspension check compares today’s date with the last available candle date and accounts for weekends.
Note: WIB = Western Indonesia Time (UTC+7).
RED RICHI EMA 34&55This indicator displays two exponential moving averages (EMA 34 & EMA 55) to identify mid-term trend direction.
It also marks crossover points with green and red circles for bullish and bearish trend shifts.
Multi-Timeframe MA - TCMaster🧩 Overview
This indicator displays up to four moving averages from different timeframes on a single chart.
It’s designed for traders who want to track higher-timeframe trends while analyzing price action on lower timeframes — a key technique in multi-timeframe confluence trading.
You can freely customize the type, length, timeframe, and color for each moving average line.
⚙️ Features
4 configurable Moving Averages (each with its own type, length, and timeframe).
Supported types:
SMA, EMA, WMA, RMA, HMA, VWMA, DEMA, TEMA.
Real-time values are fetched from higher timeframes using request.security() (no repaint).
Individual visibility toggle and line width for each MA.
Dynamic info label shows current distance between price and each MA.
Built with Pine Script v6, ensuring optimal performance and flexibility.
📊 Typical Use Cases
Identify trend direction across multiple timeframes.
Confirm entries/exits using higher timeframe trend alignment.
Spot potential reversal or continuation zones when short-term price interacts with long-term MAs.
Build confluence setups for swing, scalp, or intraday strategies.
🧠 Example Setup
MA Type Length Timeframe Purpose
MA #1 SMA 200 1m Micro trend
MA #2 EMA 200 5m Short-term trend
MA #3 EMA 200 15m Medium trend
MA #4 SMA 200 30m Macro trend
🔔 Tips
Combine with oscillators (e.g., RSI, Stoch, MACD) for stronger confluence.
Use color coding to distinguish short vs long timeframe trends.
Consider adding alerts when price crosses any MA (can be extended easily in code).
⚠️ Notes
All higher-timeframe data is handled safely using lookahead=barmerge.lookahead_off to prevent repainting.
Label updates only on the latest bar for efficiency.
VWMA, DEMA, TEMA, and HMA are computed via internal formulas for compatibility with Pine Script v6.
🏁 Summary
Multi-Timeframe MA is a powerful tool for traders who want to merge the clarity of moving averages with the precision of multi-timeframe analysis.
It helps you see the bigger picture without switching charts — perfect for intraday, swing, and trend-following strategies.