Pythia — 33 FULLPythia — v33 (Full Edition)
Analysis of Structure, Divergences, and Energy Conditions
Description
Pythia Full visualizes the structural characteristics of price movement and the internal conditions that accompany changes in market behavior.
The indicator highlights moments when impulse slows down, when energy diverges from price, when structural inconsistencies appear, or when the market shows early signs of instability.
It relies on time-based, price-based, and energy-based metrics, combining them into a unified system of visual elements.
________________________________________
Setup
Only five main parameters are required for practical use.
The built-in HUD helps evaluate how chosen settings influence the indicator’s behavior.
Additional parameters are pre-configured and optimized for a wide range of instruments.
________________________________________
What Pythia Displays
• structural conditions associated with changes in movement dynamics
• micro- and macro-divergences
• areas where impulse slows or loses stability
• combinations of energy and price movement (EnergyTrap / PriceTrap)
• sudden impulsive spikes
• time-based zones where movement compresses or changes character
• local flow conditions (Flow)
• internal directional metrics (inner-channel logic)
These elements form a structural map of the chart, helping to interpret the current movement context.
________________________________________
Core Modules
1. TTC Zones (Time-To-Collapse)
Show areas where movement historically loses impulse.
Highlight time and price conditions affecting the stability of the current swing.
2. Micro- and Macro-Divergences
Micro — local discrepancies between price and MACD.
Macro — larger-cycle structural divergences.
3. Energy Conditions
Significant micro-divergences receive an energy assessment to distinguish stronger discrepancies from weaker ones.
4. Movement Traps
EnergyTrap — elevated energy load with limited price result.
PriceTrap — notable price movement with low energy.
Both help identify unstable combinations of impulse and result.
5. Impulsive Spikes
Mark sharp price expansions, energy surges, and subsequent instability zones.
6. Flow Mode
Evaluates local changes in the energy-flow context.
7. Inner-Channel Logic
Used internally within Flow to refine directional characteristics of the movement.
8. OR-Impulses
Rare energy bursts that help identify structural features of local movement.
Interpretation of Chart Markers (1–15)
(with version availability: Full / Standard / Lite)
________________________________________
1 — Pre-Flow Divergence
What it is:
A divergence displayed in a pale version of the trend color, showing early price-energy discrepancy while price moves in a strong impulse.
Why it matters:
Signals that a regular divergence may be ignored because the market still has enough momentum to continue without correction.
How to use:
Not a reversal entry.
Wait for impulse weakening or confirmation from traps, micro-divergences, TTC, or the Catcher zone.
Versions:
(Full, Standard — limited, Lite — not included)
________________________________________
2 — Regular Bearish Divergence
What it is:
A classic discrepancy between price and momentum.
Why it matters:
Shows weakening of the current swing and increases the probability of correction or reversal.
How to use:
Useful for exits or timing counter-trend entries.
Best when combined with traps, TTC, or the Catcher zone.
Versions:
(Full, Standard, Lite)
________________________________________
3 — Divergence Energy Indicator
What it is:
A marker showing how strong the divergence energy load is.
Why it matters:
Helps separate weak divergences from structurally significant ones.
How to use:
High-energy divergences carry greater reversal potential.
Versions:
(Full, Standard — no, Lite — no)
________________________________________
4 — Trap Cloud: Mass Without Impulse
What it is:
A cloud indicating significant trade mass with minimal price progress.
Why it matters:
Shows hidden exhaustion or buildup before a directional change.
How to use:
When combined with divergences or the Catcher zone, attention increases.
Lite uses micro-markers instead of clouds.
Versions:
(Full, Standard, Lite — limited)
________________________________________
5 — Trap Cloud: Impulse Without Mass
What it is:
Shows small clusters of relatively large trades producing impulse without depth.
Why it matters:
Often indicates unstable or misleading moves.
How to use:
Strengthens reversal probability when combined with divergences.
Versions:
(Full, Standard, Lite — limited)
________________________________________
6 — Post-Impulse Oscillation Window
What it is:
The time window after an impulse-shift marker (7).
Why it matters:
Shows whether the new impulse strengthened or faded.
How to use:
Supports reading the stability of short-term structural breaks.
Versions:
(Full, Standard — no, Lite — no)
________________________________________
7 — Instant Impulse-Shift Marker
What it is:
A marker showing a sudden change in structural impulse.
Why it matters:
These points often precede short-term acceleration or instability.
How to use:
Especially meaningful when appearing near traps or divergences.
Versions:
(Full, Standard — no, Lite — no)
________________________________________
8 — Growing Price–Energy Discrepancy
What it is:
Marks increasing separation between price progress and energy behavior.
Why it matters:
Often precedes divergence formation or weakening of movement.
How to use:
Use as an early attention signal, especially when clusters appear.
Versions:
(Full, Standard — no, Lite — no)
________________________________________
9 — Collapsed Micro-Divergences
What it is:
Micro-divergences that formed but collapsed.
Why it matters:
Clusters of such points often reflect hidden weakness.
How to use:
Multiple collapsed micro-divs frequently precede structural slowing.
Versions:
(Full, Standard, Lite)
________________________________________
10 — Low-Energy Uncertainty Cloud
What it is:
A weak instability cloud similar to marker 7 but less pronounced.
Why it matters:
Marks zones where the market struggles with direction.
How to use:
Strengthens reversal context when inside a Catcher zone.
Versions:
(Full, Standard — no, Lite — no)
________________________________________
11 — Catcher Zone Marker
What it is:
Marks the moment a Catcher zone was created.
Why it matters:
Even if the zone collapses, the marker remains as evidence of structural preparation.
How to use:
If traps or divergences appear afterward, reversal probability increases.
Versions:
(Full, Standard, Lite)
________________________________________
12 — Catcher Zone (Forecast Window for Divergence)
What it is:
A dynamic zone predicting where a divergence is most likely to appear.
Why it matters:
Helps anticipate reversal signals earlier and with better timing.
How to use:
Divergences born inside the zone are significantly stronger.
Standard and Lite preserve full functionality with simplified visuals.
Versions:
(Full, Standard — limited visuals, Lite — limited visuals)
________________________________________
13 — Divergence Probation Start
What it is:
Beginning of the window where divergence must prove itself.
Why it matters:
If no structural reaction appears, the signal weakens.
How to use:
Watch traps, micro-divs, and impulse slowdown during this interval.
Versions:
(Full, Standard — limited, Lite — not included)
________________________________________
14 — Divergence Probation End
What it is:
The final point where divergence should manifest.
Why it matters:
If no reaction occurs, the market transitions into Flow and the divergence becomes irrelevant.
How to use:
If price does not react by this point — ignore the divergence.
Versions:
(Full, Standard — limited, Lite — not included)
________________________________________
15 — Catcher HUD (Forecast Accuracy Panel)
What it is:
A panel showing how many divergences the Catcher predicted and how many were confirmed by the market.
Why it matters:
Helps tune the indicator without guesswork.
How to use:
Adjust parameters and observe how HUD accuracy changes instantly.
Optimizes Pythia for each instrument and timeframe.
Versions:
(Full, Standard, Lite)
________________________________________
Note from the Developers
Pythia marks the exact areas where the market can mislead you.
So here is a simple and practical rule:
Do not step into the places where the markers stand.)
Forecasting
Pythia — 33 STANDARTPythia — v33 (Standard Edition)
Structural Movement Analysis, Divergences, Flow, and Traps
Overview
Pythia Standard is built on the same structural core as the Full Edition and focuses on practical trading tasks: timely detection of divergences, slowdown zones, traps, and local flow transitions.
It highlights areas where impulse loses strength, where price disagrees with internal energy, and where movement enters higher-risk structural states.
The Standard Edition removes specialized modules (news impulses, extended channel geometry, advanced visuals) while preserving all essential structural and energy logic.
Configuration
Only several base parameters are required in real use (MACD lengths, pivot sensitivity, structural thresholds).
Internal coefficients for TTC, Flow, and energy filters are pre-optimized, reducing the number of visible inputs.
Alerts for the key signal groups are available directly in the settings.
What Pythia Standard Displays
• structural conditions where movement changes behaviour
• micro- and macro-divergences
• zones where impulse slows down or becomes unstable
• movement traps:
– EnergyTrap — strong energy, weak price result
– PriceTrap — strong price move, weak internal energy
• TTC time- and price-based zones where movement contracts or shifts
• full Flow-mode, showing local energy-flow transitions
• inner-channel directional context
• rare OR-impulse spikes (high-intensity bursts)
Together these elements form a compact structural map of the market — without the heavier Full-Edition modules.
Key Modules
1. TTC Zones (Time-To-Collapse)
Highlight areas where momentum historically weakens.
Reflect how far a structure can extend in time and price before losing stability.
2. Micro and Macro Divergences
Micro — local short-cycle structural breaks.
Macro — larger movements with stronger implications.
Both scales are available, with sensitivity controlled by MACD and T3 filters.
3. Flow Mode
Tracks local changes in the energy-flow context.
Identifies transitions between:
• probation flow
• confirmed flow
• false flow
A useful tool for assessing whether the current movement is stable or weakening.
4. Movement Traps (EnergyTrap / PriceTrap)
EnergyTrap — strong internal energy, weak price response.
PriceTrap — strong price expansion with weak energy.
Both conditions mark vulnerable structural states where movement often breaks or changes behaviour.
5. OR-Impulses
Identify rare high-impulse events combining price expansion, an internal energy surge, and post-event instability.
Useful for recognising structurally important segments.
6. TTC Grids & Alerts
Pythia Standard includes TTC grids (with adjustable transparency) and alerts for:
• micro/macro divergences
• Flow states
• movement traps
• TTC structural conditions
News-impulse alerts and extended channel geometry remain exclusive to the Full Edition.
Release Notes
Pythia — v33 (Standard Edition) uses the same structural-energy engine as the Full Edition while excluding news impulses and extended geometry modules.
Optimized for everyday trading: divergences, Flow, traps, TTC zones, and core alerts — with fewer inputs and a cleaner interface.
Interpretation of Chart Markers (1–15)
(with version availability: Full / Standard / Lite)
________________________________________
1 — Pre-Flow Divergence
What it is:
A divergence displayed in a pale version of the trend color, showing early price-energy discrepancy while price moves in a strong impulse.
Why it matters:
Signals that a regular divergence may be ignored because the market still has enough momentum to continue without correction.
How to use:
Not a reversal entry.
Wait for impulse weakening or confirmation from traps, micro-divergences, TTC, or the Catcher zone.
Versions:
(Full, Standard — limited, Lite — not included)
________________________________________
2 — Regular Bearish Divergence
What it is:
A classic discrepancy between price and momentum.
Why it matters:
Shows weakening of the current swing and increases the probability of correction or reversal.
How to use:
Useful for exits or timing counter-trend entries.
Best when combined with traps, TTC, or the Catcher zone.
Versions:
(Full, Standard, Lite)
________________________________________
3 — Divergence Energy Indicator
What it is:
A marker showing how strong the divergence energy load is.
Why it matters:
Helps separate weak divergences from structurally significant ones.
How to use:
High-energy divergences carry greater reversal potential.
Versions:
(Full, Standard — no, Lite — no)
________________________________________
4 — Trap Cloud: Mass Without Impulse
What it is:
A cloud indicating significant trade mass with minimal price progress.
Why it matters:
Shows hidden exhaustion or buildup before a directional change.
How to use:
When combined with divergences or the Catcher zone, attention increases.
Lite uses micro-markers instead of clouds.
Versions:
(Full, Standard, Lite — limited)
________________________________________
5 — Trap Cloud: Impulse Without Mass
What it is:
Shows small clusters of relatively large trades producing impulse without depth.
Why it matters:
Often indicates unstable or misleading moves.
How to use:
Strengthens reversal probability when combined with divergences.
Versions:
(Full, Standard, Lite — limited)
________________________________________
6 — Post-Impulse Oscillation Window
What it is:
The time window after an impulse-shift marker (7).
Why it matters:
Shows whether the new impulse strengthened or faded.
How to use:
Supports reading the stability of short-term structural breaks.
Versions:
(Full, Standard — no, Lite — no)
________________________________________
7 — Instant Impulse-Shift Marker
What it is:
A marker showing a sudden change in structural impulse.
Why it matters:
These points often precede short-term acceleration or instability.
How to use:
Especially meaningful when appearing near traps or divergences.
Versions:
(Full, Standard — no, Lite — no)
________________________________________
8 — Growing Price–Energy Discrepancy
What it is:
Marks increasing separation between price progress and energy behavior.
Why it matters:
Often precedes divergence formation or weakening of movement.
How to use:
Use as an early attention signal, especially when clusters appear.
Versions:
(Full, Standard — no, Lite — no)
________________________________________
9 — Collapsed Micro-Divergences
What it is:
Micro-divergences that formed but collapsed.
Why it matters:
Clusters of such points often reflect hidden weakness.
How to use:
Multiple collapsed micro-divs frequently precede structural slowing.
Versions:
(Full, Standard, Lite)
________________________________________
10 — Low-Energy Uncertainty Cloud
What it is:
A weak instability cloud similar to marker 7 but less pronounced.
Why it matters:
Marks zones where the market struggles with direction.
How to use:
Strengthens reversal context when inside a Catcher zone.
Versions:
(Full, Standard — no, Lite — no)
________________________________________
11 — Catcher Zone Marker
What it is:
Marks the moment a Catcher zone was created.
Why it matters:
Even if the zone collapses, the marker remains as evidence of structural preparation.
How to use:
If traps or divergences appear afterward, reversal probability increases.
Versions:
(Full, Standard, Lite)
________________________________________
12 — Catcher Zone (Forecast Window for Divergence)
What it is:
A dynamic zone predicting where a divergence is most likely to appear.
Why it matters:
Helps anticipate reversal signals earlier and with better timing.
How to use:
Divergences born inside the zone are significantly stronger.
Standard and Lite preserve full functionality with simplified visuals.
Versions:
(Full, Standard — limited visuals, Lite — limited visuals)
________________________________________
13 — Divergence Probation Start
What it is:
Beginning of the window where divergence must prove itself.
Why it matters:
If no structural reaction appears, the signal weakens.
How to use:
Watch traps, micro-divs, and impulse slowdown during this interval.
Versions:
(Full, Standard — limited, Lite — not included)
________________________________________
14 — Divergence Probation End
What it is:
The final point where divergence should manifest.
Why it matters:
If no reaction occurs, the market transitions into Flow and the divergence becomes irrelevant.
How to use:
If price does not react by this point — ignore the divergence.
Versions:
(Full, Standard — limited, Lite — not included)
________________________________________
15 — Catcher HUD (Forecast Accuracy Panel)
What it is:
A panel showing how many divergences the Catcher predicted and how many were confirmed by the market.
Why it matters:
Helps tune the indicator without guesswork.
How to use:
Adjust parameters and observe how HUD accuracy changes instantly.
Optimizes Pythia for each instrument and timeframe.
Versions:
(Full, Standard, Lite)
________________________________________
Note from the Developers
Pythia marks the exact areas where the market can mislead you.
So here is a simple and practical rule:
Do not step into the places where the markers stand.)
SK Trading System v1.6 SK Trading System v0.16 – Rule-Based Market Strategy for Precise Entries & Exits
The SK Trading System v0.16 is a comprehensive, rule-based approach to trading designed to identify market turning points using price action and Fibonacci levels. Built on over 6 years of trading experience and thousands of hours of market analysis, this system combines the power of Fibonacci retracements and extensions with structured price sequences to provide a high-probability framework for identifying trend reversals and market entries.
Key Features:
Price Action-Based: The system leverages market structure, including price highs and lows, to identify significant turning points in the market.
Fibonacci Levels: Key retracement and extension levels (0.382, 0.5, 0.618, 1.618, 2.000) are used to identify optimal entry and exit points for trades.
Clear Sequences: The strategy identifies sequences of price movements (Points 0, A, B, and C) that follow a well-defined pattern of market behavior.
Risk & Money Management: The system enforces strict risk management principles, capping loss exposure to 1-3% per trade and targeting a minimum 1:1 risk/reward ratio.
Automated Trade Setup: Automatic detection of key price levels, including the Golden Pocket zone, targets, and invalidation points.
Visual Trade Markers: Easy-to-read visual indicators, including Fibonacci zones, points of interest, and target levels, to support your trading decisions.
Why Use It:
Disciplined Approach: Follow a strict, rule-driven methodology to eliminate emotional trading and boost consistency.
Multi-Timeframe Analysis: Ideal for traders who analyze multiple timeframes, from higher timeframes for trend direction to lower timeframes for precise entry points.
Comprehensive Risk Management: The system includes built-in stop loss and take profit management to protect your capital and lock in profits.
Continuous Adaptation: The strategy can adapt to changing market conditions, ensuring you stay on the right side of the market.
Who Can Benefit:
Swing Traders: Ideal for traders looking to capture medium- to long-term price movements with high-probability setups.
Trend Followers: Perfect for those who want to trade with the prevailing trend while managing risk.
Fibonacci Enthusiasts: This strategy leverages Fibonacci retracements and extensions to find high-confluence entry and exit zones.
Maximize your trading efficiency and reduce the noise of unpredictable market moves with the SK Trading System v16. Let the system guide your trading decisions with clear, actionable signals and reliable market patterns.
IU Momentum OscillatorDESCRIPTION:
The IU Momentum Oscillator is a specialized trend-following tool designed to visualize the raw "energy" of price action. Unlike traditional oscillators that rely solely on closing prices relative to a range (like RSI), this indicator calculates momentum based on the ratio of bullish candles over a specific lookback period.
This "Neon Edition" has been engineered with a focus on visual clarity and aesthetic depth. It utilizes "Shadow Plotting" to create a glowing effect and dynamic "Trend Clouds" to highlight the strength of the move. The result is a clean, modern interface that allows traders to instantly gauge market sentiment—whether the bulls or bears are in control—without cluttering the chart with complex lines.
USER INPUTS:
- Momentum Length (Default: 20): The number of past candles analyzed to count bullish occurrences.
- Momentum Smoothing (Default: 20): An SMA filter applied to the raw data to reduce noise and provide a cleaner wave.
- Signal Line Length (Default: 5): The length of the EMA signal line used to generate crossover signals and the "Trend Cloud."
- Overbought / Oversold Levels (Default: 60 / 40): Thresholds that define extreme market conditions.
- Colors: Fully customizable Neon Cyan (Bullish) and Neon Magenta (Bearish) inputs to match your chart theme.
LONG CONDITION:
- Signal: A Buy signal is indicated by a small Cyan Circle.
- Logic: Occurs when the Main Momentum Line (Glowing) crosses ABOVE the Grey Signal Line.
- Visual Confirmation: The "Trend Cloud" turns Cyan and expands, indicating that bullish momentum is accelerating relative to the recent average.
SHORT CONDITIONS:
- Signal: A Sell signal is indicated by a small Magenta Circle.
- Logic: Occurs when the Main Momentum Line (Glowing) crosses BELOW the Grey Signal Line.
- Visual Confirmation: The "Trend Cloud" turns Magenta, indicating that bearish pressure is increasing.
WHY IT IS UNIQUE:
1. Candle-Count Logic: Most oscillators calculate price distance. This indicator calculates price participation (how many candles were actually green vs red). This offers a different perspective on trend sustainability.
2. Optimized Performance: The script uses math.sum functions rather than heavy for loops, ensuring it loads instantly and runs smoothly on all timeframes.
3. Visual Hierarchy: It uses dynamic gradients and transparency (Alpha channels) to create a "Glow" and "Cloud" effect. This makes the chart easier to read at a glance compared to flat, single-line oscillators.
HOW USER CAN BENEFIT FROM IT:
- Trend Confirmation: Traders can use the "Trend Cloud" to stay in trades longer. As long as the cloud is thick and colored, the trend is strong.
- Divergence Spotting: Because this calculates momentum differently than RSI, it can often show divergences (price goes up, but the count of bullish candles goes down) earlier than standard tools.
- Scalping: The crisp crossover signals (Circles) provide excellent entry triggers for scalpers on lower timeframes when combined with key support/resistance levels.
DISCLAIMER:
This source code and the information presented here are for educational and informational purposes only. It does not constitute financial, investment, or trading advice.
Trading in financial markets involves a high degree of risk and may not be suitable for all investors. You should not rely solely on this indicator to make trading decisions. Always perform your own due diligence, manage your risk appropriately, and consult with a qualified financial advisor before executing any trades.
Net Futures OI Change + Price/OI Logic – All Bars-This indicator shows Net Change in Open Interest of Futures contract , with Open interest built-up with relation to price, specifically made for Indian Markets. Works on Index futures & Stock Futures (even on chart of underlying *if also traded in F&O segment*).
-This indicator only shows Net Futures open interest, as Tradingview only provides Open Interest for Futures contracts (in pinescript) and updates every 3 Minutes (according to the rule of National Stock Exchange)
-Also works on timeframes: 3 Minutes to 1 Month (only on Indian Scrips)
*Can use on other scrips excluding Indian Markets, but it will work only on Daily Timeframe*
Tip: Turn on/off ‘Pane Labels’ under graphic objects from indicator settings to view price relation with Open Interest (small text will appear on histogram bar)
How to Use:
Rise in Price, Rise in OI = Long Built Up
Rise in Price, Slide in OI = Short Covering
Slide in Price, Slide in OI = Short Built Up
Slide in Price, Slide in OI = Long Unwinding
Disclaimer/Warning: This indicator does not provide Buy/Sell signals or nor is an investment advice. This indicator solely for the purpose of study of price and open interest. Users are responsible for their own actions, profit/loss of the users is not the liability of author.
Trend Exhaustion Engine UnMatrixThis indicator combines classic exhaustion engines to detect market trend exhaustion, generate directional setup signals, and plot intelligent ATR-based entry/SL/TP levels.
Relative Strength vs Index - Joe v2This Indicator compares the relative strength of a ticker versus a reference index (QQQ/SPY), offering different calculation modes to capture performance or momentum differences.
Calculation Modes
Each mode analyzes the ticker’s performance against the index in a different way:
1. Moving Averages #1 (DEFAULT)
Compares the performance of the ticker relative to the index using the percentage distance from the moving average. This absolute deviation method may result in larger swings when price is far from the MA, offering a more sensitive view of divergence.
2. Moving Averages #2
Compares the performance of the ticker relative to the index using the ratio of price to moving average. This relative ratio method provides a smoother, proportional comparison and tends to produce stable values even when prices are far from the moving average.
3. % Based
Compares the percentage change in price since the session’s start time (adjustable) for both the ticker and the index.
Use case: Quick, simple snapshot of relative performance.
4. % Based - Bar-By-Bar
It compares the percentage change of the ticker from the previous bar to the percentage change of the index from the previous bar, and expresses the result as a relative strength percentage. It essentially answers: "Did the ticker move more (up or down) than the index in this bar?"
5. Rate of Change (ROC)
Compares the rate of change over a user-defined period. Optionally normalizes using ATR ratios to adjust for volatility.
Use case: Measures price momentum relative to the index.
6. RSI (Relative Strength Index)
Compares the RSI values of the ticker and index.
Effect: Highlights differences in momentum strength, expressed as a percentage difference.
-------------------------------------------------------------------
ATR Normalization (Very Important)
You can normalize the results of any mode using the Daily ATR of the ticker. This adjusts the output to account for the ticker's volatility, helping distinguish between meaningful moves and normal noise.
This is very important as every ticker have its own daily Average True Range (Typically movement in any given day)
-------------------------------------------------------------------
Trading Ideas
This indicator should not be used as the sole signal to enter trades; it works best when combined with your other trading signals.
As shown on the chart, at the open, the ticker was stronger than the index and initially moved upward. However, this strength eventually turned into weakness, and the ticker trended downward. Always keep a chart of the index open to monitor overall market behavior alongside your ticker.
It is well known that stocks generally follow the index. However, if a stock has news or specific reasons to move independently, knowing whether it is stronger or weaker than the index provides valuable insight.
Tip: If a stock is trading stronger than the index while the index is moving downward, once the index reverses and moves upward, the stock is likely to move with even greater strength, assuming it remains correlated with the index. Monitoring both the index and the stock together helps identify these opportunities.
-------------------------------------------------------------------
Important Companion Indicator: Correlation Tracker - Jv2 (Available From my Scripts)
The Correlation Tracker is a powerful tool designed to measure, visualize, and classify the correlation between a symbol and a reference index (QQQ/SPY). It provides an intuitive and customizable way to understand whether a ticker moves with, against, or independently from the market.
It classifies correlation strength into seven categories (from strong negative to strong positive) and highlights them using color-coded visuals, labels, meters, and optional background zones.
It is another part of the same puzzle and both should be used at the same time. One measuring relative strength, and the other correlation.
Buffett Quality Filter (TTM)//@version=6
indicator("Buffett Quality Filter (TTM)", overlay = true, max_labels_count = 500)
// 1. Get financial data (TTM / FY / FQ)
// EPS (TTM) for P/E
eps = request.financial(syminfo.tickerid, "EARNINGS_PER_SHARE_BASIC", "TTM")
// Profitability & moat (annual stats)
roe = request.financial(syminfo.tickerid, "RETURN_ON_EQUITY", "FY")
roic = request.financial(syminfo.tickerid, "RETURN_ON_INVESTED_CAPITAL", "FY")
// Margins (TTM – rolling 12 months)
grossMargin = request.financial(syminfo.tickerid, "GROSS_MARGIN", "TTM")
netMargin = request.financial(syminfo.tickerid, "NET_MARGIN", "TTM")
// Balance sheet safety (quarterly)
deRatio = request.financial(syminfo.tickerid, "DEBT_TO_EQUITY", "FQ")
currentRat = request.financial(syminfo.tickerid, "CURRENT_RATIO", "FQ")
// Growth (1-year change, TTM)
epsGrowth1Y = request.financial(syminfo.tickerid, "EARNINGS_PER_SHARE_BASIC_ONE_YEAR_GROWTH", "TTM")
revGrowth1Y = request.financial(syminfo.tickerid, "REVENUE_ONE_YEAR_GROWTH", "TTM")
// Free cash flow (TTM) and shares to build FCF per share for P/FCF
fcf = request.financial(syminfo.tickerid, "FREE_CASH_FLOW", "TTM")
sharesOut = request.financial(syminfo.tickerid, "TOTAL_SHARES_OUTSTANDING", "FQ")
fcfPerShare = (not na(fcf) and not na(sharesOut) and sharesOut != 0) ? fcf / sharesOut : na
// 2. Valuation ratios from price
pe = (not na(eps) and eps != 0) ? close / eps : na
pFcf = (not na(fcfPerShare) and fcfPerShare > 0) ? close / fcfPerShare : na
// 3. Thresholds (Buffett-style, adjustable)
minROE = input.float(15.0, "Min ROE %")
minROIC = input.float(12.0, "Min ROIC %")
minGM = input.float(30.0, "Min Gross Margin %")
minNM = input.float(8.0, "Min Net Margin %")
maxDE = input.float(0.7, "Max Debt / Equity")
minCurr = input.float(1.3, "Min Current Ratio")
minEPSG = input.float(8.0, "Min EPS Growth 1Y %")
minREVG = input.float(5.0, "Min Revenue Growth 1Y %")
maxPE = input.float(20.0, "Max P/E")
maxPFCF = input.float(20.0, "Max P/FCF")
// 4. Individual conditions
cROE = not na(roe) and roe > minROE
cROIC = not na(roic) and roic > minROIC
cGM = not na(grossMargin) and grossMargin > minGM
cNM = not na(netMargin) and netMargin > minNM
cDE = not na(deRatio) and deRatio < maxDE
cCurr = not na(currentRat) and currentRat > minCurr
cEPSG = not na(epsGrowth1Y) and epsGrowth1Y > minEPSG
cREVG = not na(revGrowth1Y) and revGrowth1Y > minREVG
cPE = not na(pe) and pe < maxPE
cPFCF = not na(pFcf) and pFcf < maxPFCF
// 5. Composite “Buffett Score” (0–10) – keep it on ONE line to avoid line-continuation errors
score = (cROE ? 1 : 0) + (cROIC ? 1 : 0) + (cGM ? 1 : 0) + (cNM ? 1 : 0) + (cDE ? 1 : 0) + (cCurr ? 1 : 0) + (cEPSG ? 1 : 0) + (cREVG ? 1 : 0) + (cPE ? 1 : 0) + (cPFCF ? 1 : 0)
// Strictness
minScoreForPass = input.int(7, "Min score to pass (0–10)", minval = 1, maxval = 10)
passes = score >= minScoreForPass
// 6. Visuals
bgcolor(passes ? color.new(color.green, 80) : na)
plot(score, "Buffett Score (0–10)", color = color.new(color.blue, 0))
// Info label on last bar
var label infoLabel = na
if barstate.islast
if not na(infoLabel)
label.delete(infoLabel)
infoText = str.format(
"Buffett score: {0} ROE: {1,number,#.0}% | ROIC: {2,number,#.0}% GM: {3,number,#.0}% | NM: {4,number,#.0}% P/E: {5,number,#.0} | P/FCF: {6,number,#.0} D/E: {7,number,#.00} | Curr: {8,number,#.00}",
score, roe, roic, grossMargin, netMargin, pe, pFcf, deRatio, currentRat)
infoLabel := label.new(bar_index, high, infoText,
style = label.style_label_right,
color = color.new(color.black, 0),
textcolor = color.white,
size = size.small)
Empire OS Automated Trading • Institutional-grade executionEmpire OS – 9/40 EMA Dynamic Momentum Strategy
This strategy isn’t just EMAs — it’s a dynamic entry and exit system built around real-time price behavior. The 9/40 EMA setup gives the base trend direction, and the internal engine calculates every entry, stop, and target using recent price action and a 14-ATR volatility model.
Everything adjusts automatically:
• Entries react to momentum shifts based on the 9/40 EMA separation
• Stops tighten or widen based on the current 14-ATR reading
• Targets scale with real market volatility (not fixed numbers)
• Risk-to-Reward is calculated on the fly for cleaner, stronger trades
• Exits are based on structure + volatility, not random lines
Most strategies use fixed stops, fixed R:R, or standard EMA pairs that anyone can copy.
This one adapts to the market in real time — making every trade unique to current conditions.
It’s rare because almost nobody builds a retail strategy that:
Uses a non-standard 9/40 EMA combo
Calculates stops + targets off real volatility
Adjusts risk reward based on live price activity
Filters entries through momentum AND price structure
Keeps drawdown tight while catching high-quality moves
This is the official Empire OS version — built for consistency, momentum accuracy, and prop-firm scalability.
MinsenAMRS 2.0MinsenAMRS 2.0 - Minsen Advanced Momentum Reversal System
Get an Early Warning as Momentum Weakens
Many classic indicators share a common pain point—they tell you a trend "has already happened." When you see a MACD golden cross or death cross, the price has often already moved a significant distance. Entering at that point often means chasing the move or dealing with a widened stop-loss, making trading passive.
MinsenAMRS 2.0 starts from a completely different premise. It doesn't wait for a trend to be fully formed for confirmation. Instead, it issues an alert in the early stages of trend momentum exhaustion, giving you ample time to observe, analyze, and make decisions at an optimal timing. It's like observing a car at high speed—MinsenAMRS's alert doesn't occur when it has already turned around, but at the moment it eases off the throttle and begins to decelerate.
How Does the System Identify Alert Zones?
MinsenAMRS signals are not based on a single, fixed threshold. They are generated by analyzing the historical distribution characteristics of market momentum and its current dynamic structure.
It continuously assesses the current momentum state relative to its position within the entire historical data, understanding what is normal and what is extreme. On this basis, the system dynamically identifies structural changes in momentum, such as decay and divergence. This means the alert logic adapts to different market volatility environments, with the goal of objectively capturing the early signs of a shift in the internal force driving price movement.
Core: The Alert Marker System
The following explains the meaning of all alert markers on the chart:
🟢 Bullish Direction Alerts
* Green Upward Arrow: Bullish Reversal Alert
The system identifies a significant bottom momentum exhaustion structure, suggesting a downtrend may face reversal.
* Green Small Triangle: Bullish Divergence Alert
Indicates a preliminary bottom divergence signal between price and momentum, requiring close attention.
🔴 Bearish Direction Alerts
* Red Downward Arrow: Bearish Reversal Alert
The system identifies a significant top momentum exhaustion structure, suggesting an uptrend may face reversal.
* Red Small Triangle: Bearish Divergence Alert
Indicates a preliminary top divergence signal between price and momentum, requiring close attention.
🔄 Trend Continuation Alerts
* Blue Diamond: Bullish Continuation Alert
Within an overall uptrend, suggests a short-term pullback is possible, but the primary upward direction is expected to remain intact.
* Orange Diamond: Bearish Continuation Alert
Within an overall downtrend, suggests a short-term rally is possible, but the primary downward direction is expected to remain intact.
Important Note: Alert markers represent zones identified by the system as "requiring focused observation." They are the starting point of the decision-making process, not direct trading instructions.
Information Panel
Displays the current state in real-time:
* Alert Status: Whether there is a current alert signal. (Note: The info table may show preliminary alerts based on the latest price before a candle closes on the current timeframe. It is recommended to wait for candle closure and base decisions on the final signal. This indicator is designed for early warning, so there's no need to worry about missing an entry by waiting for one candle.)
* Price Momentum: Accelerating rise/fall, or stable state.
* Composite Momentum: Extremely Strong, Strong, Neutral, Weak, Extremely Weak.
* Volume Status: Exceptionally High, Moderately High, Low, Normal.
* MACD Bias: Bullish Strengthening/Weakening, Bearish Strengthening/Weakening.
Auxiliary Reference: Synchronized MACD Display
For ease of analysis, the indicator simultaneously displays the traditional MACD and its histogram:
* Line: MACD Fast Line.
* Histogram: MACD Histogram colored according to its numerical state.
Please Note: These are auxiliary references. The core value of the system lies in the Alert Markers above.
How to Use: From Alert to Decision
When an alert marker appears, it signals that "the inertia of market momentum may be encountering resistance here, please observe closely," not "reverse your position immediately."
The correct response process is:
1. Increase Focus: Mark this zone as a key observation area on your chart.
2. Seek Confluent Confirmation: Observe if other technical structures (support/resistance, chart patterns, trendlines) align in this price zone.
3. Wait for Price Confirmation: Patiently wait for the market itself to validate the alert's effectiveness through price action (e.g., key level breaks, specific reversal candle patterns).
4. Formulate a Trading Plan: Only after receiving price action confirmation should you develop a trading plan with clear entry and stop-loss levels.
The core value of this system is to help you pre-identify "potential opportunity zones," saving significant time spent blindly scanning charts and focusing your attention on the most critical junctures of market change.
Usage Framework
It is recommended to adopt a multi-timeframe analysis workflow:
1. On the higher timeframe you use for primary analysis and strategy, watch for MinsenAMRS alert signals. This helps you locate potential areas requiring macro-strategic adjustment.
2. Once an alert appears, switch to a lower operational timeframe chart. On this micro scale, look for specific entry timings and risk management points based on more refined price action and structure.
3. Combine the higher timeframe's potential reversal alert with the lower timeframe's precise tactical signals to build a decision-making loop.
A Straightforward Strategy
After an alert signal appears, wait for the completion of one subsequent candle. Then, observe if the MACD histogram has turned to a confirming color (e.g., after a bullish signal, the histogram turns green). Additionally, confirm aligned directionality by observing the price action on two adjacent timeframes you commonly use before deciding to enter.
About Signal Characteristics
* No Repainting: Signals are finalized and plotted once at candle close. Historical signals do not change.
* Multi-Timeframe Applicable: The core analytical method is applicable across different timeframes.
A Frank Note on Applicability
No tool is universal. Understanding its optimal application scenarios is part of using it correctly:
* In Clear Trend Markets: It can effectively depict the evolution of trend momentum strength, helping you identify the accelerating phase, correction phases, and potential warning zones of terminal exhaustion within the main trend.
* During Ranging or Early Trend Reversal Phases: Its value is highest here, helping you focus on genuine potential turning points rather than ordinary fluctuations within a range.
* In Extreme, One-Sided Markets: Momentum may repeatedly touch extreme zones, and the system will continuously signal a state of "risk accumulation." In such cases, alert signals need to be interpreted in the context of the larger trend background—are they signaling a trend continuation or a genuine prelude to a reversal?
Finally: Sensing the Shift in Power Before the Change
Markets fluctuate on the tides of collective sentiment. The greatest danger lies in being swept away by the current, losing oneself in euphoria or fear. True advantage comes from observation—observing when the tide's force reaches its extreme, observing when the internal momentum driving the trend begins to subtly change.
MinsenAMRS 2.0 aims to be that reliable observation instrument in your hands. It does not predict the direction of the tide but strives to alert you to the subtle signs of a shift in its power, helping you direct your attention to where it matters most at critical moments.
May you remain calm and respond with composure amidst the rhythm of the markets.
Disclaimer & Risk Notice
1. Investment Risk Notice: Trading in financial markets carries risks. Past performance does not guarantee future results. MinsenAMRS 2.0 is solely a technical analysis tool and does not constitute any investment advice or trading signal.
2. Tool Nature Statement: This indicator is designed to assist your trading decisions but cannot replace your own analysis and judgment. Final trading decisions should be made by you, and you bear the corresponding responsibility.
3. Technical Limitations: No technical indicator can predict the market with 100% accuracy. Even the most sophisticated analytical system cannot avoid the impact of unexpected market events.
4. Learning and Adaptation: It is recommended to thoroughly test the indicator on a demo account first, familiarize yourself with its signal characteristics and response patterns, and find the usage method that suits you best.
//====中文版====
MinsenAMRS 2.0 - 明心动能反转预警
在动能衰减的初期,获得预警
许多经典指标都有一个共同的痛点——它们告诉你趋势“已经发生”。当你看到MACD金叉或死叉时,价格往往已经运行了一段距离。这时候入场,要么追高,要么止损空间被放大,交易变得被动。
MinsenAMRS 2.0 的出发点完全不同。它不等待趋势完全成型才确认,而是在趋势动能开始衰竭的初期就发出预警,让你有足够的时间观察、分析,并在最佳时机做出决策。这就像观察一辆高速行驶的汽车——MinsenAMRS的预警不发生在它已经掉头的时候,而是在它松油门、开始减速的那个时刻。
系统如何识别预警区域?
MinsenAMRS的信号并非基于单一、固定的阈值,而是通过分析市场动能的历史分布特征和当前动态结构来实现的。
它会持续评估当前动能状态在整个历史数据中的位置,理解什么是常态、什么是极端。在此基础上,系统动态识别动能运行中的衰减、背离等结构变化。这意味着预警逻辑能适应不同的市场波动环境,其目标是客观捕捉推动价格运动的内在力量发生转变的早期迹象。
核心:预警标记系统
以下是图表上所有预警标记的含义说明:
🟢 看涨方向预警
* 绿色向上箭头:看涨反转预警
系统识别出显著的底部动能衰竭结构,提示下跌趋势可能面临反转。
* 绿色小三角:看涨背离预警
提示价格与动能之间出现初步的底部背离迹象,需密切关注。
🔴 看跌方向预警
* 红色向下箭头:看跌反转预警
系统识别出显著的顶部动能衰竭结构,提示上涨趋势可能面临反转。
* 红色小三角:看跌背离预警
提示价格与动能之间出现初步的顶部背离迹象,需密切关注。
🔄 趋势延续预警
* 蓝色菱形:看涨中继预警
在整体上涨趋势中,提示短期可能出现回调,但主要上升方向预计保持不变。
* 橙色菱形:看跌中继预警
在整体下跌趋势中,提示短期可能出现反弹,但主要下降方向预计保持不变。
重要提示:预警标记是系统识别出的“需要重点观察的区域”,它们是决策流程的起点,而非直接交易的指令。
信息面板
实时显示当前状态:
* 预警状态:当前有无预警信号(信息表格预警:在当前级别K线没有走完时,信息表格会根据最新价格提前预警,建议等待K线闭合后,根据最终信号决策,本指标具有提前预警的特性,不必担心1根K线就入场晚了。)
* 价格动能:加速上涨/下跌,还是平稳状态
* 综合动能:极强、强势、中性、弱势、极弱
* 成交量状态:异常放量、温和放量、缩量、正常
* MACD多空:多头增强/减弱、空头增强/减弱
辅助参考:MACD同步显示
为便于分析,指标同步显示了传统MACD及其柱状图:
* 曲线:MACD快线
* 量柱:根据数值状态着色的MACD柱状图
请注意:这些是辅助参考,系统的核心价值在于上方的预警标记。预警信号的生成独立于MACD的传统金叉死叉逻辑。
如何使用:从预警到决策
当预警标记出现时,它意味着“市场动能的惯性在这里可能遇到阻碍,请重点观察”,而不是“立即反向操作”。
正确的应对流程是:
1. 提高关注度:将此区域标记为你图表上的关键观察区。
2. 寻求共振确认:观察该价格区域是否存在其他技术结构与之共振。
3. 等待价格确认:耐心等待市场自身通过K线行为来验证预警的有效性。
4. 制定交易计划:仅在得到价格行为确认后,才制定包含明确入场点和止损位的交易计划。
本系统的核心价值在于帮你提前锁定“潜在的机会区域”,节省大量盲目扫描图表的时间,并将你的注意力聚焦在市场最关键的变化节点上。
使用框架
建议采用大小级别联动的分析流程:
1. 在你主要分析和决策的大级别图表上,关注MinsenAMRS发出的预警信号。这帮你定位到可能需要宏观策略调整的潜在区域。
2. 当预警出现后,切换到更小的操作级别图表。在这个微观尺度上,依据更精细的价格行为和结构来寻找具体的入场时机与风控点位。
3. 将大级别的潜在转折预警与小级别的精确战术信号相结合,构建决策闭环。
一个粗暴的策略
出现预警信号后,等待走完1根K线之后,MACD量柱转变为同色(例如:出现看涨信号后,MACD量柱变绿),联动观察相邻的大小两个常用级别,确认走势同向,再决策入场。
关于信号特性
* 无未来函数:信号在K线收盘时一次性确定,历史信号不会改变
* 多级别适用:核心分析方法适用于不同的时间框架
坦诚的适用性说明
没有工具是万能的。清晰了解其最佳应用场景,本身就是正确使用的一部分:
* 在明确的趋势行情中:它能有效描绘趋势动能的强度演变,帮助你识别主趋势的加速段、调整段以及可能进入末端衰竭的预警区。
* 在震荡或趋势转换初期:此时它的价值最高,能帮助你关注真正的潜在转折点,而非震荡区间内的普通波动。
* 在极端单边行情中:动能可能反复触及极端区域,系统会持续提示“风险积聚”的状态。这时,预警信号需要你结合更大的趋势背景来理解其含义——是趋势中继,还是真正的转折前兆。
最后:在变化前感知力量的消长
市场在群体情绪的潮汐中波动。最危险的莫过于被潮水裹挟,在狂热或恐惧中迷失自我。真正的优势来自于观察——观察潮汐的力道何时达到极致,观察推动趋势的内在动能何时开始悄然变化。
MinsenAMRS 2.0 的目标,就是成为你手中那个可靠的观察仪。它不预测潮水的方向,但致力于提醒你潮汐力量转换的微妙征兆,帮助你在关键时刻,将注意力投向最该关注的地方。
愿你在市场的律动中,保持冷静,从容应对。
免责声明与风险提示
1. 投资风险提示
金融市场交易存在风险,过往表现不代表未来结果。MinsenAMRS 2.0 仅为技术分析工具,不构成任何投资建议或交易信号。
2. 工具性质说明
本指标旨在辅助您进行交易决策,但不能替代您自己的分析和判断。最终的交易决策应由您自己做出,并承担相应责任。
3. 技术局限性
没有任何技术指标能够100%准确预测市场。即使是最完善的分析系统,也无法避免市场突发性事件带来的影响。
4. 学习与适应
建议在使用前先用模拟账户进行充分测试,熟悉系统的信号特征和响应方式,找到适合自己的使用方法。
Combined Crypto Signal📈 Combined Crypto Signal — Trend + Momentum + Volatility Model
Combined Crypto Signal is a multi-factor trading model designed for crypto traders who want clean, high-probability Buy/Sell signals based on three proven pillars:
✅ Trend direction (EMA 200)
✅ Momentum confirmation (MACD + RSI)
✅ Volatility positioning (Bollinger Bands)
This script filters out noise and highlights only the strongest setups where trend, momentum, and volatility align together.
🔍 How It Works
1. Trend Filter — EMA 200
The script uses a long-term exponential moving average to determine market bias.
Price > EMA 200 → Bullish environment
Price < EMA 200 → Bearish environment
Signals only appear in the direction of the prevailing trend.
2. Momentum Confirmation — MACD + RSI
A signal requires momentum to agree with the trend:
Buy Momentum
MACD Line crosses above Signal Line
RSI is below overbought (default 70)
Sell Momentum
MACD Line crosses below Signal Line
RSI is above oversold (default 30)
This filters out weak crossover signals.
3. Volatility Check — Bollinger Bands
Price must be positioned on the favorable side of the middle Bollinger Band:
Buy: Price above BB Middle
Sell: Price below BB Middle
This ensures signals align with volatility expansion.
🎯 Final Buy / Sell Logic
A Buy Signal triggers when:
Trend = Bullish (Price > EMA 200)
Momentum = MACD Bullish Cross + RSI healthy
Volatility = Price above BB Middle
A Sell Signal triggers when:
Trend = Bearish (Price < EMA 200)
Momentum = MACD Bearish Cross + RSI healthy
Volatility = Price below BB Middle
Only when all three systems confirm, a triangle marker appears.
📌 Visuals & Alerts
Green Triangles → Valid Buy Signals
Red Triangles → Valid Sell Signals
EMA 200 plotted for trend visibility
Built-in alert conditions for automated notifications
Perfect for:
✔ Swing Trading
✔ Crypto Trend Trading
✔ Momentum Breakout Strategies
✔ Automated Alert Systems
⚙ Adjustable Inputs
You can customize:
EMA length
RSI length + OB/OS levels
MACD lengths
Bollinger Band settings
🚀 Summary
This tool combines the strength of trend + momentum + volatility into a single, easy-to-use indicator that filters out bad signals and highlights only high-probability trading opportunities.
Dynamic `request` demoPublish a new script-This should help people to make better analysis of the market
QQQ Quant Power STRATEGY v13.3 (Ribbon + TQQQ Specs)1. The Quant Engine (Data Processing)
Weighted Scoring: It assigns specific weights to stocks (e.g., NVDA gets 8.5% weight, TXN gets 1.0%).
Z-Score Pressure: It calculates how "unusual" the current buying/selling pressure is compared to the average (Standard Deviation).
Alignment Bonus: It boosts the "Conviction Score" if Mega Caps (Top 8) and Large Caps (Next 12) are moving in the same direction.
2. The Dashboard (Mission Control)
The dashboard gives you an X-Ray view of the market:
Main Status: Tells you if the market is BULLISH, BEARISH, or CHOP (Sit Out).
Conviction %: A probability score (0-99%). Higher = Safer trade.
Breadth: Counts how many of the top 20 stocks are above their EMA.
Chop Logic: If Breadth is mixed (between 6 and 14 stocks above EMA), it declares "CHOP" and blocks trades.
Mega/Large Net: Shows the net buying/selling pressure for each group.
3. Visuals
Pressure Line: The line on the chart isn't just a Moving Average; it's the Net Pressure of the 20 stocks pushing price up or down.
Conviction Ribbon: The squares at the bottom of the screen.
🟩 Green: High Probability Long (>77%).
🟥 Red: High Probability Short (>77%).
⬜ Gray: Low Conviction / Holding.
4. Strategy Logic (Automated Trading)
Entry: Enters when the "Basket" of stocks is aligned (Bull/Bear Pressure) AND the Conviction Score is high (>77%).
Exit: Closes the trade if Conviction drops (Signal fades) or hits a Hard Stop Loss.
Time Filters: Includes strict trading windows (e.g., No trading during lunch 12-1pm, closes all positions on Friday).
Summary
This is a Market Breadth & Momentum Strategy. It assumes that QQQ cannot sustain a trend unless its underlying components (NVDA, AAPL, etc.) are pushing it. It filters out "fake moves" where QQQ moves but the components don't support it.
MACD Forecast Colorful [DiFlip]MACD Forecast Colorful
The Future of Predictive MACD — is one of the most advanced and customizable MACD indicators ever published on TradingView. Built on the classic MACD foundation, this upgraded version integrates statistical forecasting through linear regression to anticipate future movements — not just react to the past.
With a total of 22 fully configurable long and short entry conditions, visual enhancements, and full automation support, this indicator is designed for serious traders seeking an analytical edge.
⯁ Real-Time MACD Forecasting
For the first time, a public MACD script combines the classic structure of MACD with predictive analytics powered by linear regression. Instead of simply responding to current values, this tool projects the MACD line, signal line, and histogram n bars into the future, allowing you to trade with foresight rather than hindsight.
⯁ Fully Customizable
This indicator is built for flexibility. It includes 22 entry conditions, all of which are fully configurable. Each condition can be turned on/off, chained using AND/OR logic, and adapted to your trading model.
Whether you're building a rules-based quant system, automating alerts, or refining discretionary signals, MACD Forecast Colorful gives you full control over how signals are generated, displayed, and triggered.
⯁ With MACD Forecast Colorful, you can:
• Detect MACD crossovers before they happen.
• Anticipate trend reversals with greater precision.
• React earlier than traditional indicators.
• Gain a powerful edge in both discretionary and automated strategies.
• This isn’t just smarter MACD — it’s predictive momentum intelligence.
⯁ Scientifically Powered by Linear Regression
MACD Forecast Colorful is the first public MACD indicator to apply least-squares predictive modeling to MACD behavior — effectively introducing machine learning logic into a time-tested tool.
It uses statistical regression to analyze historical behavior of the MACD and project future trajectories. The result is a forward-shifted MACD forecast that can detect upcoming crossovers and divergences before they appear on the chart.
⯁ Linear Regression: Technical Foundation
Linear regression is a statistical method that models the relationship between a dependent variable (y) and one or more independent variables (x). The basic formula for simple linear regression is:
y = β₀ + β₁x + ε
Where:
y = predicted variable (e.g., future MACD value)
x = independent variable (e.g., bar index)
β₀ = intercept
β₁ = slope
ε = random error (residual)
The regression model calculates β₀ and β₁ using the least squares method, minimizing the sum of squared prediction errors to produce the best-fit line through historical values. This line is then extended forward, generating a forecast based on recent price momentum.
⯁ Least Squares Estimation
The regression coefficients are computed with the following formulas:
β₁ = Σ((xᵢ - x̄)(yᵢ - ȳ)) / Σ((xᵢ - x̄)²)
β₀ = ȳ - β₁x̄
Where:
Σ denotes summation; x̄ and ȳ are the means of x and y; and i ranges from 1 to n (number of observations). These equations produce the best linear unbiased estimator under the Gauss–Markov assumptions — constant variance (homoscedasticity) and a linear relationship between variables.
⯁ Regression in Machine Learning
Linear regression is a foundational model in supervised learning. Its ability to provide precise, explainable, and fast forecasts makes it critical in AI systems and quantitative analysis.
Applying linear regression to MACD forecasting is the equivalent of injecting artificial intelligence into one of the most widely used momentum tools in trading.
⯁ Visual Interpretation
Picture the MACD values over time like this:
Time →
MACD →
A regression line is fitted to recent MACD values, then projected forward n periods. The result is a predictive trajectory that can cross over the real MACD or signal line — offering an early-warning system for trend shifts and momentum changes.
The indicator plots both current MACD and forecasted MACD, allowing you to visually compare short-term future behavior against historical movement.
⯁ Scientific Concepts Used
Linear Regression: models the relationship between variables using a straight line.
Least Squares Method: minimizes squared prediction errors for best-fit.
Time-Series Forecasting: projects future data based on past patterns.
Supervised Learning: predictive modeling using labeled inputs.
Statistical Smoothing: filters noise to highlight trends.
⯁ Why This Indicator Is Revolutionary
First open-source MACD with real-time predictive modeling.
Scientifically grounded with linear regression logic.
Automatable through TradingView alerts and bots.
Smart signal generation using forecasted crossovers.
Highly customizable with 22 buy/sell conditions.
Enhanced visuals with background (bgcolor) and area fill (fill) support.
This isn’t just an update — it’s the next evolution of MACD forecasting.
⯁ Example of simple linear regression with one independent variable
This example demonstrates how a basic linear regression works when there is only one independent variable influencing the dependent variable. This type of model is used to identify a direct relationship between two variables.
⯁ In linear regression, observations (red) are considered the result of random deviations (green) from an underlying relationship (blue) between a dependent variable (y) and an independent variable (x)
This concept illustrates that sampled data points rarely align perfectly with the true trend line. Instead, each observed point represents the combination of the true underlying relationship and a random error component.
⯁ Visualizing heteroscedasticity in a scatterplot with 100 random fitted values using Matlab
Heteroscedasticity occurs when the variance of the errors is not constant across the range of fitted values. This visualization highlights how the spread of data can change unpredictably, which is an important factor in evaluating the validity of regression models.
⯁ The datasets in Anscombe’s quartet were designed to have nearly the same linear regression line (as well as nearly identical means, standard deviations, and correlations) but look very different when plotted
This classic example shows that summary statistics alone can be misleading. Even with identical numerical metrics, the datasets display completely different patterns, emphasizing the importance of visual inspection when interpreting a model.
⯁ Result of fitting a set of data points with a quadratic function
This example illustrates how a second-degree polynomial model can better fit certain datasets that do not follow a linear trend. The resulting curve reflects the true shape of the data more accurately than a straight line.
⯁ What is the MACD?
The Moving Average Convergence Divergence (MACD) is a technical analysis indicator developed by Gerald Appel. It measures the relationship between two moving averages of a security’s price to identify changes in momentum, direction, and strength of a trend. The MACD is composed of three components: the MACD line, the signal line, and the histogram.
⯁ How to use the MACD?
The MACD is calculated by subtracting the 26-period Exponential Moving Average (EMA) from the 12-period EMA. A 9-period EMA of the MACD line, called the signal line, is then plotted on top of the MACD line. The MACD histogram represents the difference between the MACD line and the signal line.
Here are the primary signals generated by the MACD:
• Bullish Crossover: When the MACD line crosses above the signal line, indicating a potential buy signal.
• Bearish Crossover: When the MACD line crosses below the signal line, indicating a potential sell signal.
• Divergence: When the price of the security diverges from the MACD, suggesting a potential reversal.
• Overbought/Oversold Conditions: Indicated by the MACD line moving far away from the signal line, though this is less common than in oscillators like the RSI.
⯁ How to use MACD forecast?
The MACD Forecast is built on the same foundation as the classic MACD, but with predictive capabilities.
Step 1 — Spot Predicted Crossovers:
Watch for forecasted bullish or bearish crossovers. These signals anticipate when the MACD line will cross the signal line in the future, letting you prepare trades before the move.
Step 2 — Confirm with Histogram Projection:
Use the projected histogram to validate momentum direction. A rising histogram signals strengthening bullish momentum, while a falling projection points to weakening or bearish conditions.
Step 3 — Combine with Multi-Timeframe Analysis:
Use forecasts across multiple timeframes to confirm signal strength (e.g., a 1h forecast aligned with a 4h forecast).
Step 4 — Set Entry Conditions & Automation:
Customize your buy/sell rules with the 20 forecast-based conditions and enable automation for bots or alerts.
Step 5 — Trade Ahead of the Market:
By preparing for future momentum shifts instead of reacting to the past, you’ll always stay one step ahead of lagging traders.
📈 BUY
🍟 Signal Validity: The signal will remain valid for X bars.
🍟 Signal Sequence: Configurable as AND or OR.
🍟 MACD > Signal Smoothing
🍟 MACD < Signal Smoothing
🍟 Histogram > 0
🍟 Histogram < 0
🍟 Histogram Positive
🍟 Histogram Negative
🍟 MACD > 0
🍟 MACD < 0
🍟 Signal > 0
🍟 Signal < 0
🍟 MACD > Histogram
🍟 MACD < Histogram
🍟 Signal > Histogram
🍟 Signal < Histogram
🍟 MACD (Crossover) Signal
🍟 MACD (Crossunder) Signal
🍟 MACD (Crossover) 0
🍟 MACD (Crossunder) 0
🍟 Signal (Crossover) 0
🍟 Signal (Crossunder) 0
🔮 MACD (Crossover) Signal Forecast
🔮 MACD (Crossunder) Signal Forecast
📉 SELL
🍟 Signal Validity: The signal will remain valid for X bars.
🍟 Signal Sequence: Configurable as AND or OR.
🍟 MACD > Signal Smoothing
🍟 MACD < Signal Smoothing
🍟 Histogram > 0
🍟 Histogram < 0
🍟 Histogram Positive
🍟 Histogram Negative
🍟 MACD > 0
🍟 MACD < 0
🍟 Signal > 0
🍟 Signal < 0
🍟 MACD > Histogram
🍟 MACD < Histogram
🍟 Signal > Histogram
🍟 Signal < Histogram
🍟 MACD (Crossover) Signal
🍟 MACD (Crossunder) Signal
🍟 MACD (Crossover) 0
🍟 MACD (Crossunder) 0
🍟 Signal (Crossover) 0
🍟 Signal (Crossunder) 0
🔮 MACD (Crossover) Signal Forecast
🔮 MACD (Crossunder) Signal Forecast
🤖 Automation
All BUY and SELL conditions can be automated using TradingView alerts. Every configurable condition can trigger alerts suitable for fully automated or semi-automated strategies.
⯁ Unique Features
Linear Regression: (Forecast)
Signal Validity: The signal will remain valid for X bars
Signal Sequence: Configurable as AND/OR
Table of Conditions: BUY/SELL
Conditions Label: BUY/SELL
Plot Labels in the graph above: BUY/SELL
Automate & Monitor Signals/Alerts: BUY/SELL
Background Colors: "bgcolor"
Background Colors: "fill"
Linear Regression (Forecast)
Signal Validity: The signal will remain valid for X bars
Signal Sequence: Configurable as AND/OR
Table of Conditions: BUY/SELL
Conditions Label: BUY/SELL
Plot Labels in the graph above: BUY/SELL
Automate & Monitor Signals/Alerts: BUY/SELL
Background Colors: "bgcolor"
Background Colors: "fill"
Multi-Factor Trend Confluence Indicator (PTP V4)Disclaimer: This is a technical analysis tool for educational and informational purposes only. It does not constitute investment advice, financial solicitation, or a recommendation to buy or sell any security or instrument. Trading involves significant risk, and past performance is not indicative of future results. Use at your own risk.
KEY Features and Strategic Methodology
This is a comprehensive trend and confluence indicator built on multiple factors to identify potential pullbacks within an established trend.
• Core Trend Filter: Uses a long-term EMA to confirm the overall market bias.
• Fibonacci Pullback Logic: Identifies potential low-risk entry zones by calculating a 61.8% Fibonacci Retracement over a user-defined lookback period.
• Multi-Factor Confluence: A signal is generated only when the price touches the Fib zone AND the following factors align (You can edit the script to adjust the confluence conditions.):
o RSI is above 50.
o Positive DI is above Negative DI (DMI Bullish Crossover).
o Price is above the fast EMA.
• Consecutive Signal Counter: Includes a unique counter that highlights bars where the confluence conditions have been met for a minimum number of consecutive candles (4 by default), aiding in the validation of strong momentum entries.
• Moving Average Visualization: Plots and color-fills 10 WMA, 21 EMA, 42 EMA, and 200 EMA to provide a full market context and visualize momentum shifts.
1. Short-Term Momentum (WMA10 vs. EMA42 Fill)
This fill area highlights immediate price acceleration and momentum shifts:
• Green Fill (Bullish Momentum): WMA10 > EMA42.
• Red Fill (Bearish Momentum): WMA10 < EMA42.
2. Long-Term Market Context (EMA200 vs. EMA42 Fill)
This fill area defines the dominant backdrop of the market, essential for strategic positioning:
• Green Fill (Bullish Context): EMA200 < EMA42.
• Red Fill (Bearish Context): EMA200 > EMA42.
EMA200 Line Coloration
The EMA200 line color itself also provides a visual cue for the long-term context:
• Red Line: When EMA200 > EMA42 (Bearish Context).
• Green Line: When EMA200 < EMA42 (Bullish Context).
Customization
The indicator is highly customizable via the settings menu, allowing users to adjust lengths for EMA, RSI, DMI, Pivot Points, and the specific parameters for the Fibonacci Retracement Strategy (tolerance and candle limits).
Sylwia 9.1 Ultimate – Full MTF + TDI (mobile-flat)Pour tester le script de nombreux réglages dans les options
Donchian ForecastDonchian Forecast – multi-timeframe Donchian/ATR bias with ADX regime blending
Donchian Forecast is a multi-timeframe bias tool that turns classic Donchian channels into a normalized trend/mean-reversion “forecast” and a single bias value in .
It projects a short polyline path from the current price and shows how that path adapts when the market shifts from ranging to trending (via ADX).
---
Concept
1. Donchian position → direction
For each timeframe, the script measures where price sits inside its Donchian channel:
-1 = near channel low
0 = middle
+1 = near channel high
This Donchian position is multiplied by ATR to create a **price delta** (how far the forecast moves from current price).
2. Local behavior: trend vs mean-reversion around Donchian
The indicator treats the edges vs middle of the Donchian channel differently:
* By default, edges behave more “trend-like”, middle more “mean-reverting”.
* If you enable the reversed option, this logic flips (edges = mean-reverting, middle = trend-
like).
* This “local” behavior is controlled smoothly by the absolute Donchian position |pos| (not by hard zone switches).
3. Global ADX modulation (regime aware)
ADX is mapped from your chosen low → high thresholds into a signed factor in :
* ADX ≤ low → -1 (fully reversed behavior, more range/mean-reversion oriented)
* ADX ≥ high → +1 (fully normal behavior, more trend oriented)
* Values in between create a **smooth transition**.
* This global factor can:
* Keep the local behavior as is (trending regime),
* Flip it (range regime), or
* Neutralize it (indecisive regime).
4. Multi-timeframe aggregation (1x–12x chart timeframe)
* The script repeats the same logic across 12 horizons:
* 1x = chart timeframe
* 2x..12x = multiples of the chart timeframe (e.g., 5m → 10m, 15m, …; 1h → 2h, 3h, …).
* For each horizon it builds:
* Donchian position
* ATR-scaled delta (in price units)
* Locally + globally blended delta (after Donchian + ADX logic).
* These blended deltas are ATR-weighted and summed into a single bias in , which is then shown as Bias % in the on-chart table.
---
### What you see on the chart
* Forecast polyline
* Starting at the current close, the indicator draws a short chain of **up to 12 segments**:
* Segment 1: from current price → 1x projection
* Segment 2: 1x → 2x projection
* … up to 12x.
* Each segment is:
* Green when its blended delta is ≥ 0 (upward bias)
* Red when its blended delta is < 0 (downward bias)
* This is not future price, but a synthetic path showing how the Donchian/ATR/ADX model “expects” price to drift across multiple horizons.
* Bias table (top-center)
* `Bias: X.Y%`
* > 0% (green) → net upward bias across horizons
* < 0% (red) → net downward bias
* Magnitude (e.g., ±70–100%) ≈ strength of the directional skew.
* `ADX:` current ADX value (from your DMI settings).
* `ADXBlend:` the signed ADX factor in :
* +1 ≈ fully “trend-interpretation” of Donchian behavior
* 0 ≈ neutral / mixed regime
* -1 ≈ fully “reversed/mean-reversion interpretation”
---
Inputs & settings
Core Donchian / ATR
* Donchian Length – lookback for Donchian high/low on each horizon.
* Price Source – input series used for position inside the Donchian channel (default: close).
* ATR Length – ATR lookback for all horizons.
* ATR Multiplier – scales the size of each forecast step in price units (higher = longer segments / more aggressive forecast).
*Local behavior at high ADX
* Reversed local blend at high ADX?
* Off (default) – edges behave more trend-like, middle more mean-reverting.
* On – flips that logic (edges more mean-reverting, middle more trend-like).
* The actual effect is always modulated by the global ADX factor, so you can experiment with how the regime logic feels in different markets.
Global ADX blending
* DMI DI Length – period for the DI+ and DI- components.
* ADX Smoothing – smoothing length for ADX.
* ADX low (mean-rev zone) – below this level, the global factor pushes behavior toward reversal/range logic .
* ADX high (trend zone) – above this level, the global factor pushes behavior toward **trend logic**.
* Values between low and high create a smooth blend rather than a hard on/off switch.
---
How to use it (examples)
* Directional bias dashboard
* Use the Bias % as a compact summary of multi-horizon Donchian/ATR/ADX conditions:
* Consider only trades aligned with the sign of Bias (e.g., longs only when Bias > 0).
* Use the magnitude to filter for **strong vs weak** directional contexts.
* Regime-aware context
* Watch ADX and ADXBlend:
* High ADX & ADXBlend ≈ +1 → favor trend-continuation ideas.
* Low ADX & ADXBlend ≈ -1 → favor range/mean-reversion ideas.
* Around 0 → mixed/transition regimes; forecasts will be more muted.
* Visual sanity check for systems
* Overlay Donchian Forecast on your usual entries/exits to see:
* When your system trades **with** the multi-TF Donchian bias.
* When it trades **against** it (possible fade setups or no-trade zones).
This script does not generate entry or exit signals by itself. It is a contextual/forecast tool meant to sit on top of your own trading logic.
---
Notes
* Works on most symbols and timeframes; higher-timeframe multiples are built from the chart timeframe.
* The forecast line is a model-based projection, not a prediction or guarantee of future price.
* Always combine this with your own risk management, testing, and judgement. This is for educational and analytical purposes only and is not financial advice.
Smart Money Concepts Pro Smart Money Concepts Pro
A professional-grade framework for visualizing institutional price behavior through key Smart Money Concepts. It automatically maps structure shifts, imbalances, and liquidity events so traders can study how price develops around supply and demand.
Core Components
Market Structure (BOS / CHoCH) — Detects continuation and reversal breaks using pivot-based logic with a close-beyond threshold and configurable cooldown.
Order Blocks — Highlights institutional footprints validated by volume and distance filters; zones extend until mitigation.
Fair Value Gaps — Marks three-bar inefficiencies that meet a minimum gap size and optionally auto-remove once filled by a user-defined percentage.
Liquidity Sweeps — Identifies stop-hunt wicks exceeding a configurable extension beyond recent highs or lows.
Premium / Discount Zones — Defines equilibrium and price positioning within recent swing ranges.
Confluence Entries (optional) — Generates neutral BUY / SELL markers only when structure, zone, and directional context align.
Dashboard — Summarizes current structure bias, recent events, zone counts, and directional alignment in real time.
Why it’s distinct
All detections are governed by explicit thresholds—volume multipliers, minimum distances, and fill-percent logic—so each signal results from quantifiable structure rather than heuristic pattern matching. Automatic cleanup ensures charts remain clear as zones are mitigated or gaps filled.
Best use
Applicable across Forex, indices, crypto, and equities. Designed for study on 15 m – 1 D timeframes.
For optimal alignment, pin plots to the Right Scale after adding the script.
Disclaimer: This script is provided for educational and analytical purposes only. It does not constitute financial or investment advice.
FPT - DCA ModelFPT - DCA Model is a simple but powerful tool to backtest a weekly “buy the dip” DCA plan with dynamic position sizing and partial profit-taking.
🔹 Core Idea
- Invest a fixed amount every week (on Friday closes)
- Buy more aggressively when price trades at a discount from its 52-week high
- Take partial profits when price stretches too far above the daily EMA50
- Track the performance of your DCA plan vs a simple buy-and-hold from the same start date
⚙ How it works
1. Weekly DCA (on Daily timeframe)
- On each Friday after the Start Date:
- Add the “Weekly contribution” to the cash pool.
- If the close is below the “Discount from 52W high” level:
→ FULL DCA: use the full weekly contribution + an extra booster from your stash (up to “Max extra stash used on dip”).
→ Marked on the chart with a small green triangle under the bar.
- Otherwise:
→ HALF DCA: invest only 50% of the weekly contribution and keep the other 50% as stash (uninvested cash).
→ Marked with a small blue triangle under the bar.
2. 52-Week High Discount Logic
- The script computes the 52-week high as the highest daily high of the last 252 trading days.
- The “discount level” is: 52W high × (1 – Discount%).
- When price is at or below this level, dips are treated as buying opportunities and the model allocates more.
3. Selling Logic (Partial Take Profit)
- When the close is above the daily EMA50 by the selected percentage:
→ Sell the given “Sell portion of qty (%)” of your current holdings.
→ Marked with a small red triangle above the bar.
- This behaves like a gradual profit-taking system: if price stays extended above EMA50, multiple partial sells can occur over time.
📊 Panel (top-right)
The panel summarizes the state of your DCA plan:
- Weeks: number of DCA weeks since Start Date
- Total deposit: total money contributed (sum of all weekly contributions)
- Shares qty: total number of shares accumulated
- Avg price: volume-weighted average entry price
- Shares value: current market value of all shares (qty × close)
- Cash: uninvested cash (including saved stash)
- Total equity: Shares value + Cash
- DCA % PnL: performance of the DCA plan vs total deposits
- Stock % since start: performance of the underlying asset since the Start Date
✅ Recommended Use
- Timeframe: Daily (the DCA engine is designed to run on daily bars and Friday closes).
- Works best on stocks, ETFs or indices where a 52-week high is a meaningful reference.
- You can tune:
- Weekly contribution
- Discount from 52W high
- Booster amount
- EMA50 extension threshold and sell portion
⚠ Notes & Disclaimer
- This script is a backtesting and educational tool. It does not place real orders.
- Past performance does not guarantee future results.
- Always combine DCA and risk management with your own research and judgment.
Built by FPT (Funded Pips Trading) for long-term, rules-based DCA planning.
Fibonacci Projection with Volume & Delta Profile (Zeiierman)█ Overview
Fibonacci Projection with Volume & Delta Profile (Zeiierman) blends classic Fibonacci swing analysis with modern volume-flow reading to create a unified, projection-based market framework. The indicator automatically detects the latest swing high and swing low, builds a complete Fibonacci structure, and then projects future extension targets with clear visual pathways.
What makes this tool unique is the integration of two volume-based systems directly into the Fibonacci structure. A Fib-aligned Volume Profile shows how bullish and bearish volume accumulated inside the swing range, while a separate Delta Profile reveals the imbalance of buy–sell pressure inside each Fibonacci interval. Together, these elements transform the standard Fibonacci tool into a multi-dimensional structural and volume-flow map.
█ How It Works
The indicator first detects the most recent swing high and swing low using the Period setting. That swing defines the Fibonacci range, from which the script draws retracement levels (0.236–0.786) and builds a forward projection path using the chosen Projection Level and a 1.272 extension.
Along this path, it draws projection lines, target boxes, and percentage labels that show how far each projected leg extends relative to the previous one.
Inside the same swing range, the script builds a Fib-based Volume Profile by splitting price into rows and assigning each bar’s volume as bullish (close > open) or bearish (close ≤ open). On top of that, it calculates a Volume Delta Profile between each pair of fib levels, showing whether buyers or sellers dominated that band and how strong that imbalance was.
█ How to Use
This tool helps traders quickly understand market structure and where the price may be heading next. The projection engine shows the most likely future targets, highlights strong or weak legs in the move, and updates automatically whenever a new swing forms. This ensures you always see the most relevant and up-to-date projection path.
The Fib Volume Profile shows where volume supported the move and where it did not. Thick bullish buckets reveal zones where buyers stepped in aggressively, often becoming retestable support. Thick bearish buckets highlight zones of resistance or rejection, particularly useful if projected levels align with prior liquidity.
The Delta Profile adds a second dimension to volume reading by showing where buy–sell pressure was truly imbalanced. A projected Fibonacci target that aligns with a strong bullish delta, for example, may suggest continuation. A projection into a band dominated by bearish delta may warn of reversal or hesitation.
█ Settings
Period – bars used to determine swing high/low
Projection Level – chosen Fib ratio for projection path
-----------------
Disclaimer
The content provided in my scripts, indicators, ideas, algorithms, and systems is for educational and informational purposes only. It does not constitute financial advice, investment recommendations, or a solicitation to buy or sell any financial instruments. I will not accept liability for any loss or damage, including without limitation any loss of profit, which may arise directly or indirectly from the use of or reliance on such information.
All investments involve risk, and the past performance of a security, industry, sector, market, financial product, trading strategy, backtest, or individual's trading does not guarantee future results or returns. Investors are fully responsible for any investment decisions they make. Such decisions should be based solely on an evaluation of their financial circumstances, investment objectives, risk tolerance, and liquidity needs.
Bappa - Dynamic VWAP Simple Vwap, just dynamic colour Coding added to sense whether VWAP is in uptrend or downtrend. Refer to colour code to enter Call side or Put side, it never disappoints you at any timeframe. Enjoy & happy Trading!!
Better results if used in conjuction with Pivots/ fractals indicator, named as Bappa EMA + BBW (V2) indicator.
SFP + Binance Hedge Direct (Full)RSI SFP + Binance Direct Auto-Trading (Hedge Mode)
RSI SFP + 币安直连自动交易脚本 (双向持仓模式)
🇨🇳 中文说明 (Chinese)
简介 / Introduction 这是一个专为 Binance Futures Signal Bot(币安合约信号机器人) 深度定制的 RSI SFP(假突破)策略脚本。它移除了对第三方中间商(如 WunderTrading)的依赖,实现了 TradingView 到币安的毫秒级直连下单,极大降低了滑点。
核心功能 / Key Features
SFP 针尖策略: 基于 RSI 背离 + 前高/前低假突破(Swing Failure Pattern)捕捉反转机会。支持 "触碰即入场" 或 "收线确认" 模式。
币安直连 (Binance Direct): 内置符合币安 Hedge Mode (双向持仓) 标准的 JSON 生成器。支持自动挂入 TP/SL (止盈止损) 单。
智能资金管理: 无需手动计算总金额。只需输入 本金 (Margin) 和 杠杆 (Leverage),脚本自动计算总名义价值 (Notional Value) 并发送给交易所。
多重过滤系统: 集成 布林带 (Bollinger Bands) 和 成交量 (Volume) 过滤器,有效过滤震荡中的假信号。
双重报警支持:
机器人端: 发送标准 JSON 指令,包含开单、金额、止盈止损价。
手机端: 通过隐藏绘图输出,支持发送清晰易读的文本消息(如 "BTC Long, Entry: 95000, TP: 96000")。
设置指南 / Setup Guide
参数设置:
在 🤖 Bot Connection 中填入币安提供的 signalId 和 uid。
在 Position & Money 中设置您的单笔本金和杠杆(如 1000 U, 100x)。
币安设置:
在币安创建信号机器人时,务必选择 Order Size 单位为 USDT。
报警设置 (双报警模式):
自动交易: 创建报警 -> 选择 Any alert() function call -> 填入 Webhook URL -> 消息框留空。
手机提醒: 创建报警 -> 选择 Bullish/Bearish Reversal -> 填入 {{plot("Alert_Entry")}} 等占位符 -> 发送到 App。
🇺🇸 English Description
Introduction This is a specialized RSI SFP (Swing Failure Pattern) strategy script tailored for the Binance Futures Signal Bot. It eliminates the need for third-party middleware (like WunderTrading), enabling direct, low-latency execution from TradingView to Binance with minimal slippage.
Key Features
SFP Strategy: Captures reversals based on RSI Divergence + Structure False Breakouts (Wick-based). Supports "Touch Only" or "Close Return" entry modes.
Binance Direct Integration: Built-in JSON generator strictly compliant with Binance Hedge Mode. Automatically attaches TP/SL (Take Profit & Stop Loss) orders directly to the entry signal.
Smart Money Management: No need to calculate position sizes manually. Simply input your Margin (USDT) and Leverage. The script auto-calculates the Total Notional Value to send to the exchange.
Advanced Filtering: Integrated Bollinger Bands and Volume filters to reduce false signals during choppy markets.
Dual Alert System:
For Bot: Sends raw JSON commands with execution details.
For Phone: Uses hidden plots to allow clean, human-readable text alerts (e.g., "BTC Long, Entry: $...", "TP: $...").
Setup Guide
Script Settings:
Paste your Binance signalId and uid in the 🤖 Bot Connection section.
Set your Margin and Leverage in Position & Money (e.g., 1000 USDT, 100x).
Binance Settings:
When creating the Signal Bot on Binance, ensure Order Size unit is set to USDT.
Alert Setup (Double-Alert Method):
For Auto-Trading: Create Alert -> Select Any alert() function call -> Check Webhook -> Leave Message empty.
For Phone Notification: Create Alert -> Select Bullish/Bearish Reversal -> Use placeholders like {{plot("Alert_Entry")}} -> Notify on App.
⚠️ Risk Warning
This script automates high-leverage trading. Ensure your Binance Futures account is set to Hedge Mode before running. Use at your own risk.
SPY Downside Risk - Bond Flow Indicator (Daily)## **SPY Downside Risk - Bond Flow Indicator**
### 📊 **Overview**
A professional bond market risk monitoring indicator that assesses SPY (S&P 500 ETF) downside risk by tracking Treasury yield spreads and credit spreads. The indicator provides two complementary display modes for comprehensive market analysis.
---
### 🎯 **Key Features**
#### **Mode 1: Spreads Analysis**
Monitor critical fixed-income risk indicators:
- **10Y-2Y Treasury Spread**
- 🔵 Blue Line (> 20bp): Normal economic expansion
- 🟠 Orange Line (0-20bp): Flight-to-safety sentiment emerging
- 🔴 Red Line (< 0bp): **Yield curve inversion - Recession warning**
- **HY-IG Credit Spread** (High Yield - Investment Grade)
- 🟣 Purple Line: Credit spread widening - Rising default risk
- 🟢 Green Line: Credit spread tightening - Risk appetite improving
#### **Mode 2: Bond ETFs Capital Flow**
Track capital movements across four major bond ETFs:
- **SHY** (🔴 Red): 1-3 Year Treasury - Short-term safety
- **TLT** (🟠 Orange): 20+ Year Treasury - Long-term safety
- **LQD** (🟡 Yellow): Investment Grade Bonds - Quality credit
- **HYG** (🔵 Blue): High Yield Bonds - Risk appetite
---
### 🔧 **Input Parameters**
| Parameter | Default | Description |
|-----------|---------|-------------|
| **Display Mode** | Spreads | Choose between "Spreads" or "Bond ETFs" view |
| **ROC Period** | 10 | Rate of change period (for Bond ETFs mode smoothing) |
| **10Y-2Y Threshold** | 20 bp | Spread narrowing threshold indicating safe-haven flows |
| **VIX Filter Level** | 18 | Volatility threshold for heightened market stress |
---
### 📈 **How to Use**
#### **Yield Curve Inversion Signal**
When 10Y-2Y spread inverts (< 0bp):
- Historically precedes recession within 6-24 months
- Equity markets may face correction in 3-12 months
- Consider defensive positioning (bonds, gold, utilities)
#### **Credit Spread Expansion**
When HY-IG spread rapidly widens:
- Corporate default risk increasing
- Capital flowing from risky assets to safety
- Potential equity market pullback ahead
#### **Capital Flow Analysis**
- **SHY ⬆️ + HYG ⬇️** = Risk-off mode, equity pressure mounting
- **HYG ⬆️ + SHY ⬇️** = Risk-on sentiment, bullish for equities
- **TLT surge** = Long rates falling, economic slowdown expected
- **LQD + HYG divergence** = Credit quality differentiation
---
### 📊 **Real-Time Debug Table**
Upper-right corner displays key metrics:
**Spreads Mode:**
- **10Y-2Y Spread**: Current yield curve spread (basis points)
- **Credit Spread**: HY-IG spread (basis points)
- **VIX**: Market volatility index
**Bond ETFs Mode:**
- **SHY Flow**: Short-term Treasury momentum (%)
- **HYG Flow**: High-yield bond momentum (%)
- **VIX**: Market volatility index
**Color Coding:**
- 🔴 Red = High risk / Inverted
- 🟠 Orange = Caution / Elevated
- 🔵 Blue/Gray = Normal conditions
---
### ⚠️ **Trading Signals**
#### **High Risk Scenarios**
1. **Yield curve inverted** (Red line < 0) + **VIX > 18** (Orange)
- Action: Reduce equity exposure, increase cash/bonds
2. **Credit spread widening** + **HYG Flow negative**
- Action: Avoid high-yield debt, favor quality bonds
3. **SHY Flow positive** + **SPY declining**
- Action: Flight-to-safety confirmed, defensive positioning
#### **Bullish Scenarios**
1. **Steep yield curve** (Blue line > 50bp) + **HYG Flow > 3%**
- Action: Risk-on environment, equity allocation appropriate
2. **Credit spread tightening** + **Low VIX** (< 15)
- Action: Favorable credit conditions, growth exposure
---
### 🔔 **Alert System**
**Built-in Alert:**
- **Treasury Spread Inversion Alert**: Triggers when 10Y-2Y spread crosses below 0
**How to Set Up:**
1. Click "Create Alert" in TradingView
2. Select condition: "Treasury Spread Inversion Alert"
3. Configure notification preferences
---
### 📚 **Data Sources**
**Treasury Yields** - Federal Reserve Economic Data (FRED):
- `DGS2`: 2-Year Treasury Constant Maturity Rate
- `DGS10`: 10-Year Treasury Constant Maturity Rate
**Credit Spreads** - FRED:
- `BAMLC0A1CAAAEY`: ICE BofA US Corporate Index Option-Adjusted Spread
- `BAMLH0A0HYM2`: ICE BofA US High Yield Index Option-Adjusted Spread
**ETF Data** - AMEX/NASDAQ:
- iShares 1-3 Year Treasury Bond ETF (SHY)
- iShares 20+ Year Treasury Bond ETF (TLT)
- iShares iBoxx $ Investment Grade Corporate Bond ETF (LQD)
- iShares iBoxx $ High Yield Corporate Bond ETF (HYG)
**Volatility** - CBOE:
- VIX Index (Volatility Index)
**Update Frequency**: Daily (FRED data typically 1-2 day lag)
---
### 💡 **Best Practices**
1. **Timeframe**: Use on **Daily charts** for optimal signal quality
2. **Confirmation**: Combine with SPY price action, volume, and momentum indicators
3. **Risk Management**: Signals are early warnings - adjust positions gradually
4. **Mode Switching**: Toggle between modes weekly to understand both spread dynamics and flow patterns
5. **Historical Context**: Review past inversion periods (2000, 2007, 2019) for signal validation
---
### 📖 **Interpretation Guide**
#### **Recession Probability Matrix**
| 10Y-2Y Spread | Credit Spread | VIX | Risk Level |
|---------------|---------------|-----|------------|
| < -20bp | Widening | > 25 | 🔴 Very High |
| -20bp to 0 | Widening | > 18 | 🟠 High |
| 0-20bp | Stable | 15-18 | 🟡 Moderate |
| > 20bp | Tightening | < 15 | 🟢 Low |
#### **Lead Times (Historical Average)**
- Yield curve inversion → Recession: **12-18 months**
- Credit spread surge → Equity peak: **3-6 months**
- Safe-haven flows → Volatility spike: **1-4 weeks**
---
### 🎓 **Educational Notes**
**Why Monitor Treasury Spreads?**
- Long-term rates reflect growth expectations
- Short-term rates reflect Fed policy
- Inversion = Market expects Fed to cut rates (recession ahead)
**Why Track Credit Spreads?**
- Measures corporate borrowing stress
- Leading indicator of credit cycle turns
- High correlation with equity risk premiums
**Why Bond ETF Flows Matter?**
- Real-time capital allocation signals
- Faster than spread movements
- Shows risk sentiment shifts
---
### ⚙️ **Technical Specifications**
- **Version**: PineScript v5
- **Type**: Indicator (Non-overlay)
- **Calculation**: Daily timeframe only
- **Lookback Period**: 10 bars (customizable for ETF mode)
---
### 🚨 **Risk Disclaimer**
**IMPORTANT NOTICES:**
1. **Historical Performance**: Past yield curve inversions don't guarantee future recession timing
2. **False Signals**: Brief inversions (<30 days) may not indicate recession
3. **Data Lag**: FRED economic data has 1-2 business day delay
4. **Complementary Tool**: Use alongside fundamental and technical analysis
5. **Not Financial Advice**: For educational and research purposes only
**This indicator does not:**
- Provide specific buy/sell signals
- Guarantee trading profits
- Replace professional financial advice
- Account for individual risk tolerance
---
### 📞 **Support & Updates**
- **Questions**: Contact via TradingView private message
- **Bug Reports**: Describe issue with screenshot and chart settings
- **Feature Requests**: Suggestions welcome for future versions
---
### 📋 **Version History**
**v1.0** (December 2025)
- Initial release
- Dual-mode display (Spreads + Bond ETFs)
- Real-time debug table
- Yield curve inversion alert
- VIX filter integration
---
### 📄 **License**
**Protected Script** - Source code is not publicly available. Authorized users only.
---
**DISCLAIMER**: This indicator is provided "as-is" for educational purposes. Trading and investing involve substantial risk of loss. Always conduct your own research and consult with a licensed financial advisor before making investment decisions.
---
**© 2025 | SPY Downside Risk Indicator | All Rights Reserved**






















