PG DMean & Price Sync ver 9.4 - ConsolidatedPG DMean & Price Sync Strategy (SD Filter)
This strategy combines the momentum-oscillator properties of the Detrended Mean (DMean) with a Standard Deviation (SD) Price Filter for confirming trend direction, aiming to isolate high-conviction trades while actively managing risk.
🔑 Core Logic
DMean Momentum Signal: The strategy's primary engine is the DMean, which measures the percentage difference between the current closing price and a longer-term Moving Average (price_ma). It is then smoothed by a DMean Signal line (MA of the DMean).
Entry Signal: A trade is triggered when the DMean line crosses above (for Long) or below (for Short) its Signal Line, but it must clear a user-defined Dead Zone Threshold to confirm momentum commitment.
SD Filter Confirmation (Price Sync): A Standard Deviation Channel, based on a separate user-defined price source and period, is used to filter trades.
Long Filter: Allows Long entries only when the price is trading above the lower SD band, suggesting the current price action is stronger than the recent average volatility to the downside.
Short Filter: Allows Short entries only when the price is currently below the Filter Basis (SMA), confirming a bearish stance within the SD channel.
🛡️ Risk & Exit Management
Primary Exit: All trades are exited by reverse DMean Crossover/Crossunder, meaning the position is closed when the DMean momentum reverses against the open trade (e.g., DMean crosses under the Signal to exit a Long).
Hard Stop Loss (Short Trades): A mandatory percentage-based Hard Stop Loss is implemented only for short positions to protect against sudden upward price spikes, closing the trade if the loss exceeds the set percentage. (Note: This version does not include a Hard SL for Long trades).
📊 Performance Dashboard
A custom Performance Dashboard Table is displayed at the bottom right of the chart to provide real-time, at-a-glance comparison of the strategy's equity performance versus a simple Buy & Hold over the selected backtesting date range.
Indicators and strategies
Tunç ŞatıroğluTunç Şatıroğlu's Technical Analysis Suite
Description:
This comprehensive Pine Script indicator, inspired by the technical analysis teachings of Tunç Şatıroğlu, integrates six powerful TradingView indicators into a single, user-friendly suite for robust trend, momentum, and divergence analysis. Each component has been carefully selected and enhanced by beytun to improve functionality, performance, and visual clarity, aligning with Şatıroğlu's approach to technical analysis. The default configuration is meticulously set to match the exact settings of the individual indicators as used by Tunç Şatıroğlu in his training, ensuring authenticity and ease of use for followers of his methodology. Whether you're a beginner or an experienced trader, this suite provides a versatile toolkit for analyzing markets across multiple timeframes.
Included Indicators:
1. WaveTrend with Crosses (by LazyBear, modified): A momentum oscillator that identifies overbought/oversold conditions and trend reversals with clear buy/sell signals via crosses and bar color highlights.
2. Kaufman Adaptive Moving Average (KAMA) (by HPotter, modified): A dynamic moving average that adapts to market volatility, offering a smoother trend-following signal.
3. SuperTrend (by Alex Orekhov, modified): A trend-following indicator that plots dynamic support/resistance levels with buy/sell signals and optional wicks for enhanced accuracy.
4. Nadaraya-Watson Envelope (by LuxAlgo, modified): A non-linear envelope that highlights potential reversals with customizable repainting options for smoother outputs.
5. Divergence for Many Indicators v4 (by LonesomeTheBlue, modified): Detects regular and hidden divergences across multiple indicators (MACD, RSI, Stochastic, CCI, Momentum, OBV, VWMA, CMF, MFI, and more) for early reversal signals.
6. Ichimoku Cloud (TradingView built-in, modified): A multi-faceted indicator for trend direction, support/resistance, and momentum, with enhanced visuals for the Kumo Cloud.
Key Features:
- Authentic Default Settings : Pre-configured to mirror the exact parameters used by Tunç Şatıroğlu for each indicator, ensuring alignment with his proven technical analysis approach.
- Customizable Settings : Enable/disable individual indicators and fine-tune parameters to suit your trading style while retaining the option to revert to Şatıroğlu’s defaults.
- Enhanced User Experience : Modifications improve visual clarity, performance, and usability, with options like repainting smoothing for Nadaraya-Watson and adjustable Ichimoku projection periods.
- Multi-Timeframe Analysis : Combines trend-following, momentum, and divergence tools for a holistic view of market dynamics.
- Alert Conditions : Built-in alerts for SuperTrend direction changes, buy/sell signals, and divergence detections to keep you informed.
- Visual Clarity : Overlays (KAMA, SuperTrend, Nadaraya-Watson, Ichimoku) and pane-based indicators (WaveTrend, Divergences) are clearly distinguished, with customizable colors and styles.
Notes:
- The Nadaraya-Watson Envelope and Ichimoku Cloud may repaint in their default modes. Use the "Repainting Smoothing" option for Nadaraya-Watson or adjust Ichimoku settings to mitigate repainting if preferred.
- Published under the MIT License, with components licensed under GPL-3.0 (SuperTrend), CC BY-NC-SA 4.0 (Nadaraya-Watson), MPL 2.0 (Divergence), and TradingView's terms (Ichimoku Cloud).
Usage:
Add this indicator to your TradingView chart to leverage Tunç Şatıroğlu’s exact indicator configurations out of the box. Customize settings as needed to align with your strategy, and use the combined signals to identify trends, reversals, and divergences. Ideal for traders following Şatıroğlu’s methodologies or anyone seeking a powerful, all-in-one technical analysis tool.
Credits:
Original authors: LazyBear, HPotter, Alex Orekhov, LuxAlgo, LonesomeTheBlue, and TradingView.
Modifications and integration by beytun .
License:
Published under the MIT License, incorporating code under GPL-3.0, CC BY-NC-SA 4.0, MPL 2.0, and TradingView’s terms where applicable.
ATR Horizontal Lines from EMA and SMA with TableHow it works:
The script calculates ATR levels (of your choosing)
Instead of plotting curves, it creates horizontal lines
The lines are deleted and recreated on each bar to show current levels
Lines extend to the right or can be limited to a certain width
Customization options:
Line width (1-10 pixels)
Individual colors for each of the 4 lines
All the original parameters (EMA/SMA lengths, ATR length, multipliers)
The horizontal lines will now show the current ATR-based support/resistance levels and move dynamically as the EMAs, SMA, and ATR values change with new price data.
BTC 4H — No-3% Pullback Moves (>=7%, wick-to-wick)4h candles move without pullbacks 3%
in settings you can set a pullback %
and i try to got middle % of such moves
Level Marking - Day Levels, Fib, Swing high Low)Plots key day levels: previous day PH/PL/PC and live current CH/CL, each as extend-right lines with optional dashed style and right-side zig-zag price labels.
Adds “Golden Fib” 0.5 & 0.618 from the prior day’s High–Low (you can flip Low→High or High→Low to match TV’s Fib tool).
Marks fast swings (3-bar) with blue boxes that trail the latest price—great for quick scalps.
Marks slow swings (7-bar) with red horizontal lines extended to the right; price labels sit at the line ends.
Everything updates in real time each bar and respects TradingView’s future-object limits.
ATT Numbers Header (Movable)For anybody that trades with ATT (Advanced Time Technique) And can't remember the numbers and want's to have them on their chart at all time with full customizability as well this indicator is for you.
FirstStrike Long 200 - Daily Trend Rider [KedArc Quant]Strategy Description
FirstStrike Long 200 is a disciplined, long-only momentum strategy designed for daily "strike-first" entries in trending markets. It scans for RSI momentum above a customizable trigger (default 50), confirmed by EMA trend filters, and limits you to *exactly one trade per day* to avoid overtrading. It uses ATR for dynamic risk management (1.5x stop, 2:1 RR target) and optional trailing stops to ride winners. Backtested with realistic commissions and sizing, it prioritizes low drawdowns (<1% max in tests) over aggressive gains—ideal for swing traders seeking quality setups in bull runs.
Why It's Different from Other Strategies
Unlike generic RSI crossover bots or EMA ribbon mashups that spam signals and bleed in chop, FirstStrike enforces a "one-and-done" daily gate, blending precision momentum (RSI modes with grace/sustain) with robust filters (volume, sessions, rearm dips).
How It Helps Traders
- Reduces Emotional Trading: One entry/day forces discipline—miss a setup? Wait for tomorrow. Perfect for busy pros avoiding screen fatigue.
- Adapts to Regimes: Switch modes for trends ("Cross+Grace") vs. ranges ("Any bar")—boosts win rates 5-10% in backtests on high-beta names like .
- Risk-First Design: ATR scales stops to vol capping DD at 0.2% while targeting 2R winners. Trailing option locks +3-5% runs without early exits.
- Quick Insights: Labels/alerts flag entries with RSI values; bgcolor highlights signals for visual scanning. Helps spot "first-strike" edges in uptrends, filtering ~60% noise.
Why This Is Not a Mashup
This isn't a Frankenstein of off-the-shelf indicators—while it uses standard RSI/EMA/ATR (core Pine primitives), the innovation lies in:
- Custom Trigger Engine: Switchable modes (e.g., "Cross+Grace+Sustain" requires post-cross hold) prevent perpetual signals, unlike basic `ta.crossover()`.
- Daily Rearm Gate: Resets eligibility only after a dip (if enabled), tying momentum to mean-reversion—original logic not found in common scripts.
- Per-Day Isolation: `var` vars + `ta.change(time("D"))` ensure zero pyramiding/overlaps, beyond simple session filters.
All formulae are derived in-house for "first-strike" (early RSI pops in trends), not copied from public repos.
Input Configurations
Let's break down every input in the FirstStrike Long 200 strategy. These settings let you tweak the strategy like a dashboard—start with defaults for quick testing,
then adjust based on your asset or timeframe (5m for intraday). They're grouped logically to keep things organized, and most have tooltips in the script for quick reminders.
RSI / Trigger Group: The Heart of Momentum Detection
This is where the magic starts—the strategy hunts for "upward energy" using RSI (Relative Strength Index), a tool that measures if a stock is overbought (too hot) or oversold (too cold) on a 0-100 scale.
- RSI Length: How many bars (candles) back to calculate RSI. Default is 14, like a 14-day window for daily charts. Shorter (e.g., 9) makes it snappier for fast markets; longer (21) smooths out noise but misses quick turns.
- Trigger Level (RSI >= this): The key RSI value where the strategy says, "Go time!" Default 50 means enter when RSI crosses or holds above the neutral midline. Why is this trigger required? It acts as your "green light" filter—without it, you'd enter on every tiny price wiggle, leading to endless losers. RSI above this shows building buyer power, avoiding weak or sideways moves. It's essential for quality over quantity, especially in one-trade-per-day setups.
- Trigger Mode: Picks how strict the RSI signal must be. Options: "Cross only" (exact RSI crossover above trigger—super precise, fewer trades); "Cross+Grace" (crossover or within a grace window after—gives a second chance); "Cross+Grace+Sustain" (crossover/grace plus RSI holding steady for bars—best for steady climbs); "Any bar >= trigger" (looser, any bar above—more opportunities but riskier in chop). Start with "Any bar" for trends, switch to "Cross only" for caution.
- Grace Window (bars after cross): If mode allows, how many bars post-RSI-cross you can still enter if RSI dips but recovers. Default 30 (about 2.5 hours on 5m). Zero means no wiggle room—pure precision.
- Sustain Bars (RSI >= trigger): In sustain mode, how many straight bars RSI must stay above trigger. Default 3 ensures it's not a fluke spike.
- Require RSI Dip Below Rearm Before Any Entry?: A yes/no toggle. If on, the strategy "rearms" only after RSI dips below a low level (like a breather), preventing back-to-back signals in overextended rallies.
- Rearm Level (if requireDip=true): The dip threshold for rearming. Default 45—RSI must go below this to reset eligibility. Lower (30) for deeper pullbacks in volatile stocks.
For the trigger level itself, presets matter a lot—default 50 is neutral and versatile for broad trends. Bump to 55-60 for "strong momentum only" (fewer but higher-win trades, great in bull runs like tech surges); drop to 40-45 for "early bird" catches in recoveries (more signals but watch for fakes in ranges). The optimize hint (40-60) lets you test these in TradingView to match your risk—higher presets cut noise by 20-30% in backtests.
Trend / Filters Group: Keeping You on the Right Side of the Market
These EMAs (Exponential Moving Averages) act like guardrails, ensuring you only long in uptrends.
- EMA (Fast) Confirmation: Short-term EMA for price action. Default 20 periods—price must be above this for "recent strength." Shorter (10) reacts faster to intraday pops.
- EMA (Trend Filter): Long-term EMA for big-picture trend. Default 200 (classic "above the 200-day" rule)—price above it confirms bull market. Minimum 50 to avoid over-smoothing.
Optional Hour Window Group: Timing Your Strikes
Avoid bad hours like lunch lulls or after-hours tricks.
- Restrict by Session?: Yes/no for using exact market hours. Default off.
- Session (e.g., 0930-1600 for NYSE): Time string like "0930-1600" for open to close. Auto-skips pre/post-market noise.
- Restrict by Hour Range?: Fallback yes/no for simple hours. Default off.
- Start Hour / End Hour: Clock times (0-23). Defaults 9-15 ET—focus on peak volume.
Volume Filter Group: No Volume, No Party
Confirms conviction—big moves need big participation.
- Require Volume > SMA?: Yes/no toggle. Default off—only fires on above-average volume.
- Volume SMA Length: Periods for the average. Default 20—compares current bar to recent norm.
Risk / Exits Group: Protecting and Profiting Smartly
Dynamic stops based on volatility (ATR = Average True Range) keep things realistic.
- ATR Length: Bars for ATR calc. Default 14—measures recent "wiggle room" in price.
- ATR Stop Multiplier: How far below entry for stop-loss. Default 1.5x ATR—gives breathing space without huge risk
- Take-Profit R Multiple: Reward target as multiple of risk. Default 2.0 (2:1 ratio)—aims for twice your stop distance.
- Use Trailing Stop?: Yes/no for profit-locking trail. Default off—activates after entry.
- Trailing ATR Multiplier: Trail distance. Default 2.0x ATR—looser than initial stop to let winners run.
These inputs make the strategy plug-and-play: Defaults work out-of-box for trending stocks, but tweak RSI trigger/modes first for your style.
Always backtest changes—small shifts can flip a 40% win rate to 50%+!
Outputs (Visuals & Alerts):
- Plots: Blue EMA200 (trend line), Orange EMA20 (price filter), Green dashed entry price.
- Labels: Green "LONG" arrow with RSI value on entries.
- Background: Light green highlight on signal bars.
- Alerts: "FirstStrike Long Entry" fires on conditions (integrates with TradingView notifications).
Entry-Exit Logic
Entry (Long Only, One Per Day):
1. Daily Reset: New day clears trade gate and (if required) rearm status.
2. Filters Pass: Time/session OK + Close > EMA200 (trend) + Close > EMA20 (price) + Volume > SMA (if enabled) + Rearmed (dip below rearm if toggled).
3. Trigger Fires: RSI >= trigger via selected mode (e.g., crossover + grace window).
4. Execute: Enter long at close; set daily flag to block repeats.
Exit:
- Stop-Loss: Entry - (ATR * 1.5) – dynamic, vol-scaled.
- Take-Profit: Entry + (Risk * 2.0) – fixed RR.
- Trailing (Optional): Activates post-entry; trails at Close - (ATR * 2.0), updating on each bar for trend extension.
No shorts or hedging—pure long bias.
Formulae Used
- RSI: `ta.rsi(close, rsiLen)` – Standard 14-period momentum oscillator (0-100).
- EMAs: `ta.ema(close, len)` – Exponential moving averages for trend/price filters.
- ATR: `ta.atr(atrLen)` – True range average for stop sizing: Stop = Entry - (ATR * mult).
- Volume SMA: `ta.sma(volume, volLen)` – Simple average for relative strength filter.
- Grace Window: `bar_index - lastCrossBarIndex <= graceBars` – Counts bars since RSI crossover.
- Sustain: `ta.barssince(rsi < trigger) >= sustainBars` – Consecutive bars above threshold.
- Session Check: `time(timeframe.period, sessionStr) != 0` – TradingView's built-in session validator.
- Risk Distance: `riskPS = entry - stop; TP = entry + (riskPS * RR)` – Asymmetric reward calc.
FAQ
Q: Why only one trade/day?
A: Prevents revenge trading in volatile sessions . Backtests show it cuts losers by 20-30% vs. multi-entry bots.
Q: Does it work on all assets/timeframes?
A: Best for trending stocks/indices on 5m-1H. Test on crypto/forex with wider ATR mult (2.0+).
Q: How to optimize?
A: Use TradingView's optimizer on RSI trigger (40-60) and EMA fast (10-30). Aim for PF >1.0 over 1Y data.
Q: Alerts don't fire—why?
A: Ensure `alertcondition` is enabled in script settings. Test with "Any alert() function calls only."
Q: Trailing stop too loose?
A: Tune `trailMult` to 1.5 for tighter; it activates alongside fixed TP/SL for hybrid protection.
Glossary
- Grace Window: Post-RSI-cross period (bars) where entry still allowed if RSI holds trigger.
- Rearm Dip: Optional pullback below a low RSI level (e.g., 45) to "reset" eligibility after signals.
- Profit Factor (PF): Gross profit / gross loss—>1.0 means winners outweigh losers.
- R Multiple: Risk units (e.g., 2R = 2x stop distance as target).
- Sustain Bars: Consecutive bars RSI stays >= trigger for mode confirmation.
Recommendations
- Backtest First: Run on your symbols (/) over 6-12M; tweak RSI to 55 for +5% win rate.
- Live Use: Start paper trading with `useSession=true` and `useVol=true` to filter noise.
- Pairs Well With: Higher TF (daily) for bias; add ADX (>25) filter for strong trends (code snippet in prior chats).
- Risk Note: 10% sizing suits $100k+ accounts; scale down for smaller. Not financial advice—past performance ≠ future.
- Publish Tip: Add tags like "momentum," "RSI," "long-only" on TradingView for visibility.
Strategy Properties & Backtesting Setup
FirstStrike Long 200 is configured with conservative, realistic backtesting parameters to ensure reliable performance simulations. These settings prioritize capital preservation and transparency, making it suitable for both novice and experienced traders testing on stocks.
Initial Capital
$100,000 Standard starting equity for portfolio-level testing; scales well for retail accounts. Adjust lower (e.g., $10k) for smaller simulations.
Base Currency
Default (USD) Aligns with most US equities (e.g., NASDAQ symbols); auto-converts for other assets.
Order Size
1 (Quantity) Fixed share contracts for simplicity—e.g., buys 1 share per trade. For % of equity, switch to "Percent of Equity" in strategy code.
Pyramiding
0 Orders No additional entries on open positions; enforces strict one-trade-per-day discipline to avoid overexposure.
Commission
0.1% Realistic broker fee (e.g., Interactive Brokers tier); factors in round-trip costs without over-penalizing winners.
Verify Price for Limit Orders
0 Ticks No slippage delay on TPs—assumes ideal fills for historical accuracy.
Slippage
0 Ticks Zero assumed slippage for clean backtests; real-world trading may add 1-2 ticks on volatile opens.
These defaults yield low drawdowns (<0.3% max in tests) while capturing trend edges. For live trading, enable slippage (1-3 ticks) to mimic execution gaps. Always forward-test before deploying!
⚠️ Disclaimer
This script is provided for educational purposes only.
Past performance does not guarantee future results.
Trading involves risk, and users should exercise caution and use proper risk management when applying this strategy.
Position Size CalculatorPosition Size CalculatorRisk Management Made Simple – Size Your Trades Like a Pro!Tired of guessing position sizes and blowing up your account on oversized trades? This Pine Script indicator automates position sizing based on your risk tolerance, ensuring every trade risks only what you've predefined. Perfect for stocks, forex, crypto, or futures—works for long or short setups. Overlay it on your candlestick chart and watch the math do the work.Key Features:Smart Risk Control: Input your account size (e.g., $70k) and risk % (e.g., 1%). It caps your max loss per trade automatically.
Dynamic Entry & Stop: Use live chart close as entry, or click to set a manual entry level (green solid line). For stops, toggle manual placement (red broken line) or use a % distance—auto-calculates the effective % for precision.
Visual Markers: Green line for entry price, red dashed line for stop loss—spans your chart for easy spotting.
Customizable Table: Floating info panel shows Account Size, Risk Amount, Stop Distance %, and Position Size (shares/lots). Drag its position via settings (top-right default).
No More Guesswork: Formula: Position Size = (Account × Risk %) ÷ Stop Distance. Handles edge cases like tiny distances to avoid div-by-zero.
How to Use:Add to your chart via Pine Editor.
In settings: Set account size/risk %. Toggle "Use Manual Entry Price" and click chart to place green line. Do the same for stop (red line) or use % input.
Table updates live—grab the position size and execute!
Pro Tip: For shorts/longs, the abs distance keeps risk symmetric. Test on demo first.
Built for v6—clean, lightweight, and 100% customizable. Share your tweaks in comments! Remember, this is a tool, not advice—trade responsibly. (Inspired by classic Kelly Criterion vibes, but simplified for daily grinders.)
MACD / AO Alineación (V21) PublicA long or short indicator for any timeframe. It's important to consider volatility and ADX to find the most appropriate momentum. There are also other details to consider.
ダウ理論 Dow Theory – Slim HH/LL Labels + BOS/CHOCH + Trend (TAKA)ダウ理論の相場構造を“見える化”するインジケーター。
HH/LL(必要ならHL/LH)を自動ラベル化+ジグザグ描画、BOS/CHOCHを検出。
右上に Uptrend / Downtrend / Range を常時表示。全時間足・全銘柄対応。
■主な機能
・HH/LL(間引き可)+ジグザグ
・BOS(Break of Structure)/ CHOCH(転換)通知
・小波の自動フィルタ:変化率(%) と ATR×
・ADXフィルタでレンジ時の誤判定を抑制
・ライト/ダーク両モード視認性調整
■使い方(主要パラメータ)
・Pivot left/right:スイング感度(数値↑=ゆっくり&精度高め)
・Only HH/LL:要所だけ表示
・Min % / ATR×:小さすぎる波を間引き
・ADX 閾値:20〜25推奨(レンジ多い銘柄は上げる)
・表示ラベル上限:古いラベルを自動整理
■注意
・ピボットは right 本分が経過してから確定(確定足ベース)
・アラートは「Any alert()」で有効化
押し目買い/戻り売りの型づくり、構造学習、シナリオ共有に。
Granville × Dow Theory 併用推奨。
上位足でEMAトレンド(20/30/40)を確認、
下位足では本インジのHL/LH→HH/LLの継続サインを待って、EMA帯の押し/戻りで入る。
=グランビル#2(押し目買い)/#6(戻り売り)を“構造+平均線”の合流で狙う運用。
Dow Theory structure visualizer (indicator, not a strategy).
Auto labels HH/LL (optional HL/LH), draws a zigzag, detects BOS/CHOCH,
and shows Uptrend/Downtrend/Range at the top-right. Works on all timeframes & symbols.
■ Features
- HH/LL labels (filterable) + zigzag
- BOS (Break of Structure) / CHOCH alerts
- Noise filtering by % change and ATR multiplier
- ADX filter to suppress signals during ranges
- Optimized for light/dark modes
■ How to use (key inputs)
- Pivot left/right: swing sensitivity (higher = slower/cleaner)
- Only HH/LL: show key swings only
- Min % / ATR×: ignore tiny swings
- ADX threshold: 20–25 recommended
- Max labels: auto prune old labels
■ Notes
- Pivots confirm after ‘right’ bars (confirmed on closed bars)
- Enable alerts via “Any alert()”
Ideal for buy-the-dip / sell-the-rally planning and structure training
Granville × Dow Theory recommended.
Confirm the higher-timeframe EMA trend (20/30/40), then on the lower timeframe wait for this indicator’s continuation signal—HL→HH in uptrends or LH→LL in downtrends—and enter on pullbacks/returns to the EMA band.
In short, target Granville #2 (buy the dip) and #6 (sell the rally) at the confluence of structure + moving averages
Twisted Forex's Doji + Area StrategyTitle
Twisted Forex’s Doji + Area Strategy
Description
What this strategy does
This strategy looks for doji candles forming inside or near supply/demand areas . Areas are built from swing pivots and sized with ATR, then tracked for retests (“confirmations”). When a doji prints close to an area and quality checks pass, the strategy places a trade with the stop beyond the doji and a configurable R:R target.
How areas (zones) are built
• Swings are detected with a user-set pivot length.
• Each swing spawns a horizontal area centered at the pivot price with half-height = zoneHalfATR × ATR .
• Duplicates are de-duplicated by center distance (ATR-scaled).
• Areas fade when broken beyond a buffer or after an optional age (expiry).
• Retests are recorded when price touches and then bounces away from the area; repeated reactions increase the zone’s “strength”.
Signal logic (summary)
Doji detection: strict or loose body criteria with optional minimum wick fractions and ATR-scaled minimum range.
Proximity: price must be inside/near a supply or demand area (proxATR × ATR).
Side resolution: overlap is resolved by (a) which side price penetrates more, (b) fast/slow EMA trend, or (c) nearest distance. Optional “previous candle flip” can bias long after a bearish candle and short after a bullish one.
Optional 1-bar confirmation: the bar after the doji must close away from the area by confirmATR × ATR .
Quality filter (Off/Soft/Strict): four checks—(i) wick rejection past the edge, (ii) doji closes in an edge “band” of the area, (iii) fresh touch (cooldown), (iv) approach impulse over a short lookback. In Strict , thresholds auto-tighten.
Orders & exits
• Long: stop below doji low minus buffer; Short: above doji high plus buffer.
• Target = rrMultiple × risk distance .
• Pyramiding is off by default.
Position sizing
You can size from the script or from Strategy Properties:
• Script-driven (default): set Position sizing = “Risk % of equity” and choose riskPercent (e.g., 1.0%). The script applies safe floors/rounding (FX micro-lots by default) so quantity never rounds to zero.
• Properties-driven : toggle Use TV Properties → Order size ON, then pick “Percent of equity” in Properties (e.g., 1%). The header includes safe defaults so trades still place.
Key inputs to explore
• Zone building : pivotLen, zoneHalfATR, minDepartureATR, expiryBars, breakATR, leftBars, dedupeATR.
• Doji & proximity : strictDoji, dojiBodyFrac, minWickFrac, minRangeATR, proxATR, minBarsBetween.
• Overlap resolution : usePenetration, useTrend (EMA 21/55), “previous candle flip”, needNextBarConf & confirmATR.
• Quality : qualityMode (Off/Soft/Strict), minQualPass/kStrict, wickPenATR, edgeBandFrac, approachLookback, approachMinATR, freshTouchBars.
• Zone strength gating : minStrengthSoft / minStrengthStrict.
• HTF confluence (optional) : useHTFTrend (HTF EMA 34/89) and/or useHTFZoneProx (HTF swing bands).
Tips to make it cleaner / higher quality
• Turn needNextBarConf ON and use confirmATR = 0.10–0.15 .
• Increase approachMinATR (e.g., 0.35–0.45) to require a stronger pre-touch impulse.
• Raise minStrengthSoft/Strict (e.g., 4–6) so only well-reacted zones can signal.
• Use signalsOnlyConfirmed ON if you prefer trades only from zones with retests (the script falls back gracefully when none exist yet).
• Nudge proxATR to 0.5–0.6 to demand tighter proximity to the level.
• Optional: enable useHTFTrend to filter counter-trend setups.
Default settings used in this publication
• Initial capital: 100,000 (illustrative).
• Slippage: 1 tick; Commission: 0% (you can raise commission if you prefer—spread is partly modeled by slippage).
• Sizing: Risk % of equity via inputs; riskPercent = 1.0% ; FX uses micro-lot floors by default.
• Quality: Off by default (Soft/Strict available).
• HTF trend gate: Off by default.
Backtesting notes
For a meaningful sample size, test on liquid symbols/timeframes that yield 100+ trades (e.g., majors on 5–15m over 1–2 years). Backtests are modelled and broker costs/spread vary—validate on your feed and forward-test.
How to read the chart
Shaded bands are supply (above) and demand (below). Brighter bands are the nearest K per side (visual aid). BUY/SELL labels mark entries; colored dots show entry/SL/TP levels. You can hide zones or unconfirmed zones for a cleaner view.
Disclaimer
This is educational material, not financial advice. Trading involves risk. Always test and size responsibly.
K线计数竖线 - 贯穿屏幕Used to mark the past N k-lines to facilitate understanding of the running direction of the moving average
Smoothed Heiken Ashi Candles [JopAlgo]Smoothed Heiken Ashi Candles — cleaner bias, less noise, better timing
What it does (one line):
Builds a two-stage smoothed Heiken Ashi view so you can read trend vs. pullback without the usual candle noise. Color does the talking:
Lime = bullish state (close ≥ open on the smoothed HA feed)
Red = bearish state
Under the hood: price is EMA-smoothed ( Length len ), converted to Heiken Ashi, then smoothed again ( Length len2 ). Net effect: fewer whips, clearer swings.
What you’ll see
A full candle chart of Smoothed HA (o₂/h₂/l₂/c₂).
Color rule: o₂ > c₂ → red (bearish), otherwise lime (bullish).
No extra clutter—just an easy bias read you can trust at a glance.
Read in 3 seconds: What color? What slope? Are pullbacks shallow or deep relative to the last swing?
How to use it (simple, repeatable)
Bias filter:
Trade longs while candles are lime.
Trade shorts while candles are red.
Where to act (location first):
Use Volume Profile v3.2 (VAH/VAL/POC/LVNs) and Anchored VWAP for entries/targets.
No level, no trade.
When to click (timing):
Continuation: In lime, buy the first pullback that holds a level (VAL/AVWAP/MA cluster) and prints a fresh lime close. Mirror for red shorts.
Reclaim/Reject: A color flip that happens at a level (e.g., AVWAP reclaim → turns lime) is higher quality than a random mid-range flip.
Quality check (optional, strong):
If you use CVDv1 , prefer setups with Alignment OK and no Absorption against your side.
Timeframe guidance
1–5m (scalps): Keep len / len2 shorter (e.g., 5 / 5 or 6 / 8) to avoid lag.
15m–1H (intraday): Default 10 / 10 is a sweet spot.
2H–4H (swing): Try 14–20 / 10–14 for smoother swings.
1D+ (position): 20–34 / 14–20 for backdrop; execute on a lower TF.
Settings that actually matter (and how to tune)
Smoothing Length for Original OHLC (len)
Controls the base smoothness before HA.
Lower = more reactive, more flips.
Higher = steadier bias, more lag.
Smoothing Length for Heiken Ashi (len2)
Controls the final polish of the HA feed.
Lower = earlier turns (noisier).
Higher = fewer flips (slower).
Practical tip: If you get too many color flips, raise len2 first. If it feels sluggish at entries, lower len slightly.
Entries, exits, and risk (keep it tight)
Entry — continuation:
In lime, wait for a pullback to VAL / AVWAP / MA cluster, then a new lime close → enter.
Stop: below structure/last swing. Targets: POC/HVNs or prior swing high/low.
Entry — reclaim/reject:
Color flips at a level (e.g., AVWAP reclaim turns lime) → enter with the level holding.
Invalidation: immediate flip back on the next bar and level loss.
Manage:
If color stays with you but progress stalls at HVNs, trim. If color flips against your position, tighten or exit unless higher-TF context argues to hold.
Best combos with other tools
Volume Profile v3.2: Use VAH/VAL/LVNs/POC for where to act; Smoothed HA tells you if trend context supports the trade.
Anchored VWAP: A reclaim/rejection with matching HA color is a high-quality timing cue.
CVDv1: Take color-aligned trades with flow (Alignment OK, strong Imbalance, no Absorption).
Patterns you’ll recognize
Walk-of-color: Multiple same-color bars with rising/lowering bodies → ride pullbacks to level; don’t fade.
Color flip at level: The cleanest reversal context (e.g., red→lime on a VAL reclaim).
Chop tell: Rapid lime↔red flips mid-range → do less; only trade edges.
Practical defaults to start
len = 10, len2 = 10
Timeframes: 15m–4H out of the box
Process: Location → Color/Bias → Timing bar → (optional) CVD check → Structure-based risk
Serious Disclaimer & Licensing
This indicator and description are provided for educational purposes only and do not constitute financial, investment, or trading advice. Markets involve risk; you can lose some or all of your capital. Past performance does not guarantee future results. You are solely responsible for evaluating the suitability of this tool in your process, including testing on historical and simulated data and applying appropriate risk management.
Data quality can vary by exchange/venue. No warranty—express or implied—is made regarding accuracy, completeness, or fitness for a particular purpose. assumes no liability for any direct or consequential losses arising from the use of this script or description.
License: This Pine Script™ code is released under the Mozilla Public License 2.0 (MPL 2.0), © JopAlgo. You may use, modify, and distribute the code under MPL 2.0 terms.
ICT Suspension BlocksICT Suspension Block (SB) Indicator
The ICT Suspension Block (SB) is a three-candle price action pattern that often act as support or resistance zones. A Suspension Block is a three-candle pattern showing a brief pause in price efficiency before continuation. These zones frequently serve as areas where price may later return, offering traders potential trading opportunities.
Pattern Definition
A Suspension Block forms when three consecutive candles move in the same direction but leave behind a specific body-to-body imbalance. (a gap between the bodies of consecutive candles).
Bullish Suspension Block (+SB):
All three candles are bullish (close > open).
Candle 1 close < Candle 2 open.
Candle 2 close < Candle 3 open.
Zone = from Candle 1 close to Candle 3 open.
Bearish Suspension Block (-SB):
All three candles are bearish (close < open).
Candle 1 close > Candle 2 open.
Candle 2 close > Candle 3 open.
Zone = from Candle 1 close to Candle 3 open.
These zones mark areas where price was temporarily imbalanced. Price often “respects” these levels later, either bouncing from them or breaking through them, which can provide valuable trade context.
Application
Suspension Blocks are used to mark areas where price may later react:
A Bullish SB can act as potential support.
A Bearish SB can act as potential resistance.
The significance of a block depends on market context. Blocks formed during strong, impulsive moves tend to be more meaningful than those in consolidation.
How the Indicator Works
Identifies bullish and bearish suspension blocks using body gap imbalances.
Draws colored zones (green = bullish, red = bearish) directly on the chart.
Extends zones forward until they are inversed by price action.
Once inversed, zones switch to a neutral color, allowing traders to annotate/extend them manually if desired.
Includes Consequent Encroachment (CE) lines (the 50% equilibrium of the block), which many traders use as reaction levels.
Features
Customizable colors for bullish, bearish, and inversed zones
Extend blocks indefinitely forward or limit them to a set number of bars
Adjustable maximum number of displayed blocks for performance control
Consequent Encroachment (CE) (Middle Point, 50%, Equilibrium) line feature
Configurable CE line style, color, and width
How to Use It
Trend Following: Blocks forming in the direction of trend can act as continuation zones.
Reversals: Opposite-direction blocks may signal exhaustion and potential turning points.
Liquidity Levels: CE lines (50% of block) often serve as reaction levels for entries, partials, or stop placement.
Context is Key: Suspension Blocks should not be used in isolation. Combine them with market structure, liquidity pools, or other confluence factors for best results.
Notes
This indicator is intended for technical analysis and research.
It should always be combined with proper risk management and a complete trading plan.
Past market behavior does not guarantee future results.
LBR Oscillator with Signals & AlertsLinda Bradford Raschke MacD indicator. Has alerts and can be used in the pine screener on different timeframes.
Daily High/Low/Mid (Prev Day Extended Split)Very usefull indicator to understand yesterday"s high low middle and next day"s high low middle in every chart, even in renko chart. try it...
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)
Alt buy signal 1H Entry + 4H Confirm (MACD + Stoch RSI + HMA)This indicator is a multi-timeframe (MTF) analysis tool designed for the ALT trading , capturing entry signals on the 1-hour (1H) timeframe and confirming trends on the 4-hour (4H) timeframe. It combines MACD, Stoch RSI, and Hull Moving Average (HMA) to identify precise buy opportunities, particularly at reversal points after a downtrend or during trend shifts. It visually marks both past and current BUY signals for easy reference.
Key Features:
1H Entry Signal (Early Ping): Triggers on a MACD golden cross (below 0) combined with a Stoch RSI oversold cross (below 20), offering an initial buy opportunity.
4H Trend Confirmation (Entry Ready): Validates the trend with a 4H MACD histogram rising (in negative territory) or a golden cross, plus a Stoch RSI turn-up (above 30).
Past BUY Display: Labels past data points where these conditions were met as "1H BUY" or "FULL BUY," facilitating backtesting.
HMA Filter: Optional HMA(16) to confirm price breakouts, enhancing trend validation.
Purpose: Ideal for short-term scalping and swing trading. Supports a two-step strategy: initial partial entry on 1H signals, followed by additional entry on 4H confirmation.
Usage Instructions
Installation: Add the indicator to an IMX/USDT 1H chart on TradingView.
Signal Interpretation:
lime "1H BUY": 1H conditions met, consider initial entry (stop-loss: 3-5% below recent low).
green "FULL BUY": 1H+4H conditions met, confirm trend for additional entry (take-profit: 10% below recent swing high).
Customization: Adjust TF (1H/4H), MACD/Stoch RSI parameters, and HMA usage via the input settings.
Alert Setup: Enable alerts for "ENTRY READY" (1H+4H) or "EARLY PING" (1H only) conditions.
Advantages
Accuracy: Reduces false signals by combining MACD golden cross below 0 with Stoch RSI oversold conditions.
Dual Confirmation: 1H for quick timing and 4H for trend validation, improving risk management.
Visualization: Past BUY points enable easy backtesting and pattern recognition.
Flexibility: 4H confirmation mode adjustable (histogram rise or golden cross).
Limitations
Timeframe Dependency: Optimized for 1H charts; may not work on other timeframes.
Market Conditions: Potential whipsaws in sideways markets; additional filters (e.g., RSI > 50) recommended.
Manual Management: Stop-loss and take-profit require user discretion.
HM2 - Murrey Math Levels# Murrey Math Indicator - Comprehensive Description
## **What is Murrey Math?**
Murrey Math is a trading system developed by T.H. Murrey that divides price action into 8 equal segments (octaves) based on Gann and geometry principles. It automatically identifies key support and resistance levels where price is likely to react, making it a powerful tool for determining entry/exit points and price targets.
## **How It Works**
The indicator:
1. **Analyzes price history** over a lookback period (default 64-200 bars)
2. **Finds the highest high and lowest low** in that period
3. **Calculates a "fractal"** - a geometric scaling factor based on price magnitude
4. **Creates 8 equal divisions** between key levels, plus 4 overshoot levels (total 13 levels)
5. **Labels each level** from -2/8 to +2/8 with their trading significance
## **The 13 Murrey Math Levels**
### **Core Levels (0/8 to 8/8):**
- ** - Ultimate Support** (Blue)
- Extreme oversold condition
- Strong buying opportunity
- Price rarely breaks below this
- ** - Weak, Stall & Reverse** (Orange)
- Weak support level
- Price often stalls and reverses here
- ** - Pivot/Reverse Level** (Red)
- Major support that can become resistance
- Important reversal zone
- ** - Bottom of Trading Range - BUY Zone** (Green)
- Bottom boundary of normal trading
- **Premium BUY zone** - 40% of trading happens between 3/8 and 5/8
- ** - Major Support/Resistance** (Blue)
- **THE MOST IMPORTANT LEVEL**
- The midpoint - best entry/exit level
- Strong pivot point that price respects
- ** - Top of Trading Range - SELL Zone** (Green)
- Top boundary of normal trading
- **Premium SELL zone**
- ** - Pivot/Reverse Level** (Red)
- Major resistance that can become support
- Important reversal zone
- ** - Weak, Stall & Reverse** (Orange)
- Weak resistance level
- Price often stalls and reverses here
- ** - Ultimate Resistance** (Blue)
- Extreme overbought condition
- Strong selling opportunity
- Price rarely breaks above this
### **Overshoot Levels:**
- ** & ** (Gray) - Extreme downside overshoot zones
- ** & ** (Gray) - Extreme upside overshoot zones
- These indicate extreme moves beyond normal trading ranges
## **Trading Zones (from your diagram)**
1. **Consolidation Trading Area** (0/8 to 3/8)
- Price is in a bearish zone
- Look for BUY opportunities near support levels
2. **Normal Trading Area** (3/8 to 5/8)
- **40% of trading occurs here**
- Price oscillates between these boundaries
- Range-bound trading strategies work best
3. **Premium Trading Area** (5/8 to 8/8)
- Price is in a bullish zone
- Look for SELL opportunities near resistance levels
## **Trading Strategies**
### **Buy Signals:**
- Price bounces off 0/8 (ultimate support)
- Price pulls back to 3/8 in an uptrend
- Price breaks above 4/8 after consolidation
### **Sell Signals:**
- Price rejects at 8/8 (ultimate resistance)
- Price rallies to 5/8 in a downtrend
- Price breaks below 4/8 after consolidation
### **Range Trading:**
- Buy near 3/8, sell near 5/8 when price is ranging
- Use 4/8 as the pivot to determine trend direction
## **Key Advantages**
✅ **Objective levels** - No subjective placement
✅ **Self-adjusting** - Automatically recalculates based on recent price action
✅ **Clear trading zones** - Easy to identify support/resistance
✅ **Works on all timeframes** - From 1-minute to monthly charts
✅ **Combines with other indicators** - Works well with RSI, MACD, etc.
## **Important Notes**
- The indicator is **dynamic** - levels update as new highs/lows form
- **4/8 is the most critical level** - price above = bullish, below = bearish
- When price reaches overshoot levels (±1/8, ±2/8), expect strong reversals
- Works best in trending markets; can give false signals in choppy conditions
This geometric approach to support/resistance has been used by traders for decades and remains popular due to its objective, mathematical nature!
Directional Indicator Crossovers [JopAlgo]Directional Indicator Crossovers — read trend intent at a glance, on any timeframe
Most traders ask two questions before they click: who’s in control right now and is control getting stronger or weaker?
The Directional Indicator (DI) answers the first one cleanly. +DI tracks upward directional movement; –DI tracks downward directional movement. When +DI crosses above –DI, buyers have the initiative; when –DI crosses above +DI, sellers do. DI Xover focuses on that simple, tradeable signal—the crossover—and keeps the pane uncluttered so you can layer it with your location/flow tools.
(If you add screenshots: image #1 can label +DI, –DI and a bullish crossover; image #2 can show a failed crossover in chop next to a successful one at a strong level.)
What you’re seeing (and how it’s built)
This indicator plots two lines in a separate pane:
+DI (green): smoothed positive directional movement.
–DI (red): smoothed negative directional movement.
Under the hood (length = 14 by default):
It measures how much today’s high exceeded yesterday’s high (up move) and how much today’s low fell below yesterday’s low (down move).
It keeps only the dominant side each bar (if up > down and up > 0 → up counts; vice-versa for down).
It normalizes by True Range (so moves are scaled by volatility) and smooths with RMA (so you don’t get jitter).
It raises alerts when +DI crosses above –DI (bullish) or –DI crosses above +DI (bearish).
How to read it, fast:
Cross up = buyers just took initiative.
Cross down = sellers just took initiative.
Wider distance between the lines = stronger control.
Lines braided/tight = balance/chop → expect more fake crosses.
DI is about directional control. It doesn’t tell you where to trade—that’s your location (e.g., Volume Profile, AVWAP). Use DI as a timing/confirmation layer, not as a standalone level generator.
Using DI Crossovers on any timeframe
The framework doesn’t change; only your expectations do as you zoom.
Scalping (1–5m)
Treat crossovers as triggers at levels. If price is tagging VAL/VAH/LVN (from Volume Profile v3.2) or Anchored VWAP, a fresh +DI cross up is your green light for a quick long; –DI cross up flips that logic for shorts.
Avoid taking every crossover mid-range—wait for location first.
In fast tape, require the lines to separate for 1–2 bars after the cross before you click.
Intraday (15m–1H)
In trend days, the first pullback into your level (POC/VA boundary/AVWAP) that prints a fresh +DI cross up is often the cleanest add/entry.
In balance days, fade DI crosses at edges back to POC—only if your flow tool isn’t screaming absorption against you.
Swing (2H–4H)
Look for confluence: at Weekly AVWAP or composite VAL/VAH, a DI crossover that stays separated for several bars is a solid momentum confirmation.
Failed crossover (lines recross quickly) near a level is a useful fail signal—expect a move back into value.
Position (1D–1W)
Use fewer, bigger signals: a weekly DI cross at Monthly/Quarterly AVWAP or at composite value edges marks a regime change.
Add on pullbacks when the controlling DI stays dominant (distance holds or widens).
Entries, exits, and risk (simple rules)
Entry (with level): wait for price to reach your level (e.g., VAL/VAH or AVWAP), then take the trade with the DI cross in that direction.
Filter: skip crosses when the two lines are braided (tiny separation) unless you’re trading a tight scalp with strict risk.
Exit / reduce: if your trade was based on a bullish cross, consider reducing when –DI recaptures +DI or the lines flatten at your target HVN/POC.
Stops: put them beyond the level (not just on a DI recross), but treat a fast recross as a warning to tighten.
Settings that actually matter (and how to tune them)
DI Length (default 14):
Shorter (7–10) = faster signals, more noise (good for scalps with filters).
Longer (20–30) = fewer but stronger signals (good for swing/position).
If you often see flip-flops, lengthen the setting or take crosses only at VP/AVWAP levels.
Pro tip: Define a minimum separation rule for yourself (e.g., after a cross, require the gap between +DI and –DI to increase on the next bar). You don’t need extra code for this—just enforce it visually.
What to look for (pattern cheatsheet)
Cross + hold at a level: The lines cross at your level and keep separating → high-quality entry in that direction.
Sneaky fail: Cross, then immediate recross back → treat it as a fade signal back into value (especially near VAH/VAL).
Strength confirmation: After a breakout, +DI stays above –DI on pullbacks → trend is healthy; buy dips at AVWAP/POC.
Pre-move tell: DI lines unbraid and begin diverging before price leaves a range; wait for location + trigger.
Combining DI Xover with other tools
Cumulative Volume Delta v1 (CVDv1):
Use DI for direction, and CVDv1 for quality. A bullish DI cross with ALIGN OK + Imbalance strong + no Absorption is a far better long than DI alone.
If DI crosses up but CVDv1 flags Absorption (red), don’t chase—look for the fail/reclaim instead.
Volume Profile v3.2 :
Let VP choose the battleground (POC/VAH/VAL/LVNs). Take the DI crossover at those references.
Classic: bearish DI cross at VAH → fade toward POC; bullish DI cross at VAL → rotate to POC—assuming CVDv1 isn’t vetoing with Absorption.
Anchored VWAP :
Treat reclaims/rejections of AVWAP as the location and DI cross as the trigger.
Example: price reclaims Weekly AVWAP, then on the next pullback, a +DI cross up confirms the add.
Common pitfalls this helps you avoid
Trading crosses in the middle of nowhere. DI is a trigger, not a level; wait for VP/AVWAP.
Chasing every wiggle. When the lines are braided, you’re likely in balance—expect fake crosses.
Ignoring flow. A DI cross against CVDv1 Absorption is often a trap; quality > quantity.
Practical defaults to start with
Length: 14
Timeframes: Works out of the box on 15m–4H. For 1–5m scalps try 10–12; for daily/weekly swings try 20–30.
Process: Only act on crosses at levels (VP v3.2 / Anchored VWAP), and prefer those where CVDv1 says ALIGN OK and no Absorption.
Alerts (what they tell you)
Bullish DI Crossover: +DI crossed above –DI → buyers just took initiative. Look to your chart for location and CVDv1 quality before entering.
Bearish DI Crossover: –DI crossed above +DI → sellers took initiative. Same rule: confirm at a level with flow.
Open source & disclaimer
This indicator is published open source so traders can learn, adapt, and build rules they trust. No tool guarantees outcomes; risk management remains essential.
Disclaimer — Not Financial Advice.
The “Directional Indicator Crossovers ” indicator and this description are provided for educational purposes only and do not constitute financial or investment advice. Trading involves risk, including possible loss of capital. makes no warranties and assumes no responsibility for any trading decisions or outcomes resulting from the use of this script. Past performance is not indicative of future results.
Smart Choppy Index v1 [JopAlgo]Smart Choppy Index v1 — decide trend vs. chop in seconds
What it does (one line):
Measures the percent range of price over a lookback and tells you if the market is choppy (do less, fade edges) or trending (go with breaks/pullbacks).
Range% = (Highest High − Lowest Low) / Close × 100 over length
Below Choppy Threshold → likely range (red tint / X marker)
Above Trending Threshold → likely trend (green tint / ● marker)
Between them = mixed/transition (no background)
Read the pane fast
Orange line: the live Range%.
Red dashed line: Choppy Threshold.
Green dashed line: Trending Threshold.
Background: soft red during chop, soft green during trend.
Markers: X at the top when chop is detected, ● at the bottom when trend is detected.
TL;DR: Red = play defense / mean-revert. Green = play offense / trend-follow.
Simple playbook (copy this into your process)
Identify regime
Choppy (Range% < red line): prefer mean-reversion at VP edges / AVWAP; smaller targets, quicker exits.
Trending (Range% > green line): prefer breakouts + pullbacks; hold to POC/HVNs or structure.
Only execute at real locations
Volume Profile v3.2 : VAH/VAL/POC/LVNs for entries/targets.
Anchored VWAP : reclaims/rejections for timing.
Quality check (optional, recommended)
CVDv1 : execute with flow (Alignment OK, strong Imbalance, no Absorption against your side).
Risk
Stops go beyond structure/level, not on indicator flips.
If regime flips right after entry (green → red or red → green), consider tightening or exiting early.
Timeframe guidance
1–5m (scalps): length 14–20. You’ll see more flips—use thresholds a touch wider and execute only at edges.
15m–1H (intraday): length 14–34. Sweet spot for day trading bias.
2H–4H (swing): length 20–50. Fewer, cleaner signals; great for planning.
1D+ (position): length 50–100. Use as backdrop; trigger on lower TFs.
Settings that actually matter (and how to tune)
Lookback Period (length)
Shorter = faster regime changes; longer = smoother, fewer flips.
Choppy Threshold (%) / Trending Threshold (%)
Calibrate by history: scroll back and mark typical Range% during range days vs trend days for your market/TF.
If you get too many trend flags, raise the green threshold.
If everything looks “choppy,” lower the red threshold slightly.
Background color
Turn off if your chart feels busy; markers remain.
How to trade it with other tools
In Chop (red):
Fade VAH/VAL/AVWAP touches toward POC with tight stops. Confirm with CVDv1 (avoid longs if Absorption is red, etc.).
In Trend (green):
Break + retest at VP levels/AVWAP. Add on pullbacks that hold while Range% stays above the green line.
Patterns to recognize
Squeeze → Expansion: Range% ramps from below red toward/through green → expect a trend phase.
Exhaustion → Balance: After a long green phase, Range% falls back toward the middle → take profits into HVNs, expect more two-way trade.
False break tell: Level poke while Range% sits near red → low odds of follow-through; prefer reclaims.
Practical defaults to start
length = 14
Choppy Threshold = 1.5%
Trending Threshold = 2.5%
Process: Regime → Location → Flow → Execute with structure-based risk
Serious Disclaimer & Licensing
This script and description are provided for educational purposes only and do not constitute financial, investment, or trading advice. Markets are risky; you can lose some or all of your capital. Past performance does not guarantee future results. You are solely responsible for your trading decisions, including evaluating the suitability of this tool in your process, testing it on historical and simulated data, and managing risk.
This indicator relies on exchange data that may vary across venues; differences in volume, liquidity, and price feeds can impact results. No warranty is made—express or implied—regarding accuracy, completeness, or fitness for a particular purpose. assumes no liability for any direct or consequential losses arising from the use of this script or description.
License: This Pine Script® code is released under the Mozilla Public License 2.0 (MPL 2.0), © JopAlgo. You may use, modify, and distribute the code in accordance with MPL 2.0 terms.
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 .