MACD StrategyOverview
The "MACD Strategy" is a straightforward trading strategy tested for BTCUSDT Futures on the 1-minute timeframe, leveraging the Moving Average Convergence Divergence (MACD) indicator to identify momentum-based buy and sell opportunities. Developed with input from expert trading analyst insights, this strategy combines technical precision with risk management, making it suitable for traders of all levels on platforms like TradingView. It focuses on capturing trend reversals and momentum shifts, with clear visual cues and automated alerts for seamless integration with trading bots (e.g., Bitget webhooks).
#### How It Works
This strategy uses the MACD indicator to generate trading signals based on momentum and trend direction:
- **Buy Signal**: Triggered when the MACD line crosses above the signal line, and the MACD histogram turns positive (above zero). This suggests increasing bullish momentum.
- **Sell Signal**: Triggered when the MACD line crosses below the signal line, and the MACD histogram turns negative (below zero), indicating growing bearish momentum.
Once a signal is detected, the strategy opens a position (long for buy, short for sell) with a position size calculated based on your risk tolerance. It includes a stop-loss to limit losses and a take-profit to lock in gains, both dynamically adjusted using the Average True Range (ATR) for adaptability to market volatility.
#### Key Features
- **MACD-Based Signals**: Relies solely on MACD for entry points, plotted in a separate pane for clear momentum analysis.
- **Risk Management**: Automatically calculates position size based on a percentage of your account balance and sets stop-loss and take-profit levels using ATR multipliers and a risk:reward ratio.
- **Visual Feedback**: Plots entry, stop-loss, and take-profit lines on the chart with labeled markers for easy tracking.
- **Alerts**: Includes Bitget webhook-compatible alerts for automated trading, notifying you of buy and sell signals in real-time.
#### Input Parameters
- **Account Balance**: Default 10000 – Set your initial trading capital to determine position sizing.
- **MACD Fast Length**: Default 12 – The short-term EMA period for MACD sensitivity.
- **MACD Slow Length**: Default 26 – The long-term EMA period for MACD calculation.
- **MACD Signal Length**: Default 9 – The smoothing period for the signal line.
- **Risk Per Trade (%)**: Default 3.0 – The percentage of your account balance risked per trade (e.g., 3% of 10000 = 300).
- **Risk:Reward Ratio**: Default 3.0 – The ratio of potential profit to risk (e.g., 3:1 means risking 1 to gain 3).
- **SL Multiplier**: Default 1.0 – Multiplies ATR to set the stop-loss distance (e.g., 1.0 x ATR).
- **TP Multiplier**: Default 3.0 – Multiplies ATR to set the take-profit distance, adjusted by the risk:reward ratio.
- **Line Length (bars)**: Default 25 – Duration in bars for displaying trade lines on the chart.
- **Label Position**: Default 'left' – Position of text labels (left or right) relative to trade lines.
- **ATR Period**: Default 14 – The number of periods for calculating ATR to measure volatility.
#### How to Use
1. **Add to Chart**: Load the "MACD Strategy" as a strategy and the "MACD Indicator" as a separate indicator on your TradingView chart (recommended for BTCUSDT Futures on the 1-minute timeframe).
2. **Customize Settings**: Adjust the input parameters based on your risk tolerance and market conditions. For BTCUSDT Futures, consider reducing `Risk Per Trade (%)` during high volatility (e.g., 1%) or increasing `SL Multiplier` for wider stops.
3. **Visual Analysis**: Watch the main chart for trade entry lines (green for buy, red for sell), stop-loss (red), and take-profit (green) lines with labels. Use the MACD pane below to confirm momentum shifts.
4. **Set Alerts**: Create alerts in TradingView for "Buy Signal" and "Sell Signal" to automate trades via Bitget webhooks.
5. **Backtest and Optimize**: Test the strategy on historical BTCUSDT Futures 1-minute data to fine-tune parameters. The short timeframe requires quick execution, so monitor closely for slippage or latency.
#### Tips for Success
- **Market Conditions**: This strategy performs best in trending markets on the 1-minute timeframe. Avoid choppy conditions where MACD crossovers may produce false signals.
- **Risk Management**: Start with the default 3% risk per trade and adjust downward (e.g., 1%) during volatile periods like BTCUSDT news events. The 3:1 risk:reward ratio targets consistent profitability.
- **Timeframe**: Optimized for 1-minute charts; switch to 5-minute or 15-minute for less noise if needed.
- **Confirmation**: Cross-check MACD signals with price action or support/resistance levels for higher accuracy on BTCUSDT Futures.
#### Limitations
- This strategy relies solely on MACD, so it may lag in fast-moving or sideways markets. Consider adding a secondary filter (e.g., RSI) if needed.
- Stop-loss and take-profit are ATR-based and may need adjustment for BTCUSDT Futures’ high volatility, especially during leverage trading.
#### Conclusion
The "MACD Strategy" offers a simple yet effective way to trade momentum shifts using the MACD indicator, tested for BTCUSDT Futures on the 1-minute timeframe, with robust risk management and visual tools. Whether you’re scalping crypto futures or exploring short-term trends, this strategy provides a solid foundation for automated or manual trading. Share your feedback or customizations in the comments, and happy trading!
Oscillatori centrati
VWMA MACD Amanita Buy/Sell Signals VWMA MACD Amanita Buy/Sell Signals – Volume-Weighted Momentum Indicator
A twist on the classic MACD: this indicator uses Volume Weighted Moving Averages (VWMA) instead of EMAs, giving more weight to price moves backed by higher volume.
Features:
VWMA-based MACD line & signal line
Histogram highlights bullish/bearish momentum
Color-coded for easy visualization
Quick Guide:
MACD above Signal → bullish
MACD below Signal → bearish
Rising histogram → strengthening trend
Falling histogram → weakening trend
Perfect for traders who want momentum confirmed by volume.
VWMA MACD AmanitaVWMA MACD (Volume-Weighted MACD)
This indicator modifies the standard MACD by replacing EMAs with VWMAs
(Volume-Weighted Moving Averages).
- Fast VWMA (default 12 bars)
- Slow VWMA (default 26 bars)
- MACD Line = Fast VWMA - Slow VWMA
- Signal Line = EMA of MACD (default 9 bars)
- Histogram = MACD - Signal
Compared to the standard MACD, this version emphasizes price moves that
are backed by higher trading volume, helping to filter out weak signals.
The script also lets you choose the price source (Close, HL2, HLC3, OHLC4).
Inverse Fisher Transform COMBO XThis is a vastly improved version of the indicator "Inverse Fisher Transform COMBO STO+RSI+CCIv2" by KIVANÇ fr3762 and updated previously by lordofcodes.
This script includes all the original oscillators included in the original script including CCI, CCIv2, MFI, RSI, Stochastic, and SMI oscillators. In Inverse Fisher Transform, one looks for the indicator lines of your choosing to be either above or below the centerline as with all oscillators. In addition it has many new features that greatly enhance the variety of uses for this very helpful indicator.
-Updated the script to indicator in pinescript v6.
-An Inverse Fisher Transform of the Heikin Ashi Calculation has been included in the script, with
both a raw Heikin Ashi signal output as well as a smoothed Heikin Ashi calculation are included.
-In addition, bar coloring according to the raw Heikin Ashi calculation is included in order to
allow for a standard bar chart to also give the visual indication of the Heikin Ashi chart type
This allows the trader to maintain the accuracy of price information on the chart that standard candles provide while still being able to reference the smoothed trend calculation of Heikin Ashi candles.
-Updated the script to add smoothing method and length inputs for each indicator.
-Smoothing methods available include the original wma smoothing, as well as sma, ema, dema,
tema, rma, hma, vwma, and t3 moving average calculations.
-Now you can also select the method for calculating the Inverse Fisher Transform using either
the default method of whether the oscillator is above or below the centerline, or to be based
on the oscillator's position in relation to a signal line instead, which can potentially give more
timely and accurate signals.
-The signal line's length and moving average calculation method are also adjustable according to
the same variety as the oscillators themselves. For simplicity the same signal line calculation
will be applied to all oscillators except for the Heikin Ashi since Heikin Ashi is not an oscillator.
In general, a low smoothing input works best for a slower moving average types such as rma and t3 which are my personal preference, while a larger number works better for the faster moving average calculations such as wma, hma, ema, dema, or tema. Though in practice, the combination of different smoothing methods and lengths across the variety of included indicators are greatly variable and can offer a complete trading strategy including long and short term trend analysis as well as volume analysis and Heikin Ashi candle analysis with just this one indicator.
As always, one indicator never guarantees results, which is a problem this script seeks to address, but it still benefits one to look for confirmation from other indicators and methods.
I hope you are able to find this indicator an effect addition to your trading strategy.
Aroon ADX/DIUnified trend-strength (ADX/DI) + trend-age (Aroon) with centered scaling, gated signals, regime tints, and a compact readout.
What is different about this script:
- Purpose-built mashup of ADX/DI tells trend strength and side, while Aroon Oscillator tracks trend emergence/aging. Combining them into a scaled chart creates a way to separate “strong-but-late” trends from “newly-emerging” ones.
- Unified scale: Centering the maps into a common +/- 100 range so all lines are directly comparable at a glance (no units mismatch or fumbling with scales).
- Signal quality gating: DI cross signals can be gated by minimum ADX so crosses in chop are filtered out.
- Regime context: Background tints show low-strength chop, developing, and strong regimes using your ADX thresholds.
- Operator-focused UI: Clean fills, color-blind palette, and a two-column table summarizing DI+, DI−, ADX, Aroon, and a plain-English Bias/Trend status.
How it works:
- DI+/DI−/ADX: Wilder’s DI is smoothed; DX → ADX via SMA smoothing.
- Aroon Oscillator: highlights new highs/lows frequency to infer trend
- Centering: Maps DI/ADX from 5-95 and ±100, with your Midpoint controlling where “0” sits in raw mode.
- Signals:
- Bullish/Bearish DI crosses, optionally allowed only when ADX ≥ Min.
- ADX crosses of your Low/High thresholds.
- Aroon crosses of 0, +80, −80 (fresh trend thresholds).
- Display aids: Optional fill between DI+/DI−; thin guides for thresholds; single-pane table summary.
How to use:
- For this to be useful, centering should stay on, modify ADX Low/High and monitor DI crosses with ADX.
- Interpretations:
Bias: DI+ above DI− = bull; below = bear.
Strength level: ADX < Low = chop, Low–High = developing, > High = strong.
Freshness: Aroon > +80 or crossing up 0 suggests new or continued bull push; < −80 or crossing down 0 suggests new or continued bear push.
- Alerts: Use built-ins for DI crosses, ADX regime changes, and Aroon thresholds.
Auto Fib Extension + MA Cross Strategy 📌 Overview:
This strategy combines two powerful technical analysis tools — Moving Average Crossovers and Fibonacci Extension Levels — to capture trend-based momentum trades with intelligent exits based on price structure. It is designed for traders seeking a rule-based, automated system that balances trend-following entries with price-action-based exits, while including proper risk management tools like stop-loss and trailing stops.
📈 Entry Logic:
✅ Long Entry:
Fast MA crosses above Slow MA (Golden Cross), indicating bullish momentum.
A valid swing low → swing high is detected, from which Fibonacci extensions are projected.
Entry is executed at market once both conditions are satisfied.
🔻 Short Entry:
Fast MA crosses below Slow MA (Death Cross), indicating bearish momentum.
A valid swing high → swing low is identified, and downside Fibonacci targets are calculated.
Short entry is triggered accordingly.
MA Types Supported: SMA and EMA (selectable)
Customizable Lengths: Fast and Slow MA periods are adjustable
🛡️ Risk Management Features:
📍 Stop Loss:
Optional fixed stop-loss based on a percentage distance from the entry price.
Default: 1.5% (adjustable)
🧲 Trailing Stop:
Optional trailing stop activates once price moves in your favor.
Adjusted dynamically based on percentage of price (default: 1.0%).
Both Stop Loss and Trailing Stop can be enabled or disabled independently.
📊 Additional Features:
Custom Swing Lookback: Detects local swing highs/lows using a configurable lookback window.
Clean visual plots: MA lines and Fib extensions are plotted for clear analysis.
Alerts: Built-in alerts notify you when:
A Long or Short entry signal occurs
Price hits a Take-Profit level
🔍 Use Cases:
This strategy is especially effective for:
Trend-trading environments (crypto, forex, indices)
Swing trading on intraday or daily charts
Traders who rely on structure-based exits instead of arbitrary profit targets
Users who want an automated but flexible system with built-in visual tools
✅ Summary:
This strategy offers a robust and disciplined trading framework, leveraging the proven effectiveness of MA crossovers and the natural price rhythm captured by Fibonacci extensions. With optional stop-loss and trailing protection, it suits both conservative risk profiles and momentum-based strategies, making it adaptable to many trading styles.
Dynamic Momentum Oscillator with Adaptive ThresholdsDynamic Momentum Oscillator with Adaptive Thresholds (DMO-AT)
This advanced indicator is designed to provide traders with a robust tool for identifying momentum shifts, overbought/oversold conditions, and potential reversals in any market. Unlike traditional oscillators with fixed thresholds, DMO-AT uses adaptive levels that adjust based on current volatility (via ATR) and incorporates volume weighting for more accurate signals in high-volume environments.
#### Key Features:
- **Momentum Calculation**: A normalized momentum value derived from price changes, optionally weighted by volume for enhanced sensitivity.
- **Adaptive Thresholds**: Overbought and oversold levels dynamically adjust using ATR, making the indicator adaptable to volatile or ranging markets.
- **Signal Line**: An EMA of the momentum for crossover signals, helping confirm trend directions.
- **Divergence Detection**: Built-in alerts for bullish and bearish divergences between price and momentum.
- **Visual Enhancements**: Background coloring for quick zone identification, dashed static lines for reference, and a customizable stats table displaying real-time values.
- **Alerts**: Multiple alert conditions for crossovers, zone entries, and divergences to keep you notified without constant chart watching.
#### How to Use:
1. Add the indicator to your chart via TradingView's indicator search.
2. Customize inputs: Adjust the momentum length, source, ATR length, and threshold multiplier to fit your trading style (e.g., shorter lengths for scalping, longer for swing trading).
3. Interpret Signals:
- **Crossover**: Momentum crossing above the signal line suggests bullish momentum; below indicates bearish.
- **Zones**: Entering the overbought (red) zone may signal a potential sell; oversold (green) for buys.
- **Divergences**: Use alerts to spot hidden opportunities where price and momentum disagree.
4. Combine with other tools like moving averages or support/resistance for confluence.
5. Enable the stats table for at-a-glance insights on the chart.
This indicator is versatile across timeframes and assets, from stocks to crypto. It's optimized for clarity and performance, with no repainting.
Ichimoku + Daily Candle X + Hull MA X + MACD Ichimoku + Daily-Candle X + Hull MA X + Hull‑Based MACD — Strategy Description
A high-confluence, multi-indicator strategy that blends trend, momentum, and multi-timeframe confirmation to deliver precision entries for traders of all levels.
Core Components & Trading Logic
Ichimoku Cloud (Trend Confirmation)
Confirms trend direction using Senkou Span A & B. A bullish bias is triggered when Span A > Span B, and bearish when vice versa.
Daily Candle Cross (Multi-Timeframe Momentum)
Compares today’s daily close with yesterdays. A bullish signal arises when today's price exceeds yesterdays, providing higher-timeframe momentum context.
Hull MA Cross (Fast, Smooth Trend Detection)
Utilizes Hull Moving Average, known for its rapid responsiveness and smooth behavior. A bullish signal occurs when the current HMA crosses above the previous HMA.
Hull-Based MACD (Filtered Momentum)
Derived by subtracting a slow HMA from a fast HMA to form the MACD line, with the signal line being another HMA of that difference. Bullish when MACD > Signal.
Strategy Benefits
Multi-Layer Confirmation: Armed with trend (Ichimoku), momentum (Daily Candle), quick signal (HMA), and noise-filtered momentum (Hull MACD), this approach filters out weak signals for higher-quality entries.
Adaptive & Smooth: Hull-based indicators offer the speed of rapid responsiveness while maintaining smoothness—ideal for dynamic market environments.
Customizable & Scalable: Easily tweak input parameters to align with your preferred market, timeframe, and risk thresholds.
VWMA MACD Trend Grinder Buy/Sell SignalsDescription:
This indicator combines a VWMA-based MACD with volume and trend filters to reduce false buy and sell signals.
It is designed to give more reliable entry and exit points in trending markets while avoiding low-volume noise.
Features:
1. VWMA MACD:
- MACD is calculated using Volume-Weighted Moving Averages (VWMA) instead of standard EMAs.
- Histogram shows the difference between MACD and its signal line.
2. Volume Filter:
- Signals are only triggered when current volume exceeds a multiple of its moving average.
- Reduces false signals in low-volume periods.
3. Trend Filter:
- Only triggers buy signals when price is above a long-term VWMA (uptrend).
- Only triggers sell signals when price is below the long-term VWMA (downtrend).
- Helps avoid counter-trend trades.
4. Plots:
- MACD (blue), Signal (orange), Histogram (green/red)
- Trend VWMA (purple)
- Buy and Sell arrows in the indicator pane (green/red)
5. Alerts:
- Configurable alerts for buy and sell signals filtered by volume and trend.
Inputs:
- Fast Length: VWMA period for the fast MACD line (default 12)
- Slow Length: VWMA period for the slow MACD line (default 26)
- Signal Length: EMA period for the MACD signal line (default 9)
- Volume MA Length: Length for volume moving average filter (default 20)
- Volume Threshold Multiplier: Multiplier for volume filter (default 1.2)
- Trend VWMA Length: Period for long-term trend VWMA (default 50)
- Price Source: Close, HL2, HLC3, OHLC4
Usage:
- Use as a confirmation tool along with other analysis techniques.
- Buy when the green triangle appears (MACD crossover, above trend VWMA, sufficient volume).
- Sell when the red triangle appears (MACD crossunder, below trend VWMA, sufficient volume).
- Trend VWMA helps visually confirm the market trend.
Brandon MA OscPlots the percent deviation of price from a chosen volume-weighted MA and envelopes it with smoothed standard-deviation bands. It supports Trend, Reversion, and Valuation modes with OB/OS markers and background shading, generating simple buy/sell cues when bands are crossed.
MACD Lissé Smoothed MACD – Custom Indicator
This indicator is an enhanced version of the classic MACD, designed to balance responsiveness and noise reduction. It uses a short HMA (Hull Moving Average) smoothing to track price movements faster while keeping the signal smooth.
Key Features:
HMA-Smoothed MACD: Tracks trends with less lag than a standard MACD.
Signal Line: A simple EMA applied to the smoothed MACD to identify crossovers and generate buy/sell signals.
Filtered Histogram: Shows the difference between the smoothed MACD and its signal line, with an optional threshold to focus on meaningful movements and reduce visual noise.
Customizable Parameters:
Fast EMA Length and Slow EMA Length to adjust the classic MACD
HMA MACD Smoothing for faster or smoother MACD response
Signal Smoothing to fine-tune the signal line
Histogram Threshold to filter small movements and reduce noise
This indicator is ideal for traders who want a MACD that is responsive but not ultra-smoothed, perfect for spotting trend changes quickly without being overwhelmed by minor price fluctuations.
Colors and Display:
Smoothed MACD: Blue
Signal Line: Orange
Histogram: Green (positive) / Red (negative)
MACD/ATR with Histogram(MACD-VH)MACD cannot be used directly as it is non-stationary and needs to be divided by ATR.
The values such as color, style, and ATR can all be modified.
MACD Bullish Divergence + Multi-TF RSI Buy SignalsNew script to overlap MACD Bullish Divergence and RSI signals to give confluence.
Penguin Trend with RSI on DiffVisualizes volatility regime via the percent spread between the upper Bollinger Band and the upper Keltner Channel, with bar colors from a lightweight trend engine and an RSI computed on the Diff signal. Supports SMA/EMA/WMA/RMA/HMA/VWMA/VWAP and an optional calculation timeframe. Defaults preserve the original look and behavior.
Penguin Trend with RSI on Diff shows expansion vs. compression in price action by comparing two classic volatility envelopes. It computes:
Diff% = (UpperBB − UpperKC) / UpperKC × 100
• Diff > 0: Bollinger Bands are wider than Keltner Channels → expansion / momentum regime
• Diff < 0: BB narrower than KC → compression / squeeze regime
A white “Average Diff” line smooths Diff% (default: SMA(5)) to highlight regime shifts. Bars are colored only when Diff > 0 to focus on expansion phases. A lightweight trend engine defines four states from a fast/slow MA bias and a short “thrust” MA on ohlc4:
• Green: Bullish bias and thrust > fast MA (healthy upside thrust)
• Red: Bearish bias and thrust < fast MA (healthy downside thrust)
• Yellow: Bullish bias but thrust ≤ fast MA (pullback/weakness)
• Blue: Bearish bias but thrust ≥ fast MA (bear rally/short squeeze)
RSI on Diff:
The indicator adds an RSI applied to Diff% to gauge momentum of the expansion/compression signal itself. Choose between Built-in RSI or a manual RMA-based computation, and optionally smooth it. Default OB/OS lines are 70/30.
How it works:
• Bollinger Bands (BB): Basis = selected MA of src (default SMA(20)); Width = StdDev × Mult (default 2.0)
• Keltner Channels (KC): Basis = selected MA of src (default SMA(20)); Width = ATR(kcATR) × Mult (defaults 20 and 2.0)
• Diff%: Safe division guards against division-by-zero
• MA engine: Select SMA / EMA / WMA / RMA / HMA / VWMA / VWAP for BB/KC bases, Average Diff, and trend components (VWAP is session-anchored)
• Calculation timeframe: Compute internals on a chosen TF via request.security() while viewing any chart TF
Inputs (key):
• Calculation timeframe: Empty = chart TF; set e.g., 60/240 to compute on that TF
• BB: Length, StdDev Mult, MA Type
• KC: Basis Length, ATR Length, Multiplier, MA Type
• Average Diff: Length and MA Type
• RSI on Diff: RSI Length, Method (Built-in or Manual RMA), Smoothing Length, OB/OS levels, show/hide
• Trend Engine: Fast/Slow lengths & MA type, Signal (kept for completeness), Thrust MA length & type
• Display/Visibility: Paint bars only when Diff > 0; show zero line; “true Blue” color toggle; show/hide Diff columns and Average Diff
How to use:
1. Regime changes: Watch Diff% or Average Diff crossing 0. Above zero favors momentum/continuation setups; below zero suggests compression and potential breakout conditions.
2. State confirmation: During expansion (Diff > 0), prioritize Green/Red for aligned thrust; treat Yellow/Blue as cautionary/contrarian.
3. RSI on Diff: Use OB/OS and crossovers for timing entries/exits or for confirming/negating expansion strength.
Alerts:
• Diff crosses above/below 0
• Average Diff crosses above/below 0
• RSI(Diff) crosses above OB / below OS
• State changes: GREEN / RED / YELLOW / BLUE
Notes & limitations:
• VWAP is session-anchored and best on intraday data. If not applicable on the selected calculation TF, the script automatically falls back to EMA.
• Defaults (SMA(20) for BB/KC, multipliers 2.0, SMA(5) Average Diff, original trend coloring and bar painting) preserve the original appearance.
• RSI on Diff is plotted in the same pane for a compact workflow; you can hide it or split into a separate indicator if desired.
Release notes:
v6.0 — Upgraded to Pine v6. Added multi-MA options (SMA/EMA/WMA/RMA/HMA/VWMA/VWAP), calculation timeframe, RSI on Diff (Built-in or Manual RMA) with smoothing, safe division guard, optional zero line, and optional true Blue color. Defaults retain the original behavior.
License / disclaimer:
© waranyu.trkm — MIT License. Educational use only; not financial advice.
Penguin TrendMeasures the volatility regime by comparing the upper Bollinger Band to the upper Keltner Channel and colors bars with a lightweight trend state. Supports SMA/EMA/WMA/RMA/HMA/VWMA/VWAP and a selectable calculation timeframe. Default settings preserve the original look and behavior.
Penguin Trend visualizes expansion vs. compression in price action by comparing two classic volatility envelopes. It computes:
Diff% = (UpperBB − UpperKC) / UpperKC × 100
* Diff > 0: Bollinger Bands are wider than Keltner Channels -> expansion / momentum regime.
* Diff < 0: BB narrower than KC -> compression / squeeze regime.
A white “Average Difference” line smooths Diff% (default: SMA(5)) to help spot regime shifts.
Trend coloring (kept from original):
Bars are colored only when Diff > 0 to emphasize expansion phases. A lightweight trend engine defines four states using a fast/slow MA bias and a short “thrust” MA applied to ohlc4:
* Green: Bullish bias and thrust > fast MA (healthy upside thrust).
* Red: Bearish bias and thrust < fast MA (healthy downside thrust).
* Yellow: Bullish bias but thrust ≤ fast MA (pullback/weakness).
* Blue: Bearish bias but thrust ≥ fast MA (bear rally/short squeeze).
Note: By default, Blue renders as Yellow to preserve the original visual style. Enable “Use true BLUE color” if you prefer Aqua for Blue.
How it works (under the hood):
* Bollinger Bands (BB): Basis = selected MA of src (default SMA(20)). Width = StdDev × Mult (default 2.0).
* Keltner Channels (KC): Basis = selected MA of src (default SMA(20)). Width = ATR(kcATR) × Mult (defaults 20 and 2.0).
* Diff%: Safe division guards against division-by-zero.
* MA engine: You can choose SMA / EMA / WMA / RMA / HMA / VWMA / VWAP for BB/KC bases, Diff smoothing, and the trend components (VWAP is session-anchored).
* Calculation timeframe: Set “Calculation timeframe” to compute all internals on a chosen TF via request.security() while viewing any chart TF.
Inputs (key ones):
* Calculation timeframe: Empty = use chart TF; if set (e.g., 60), all internals compute on that TF.
* BB: Length, StdDev Mult, MA Type.
* KC: Basis Length, ATR Length, Multiplier, MA Type.
* Smoothing: Average Length & MA Type for the “Average Difference” line.
* Trend Engine: Fast/Slow lengths & MA type; Signal (kept for completeness); Thrust length & MA type (defaults replicate original behavior).
* Display: Paint bars only when Diff > 0; optional Zero line; optional true Blue color.
How to use:
1. Regime changes: Watch Diff% or Average Diff crossing 0. Above zero favors momentum/continuation setups; below zero suggests compression and potential breakout conditions.
2. State confirmation: Use bar colors to qualify expansion: Green/Red indicate expansion aligned with trend thrust; Yellow/Blue flag weaker/contrarian thrust during expansion.
3. Multi-timeframe analysis: Run calculations on a higher TF (e.g., H1/H4) while trading a lower TF chart to smooth noise.
Alerts:
* Diff crosses above/below 0.
* Average Diff crosses above/below 0.
* State changes: GREEN / RED / YELLOW / BLUE.
Notes & limitations:
* VWAP is session-anchored and best on intraday data. If not applicable on the selected calculation TF, the script automatically falls back to EMA.
* Default parameters (SMA(20) for BB/KC, multipliers 2.0, SMA(5) smoothing, trend logic and bar painting) preserve the original appearance.
Release notes:
v6.0 — Rewritten in Pine v6 with structured inputs and guards. Multi-MA support (SMA/EMA/WMA/RMA/HMA/VWMA/VWAP). Calculation timeframe via request.security() for multi-TF workflows. Safe division; optional zero line; optional true Blue color. Original visuals and behavior preserved by default.
License / disclaimer:
© waranyu.trkm — MIT License. Educational use only; not financial advice.
RSI with MA and Candle Highlight BY GRAFClassic RSI with minor modifications, background color changes when it is higher/lower than its average, making it easier to see. Additionally, the candle color changes when the RSI is overbought or oversold.
SAR Oscillator [Bellsz]Converts Parabolic SAR into a normalized oscillator with crossover signals, gradient fills, and trend strength levels. A cleaner way to read SAR momentum. Making it easier to read momentum shifts, trend strength, and reversals directly in the sub-chart. Instead of dots on price only, this tool converts SAR dynamics into a smooth oscillator that highlights bias and turning points.
What it shows
Normalized Price Line — scaled view of price relative to SAR.
Normalized SAR Line — SAR value normalized across the high/low range.
SAR Dots — visual cue when crossovers occur (potential reversal or trend acceleration).
Gradient Fill — color-coded background for quick read of momentum direction/intensity.
Guide Levels — ±50 baseline to track trend strength and overextension.
Why use it
Converts SAR into an oscillator format, easier to compare across instruments & timeframes.
Highlights momentum shifts early (crossovers, gradient flips).
Adds structure with gradient fill and baselines, making SAR more actionable than standard dot plots.
Works as a trend bias filter or confirmation tool alongside other indicators.
Inputs
Acceleration / Increment / Maximum — adjust SAR sensitivity.
Custom Colors — choose your scheme for price, SAR, and gradients.
Best practices
Use on intraday or swing TFs as a trend bias filter.
Look for Normalized Price crossing Normalized SAR as potential entry signals.
Watch how SAR dots cluster near ±100 for exhaustion or reversal signals.
Notes
This is a visual enhancement of SAR; it does not repaint.
Combine with volume, FVGs, or session models for added context.
MACD Quadrant Matrix – 10 US MajorsThis script provides a quadrant matrix visualization of the MACD indicator across 10 major U.S. stocks (AAPL, MSFT, NVDA, AMZN, GOOGL, META, TSLA, BRK.B, UNH, LLY).
It is designed as a visual screening tool to quickly analyze the relative MACD conditions of large-cap U.S. equities.
# Quadrant Logic
Q1 (Green): MACD > 0 and MACD > Signal
Q2 (Orange): MACD > 0 and MACD < Signal
Q3 (Blue): MACD < 0 and MACD > Signal
Q4 (Red): MACD < 0 and MACD < Signal
# Features
Adjustable timeframe (default: Daily)
Quadrant background visualization
Optional jitter to reduce overlap of bubbles
Tooltip display with MACD, Signal, and Delta values
Counts of how many symbols fall into each quadrant
# Limitations
Symbol list is fixed to 10 large-cap U.S. stocks (modifiable in code).
This is a visualization tool only. It does not generate buy/sell signals.
Results and quadrant positioning will vary depending on timeframe selection.
# Disclaimer
This script is for educational and analytical purposes only.
It is not financial advice, and should not be relied upon for trading or investment decisions.
Trading and investing carry risk, and users should perform their own due diligence.
Tick Ratio Simulator - Advanced Market Sentiment IndicatorOverview
The Tick Ratio Simulator is a sophisticated market sentiment indicator that provides real-time insights into buying and selling pressure dynamics. This proprietary indicator transforms complex market microstructure data into actionable trading signals.
Key Features
Real-Time Sentiment Analysis: Captures instantaneous shifts in market momentum
Multi-Timeframe Adaptability: Customizable calculation periods for any trading style
Visual Clarity: Color-coded histogram with dynamic zone highlighting
Integrated Alert System: Pre-configured alerts for key market transitions
Performance Dashboard: Live metrics display for informed decision-making
Trading Applications
✓ Trend Confirmation: Validate existing trends with momentum analysis
✓ Reversal Detection: Identify potential turning points at extreme readings
✓ Entry/Exit Timing: Optimize trade execution with overbought/oversold zones
✓ Risk Management: Clear visual boundaries for position sizing decisions
Signal Interpretation
Extreme Zones (±75): High probability reversal areas
Standard Thresholds (±50): Traditional overbought/oversold levels
Zero Line Crossings: Momentum shift confirmations
Histogram Expansion/Contraction: Strength of directional bias
Customization Options
Adjustable calculation and smoothing periods
Fully customizable color schemes
Toggle histogram and reference lines
Real-time information table positioning
Alert Conditions
Four pre-built alert templates for automated notifications:
Momentum threshold breaches
Directional changes
Extreme zone entries
Custom level crossovers
Best Practices
Works exceptionally well when combined with:
Volume analysis
Support/resistance levels
Price action patterns
Other momentum oscillators
Note: This indicator uses proprietary calculations to simulate institutional-grade tick analysis without requiring actual tick data feeds. Results are optimized for liquid markets with consistent volume profiles.
For optimal results, adjust parameters based on your specific instrument and timeframe. Past performance does not guarantee future results.
Narrow Range Marker (Multi-TF)Marks bars with a circle when the selected timeframe’s range (high–low) is below a user-defined threshold. Supports 15m, 1H, Daily, Weekly, and Monthly timeframes, each with its own adjustable threshold.
Intraday Level Touch Counter V2.010 customizable levels (5 positive, 5 negative)
Fixed levels OR dynamic ATR-based levels
Historical statistics with percentage probabilities
Real-time current day monitoring
Customizable table positions and sizes
Up to 500 days of historical analysis
Pivot Distance Strategy# Multi-Timeframe Pivot Distance Strategy
## Core Innovation & Originality
This strategy revolutionizes moving average crossover trading by applying MA logic to **pivot distance relationships** instead of raw price data. Unlike traditional MA crossovers that react to price changes, this system reacts to **structural momentum changes** in how current price relates to recent significant pivot levels, creating earlier signals with fewer false positives.
## Methodology & Mathematical Foundation
### Pivot Distance Oscillator
The strategy calculates:
- **High Pivot Percentage**: (Current Close / Last Pivot High) × 100
- **Low Pivot Percentage**: (Last Pivot Low / Current Close) × 100
- **Pivot Distance**: High Pivot Percentage - Low Pivot Percentage
This creates a standardized oscillator measuring market structure compression/expansion regardless of asset price or volatility.
### Multi-Timeframe Filter
Higher timeframe analysis provides directional bias:
- **HTF Long** → Allow long entries, force short exits
- **HTF Short** → Allow short entries, force long exits
- **HTF Squeeze** → Block all entries, force all exits
## Signal Generation Methods
### Method 1: Dual MA Crossover (Primary/Default)
**Fast MA (14 EMA)** and **Slow MA (50 SMA)** applied to pivot distance values:
- **Long Signal**: Fast MA crosses above Slow MA (accelerating bullish pivot momentum)
- **Short Signal**: Fast MA crosses below Slow MA (accelerating bearish pivot momentum)
**Key Advantage**:
- Traditional: Fast MA(price) crosses Slow MA(price) - reacts to price changes
- This Strategy: Fast MA(pivot distance) crosses Slow MA(pivot distance) - reacts to structural changes
- Result: Earlier signals, better trend identification, fewer ranging market whipsaws
### Method 2: MA Cross Zero
- **Long**: Pivot Distance MA crosses above zero
- **Short**: Pivot Distance MA crosses below zero
### Method 3: Pivot Distance Breakout (Squeeze-Based)
Uses dynamic threshold envelopes to detect compression/expansion cycles:
- **Long**: Distance breaks above dynamic breakout threshold after squeeze
- **Short**: Distance breaks below negative breakout threshold after squeeze
**Note**: Only the Breakout method uses threshold envelopes; MA Cross modes operate without them for cleaner signals.
## Risk Management Integration
- **ATR-Based Stops**: Entry ± (ATR × Multiplier) for stops/targets
- **Trailing Stops**: Dynamic adjustment based on profit thresholds
- **Cooldown System**: Prevents overtrading after stop-loss exits
## How to Use
### Setup (Default: MA Cross MA)
1. **Strategy Logic**: "MA Cross MA" for structural momentum signals
2. **MA Settings**: 14 EMA (fast) / 50 SMA (slow) - both adjustable
3. **Multi-Timeframe**: Enable HTF for trend alignment
4. **Risk Management**: ATR stop loss, ATR take profit
### Signal Interpretation
- **Blue/Purple lines**: Fast/Slow MAs of pivot distance
- **Green/Red histogram**: Positive/negative pivot distance
- **Triangle markers**: MA crossover entry signals
- **HTF display**: Shows higher timeframe bias (top-left)
### Trade Management
- **Entry**: Clean MA crossover with HTF alignment
- **Exit**: Opposite crossover, HTF change, or risk management triggers
## Unique Advantages
1. **Structural vs Price Momentum**: Captures market structure changes rather than just price movement, naturally filtering noise
2. **Multi-Modal Flexibility**: Three signal methods for different market conditions or strategies
3. **Timeframe Alignment**: HTF filtering improves win rates by preventing counter-trend trades