BTC Halvings**BTC Halvings — Vertical Lines**
* 🎯 Marks every Bitcoin halving with an infinite vertical line.
* 🕰️ UTC timestamps: 2012-11-28 15:24, 2016-07-09 16:46, 2020-05-11 19:23, 2024-04-20 00:09.
* 📊 Works on any symbol and timeframe; lines anchor by exact bar time.
* 🧱 No repaint, no external data, overlay only.
* 🎨 Edit color/width in code to match your theme.
* 🔁 Static list; update when future halvings occur.
* ⚠️ Informational only; not financial advice.
Indicatori e strategie
US Gov Shutdowns🟪 Shades the chart background during US federal government shutdowns since 1980.
🗓 Uses UTC date ranges; bars are painted if the bar interval overlaps the shutdown interval.
📅 On monthly charts, a whole month is shaded if any day in that month overlaps a shutdown.
⚙️ Color is user-configurable via input.
📈 Works on any symbol and timeframe; overlay enabled.
🧾 Included ranges: 1980-05-01, 1981-11-23, 1984-10-04, 1986-10-17, 1990-10-06, 1995-11-14, 1995-12-16, 2013-10-01, 2018-01-20, 2018-02-09, 2018-12-22 to 2019-01-25.
🔄 Static list; update when new shutdowns occur.
Directional Strength and Momentum Index█ OVERVIEW
“Directional Strength and Momentum Index” (DSMI) is a technical analysis indicator inspired by DMI, but due to different source data, it produces distinct results. DSMI combines direction measurement, trend strength, and overheat levels into a single index, enhanced with gradient fills, extreme zones, entry signals, candle coloring, and a summary table.
█ CONCEPT
The classic DMI, despite its relatively simple logic, can seem somewhat chaotic due to separate +DI and -DI lines and the need for manual interpretation of their relationships. The DSMI indicator was created to increase clarity and speed up results, consolidating key information into a single index from 0 to 100 that simultaneously:
- Indicates trend direction (bullish/bearish)
- Measures movement strength
- Identifies overheat levels
- Generates ready entry signals
DMI (ADX + +DI / -DI) measures trend direction and strength, but does so based solely on comparing price movements between candles. ADX shows whether the trend is orderly and growing (e.g., above 20–30), but does not assess how dynamic the movement is.
DSMI, on the other hand, takes into account candle size and actual market aggression, thus showing directional momentum — whether the trend has real “fuel” to sustain or accelerate, not just whether it is orderly.
The main calculation difference involves replacing True Range with candle size (high-low) and using directional EMA instead of Wilder smoothing. This allows DSMI to react faster to momentum changes, eliminating delays typical of classic DMI based on TR.
This gives the trader an immediate picture of the market situation without analyzing multiple lines.
█ FEATURES
DSMI Main Line:
- EMA(Directional Index) based on +DS and -DS
- Scale 0–100, smooth color gradient depending on strength
+DS / -DS:
- Positive and Negative Directional Strength
- Gradient fill between lines — more intense with stronger trend
Extreme Zones:
- Default 20 and 80
- Gradient fill outside zones
Trend Strength Levels:
- Weak (<10) → neutral
- Moderate (up to 35)
- Strong (up to 45)
- Overheated (up to 55)
- Extreme (>55)
All levels editable
Entry Signals:
- Activated on crossing entry level (default 20)
Or on direction change when DSMI already ≥ entry level
- Highlighted background (green/red)
Candle Coloring:
- According to current trend
Trend Strength Table:
- Top-right corner
- Shows current strength (WEAK/STRONG etc.) + DSMI value
Alerts:
- DSMI Bullish Entry
- DSMI Bearish Entry
█ HOW TO USE
Add to Chart: Paste code in Pine Editor or find in indicator library.
Settings:
DSMI Parameters:
- DSMI Period → default 20
- Show DSMI Line → on/off
Extreme Zones:
- Lower Level → default 20
- Upper Level → default 80
Trend Strength Levels:
- Weak, Moderate, Strong, Overheated → adjust to strategy
Trend Colors:
- BULLISH → default green
- BEARISH → default red
- NEUTRAL → gray
Entry Signals:
- Show Highlight → on/off
- DSMI Entry Level → default 20
Signal Interpretation:
- DSMI Line: Main strength indicator.
- Gradient between +DS and -DS: Visualizes side dominance.
- Crossing 18 with direction confirmation → entry signal.
- Extreme Zones: Potential reversal or continuation points after correction.
- Table: Quick overview of current trend condition.
█ APPLICATIONS
The indicator works well in:
- Trend-following: Enter on signal, exit on direction change or overheat. When a new trend appears, consider entering a position, preferably with a rising trend strength indicator.
- Scalping/daytrading: Shorter period (7–10), lower entry level.
- Swing/position: Longer period (20–30), higher entry level, extreme zones as filters.
- Noise filtering: Ignores consolidation below “Weak” – increasing value e.g. to 15 highlights consolidation zones, but no signals appear there.
Style Adjustment:
- Aggressive strategies → shorten period and entry level
- Conservative → extend period, raise entry level (25–30), watch “Overheated”
“Weak” level (<10 default) → neutral; increasing it e.g. to 15 gives fewer but higher-quality signals. The Weak zone value controls the level below which no signals appear, and the gradient turns gray (often aligned with consolidation zones).
Combine with:
- Support/resistance levels
- Fair Value Gaps (FVG)
- Volume (Volume Profile, VWAP)
- Other oscillators (RSI, Stochastic)
█ NOTES
- Works on all markets and timeframes.
- Adjust period and levels to instrument volatility.
- Higher entry level → fewer signals, higher quality.
- Neutral color below “Weak” – avoids trading in consolidation.
- Gradient and table enable quick assessment without line analysis.
Reward-Risk Visual Zones (RRZ)📘 Reward-Risk Visual Zones (RRZ)
A Practical Visual Framework for Assessing Trade Quality Before Entry.
Concept Overview
The Reward-Risk Visual Zones (RRZ) indicator converts the invisible concept of risk-to-reward ratio into a clear, on-chart visualization.
Instead of estimating whether a setup is “worth it,” RRZ dynamically calculates potential reward versus risk using pivots and volatility (ATR) — then color-codes zones to help traders instantly identify high-reward, low-risk entries.
This approach transforms raw price swings into an intuitive visual risk map, making it easier to filter impulsive trades and prioritize statistically favorable opportunities.
⚙️ How It Works
1. Pivot-Based Swing Detection
• The indicator identifies recent swing highs and lows using a sensitivity-controlled pivot algorithm (Pivot Sensitivity input).
• These pivot levels act as potential entry anchors for evaluating the trade’s next reward-risk setup.
2. ATR-Driven Volatility Normalization
• The Average True Range (ATR) defines a volatility-adjusted stop level for each trade idea.
• This ensures that all calculations adapt automatically to changing market conditions and volatility regimes.
3. Reward-to-Risk Ratio Calculation
• For long setups: potential reward = recent highest high − swing low.
• For short setups: potential reward = swing high − recent lowest low.
• Each is divided by the current ATR to normalize scale and produce an intuitive R:R metric (e.g., “2.4 : 1”).
• When the computed R:R meets or exceeds the user-defined threshold (default = 2.0), the zone is flagged as “Good R:R.”
4. Visual Zone Mapping
• The indicator automatically draws Entry, Target, and Stop-Loss lines on the chart, extending them forward for clarity.
• Each line’s color, width, and style are fully customizable.
• “Good R:R” opportunities display in green (long) or red (short), while low-reward setups appear in orange to signal caution.
• Optional labels summarize the complete trade snapshot, including entry, stop, target, and R:R value.
5. Cooldown and Trade Filtering
• To prevent over-plotting in rapid swing environments, a bar-based cooldown system controls how often new signals appear.
• This ensures that the indicator focuses on meaningful structural shifts, not minor oscillations.
⸻
🧠 Why It’s Different
Most risk-reward tools require manual marking or use fixed ratios.
RRZ automates the entire process , combining:
• Real-time swing detection,
• ATR-based adaptive stop placement, and
• Dynamic visual feedback showing if the setup’s reward potential justifies the risk.
It functions as a decision filter, not a signal generator — helping traders develop professional trade selection habits consistent with institutional risk management principles.
⸻
📈 How to Use
1. Primary Context:
• Apply on 5-minute to 1-hour charts for intraday and swing setups.
2. Interpretation:
• 🟢 Good R:R Zone (> Threshold): Favorable setup, potential asymmetric reward.
• 🟠 Low R:R Zone (< Threshold): Unfavorable setup, higher risk exposure.
3. Strategy Integration:
• Use alongside structure indicators, support/resistance tools, or volume analysis to confirm entries.
4. Risk Management Application:
• Visually plan position size and stop distance using plotted lines.
• Back-test various ATR and threshold combinations to align with your personal risk tolerance.
⸻
🧩 Customization
Parameter Purpose
Pivot Sensitivity Controls how reactive the swing points are.
ATR Length Defines volatility baseline for stop placement.
Min R:R Threshold Minimum acceptable reward-to-risk ratio to mark “Good R:R.”
Cooldown Bars Prevents overcrowding of signals during choppy periods.
Line Colors & Styles Personalize entry, target, and stop visualization.
Show Below R:R Zones Toggle visibility of sub-threshold setups for educational use.
⚠️ Disclaimer
The Reward-Risk Visual Zones indicator is designed for educational and analytical use only.
It does not constitute financial advice or guarantee specific performance. Always validate signals and apply disciplined risk management before trading.
Institutional Accumulation Score (IAS) v4.1 Lite - IbotradeInstitutional Accumulation Score (IAS) v4.0 – Ibotrade Strategies (TM)
The Institutional Accumulation Score (IAS) is designed to highlight moments when professional buying pressure may be building beneath the surface of a trend.
IAS analyzes each candle using five measurable conditions that often appear during institutional accumulation phases:
Up Bar → Close > Open (positive session)
Strong Close → Close finishes in the upper portion of the range
High Relative Volume → Volume exceeds its moving average × user-set multiple
Wide Range → True range greater than ATR × threshold
Trend Alignment → Price trades above the longer-term SMA
Each fulfilled condition adds +1 point to the IAS Score (0–5).
Bars scoring 4 (S4) or 5 (S5) are flagged as potential accumulation events—often appearing near the start or continuation of strong uptrends.
🎨 Visualization & Customization
EMA Ribbon Filter: Eight-layer Madrid-style ribbon (8 → 200 EMA) defines the market trend; signals can be gated to appear only when the ribbon is green.
Arrows: Plot S4/S5 triangles below bars; full color and text customization for any chart theme.
Spacing Filter: Controls the minimum number of bars between signals to avoid clutter.
Legacy Labels: Optional “Accumulation Score” text labels for detailed study.
⚙️ Key Inputs
Volume MA Length & ATR Length
Trend SMA Length
Relative Volume and Range Multipliers
Minimum Close Position %
Ribbon Filter ON/OFF
Arrow size, colors, text visibility
Minimum Bars Between Signals
💡 How to Use
Apply IAS to daily or multi-day charts.
Focus on S4/S5 signals forming above the EMA Ribbon or major trend lines.
Combine with your breakout, volume-dry-up, or volatility-contraction setups for confirmation.
Use clustering of IAS signals to gauge institutional interest and trend conviction.
IAS works best when integrated into a broader trend-following or momentum-based strategy.
⚠️ Disclaimer
This script is for educational and informational purposes only.
It does not constitute financial advice, investment guidance, or a solicitation to buy or sell any security.
Trading and investing carry significant risk; always perform your own due diligence.
Past performance does not guarantee future results.
Analog Flow [KedArc Quant]🧭Overview
AnalogFlow is an advanced analogue-based market projection engine that reconstructs future price tendencies by matching current price behavior to historical analogues in the same instrument. Instead of using traditional indicators (moving averages, RSI, or regression), AnalogFlow applies pattern vector similarity analysis — a data-driven technique that identifies historically similar sequences and aggregates their subsequent movements into a smooth, forward-looking curve.
Think of it as a market memory system:
If the current pattern looks like one we’ve seen before, how did price move afterward?
💡 Why AnalogFlow Is Unique
- Pattern-centric — it doesn’t rely on any standard indicator formula; it directly analyzes price movement vectors.
- Adaptive — it learns from the same instrument’s past behavior, making it self-calibrating to volatility and regime shifts.
- Non-repainting — the projection is generated on the latest completed bar and remains fixed until new data is available.
- Noise-resistant — the EMA-Blend engine smooths the projected trajectory, reducing random variance between analogues.
This isn’t a combination of existing tools — it’s an original implementation of analogue-based projection theory
⚙️ Inputs & Configuration
Pattern Bars
Number of bars in the reference pattern window 40
Projection Bars
Number of bars forward to project 30
Search Depth
Number of bars back to look for matching analogues 600
Distance Metric
Comparison method: `Euclidean`, `Manhattan`, or `Cosine` Euclidean
Matches
Number of top analogues to blend (1–5) Top-3
Build Mode
Projection type: `Cumulative`, `MeanStep`, or `EMA-Blend` EMA-Blend
EMA Blend Length
Smoothness of the projected path 15
Normalize Pattern
Enable Z-score normalization for shape matching true
Dissimilarity Mode
If true, finds inverse analogues (mean-reversion analysis) false
Line Color / Width
Style settings for projection curve Blue / 2
📈 How It Works with Past Data
- The system builds a memory bank of patterns from the last N bars
- It compares the latest Pattern Bars segment to each historical segment.
- It selects the Top-K most similar (or dissimilar) analogues.
- For each analogue, it retrieves what happened after that pattern historically.
- It averages or smooths those forward moves into a single composite forecast curve.
- The forecast (blue line) is drawn ahead of the current candle.
🔍 Output Explained
Blue Path:
The weighted mean future trajectory based on historical analogues.
Smoother when EMA-Blend mode is on.
Flat Section:
Indicates low directional consensus or equilibrium across analogues.
Upward / Downward Slope:
Historical tendency toward continuation or reversal following similar conditions.
📆 Recommended Timeframes
Scalping / Short-term
1m–5m --> Short `winLen` (20–30), small `ahead` (10–15)
Swing Trading
15m–1h --> Balanced settings (winLen=40–60, ahead=20–30)
Positional / Multi-Day
4h–1D --> Large windows (winLen=80–120, ahead=30–50)
🌍 Instrument Compatibility
✅ Works seamlessly on:
- Stocks / ETFs
- Indices
- Cryptocurrency
- Commodities (Gold, Crude, etc.)
- Futures & F&O (both intraday and positional)
- Forex
No symbol-specific calibration needed — it self-adapts to volatility.
🧭 How Traders Can Use It
Use Case
Forecast Context
- Identify likely short-term price path or drift direction.
Reversal Detection
- Flip `seekOpp` to true for mean-reversion pattern analysis.
Scenario Comparison
- Observe whether current regime tends to continue or stall.
Momentum Confirmation
- Combine with trend tools (e.g., EMA or MACD) for direction bias.
Backtesting Support
- Compare projected path vs. realized price to evaluate reliability.
❓ FAQ
Q1. Does AnalogFlow repaint?
→ No. It calculates only once per completed bar and projects forward. Future path remains static until a new bar closes.
Q2. Is it a neural network or AI model?
→ Not in the ML sense — it’s a deterministic analogue-matching engine using statistical distance metrics.
Q3. Why does the projection sometimes flatten?
→ That means similar historical setups had no clear consensus in direction (neutral expectation).
Q4. Can I use it for live trading signals?
→ AnalogFlow is not a signal generator. It provides *probabilistic context* for upcoming movement.
Q5. Does higher `scanDepth` improve accuracy?
→ Up to a point. More depth gives more analogues, but too much can dilute recency. Try 400–800.
📘 Glossary
Analogue
A past pattern similar to the current price behavior.
Distance Metric
Mathematical formula for pattern similarity.
Step Vector
Difference between consecutive closing prices.
EMA-Blend
Exponential smoothing of projected path.
Cumulative Mode
Adds sequential historical deltas directly.
Z-Score Normalization
Rescaling to mean 0, variance 1 for shape comparison.
🧩 Summary
AnalogFlow converts the market’s historical echoes into a structured, statistically weighted forward projection. It gives traders a contextual roadmap — not a signal — showing how similar past setups evolved, allowing better-informed entries, exits, and scenario planning across all asset classes.
⚠️ 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.
Entry ArrowThis script plots an entry arrow when the higher-probability conditions line up. If no volume expansion, no 2-bar follow-through, HTF still bearish, or buying into upper band), you won’t get an entry, so problem solved.
HITESH SOMANI Strategy Technical based strategy. Strong chart pattern based strategy for working professionals who dont have much time for trading
Dynamic FVG & Trap Zones📘 Dynamic FVG & Trap Zones (DFTZ)
A Hybrid Model Combining Imbalance Mapping, Volume Behavior, and Trap Detection
Concept Overview
“Dynamic FVG & Trap Zones” is built to visualize real-time Fair Value Gaps (FVGs) and identify liquidity trap events inside those gaps using adaptive volume filters and wick-based logic.
Traditional FVG indicators merely mark imbalance zones between consecutive candles, but this model goes further — it measures how volume reaction and price penetration inside those zones reveal potential f alse moves or trap formations by smart money.
⚙️ How It Works
1. FVG Detection
• A Bullish FVG is detected when low > high , showing a price void left by aggressive buying.
• A Bearish FVG forms when high < low , implying a selling imbalance.
• These zones are automatically drawn as semi-transparent boxes that extend forward for 10 bars and decay once they exceed the configurable lookback window.
2. Volume Normalization & Grading
• Every bar’s volume is compared against a dynamic SMA( volLookback ) average to calculate a Volume Grade = current vol / avg vol.
• Only bars exceeding the Min Volume Grade threshold are eligible to generate valid FVG zones, ensuring that low-participation moves are ignored.
• The Trap Volume Threshold sets how quiet the reaction bar must be (relative to average volume) to qualify as a trap event.
3. Trap Detection Logic
• Each active FVG zone monitors incoming candles.
• A potential trap is triggered when price re-enters the zone (body or wick depending on settings) but fails to expand with confirming volume.
• If the event occurs inside a Bullish FVG, it marks a Bear Trap (green zone turned red).
If it happens inside a Bearish FVG, it flags a Bull Trap (red zone turned green).
• This reversal in zone color visually conveys trapped liquidity and potential directional fade.
4. Exclusivity and Cooldown Control
• To avoid signal clustering, you can choose exclusivity modes:
Allow Both, Bear over Bull, or Bull over Bear.
• A built-in per-signal cooldown timer prevents back-to-back plots of the same type, enhancing signal clarity during rapid price action.
5. Adaptive Visualization
• Wick-based vs body-based trap detection (toggleable).
• Optional cooldown filtering on shapes ensures the chart only displays validated events.
• Old FVG boxes are pruned automatically beyond the chosen lookback horizon.
🧠 Why It’s Different
Unlike static FVG detectors or simple liquidity sweep tools, DFTZ blends:
• Volume context (Smart Volume Grade filtering)
• Behavioral trap detection within imbalance zones
• Dynamic cooldown mechanics that control over-signaling
• Forward-propagating zones that self-expire gracefully
This synergy makes it a compact yet powerful tool for visualizing imbalances + liquidity traps in one framework — ideal for discretionary traders combining SMC concepts with volume analytics.
📈 How to Use
• Primary Context: Use on 15 min to 1 h charts to spot active FVG zones forming after impulsive moves.
• Trap Signal Interpretation:
• 🔴 “Trap” below bar → Bullish reversal (Bear Trap).
• 🟢 “Trap” above bar → Bearish reversal (Bull Trap).
• Combine With: Market structure breaks, VWAP, or delta volume tools to confirm true reversal intent.
• Alerts: All major events (FVG creation & trap confirmation) trigger ready-to-use alerts for automation or back-testing.
🧩 Customization
Setting Function
Max FVG Lookback Controls how long old zones remain active.
Volume SMA Period Defines the baseline for volume grading.
Min Volume Grade & Trap Volume Threshold Tune the sensitivity of trap confirmation.
Wick-Based Trap Detection Enable to capture wick rejections inside zones.
Signal Cooldown Prevents rapid multiple plots on successive bars.
⚠️ Disclaimer
This tool is designed for educational and analytical purposes only. It does not constitute financial advice or guarantee trading performance. Always conduct your own analysis and risk management before entering a position.
Multiple Moving Average v2 super Multiple Moving Average v2 super
for those who need it Enjoy
ema 50 100 20 100 200 al in 1
Turtles StrategyBorn from the 1980s "Turtle" experiment, this method of trading captures breakouts and places or closes trades with intrabar entries or exits and realized-equity risk controls.
How It Works
The strategy buys/sells on breakouts from recent highs/lows, using ATR for volatility-adjusted stops and sizing. It risks a fixed % (default 1%) of realized equity per trade—initial capital plus closed P&L, ignoring open positions for conservatism. Drawdown protection auto-reduces risk by 20% at 10% drops (up to three times), resetting only on full peak recovery. Single positions only, with 1-tick slippage simulated for realistic fills. Best for trending assets like forex,commodities, crypto, stocks. Backtest for optimal parameters.
Main Operations
The strategy works on any timeframe but it's meant to be used on daily charts.
Entry Signals:
Long: Buy-stop 1 tick above 20-bar high (default "Entry Period") when no position—enters intrabar on breakout.
Short: Sell-stop 1 tick below 20-bar low. OCA cancels opposites.
Size: (Realized equity × adjusted risk %) ÷ (2× ATR stop distance), scaled by point value.
Exit Signals:
Longs: Stop at tighter of (entry - 2× ATR) or (10-bar low - 1 tick trailing, default "Exit Period").
Shorts: Stop at tighter of (entry + 2× ATR) or (10-bar high + 1 tick trailing).
Locks profits in trends, exits fast on fades.
Risk Controls:
Tracks realized equity peak.
10% drawdown: Risk ×0.8; 20%/30%: Further ×0.8 (max 3x).
Full reset above peak—preserves capital in slumps.
VWAP/MVWAP v6 VWAP/MVWAP v6
version 6 compatible as in trading view v6 . original script was not v6 compatible.
i added ema boillanger band and super trend
Enjoy
Amir mohammad lorProfessional-Grade Visualization: It employs a clean, multi-layered visual approach:
Table: Displays a real-time status table in the top corner, showing the current state of all strategy conditions (e.g., "Trend: BULLISH", "Momentum: WEAK").
Zones & Lines: Draws key support/resistance zones and trendlines automatically
Volume Spike & RSI | Buy/Sell SignalsThis indicator is designed for intraday traders who seek clean, actionable buy and sell signals using a blend of momentum (RSI) and volume analysis. It automatically detects momentum bursts based on the RSI crossing user-defined levels with a simultaneous volume spike—helping filter out weak or late signals. Signals are highlighted by discrete, color-coded arrows and non-overlapping labels for easy chart interpretation without clutter.
How it works
Buy signal: Generated when the RSI crosses above your chosen “Buy Threshold” (default 60) AND the volume on that bar is above its 20-period average. This suggests strong momentum with real volume support.
Sell signal: Generated when the RSI crosses below your chosen “Sell Threshold” (default 40) AND the volume on that bar is above average, signaling momentum loss or bearish pressure.
Visuals:
Buy signals are illustrated by green upward labels/arrows beneath candles.
Sell signals feature red downward labels/arrows above candles.
All signals adjust spacing dynamically, so they never overlap the price bar.
Bars are colored lime when momentum and volume are both high.
Customization
Fully adjustable RSI “Buy” and “Sell” levels.
Customizable sensitivity for the volume spike via the SMA period input.
Label spacing can be tuned in settings so signals always remain visible, regardless of volatility.
Alerts
Built-in alert conditions for both buy and sell events, compatible with TradingView’s native alerting system.
How to use
1. Add the indicator to your intraday chart (works on any timeframe).
2. When a buy or sell label/arrow appears, it marks a technical momentum burst with real volume conviction. Use these as actionable entries or exits—always manage risk with your personal trading plan.
3. Adjust parameters in the script’s settings as needed for your market or style.
Originality & credits
The logic and code were developed specifically for this script, combining classic RSI levels with volume confirmation and careful non-overlapping visual presentation to ensure clarity for intraday trading.
This tool is for educational and informational purposes only. It is not financial advice or a guarantee of performance. Always test on demo before using in live trading.
Magik- OB findermarks Magic Orderblocks 15 min time frame... when price visits the ob go to 1 min tf.. after price makes a mss.. enter.. enjoy!!!
Alladin call Alladin Call .
As always Buy signal is reliable.. sell is not sell u decide. have a stop loss. sell its there just for formality ..
Enjoy
MACD Pro with RSI Combo MACD Pro + RSI combo
Its space saving and 2 in 1 indicator . works good For those who ned it . Made it public enjoy
wow .
Alladin PUT v1Alladin use in 1 hrs charts .. For buy signal is excellent .. sell you have to decide . sell is not that reliable but its there ..
Gann_RSGann_RS — Precision Gann Level Indicator (RightSpade Edition)
Gann_RS (RightSpade Edition) is a professional-grade indicator that applies Gann’s square-root progression technique to identify dynamic support and resistance levels around a key reference point (price X).
✅ Key Features
• Auto-detects base level using daily close or daily low.
• Plots symmetrical Gann levels above / below initial X using √X + Step logic.
• Adjustable step size and number of levels.
• Distinct color coding for alternate bands.
⚙️ Usage Tips
• Works on any symbol and timeframe.
• Use smaller Step values (1-2) for tighter intraday analysis, larger values (2-4) for swing setups.
• Combine with trend-based confirmation indicators for maximum accuracy.
🧭 Developed & maintained by
RightSpade Capital Advisors Pvt. Ltd. — SEBI Reg. INH000018799
📌 Disclaimer
This script is for educational & research purposes only and does not constitute investment advice or a buy/sell recommendation. Market participation involves risk; please consult your financial advisor before making trading decisions.
© 2025 RightSpade Capital Advisors Pvt. Ltd. All Rights Reserved.
MirPapa_Lib_candleLibrary "MirPapa_Lib_candle"
calculateBoxDimensions(_boxW, _extraW, _spacingVal)
Parameters:
_boxW (int)
_extraW (int)
_spacingVal (int)
calculateBoxPosition(_index, _currentBar, _offset, _dims)
Parameters:
_index (int)
_currentBar (int)
_offset (int)
_dims (BoxDimensions)
createCandleData(_o, _h, _l, _c, _idx)
Parameters:
_o (float)
_h (float)
_l (float)
_c (float)
_idx (int)
createCandleObjects(_idx, _config)
Parameters:
_idx (int)
_config (RenderConfig)
deleteCandleObjects(_obj)
Parameters:
_obj (CandleObjects)
renderBox(_b, _data, _pos, _bull, _bear, _border)
Parameters:
_b (box)
_data (CandleData)
_pos (BoxPosition)
_bull (color)
_bear (color)
_border (color)
renderWicks(_wickT, _wickB, _data, _pos)
Parameters:
_wickT (line)
_wickB (line)
_data (CandleData)
_pos (BoxPosition)
renderExtendLines(_ol, _hl, _ll, _cl, _data, _rightX, _show)
Parameters:
_ol (line)
_hl (line)
_ll (line)
_cl (line)
_data (CandleData)
_rightX (int)
_show (bool)
renderValueLabels(_lo, _lh, _ll, _lc, _data, _rightX, _show)
Parameters:
_lo (label)
_lh (label)
_ll (label)
_lc (label)
_data (CandleData)
_rightX (int)
_show (bool)
generateStatsText(_data)
Parameters:
_data (CandleData)
calculateStatsColor(_data, _config)
Parameters:
_data (CandleData)
_config (StatsConfig)
renderStatsLabel(_lbl, _data, _rightX, _show, _config, _labelStyle, _labelSize)
Parameters:
_lbl (label)
_data (CandleData)
_rightX (int)
_show (bool)
_config (StatsConfig)
_labelStyle (string)
_labelSize (string)
createPrevDailyLines(_dayStart, _high, _low, _currentTime, _highCol, _lowCol, _vertCol, _lineWidth, _lineStyle)
Parameters:
_dayStart (int)
_high (float)
_low (float)
_currentTime (int)
_highCol (color)
_lowCol (color)
_vertCol (color)
_lineWidth (int)
_lineStyle (string)
updatePrevDailyLines(_lines, _dayStart, _high, _low)
Parameters:
_lines (PrevDailyLines)
_dayStart (int)
_high (float)
_low (float)
extendPrevDailyLines(_lineH, _lineL, _currentTime)
Parameters:
_lineH (line)
_lineL (line)
_currentTime (int)
renderCandle(_obj, _data, _pos, _bull, _bear, _border, _showExt, _showLbl)
Parameters:
_obj (CandleObjects)
_data (CandleData)
_pos (BoxPosition)
_bull (color)
_bear (color)
_border (color)
_showExt (bool)
_showLbl (bool)
CandleData
Fields:
_top (series float)
_bottom (series float)
_high (series float)
_low (series float)
_open (series float)
_close (series float)
_isBull (series bool)
_barIndex (series int)
CandleObjects
Fields:
_boxObj (series box)
_wickTop (series line)
_wickBottom (series line)
_highLine (series line)
_lowLine (series line)
_openLine (series line)
_closeLine (series line)
_lblO (series label)
_lblH (series label)
_lblL (series label)
_lblC (series label)
PrevDailyLines
Fields:
_high (series float)
_low (series float)
_dayStart (series int)
_lineHigh (series line)
_lineLow (series line)
_lineVertical (series line)
BoxPosition
Fields:
_leftX (series int)
_rightX (series int)
_midX (series int)
BoxDimensions
Fields:
_width (series int)
_gap (series int)
RenderConfig
Fields:
_bullColor (series color)
_bearColor (series color)
_borderColor (series color)
_wickColor (series color)
_lineColor (series color)
_labelBgColor (series color)
_labelTextColor (series color)
_labelStyle (series string)
_labelSize (series string)
_lineStyle (series string)
_lineExtend (series string)
StatsConfig
Fields:
_positiveColor (series color)
_negativeColor (series color)
_transparency (series int)
Market Structure Trailing Stop MTF [Inspired by LuxAlgo]# Market Structure Trailing Stop MTF
**OPEN-SOURCE SCRIPT**
*208k+ views on original · Modified for MTF Support*
This indicator is a direct adaptation of the renowned **Market Structure Trailing Stop** by **LuxAlgo** (original script: [Market Structure Trailing Stop ]()). The core logic remains untouched, providing dynamic trailing stops based on market structure breaks (CHoCH/BOS). The **only modification** is the addition of **Multi-Timeframe (MTF) support**, allowing users to apply the trailing stops and structures from **higher timeframes (HTF)** directly on their current chart. This enhances usability for traders analyzing cross-timeframe confluence without switching charts.
**Special thanks to LuxAlgo** for releasing this powerful open-source tool under CC BY-NC-SA 4.0. Your contributions to the TradingView community have inspired countless traders—grateful for the solid foundation!
## 🔶 How the Script Works: A Deep Dive
At its heart, this indicator detects **market structure shifts** (bullish or bearish breaks of swing highs/lows) and uses them to generate **adaptive trailing stops**. These stops trail the price while protecting profits and acting as dynamic support/resistance levels. The MTF enhancement pulls this logic from user-specified higher timeframes, overlaying HTF structures and stops on the lower timeframe chart for seamless multi-timeframe analysis.
### Core Logic (Unchanged from LuxAlgo's Original)
1. **Pivot Detection**:
- Uses `ta.pivothigh()` and `ta.pivotlow()` with a user-defined lookback (`length`) to identify swing highs (PH) and lows (PL).
- Coordinates (price `y` and bar index/time `x`) are stored in persistent variables (`var`) for tracking recent pivots.
2. **Market Structure Detection**:
- **Bullish Structure (BOS/CHoCH)**: Triggers when `close > recent PH` (break above swing high).
- If `resetOn = 'CHoCH'`, resets only on major shifts (Change of Character); otherwise, on all breaks.
- Sets trend state `os = 1` (bullish) and highlights the break with a horizontal line (dashed for CHoCH, dotted for BOS).
- Initializes trailing stop at the local minimum (lowest low since the pivot) using a backward loop: `btm = math.min(low , btm)`.
- **Bearish Structure**: Triggers when `close < recent PL`, mirroring the bullish logic (`os = -1`, local maximum for stop).
- Structure state `ms` tracks the break type (1 for bull, -1 for bear, 0 neutral), resetting based on user settings.
3. **Trailing Stop Calculation**:
- Tracks **trailing max/min**:
- On new bull structure: Reset `max = close`.
- On new bear: Reset `min = close`.
- Otherwise: `max = math.max(close, max)` / `min = math.min(close, min)`.
- **Stop Adjustment** (the "trailing" magic):
- On fresh structure: `ts = btm` (bull) or `top` (bear).
- In ongoing trend: Increment/decrement by a percentage of the max/min change:
- Bull: `ts += (max - max ) * (incr / 100)`
- Bear: `ts += (min - min ) * (incr / 100)`
- This creates a **ratcheting effect**: Stops move favorably with the trend but never against it, converging toward price at a controlled rate.
- **Visuals**:
- Plots `ts` line colored by trend (teal for bull, red for bear).
- Fills area between `close` and `ts` (orange on retracements).
- Draws structure lines from pivot to break point.
4. **Edge Cases**:
- Variables like `ph_cross`/`pl_cross` prevent multiple triggers on the same pivot.
- Neutral state (`ms = 0`) preserves prior `max/min` until a new structure.
### MTF Enhancement (Our Addition)
- **request.security() Integration**:
- Wraps the entire core function `f()` in a security call for each timeframe (`tf1`, `tf2`).
- Returns HTF values (e.g., `ts1`, `os1`, structure times/prices) to the chart's context.
- Uses `lookahead=barmerge.lookahead_off` for accurate historical repainting-free data.
- Structures are drawn using `xloc.bar_time` to align HTF lines precisely on the LTF chart.
- **Multi-Output Handling**:
- Separate plots/fills/lines for each TF (e.g., `plot_ts1`, `plot_ts2`).
- Colors and toggles per TF to distinguish HTF1 (e.g., teal/red) from HTF2 (e.g., blue/maroon).
- **Benefits**: Spot HTF bias on LTF entries, e.g., enter longs only if both TF1 (1H) and TF2 (4H) show bullish `os=1`.
This keeps the script lightweight—**no repainting, max 500 lines**, and fully compatible with LuxAlgo's original behavior when TFs are set to the chart's timeframe.
## 🔶 SETTINGS
### Core Parameters
- **Pivot Lookback** (`length = 14`): Bars left/right for pivot detection. Higher = smoother structures, fewer signals; lower = more noise.
- **Increment Factor %** (`incr = 100`): Speed of stop convergence (0-∞). 100% = full ratchet (mirrors max/min exactly); <100% = slower trail, reduces whipsaws.
- **Reset Stop On** (`'CHoCH'`): `'CHoCH'` = Reset only on major reversals (dashed lines); `'All'` = Reset on every BOS/CHoCH (tighter stops).
### MTF Support
- **Timeframe 1** (`tf1 = ""`): HTF for first set (e.g., "1H"). Empty = current chart.
- **Timeframe 2** (`tf2 = ""`): Second HTF (e.g., "4H"). Enables dual confluence.
### Display Toggles
- **Show Structures** (`true`): Draws horizontal lines for breaks (per TF colors).
- **Show Trailing Stop TF1/TF2** (`true`): Plots the stop line.
- **Show Fill TF1/TF2** (`true`): Area fill between close and stop.
### Candle Coloring (Optional)
- **Color Candles** (`false`): Enables custom `plotcandle` for body/wick/border.
- **Candle Color Based On TF** (`"None"`): `"TF1"`, `"TF2"`, or none. Colors bull trend green, bear red.
- **Candle Colors**: Separate inputs for bull/bear body, wick, border (e.g., solid green body, transparent wick).
### Alerts
- **Enable MS Break Alerts** (`false`): Notifies on structure breaks (bull/bear per TF) **only on bar close** (`barstate.isconfirmed` + `alert.freq_once_per_bar_close`).
- **Enable Stop Hit Alerts** (`false`): Triggers on stop breaches (long/short per TF), using `ta.crossunder/crossover`.
### Colors
- **TF1 Colors**: Bullish (teal), Bearish (red), Retracement (orange).
- **TF2 Colors**: Bullish (blue), Bearish (maroon), Retracement (orange).
- **Area Transparency** (`80`): Fill opacity (0-100).
## 🔶 USAGE
Trailing stops shine in **trend-following strategies**:
- **Entries**: Use structure breaks as signals (e.g., long on bullish BOS from HTF1).
- **Exits**: Trail stops for profit-locking; alert on hits for automation.
- **Confluence**: Overlay HTF1 (e.g., 1H) for bias, HTF2 (e.g., Daily) for major levels—enter LTF only on alignment.
- **Risk Management**: Lower `incr` avoids early stops in chop; reset on `'All'` for aggressive trailing.
! (i.imgur.com)
*HTF1 shows bullish structure (teal line), trailing stop ratchets up—long entry confirmed on LTF pullback.*
! (i.imgur.com)
*TF1 (blue) bearish, TF2 (red) neutral—avoid shorts until alignment.*
! (i.imgur.com)
*Colored based on TF1 trend: Green bodies on bull `os=1`.*
Pro Tip: Test on demo—pair with LuxAlgo's other tools like Smart Money Concepts for full structure ecosystem.
## 🔶 DETAILS: Mathematical Breakdown
On bullish break:
- Local min: `btm = ta.lowest(n - ph_x)` (optimized loop equivalent).
- Stop init: `ts = btm`.
- Update: `Δmax = max - max `, `ts_new = ts + Δmax * (incr/100)`.
Bearish mirrors with `Δmin` (negative, so decrements `ts`).
In MTF: HTF `time` aligns lines via `line.new(htf_time, level, current_time, level, xloc.bar_time)`.
No logs/math libs needed—pure Pine v5 efficiency.
## Disclaimer
This is for educational purposes. Not financial advice. Backtest thoroughly. Original by LuxAlgo—modify at your risk. See TradingView's (www.tradingview.com). Licensed under CC BY-NC-SA 4.0 (attribution to LuxAlgo required).
TPAmacd — Free MACD with Divergence (by TPA OG)💎 TPAmacd — Free by TPA OG
Professional Divergence Detection for Confident Technical Analysis
🧭 Overview
TPAmacd is an advanced divergence-analysis tool built for traders who value precision, adaptability, and clarity.
It automatically identifies bullish and bearish divergences on the MACD histogram, confirms momentum shifts, and provides a clean, customizable visual framework — helping you interpret market transitions with greater confidence.
⚙️ Key Features
- Auto-detected Bullish / Bearish Divergences — instantly highlights potential momentum shifts.
- Multi-Timeframe Compatibility — analyze divergences seamlessly across any chart period.
- Histogram Reversal Alerts — get notified as momentum changes direction.
- Customizable Settings — choose between EMA / SMA, set color themes, and adjust visual precision.
- Efficient, Lightweight Design — optimized for clarity and performance on all devices.
🧩 Ideal Pairing
When used alongside TPA OG – Trend & Price Action Pro, TPAmacd becomes a powerful confirmation layer for trend-continuation or exhaustion setups.
Together, they help traders form structured, data-driven strategies across Forex, Crypto, and Stocks — without noise or over-optimization.
📈 Why Traders Choose TPAmacd
- Professional-grade divergence mapping
- Intuitive design — minimal clutter, maximum context
- Adaptable for scalping, swing, or long-term analysis
- Clear alerts and smooth integration with your workflow
⚠️ Important Disclaimer
This script is provided for educational and informational purposes only.
It does not constitute financial, investment, or trading advice.
No indicator, including TPAmacd or any related tools by TPA OG, can guarantee accuracy or profitability.
All trading involves risk, and past performance is not indicative of future results.
Always perform independent analysis and use appropriate risk-management practices before placing any trade.
💡 About TPA OG
TPA OG develops transparent, data-driven tools that help traders understand price behavior, momentum, and market context — enabling disciplined, informed decision-making across multiple asset classes.
📬 Follow TPA OG on TradingView for free updates, new releases, and educational insights.
🔖 Hashtags
#TPAmacd #TPAOG #MACD #Divergence #Momentum #TechnicalAnalysis #TradingView #Forex #Crypto #Stocks #SwingTrading #Scalping #PriceAction #MultiTimeframe #FreeIndicator
Speculative XRP Buy/Sell SignalThis is just a beta trying to test new indicator please bear with me.
//@version=5
indicator(title="Speculative XRP Buy/Sell Signal", shorttitle="XRP Signal", overlay=true)
// Inputs
fastLength = input.int(9, title="Fast EMA Length", minval=1)
slowLength = input.int(21, title="Slow EMA Length", minval=1)
rsiLength = input.int(14, title="RSI Length", minval=1)
rsiOverbought = input.int(60, title="RSI Overbought Threshold", minval=50, maxval=100)
rsiOversold = input.int(40, title="RSI Oversold Threshold", minval=0, maxval=50)
// Calculations
fastEMA = ta.ema(close, fastLength)
slowEMA = ta.ema(close, slowLength)
rsi = ta.rsi(close, rsiLength)
// Conditions
emaBullish = ta.crossover(fastEMA, slowEMA)
emaBearish = ta.crossunder(fastEMA, slowEMA)
buyCondition = emaBullish and rsi < rsiOversold
sellCondition = emaBearish and rsi > rsiOverbought
// Plots
plot(fastEMA, color=color.blue, title="Fast EMA", linewidth=2)
plot(slowEMA, color=color.orange, title="Slow EMA", linewidth=2)
// Signals
plotshape(series=buyCondition, title="Buy Signal", location=location.belowbar, color=color.green, style=shape.arrowup, size=size.normal, text="BUY")
plotshape(series=sellCondition, title="Sell Signal", location=location.abovebar, color=color.red, style=shape.arrowdown, size=size.normal, text="SELL")
// Alerts
alertcondition(buyCondition, title="XRP Buy Alert", message="Speculative BUY: EMA crossover + RSI oversold on XRP!")
alertcondition(sellCondition, title="XRP Sell Alert", message="Speculative SELL: EMA crossunder + RSI overbought on XRP!")






















