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.
Medias móviles
Ultimate Scalping IndicatorOverview
The Confluence Signal Indicator is a precision-built scalping tool designed to identify high-probability reversal points in the market.
It combines three core technical elements:
Trend
Mean reversion
Momentum
into a single, efficient system.
By filtering out weak RSI signals and focusing only on setups that align with trend direction and recent momentum shifts, this indicator delivers cleaner and more accurate short-term trade signals.
Core Components
200-Period Moving Average (MA200, 5-Minute Timeframe)
The MA200 is always calculated from the 5-minute chart, regardless of your current timeframe. It defines the macro trend direction and ensures that all trades align with the prevailing momentum.
Session VWAP (Volume-Weighted Average Price)
The VWAP tracks the real-time average price weighted by volume for the current trading session. It acts as a dynamic mean-reversion level and helps identify key areas of institutional activity and short-term balance.
RSI (Relative Strength Index)
The indicator uses a standard 14-period RSI to detect overbought and oversold market conditions.
A “recency filter” is added to ensure signals only appear when RSI has recently transitioned from strength to weakness or vice versa, reducing false signals in trending markets.
Signal Logic
Bullish Signal (Green Arrow)
A bullish reversal signal is plotted below a candle when:
Price is above both the 5-minute MA200 and the Session VWAP.
RSI is oversold (below 30).
The last time RSI was above 50 occurred within the last 10 candles before going oversold.
This ensures that the dip is a fresh pullback within an uptrend, not a prolonged oversold condition.
Bearish Signal (Red Arrow)
A bearish reversal signal is plotted above a candle when:
Price is below both the 5-minute MA200 and the Session VWAP.
RSI is overbought (above 70).
The last time RSI was below 50 occurred within the last 10 candles before going overbought.
This ensures that the overbought reading follows a recent move from weakness, identifying potential short entries in a downtrend.
Recommended Usage
This is a scalping-focused indicator, intended for use on timeframes of 5 minutes or lower. Therefore I would highly recommend to use it on Equity futures trading, such as NQ!, ES!, GC! and so on.
It performs best when combined with additional tools such as support and resistance zones, order blocks, or liquidity levels for context.
Avoid counter-trend signals unless confirmed by price structure or volume behavior.
KD-NewAutoTrade for Future Trading - Heikin Ashi candles The KD-NewAutoTrade strategy is a dynamic trend-following indicator designed for scalping and swing trading across crypto, forex, and index futures. It combines the precision of EMA crossovers, RSI momentum, and ADX trend strength to deliver clear Buy/Sell signals with high reliability.
🔹 Core Logic
EMA Fast & Slow Crossover – Identifies short-term and long-term trend shifts.
RSI Confirmation – Filters out false signals by requiring RSI to cross custom Buy/Sell thresholds.
ADX Filter – Ensures trades only trigger when market trend strength exceeds your chosen ADX minimum.
🔹 Key Features
Visual Buy/Sell triangles directly on the chart.
Customizable inputs for EMA, RSI, and ADX lengths.
Works efficiently on all timeframes and all markets (Crypto, Indices, Stocks, Commodities).
Optional background highlights for active trade zones.
Alert conditions for both BUY and SELL setups – ready to use in automated strategies or alert bots.
🔹 Recommended Usage
Use Heikin Ashi candles
Works best on 1M - 5M timeframes.
Combine with volume or higher-timeframe trend confirmation for stronger signals.
XAUUSD Best Strategy - Buy/Sell SignalsThe best strategy to trade XAUUSD (gold) often depends on your trading style and market conditions, but several high-probability approaches are recommended by top traders and industry experts for both scalping and swing trading.
Trend-Following Using EMAs
Use a combination of 9-period and 21-period Exponential Moving Averages (EMA) on the 5-minute or 15-minute chart.
Enter long when the 9 EMA crosses above the 21 EMA, especially when overall trend aligns with higher timeframes (such as H1 or H4).
Confirm entries with an RSI value above 50 for buys (or below 50 for sells).
Set stop loss just below the latest swing low for long positions.
Ideal for fast-moving, trending sessions (London and New York overlap).
Henry's MA & RSProviding 10 21 50 200 MA and RS rating based on S&P 500, basically for US stocks. Enjoy!
Quantura - Average Intraday Candle VolumeIntroduction
“Quantura – Average Intraday Candle Volume” is a quantitative visualization tool that calculates and displays the average traded volume for each intraday time position based on a user-defined historical lookback period. It allows traders to analyze recurring intraday volume patterns, identify high-activity sessions, and detect liquidity shifts throughout the trading day.
Originality & Value
This indicator goes beyond standard volume averages by normalizing and aligning volume data according to the time of day. Instead of simply smoothing recent bars, it builds an intraday volume profile based on historical daily averages, enabling users to understand when during the day volume typically peaks or drops.
Its originality and usefulness come from:
Converting standard volume data into time-aligned intraday averages.
Visualization of historical intraday liquidity behavior, not just total daily volume.
Dynamic scaling using normalization and transparency to emphasize active and quiet periods.
Optional day-separator lines for precise intraday structure recognition.
Gradient-based coloring for better visual interpretation of volume intensity.
Functionality & Core Logic
The indicator divides each day into discrete intraday time positions (based on chart timeframe).
For each position, it stores and updates historical volume values across the selected number of days.
It calculates an average volume per time position by aggregating all stored values and dividing them by the number of valid days.
The result is plotted as a continuous histogram showing typical intraday volume distribution.
The bar colors and transparency dynamically reflect the relative intensity of volume at each point in the day.
Parameters & Customization
Number of Days for Averaging: Defines how many past days are included in the volume average calculation (default: 365).
UTC Offset: Allows synchronization of intraday cycles with local or exchange time zones.
Base Color: Sets the main color for plotted volume columns.
Color Mode: Choose between “Gradient” (transparency dynamically adjusts by intensity) or “Normal” (fixed opacity).
Day Line: Toggles dashed vertical lines marking the start of each trading day.
Visualization & Display
Volume is plotted as a series of histogram bars, each representing the average volume for a specific intraday time position.
A gradient color mode enhances readability by fading lower-intensity areas and highlighting high-volume regions.
Optional day-separator lines visually segment historical sessions for easy reference.
Works seamlessly across all chart timeframes that divide the 24-hour day into regular bar intervals.
Use Cases
Identify when trading activity typically peaks (e.g., session opens, news windows, or overlapping markets).
Compare current intraday volume to historical averages for early anomaly detection.
Enhance algorithmic or discretionary strategies that depend on volume-timing alignment.
Combine with volatility or price structure indicators to confirm market activity zones.
Evaluate session consistency across different time zones using the UTC offset parameter.
Limitations & Recommendations
The indicator requires intraday data (below 1D resolution) to function properly.
Volume behavior may vary across brokers and assets; adjust averaging period accordingly.
Does not predict price movement — it provides volume-based context for analysis.
Works best when combined with structure or momentum-based indicators.
Markets & Timeframes
Compatible with all intraday markets — including crypto, Forex, equities, and futures — and all intraday timeframes (from 1 minute to 4 hours). It is particularly valuable for analyzing assets with continuous 24-hour trading activity.
Author & Access
Developed 100% by Quantura. Published as a Open-source script indicator. Access is free.
Important
This description complies with TradingView’s Script Publishing and House Rules. It provides a clear explanation of the indicator’s originality, logic, and purpose, without any unrealistic performance or predictive claims.
PSAR with ATR Trailing Stop + SMA Filter📈 Strategy Overview: PSAR + 6×ATR Trailing Stop with SMA Filter
This strategy is built around the principle of “Cut the losers, let the winners run” — a disciplined, trend-following approach that combines the Parabolic SAR indicator with dynamic risk management and a Simple Moving Average (SMA) trend filter.
🔍 Strategy Logic
Trend Filter Trades are only taken in the direction of the prevailing trend, defined by a user-selected SMA (default: 100).
✅ Long trades only when price is above the SMA
✅ Short trades only when price is below the SMA
Entry Signal: A trade is triggered when the Parabolic SAR flips to the opposite side of the price bars, signaling a potential trend reversal.
Stop Loss: The stop loss is dynamically set at 6×ATR from the entry price. This adapts to market volatility and is recalculated every bar — effectively acting as a trailing stop.
Exit Logic: There is no fixed take profit. The trade remains open until the trailing stop is hit — allowing winners to run and losers to be cut quickly.
Risk Management: Each trade risks 0.5% of total equity, ensuring consistent position sizing and capital preservation.
📊 Visual Elements
PSAR dots mark trend direction changes
SMA line shows the broader trend filter
Trailing stop crosses (with 50% opacity) indicate the current stop level without cluttering the chart
⚙️ Customizable Inputs
PSAR parameters: Start, Increment, Maximum
ATR length and multiplier
SMA length
Risk percentage per trade
This strategy is ideal for traders who want to stay aligned with the trend, automate disciplined exits, and avoid emotional decision-making. Clean, simple, and powerful.
Wishing you calm and successful trades!
Cloud and Table - Ostinato TradingMain indicator of Ostinato Trading, the moving averages cloud and table. You can superpose various moving averages, bollinger bands and their color fill. Additionaly the table is used to plot the distance from the price to moving averages, the ATR value, the stop loss ... You can also plot a bulls eyes of SL and TP in points to visualise it on the chart.
CDC BACKTEST (MACD) FIX AMOUNT $200k per trade This strategy implements an Exponential Moving Average (EMA) Crossover System designed for backtesting and performance evaluation. EMA 12,26 (MACD)
The trading logic is based on the crossover between two EMAs — a short-term EMA (12) and a long-term EMA (26) — which serves as a momentum-based signal for trend identification.
Buy Condition:
A long (buy) position is entered when the 12-period EMA crosses above the 26-period EMA, indicating a potential upward trend or bullish momentum.
Sell Condition:
A position is closed, or a short (sell) position is opened, when the 12-period EMA crosses below the 26-period EMA, signaling a potential downward trend or bearish momentum.
Position Sizing:
Each trade with a fixed position size of 200,000 USD (default), while the starting account balance is set at 400,000 (USD).
Both the fixed trade amount and the initial balance are user-adjustable parameters, allowing flexibility for different risk preferences and portfolio sizes.
ATR SL/TP Precision Zones (Dots)ATR SL/TP Precision Zones (Dots) is a volatility-based tool designed to help traders set accurate Stop Loss and Take Profit levels based on real market volatility — not fixed pips or emotion.
This indicator uses ATR (Average True Range) multiplied by 1.2 to calculate dynamic distance bands.
Instead of drawing a ribbon or channel, it places simple dots above and below each candle:
Upper Dot (Green) → Suggested Take Profit / Price Stretch Zone
Lower Dot (Red) → Suggested Stop Loss Cushion / Support Expansion Zone
Because ATR measures market volatility, these dots expand during high volatility and tighten during slow markets, helping traders avoid stop-loss hunts and premature exits.
Why This Works
Most traders lose because:
They set SL too close → stopped out by noise
They set TP too far → price never reaches it
This tool calibrates those distances automatically based on real price movement behavior.
ATR = volatility
Volatility = market breathing room
This indicator ensures your trade has room to breathe, increasing win consistency.
Best Use Cases
Scalping
Swing trading
Trend continuation entries
Reversal confirmations with support/resistance
Works on Crypto / Forex / Stocks / Futures
Nifty Futures Momentum ScalperNifty Futures Momentum Scalper
Backtesting
VPA , RSI, momentum trades with EMA crossover
tradingview_momentum_Hull-Suite-W-FVSO-NO-WeekendMomentum no weekend trades. It uses FVZO and Hull suite.
This strategy has low win rate but successfully catches trends. Works well on ETH in High Time Frame multi-year.
Squeeze Ultimate MTF DashboardThis script provides real time data on the following across 3 TF of your choice all displayed in a clear table on your chart:
1) Momentum - do we have expanding positive or negative momentum
2) Do we have stacked averages - any choices of 4 EMA's
3) Are we in a squeeze
4) How many bars since the squeeze fired have passed
This allows you to gauge, on MTF, whether we have expanding momentum, in a stacked moving average environment and whether the squeeze is getting ready to fire or has already fired, and if so, how long ago.
Credit to John carter for developing the original squeeze
Stoch PRO + Dynamic EMA (EMA cross)Stoch PRO + Dynamic EMA Documentation
Overview:
- Pine Script v6 overlay indicator combining a trend-colored EMA with a Stochastic oscillator to highlight midline momentum shifts.
- Designed for TradingView charts (Indicators → Import) as a visual aid for timing entries within trend-following setups.
- Crafted and optimized around BTCUSDT on the 4h timeframe; adapt inputs before applying to other markets or intervals.
Inputs:
- EMA Length (default 50): smoothing window for the dynamic EMA; lower values respond faster but whipsaw more.
- Stochastic K Length (20): lookback for the raw %K calculation.
- Stochastic K Smoothing (3): SMA applied to %K to reduce noise.
- Stochastic D Smoothing (3): SMA over %K to produce the companion %D line.
Visual Elements:
- EMA plotted on price with linewidth 3; teal when close > EMA, fuchsia otherwise.
- Background tinted teal/fuchsia at high transparency (≈92) to reinforce the current trend bias without obscuring price bars.
Oscillator Logic:
- %K = ta.stoch(high, low, close, kLength); smoothed with ta.sma(kRaw, kSmooth).
- %D = ta.sma(k, dSmooth).
- Focus is on the midline (50) rather than traditional 20/80 extremes to emphasize rapid momentum flips.
Signals:
- Buy: %K crossing above 50 while close > EMA (teal state). Plots tiny teal circle below the bar.
- Sell: %K crossing below 50 while close < EMA (fuchsia state). Plots tiny purple circle above the bar.
Trading Workflow Tips:
- Use EMA/background color for directional bias, then confirm with %K 50-cross to refine entries.
- Consider higher-timeframe trend filters or price-action confirmation to avoid range chop.
- Stops often sit just beyond the EMA; adjust thresholds (e.g., 55/45) if too many false positives occur.
- Always plan risk/reward upfront—define TP/SL levels that fit your strategy and backtest them thoroughly before trading live.
Alerts & Extensions:
- Wrap crossUp/crossDown in alertcondition() if TradingView alerts are needed.
- For automation/backtesting, convert logic to a strategy() script or add position management rules.
TFX AVERAGESThis indicator created by TFX features the EMA's of 5, 10, 20, 50, 200. These indicators will show the averages of candles.
Is it Time for a Pullback? Check Bars Since MA TestAn old market adage declares that “prices never move in a straight line.” Dips occur even in bullish markets. But how can traders know when prices may be due for a pullback?
Today’s script tries to answer that question by asking how many bars have passed since a stock, index or other symbol has tested a given moving average. Long periods of time without touching a line such as the 50-day simple moving average, for example, could prompt traders to be more patient.
Bars Since MA Test counts how many bars have passed since prices touched or crossed the MA in question. The resulting value is plotted in a simple histogram. Users can set the MA length and type. By default, it uses the 50-day simple moving average (SMA).
The chart above applies Bars Since MA Test to the S&P 500. It shows that the index has gone 129 bars without testing its 50-day SMA. That’s the longest since a 146-bar stretch between July 2006 and February 2007.
Other longer runs include January-August 1995 (156 bars), November 1960-June 1961 (144 bars) and April-November 1958 (158 bars).
Given the small number of comparable readings, could traders suspect the current advance is getting long in the tooth?
TradeStation has, for decades, advanced the trading industry, providing access to stocks, options and futures. If you're born to trade, we could be for you. See our Overview for more.
Past performance, whether actual or indicated by historical tests of strategies, is no guarantee of future performance or success. There is a possibility that you may sustain a loss equal to or greater than your entire investment regardless of which asset class you trade (equities, options or futures); therefore, you should not invest or risk money that you cannot afford to lose. Online trading is not suitable for all investors. View the document titled Characteristics and Risks of Standardized Options at www.TradeStation.com . Before trading any asset class, customers must read the relevant risk disclosure statements on www.TradeStation.com . System access and trade placement and execution may be delayed or fail due to market volatility and volume, quote delays, system and software errors, Internet traffic, outages and other factors.
Securities and futures trading is offered to self-directed customers by TradeStation Securities, Inc., a broker-dealer registered with the Securities and Exchange Commission and a futures commission merchant licensed with the Commodity Futures Trading Commission). TradeStation Securities is a member of the Financial Industry Regulatory Authority, the National Futures Association, and a number of exchanges.
TradeStation Securities, Inc. and TradeStation Technologies, Inc. are each wholly owned subsidiaries of TradeStation Group, Inc., both operating, and providing products and services, under the TradeStation brand and trademark. When applying for, or purchasing, accounts, subscriptions, products and services, it is important that you know which company you will be dealing with. Visit www.TradeStation.com for further important information explaining what this means.
9 & 20 EMA Cross Alert 9 and 20 EMA will be put on chart. Bull and bear signal will appear when EMAs cross. Alert is available when EMAs cross.
Close Below MAClose Below MA (SMA or EMA)
This indicator helps traders quickly identify when a candle closes below a moving average — a classic signal of potential bearish momentum or a shift in trend.
You can choose between Simple Moving Average (SMA) or Exponential Moving Average (EMA) from a convenient dropdown menu, and customize the MA length to fit your strategy.
When a candle closes below the selected MA, a small black arrow appears above the bar, and an alert can be triggered for instant notifications.
Features:
Choose between SMA or EMA.
Adjustable MA length.
Visual signal (arrow) when the close is below the selected MA.
Built-in alert support
Usage Ideas:
Spot early signs of a bearish reversal.
Use alerts for automated trade monitoring.
dO / wO / mO + MA 50/200 + PrevDay H/L Description
This indicator plots key reference levels used by professional traders:
Daily Open (dO)
Weekly Open (wO)
Monthly Open (mO)
Previous Day High (pdH) and Previous Day Low (pdL)
Moving Averages: 50 & 200 SMA
Each level is drawn as a clean dotted white line with a fixed label directly on the price chart.
All levels can be individually toggled on or off via checkboxes in the settings panel.
The pdH/pdL lines start exactly from the candles that created them, providing clear structure for breakout, retracement, and liquidity analysis.
The 50/200 SMA are included for long-term trend context.
This tool is designed for traders who rely on multi-timeframe structure and precision levels for both intraday and swing strategies.
Features
Toggle visibility for dO, wO, mO, pdH, and pdL
Accurate placement of previous day levels
Lightweight and responsive
Clean minimal visual design
Supports any symbol and timeframe
Usage Notes
Perfect for confluence-based trading:
Combine pdH/pdL with session opens to identify key liquidity zones
Use SMA 50/200 for directional bias
Works on crypto, forex, indices, and equities
Golden Flow MapGolden Flow Map is a multi–timeframe moving–average system
designed to reveal the underlying direction of long–term market flow,
beyond daily volatility or short–term signals.
This script overlays four major trend lines — each representing a different layer of market rhythm:
Timeframe Length Meaning
🟣 1D – 365 MA Annual average — the true life line of the trend
🔴 1D – 200 MA Institutional benchmark — the long-term threshold
🟢 1W – 20 MA Mid-cycle momentum guide
🟠 3D – 100 MA Wave transition detector — captures trend shifts early
By combining these four perspectives on a single chart,
you can instantly distinguish between a short-term bounce and a major trend reversal.
🧭 How to Use
When all four lines align in one direction → that’s the main current of the market.
If price loses the 200D or 365D, ignore small rebounds — the structure has shifted.
The cross between Weekly 20 and 3D 100 often marks a wave transition.
Focus on alignment order rather than crossovers —
markets ultimately return to the direction of the higher timeframe.
⚙️ Features
SMA / EMA toggle
Individual MA on/off controls
Built-in alerts for 200D and 1W20 cross events
🧠 Concept
“Indicators are not signals — they are maps.”
This tool is not meant to predict, but to reveal the pulse of the market
and guide you through its long-term structure.
✍️ Creator’s Note
Developed from DDU’s personal long-term trend framework,
this indicator serves as a visual compass to expand a trader’s vision
from short-term reactions to macro-level flow.
Golden Flow MapGolden Flow Mapis a multi–timeframe moving–average system
designed to reveal the underlying direction of long–term market flow,
beyond daily volatility or short–term signals.
This script overlays four major trend lines — each representing a different layer of market rhythm:
Timeframe Length Meaning
🟣 1D – 365 MA Annual average — the true life line of the trend
🔴 1D – 200 MA Institutional benchmark — the long-term threshold
🟢 1W – 20 MA Mid-cycle momentum guide
🟠 3D – 100 MA Wave transition detector — captures trend shifts early
By combining these four perspectives on a single chart,
you can instantly distinguish between a short-term bounce and a major trend reversal.
🧭 How to Use
When all four lines align in one direction → that’s the main current of the market.
If price loses the 200D or 365D, ignore small rebounds — the structure has shifted.
The cross between Weekly 20 and 3D 100 often marks a wave transition.
Focus on alignment order rather than crossovers —
markets ultimately return to the direction of the higher timeframe.
⚙️ Features
SMA / EMA toggle
Individual MA on/off controls
Built-in alerts for 200D and 1W20 cross events
🧠 Concept
“Indicators are not signals — they are maps.”
This tool is not meant to predict, but to reveal the pulse of the market
and guide you through its long-term structure.
✍️ Creator’s Note
Developed from DDU’s personal long-term trend framework,
this indicator serves as a visual compass to expand a trader’s vision
from short-term reactions to macro-level flow.
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 such as 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 have seen before, how did price move afterward?
Why AnalogFlow Is Unique
1. Pattern centric - it does not rely on any standard indicator formula; it directly analyzes price movement vectors.
2. Adaptive - it learns from the same instrument's past behavior, making it self calibrating to volatility and regime shifts.
3. Non repainting - the projection is generated on the latest completed bar and remains fixed until new data is available.
4. Noise resistant - the EMA Blend engine smooths the projected trajectory, reducing random variance between analogues.
Inputs and 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 (default Euclidean)
Matches
Number of top analogues to blend (1-5): Top 3
Build Mode
Projection type: Cumulative, MeanStep, or EMA Blend (default 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 for mean reversion analysis: false
Line Color and Width
Style settings for projection curve: Blue, width 2
How It Works with Past Data
1. The system builds a memory bank of patterns from the last N bars based on the scanDepth value.
2. It compares the latest Pattern Bars segment to each historical segment.
3. It selects the Top K most similar or dissimilar analogues.
4. For each analogue, it retrieves what happened after that pattern historically.
5. It averages or smooths those forward moves into a single composite forecast curve.
6. The forecast (blue line) is drawn ahead of the current candle using line.new with no repainting.
Output Explained
Blue Path
The weighted mean future trajectory based on historical analogues.
Smoother when EMA Blend mode is enabled.
Flat Section
Indicates low directional consensus or equilibrium across analogues.
Upward or Downward Slope
Represents 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 and ETFs
Indices
Cryptocurrency
Commodities (Gold, Crude, etc.)
Futures and F&O (both intraday and positional)
Forex
No symbol specific calibration needed. It self adapts to volatility.
How Traders Can Use It
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 the current regime tends to continue or stall.
Momentum Confirmation
Combine with trend tools such as EMA or MACD for directional bias.
Backtesting Support
Compare projected path versus realized price to evaluate reliability.
FAQ
Q1. Does AnalogFlow repaint?
No. It calculates only once per completed bar and projects forward. The future path remains static until a new bar closes.
Q2. Is it a neural network or AI model?
Not in the machine learning sense. It is 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 to 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 the projected path.
Cumulative Mode
Adds sequential historical deltas directly.
Z Score Normalization
Rescaling to mean 0 and 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 and 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 proper risk management when applying this strategy.
SMA 10/20/50 Weekly on all timeframeSMA 10/20/50 Weekly on all timeframe to keep a bias on all your chart






















