Trend Impulse Channels [With Simple MA]Trend Impulse Channels + MA | Premium Modified Version
This is a **premium modified version** of the original **Trend Impulse Channels** script by **Zeiierman**, enhanced and republished by **Markking77**.
This version includes a clean **Moving Average (MA)** overlay to add extra trend confirmation.
*What’s New:**
- MA overlay for better trend visibility.
- All original trend impulse logic retained.
- Clean, customizable signals for retests & trend steps.
- Fully adjustable style for premium look.
Original Script Info:**
- **Original Author:** © Zeiierman
- **Modified & Published by:** © Markking77
- **License:** (creativecommons.org)
**Disclaimer:**
This script is **for educational purposes only** and not financial advice. Always do your own research and trade responsibly.
Moving_average
Signalgo MASignalgo MA is a TradingView indicator based on moving average (MA) trading by combining multi-timeframe logic, trend strength filtering, and adaptive trade management. Here’s a deep dive into how it works, its features, and why it stands apart from traditional MA indicators.
How Signalgo MA Works
1. Multi-Timeframe Moving Average Analysis
Simultaneous EMA & SMA Tracking: Signalgo MA calculates exponential (EMA) and simple (SMA) moving averages across a wide range of timeframes—from 1 minute to 3 months.
Layered Cross Detection: It detects crossovers and crossunders on each timeframe, allowing for both micro and macro trend detection.
Synchronized Signal Mapping: Instead of acting on a single crossover, the indicator requires agreement across multiple timeframes to trigger signals, filtering out noise and false positives.
2. Trend Strength & Quality Filtering
ADX Trend Filter: Trades are only considered when the Average Directional Index (ADX) confirms a strong trend, ensuring signals are not triggered during choppy or directionless markets.
Volume & Momentum Confirmation: For the strongest signals, the system requires:
A significant volume spike
Price above/below a longer-term EMA (for buys/sells)
RSI momentum confirmation
One-Time Event Detection: Each crossover event is flagged only once per occurrence, preventing repeated signals from the same move.
Inputs
Preset Parameters:
EMA & SMA Lengths: Optimized for both short-term and long-term analysis.
ADX Length & Minimum: Sets the threshold for what is considered a “strong” trend.
Show Labels/Table: Visual toggles for displaying signal and trade management information.
Trade Management:
Show TP/SL Logic: Toggle to display or hide take-profit (TP) and stop-loss (SL) levels.
ATR Length & Multipliers: Fine-tune how SL and TP levels adapt to market volatility.
Enable Trailing Stop: Option to activate dynamic stop movement after TP1.
Entry & Exit Strategy
Entry Logic
Long (Buy) Entry: Triggered when multiple timeframes confirm bullish EMA/SMA crossovers, ADX confirms trend strength, and all volume/momentum filters align.
Short (Sell) Entry: Triggered when multiple timeframes confirm bearish crossunders, with the same strict filtering.
Exit & Trade Management
Stop Loss (SL): Automatically set based on recent volatility (ATR), adapting to current market conditions.
Take Profits (TP1, TP2, TP3): Three profit targets at increasing reward multiples, allowing for flexible trade management.
Trailing Stop: After TP1 is hit, the stop loss moves to breakeven and a trailing stop is activated to lock in further gains.
Event Markers: Each time a TP or SL is hit, a visual label is placed on the chart for full transparency.
Strict Signal Quality Filters: Signals are only generated when volume spikes, momentum, and trend strength all align, dramatically reducing false positives.
Adaptive, Automated Trade Management: Built-in TP/SL and trailing logic mean you get not just signals, but a full trade management suite, rarely found in standard MA indicators.
Event-Driven, Not Static: Each signal is triggered only once per event, eliminating repetitive or redundant entries.
Visual & Alert Integration: Every signal and trade event is visually marked and can trigger TradingView alerts, keeping you informed in real time.
Trading Strategy Application
Versatility: Suitable for scalping, day trading, swing trading, and longer-term positions thanks to its multi-timeframe logic.
Noise Reduction: The layered filtering logic means you only see the highest-probability setups, helping you avoid common MA “fakeouts” and overtrading.
So basically what separates Signalgo MA from traditional MA indicators?
1. Multi-Timeframe Analysis
Traditional MA indicators: Usually measure crossovers or signals within a single timeframe.
Signalgo MA: simultaneously calculates fast/slow EMAs & SMAs for multiple periods. This enables it to create signals based on synchronized or stacked momentum across multiple periods, offering broader trend confirmation and reducing noise from single-timeframe signals.
2. Combinatorial Signal Logic
Traditional: A basic crossover is typically “if fast MA crosses above/below slow MA, signal buy/sell.”
Signalgo MA: Generates signals only when MA crossovers align across several timeframes, plus takes into consideration the presence or absence of conflicting signals in shorter or longer frames. This reduces false positives and increases selectivity.
3. Trend Strength Filtering (ADX Integration)
Traditional: Many MA indicators are “blind” to trend intensity, potentially triggering signals in low volatility or ranging conditions.
Signalgo MA: Employs ADX as a minimum trend filter. Signals will only fire if the trend is sufficiently strong, reducing whipsaws in choppy or sideways markets.
4. Volume & Strict Confirmation Layer
Traditional: Few MA indicators directly consider volume or require confluence with other major indicators.
Signalgo MA: Introduces a “strict signal” filter that requires not only MA crossovers and trend strength, but also (on designated frames):
Significant volume spike,
Price positioned above/below a higher timeframe EMA (trend anchor),
RSI momentum confirmation.
5. Persistent, Multi-Level TP/SL Automated Trade Management
Traditional: Separate scripts or manual management for stop-loss, take-profit, and trailing-stops, rarely fully integrated visually.
Signalgo MA: Auto-plots up to three take-profit levels, initial stop, and a trailing stop (all ATR-based) on the chart. It also re-labels these as they are hit and resets for each new entry, supporting full trade lifecycle visualization directly on the chart.
6. Higher Timeframe SMA Crosses for Long-Term Context
Traditional: Focuses only on the current chart’s timeframe.
Signalgo MA: Incorporates SMA cross logic for weekly, monthly, and quarterly periods, which can contextualize lower timeframe trades within broader cycles, helping filter against counter-trend signals.
7. “Signal Once” Logic to Prevent Over-Trading
Traditional: Will often re-fire the same signal repeatedly as long as the condition is true, possibly resulting in signal clusters and over-trading.
Signalgo MA: Fires each signal only once per condition—prevents duplicate alerts for the same trade context.
Chebyshev-Gauss Moving AverageThis indicator applies the principles of Chebyshev-Gauss Quadrature to create a novel type of moving average. Inspired by reading rohangautam.github.io
What is Chebyshev-Gauss Quadrature?
It's a numerical method to approximate the integral of a function f(x) that is weighted by 1/sqrt(1-x^2) over the interval . The approximation is a simple sum: ∫ f(x)/sqrt(1-x^2) dx ≈ (π/n) * Σ f(xᵢ) where xᵢ are special points called Chebyshev nodes.
How is this applied to a Moving Average?
A moving average can be seen as the "mean value" of the price over a lookback window. The mean value of a function with the Chebyshev weight is calculated as:
Mean = /
The math simplifies beautifully, resulting in the mean being the simple arithmetic average of the function evaluated at the Chebyshev nodes:
Mean = (1/n) * Σ f(xᵢ)
What's unique about this MA?
The Chebyshev nodes xᵢ are not evenly spaced. They are clustered towards the ends of the interval . We map this interval to our lookback period. This means the moving average samples prices more intensely from the beginning and the end of the lookback window, and less intensely from the middle. This gives it a unique character, responding quickly to recent changes while also having a long "memory" of the start of the trend.
Signalgo BBSignalgo BB: Technical Overview
Signalgo BB is a Bollinger Bands (BB) indicator for TradingView, designed to provide a multi-dimensional view of volatility, trend, and trading opportunities within a single overlay. Below is a detailed, impartial explanation of its workings, inputs, and trading logic.
Core Mechanics
Signalgo BB operates on the principle of nested volatility bands and moving averages. It calculates:
Fast & Slow Bands: Two sets of Bollinger Bands (BB), using different moving average types (EMA or SMA), lengths, and standard deviation multipliers.
Volatility Cloud: A dynamic visual layer indicating when price is inside both, one, or neither band.
Filtering: A short-term RSI is used to confirm trend direction and filter out weak signals.
Inputs & Components
MA Type: Choice between EMA, SMA for both fast and slow MA calculations.
Fast/Slow Lengths
Fast/Slow Deviations
RSI Length/Thresholds
Show Cloud: Toggle for the visual volatility cloud.
Signal Mode: Band Break.
Prevent Repeated Signals: Option to suppress duplicate signals in the same direction.
TP/SL & Trailing Logic: Advanced, automated trade management with ATR-based distances, three take-profit levels, and a dynamic trailing stop.
Signal Generation
Band Break: Triggers when price crosses the fast BB band.
RSI Filter: All signals require RSI confirmation.
Prevent Repeated Signals: Optionally only marks the first breakout in a series to reduce overtrading.
Entry/Exit Marks: Labels are plotted for visual clarity, and signals can trigger TradingView alerts.
Trade Management
Stop Loss (SL): Set at a multiple of ATR from the entry price, adapting to current volatility.
Take Profits (TP1, TP2, TP3): Three levels scaled by risk-reward ratios, supporting partial exits.
Trailing Stop: After the first TP is hit, SL moves to breakeven and then trails at a user-defined multiple of ATR, locking in further gains.
Event Markers: Each TP, SL, and trailing stop event is labeled on the chart.
Direction State: The indicator tracks active trades, allowing for only one open position per direction at a time.
Cloud Visualization: The background color changes depending on whether price is inside both, one, or no bands, making it easier to visualize market conditions.
Multiple Signal Logics: It doesn’t just look at breakouts, it includes cloud crossings, mean reversion, and a choice of how to combine them.
Rigorous Filtering: Signals require RSI trend confirmation, reducing false entries during weak phases.
Automated Trade Management: Built-in TP/SL and trailing logic, dynamically adapting to volatility.
Signal Suppression: Option to prevent repeated signals, reducing noise and overtrading.
Customizable MA Types: Supports EMA, SMA, and a selection algorithm for future expansion.
Trading Strategy Application
Volatility Regimes: The cloud’s color indicates whether price is inside, between, or outside the bands, helping traders identify trending, ranging, or breakout conditions.
Signals: entries can be based on breakouts filtered by RSI trend strength.
Risk Management: All active trades are managed by TP/SL logic, trailing stops after TP1, and visual feedback on exits.
Visual Alerts: Both signals and TP/SL events are marked on the chart for manual review.
Flexibility: Users can switch modes or suppress repeated signals as needed, depending on trading style.
Practical Usage
Intraday to Swing: Suitable for timeframes from minutes to days, depending on the MA periods and volatility profile.
Manual or Automated: The visual overlay and alerts support both manual trading and automated strategies.
Education & Review: The colored cloud and event markers make it easy to review past price action and learn from signals.
What separates this indicator from traditional ones:
1. Dual Bollinger Bands
Traditional: Most indicators use a single set of Bollinger Bands (two standard deviations above/below a moving average).
Signalgo BB: Implements two sets of bands—a "fast" set (shorter moving average, narrower deviation) and a "slow" set (longer moving average, wider deviation). This provides both immediate (fast) and broader context (slow) for volatility and price action.
2. Volatility Cloud Visualization
Traditional: Standard Bollinger Bands display as two lines, with the area between sometimes shaded as a "band" but without dynamic color changes.
Signalgo BB: The background is colored differently depending on whether price is within both, one, or neither band, offering a visual "cloud" that distinguishes trending, ranging, or breakout regimes at a glance.
3. RSI Filtering
Traditional: Many indicators either don’t filter signals, or if they do, it’s not always configurable.
Signalgo BB: Adds an optional RSI filter, requiring signals to be confirmed by short-term RSI overbought/oversold conditions. This reduces false signals in range-bound or low-trend environments.
4. Prevention of Repeated Signals
Traditional: Most indicators will keep firing signals as long as conditions are met, which can cause overtrading.
Signalgo BB: Offers a user-toggleable option to suppress repeated signals in the same direction until the opposite signal occurs. This reduces noise for discretionary traders.
5. Integrated Trade Management
Traditional: Manual or separate coding is required for stop-loss, take-profit, and trailing stop logic.
Signalgo BB: Builds in dynamic, ATR-based stop-loss; up to three take-profit levels and a trailing stop that activates after the first TP is hit. All levels are visually plotted on the chart, and events (TP/SL hits) are labeled, aiding strategy review and automation.
6. Event Labeling and Alerts
Traditional: Alerts may exist for entry/exit, but rarely for each TP/SL event.
Signalgo BB: Places labels for every entry, exit, and TP/SL event. It also provides TradingView alertconditions for each event, enabling automated notifications or integration with trading bots.
7. Directional State Tracking
Traditional: Indicators typically do not track the "state" of a trade (e.g., active long/short/flat) beyond simple signals.
Signalgo BB: Maintains persistent variables for entry price, SL, TP, trailing stop, and trade direction, ensuring only one active signal per direction. This prevents overlapping entries and mimics realistic trade management.
8. User Customization
Traditional: Default settings are often hardcoded, or customization is limited.
Signalgo BB: Offers extensive user inputs for MA type and TP/SL logic—making the tool adaptable to many strategies and timeframes.
RSI Shift Zone [ChartPrime] with MAThis is a modified version of the original *RSI Shift Zone * script.
What’s new?
➤ Added a customizable Moving Average (SMA/EMA) plotted on top of the RSI for better trend confirmation.
➤ Keeps the original RSI zone detection logic and highlights possible reversal or shift areas.
➤ Clean visual style with clear zone fills, labels, and optional RSI value display.
Settings:
- RSI Length and Levels
- Minimum Channel Length
- Display RSI Value Toggle
- Moving Average Length & Type (SMA or EMA)
License: This script is shared under the Mozilla Public License 2.0 and retains © ChartPrime as the original author.
I hope this helps traders get a better visual on trend shifts and confirmations.
Feel free to share feedback or suggestions!
Logarithmic Moving Average (LMA) [QuantAlgo Original Author: QuantAlgo
License: Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International
Source: creativecommons.org
This script is originally developed by QuantAlgo and is shared under the CC BY-NC-SA 4.0 license.
I have reused and slightly modified it for personal learning and for the benefit of the TradingView community.
All core credits belong to QuantAlgo.
This version remains fully open-source and non-commercial, respecting the original license terms.
Anyone reusing or modifying this script must keep the same license and attribution.
— Modified & shared publicly by Mark804
QMP Filter Jan 2025The QMP Filter itself are the red/blue dots displayed on the price chart. These are a combination of the MACD Platinum (zero lag MACD) and the QQE Adv. When they are in sync, then a QMP Filter dot is presented.
The indicator also includes the option of adding multiple Moving Averages and Bollinger Bands to the price chart if required. Cheers. Jim
Candle Ghosts: MTF 3 Candle Viewer by Chaitu50cCandle Ghosts: MTF 3 Candle Viewer helps you see candles from other timeframes directly on your chart. It shows the last 3 candles from a selected timeframe as semi-transparent boxes, so you can compare different timeframes without switching charts.
You can choose to view candles from 30-minute, 1-hour, 4-hour, daily, or weekly timeframes. The candles are drawn with their full open, high, low, and close values, including the wicks, so you get a clear view of their actual shape and size.
The indicator lets you adjust the position of the candles using horizontal and vertical offset settings. You can also control the spacing between the candles for better visibility.
An optional EMA (Exponential Moving Average) from the selected timeframe is also included to help you understand the overall trend direction.
This tool is useful for:
Intraday traders who want to see higher timeframe candles for better decisions
Swing traders checking lower timeframe setups
Anyone doing top-down analysis using multiple timeframes on a single chart
This is a simple and visual way to study how candles from different timeframes behave together in one place.
趨勢通道動態出場策略|Trend Channel Exit Strategy (TradeSoEasy)這是一套結合「高點通道突破進場」與「動態出場機制」的交易策略。
進場以近期高點突破為依據,出場則可依照使用者選擇兩種模式:
1️⃣ 低點跌破出場(通道下緣)
2️⃣ 均線跌破出場(均線支撐)
參數說明:
LE (Long Entry Period):進場通道長度,預設15。
LX (Long Exit Period):出場通道或均線長度,預設30。
Exit_mode (1=低點出場, 2=均線出場):選擇出場方式。
這套策略可應用於趨勢明確的市場,如加密貨幣、指數、強勢個股等,特別適合做為順勢交易的入門腳本。
✨ 由 TradeSoEasy 開發與維護
📍 更多策略與教學請見:itradesoeasy.com/
⚠️ 風險聲明:
本策略僅為教育用途,不保證獲利。
市場有風險,交易請謹慎評估自身承受能力。
---
This is a breakout trend-following strategy with dynamic exit mechanisms.
It enters on recent high breakout and offers **two exit modes** for users to choose:
1️⃣ Exit below recent low (low channel)
2️⃣ Exit below moving average (dynamic support)
Parameters:
LE (Long Entry Period): Number of bars to define entry channel (default: 15).
LX (Long Exit Period): Number of bars to define exit channel or SMA period (default: 30).
Exit_mode (1 = lowest low exit, 2 = SMA exit): Exit mode selection.
Ideal for trending markets like crypto, indices, or strong momentum stocks.
Great for beginners learning trend trading.
✨ Developed by TradeSoEasy
📍 Learn more: itradesoeasy.com/
⚠️ Risk Disclaimer:
This strategy is for educational purposes only and does not guarantee profits.
Trading involves risk. Please evaluate your own risk tolerance carefully before participating.
Intelligent Moving📈 Intelligent Moving — Self-Adjusting Trend Bands with Neural Optimization
Description
Intelligent Moving is a closed-source indicator for trend analysis and breakout detection. It uses a central moving average, ATR-based deviation bands, and a self-optimizing algorithm powered by virtual trade simulation and a simple neural network (perceptron). The tool adjusts its core parameters in real time, allowing it to dynamically adapt to evolving market conditions without manual intervention.
🧩 Structure and Visual Elements
The indicator displays:
- 📍 Central Moving Average Line: The trend baseline.
- 📊 ATR-Based Deviation Bands: Upper and lower lines offset from the MA using an adaptive multiplier.
- 📈 Trend Coloring: All three lines change color based on whether the price is trending above or below the MA.
- 🔼🔽 Signal Arrows: Buy/sell arrows appear when the price reverts from an overextended zone.
🔍 Detailed Logic of Calculations
1. Moving Average
The center line is a moving average whose period is dynamically optimized based on historical performance. It reflects the current trend direction and is used for band calculations and signal logic.
2. ATR-Based Deviation Bands
Deviation bands are calculated as:
- Upper Band = MA + ATR × UpperDeviation
- Lower Band = MA − ATR × LowerDeviation
These bands do not use standard deviation. Instead, the ATR (with the same period as the MA) is multiplied by deviation coefficients, which are optimized in real time.
3. Trend Coloring
The indicator colors the bands based on the relative position of price closes:
- Bullish Trend (e.g., Blue): Recent closes are above the MA.
- Bearish Trend (e.g., Red): Recent closes are below the MA.
This helps traders visually identify the dominant trend at a glance.
🎯 Signal Generation Logic
🔼 Buy Signal:
- Price closes below the lower band for one or more bars.
- Then, a bar closes back above the lower band.
🔽 Sell Signal:
- Price closes above the upper band for one or more bars.
- Then, a bar closes back below the upper band.
Signals are reversion-based, not triggered by classical crossovers or oscillators. They aim to detect price exhaustion followed by reversal.
🧠 Neural Optimization Engine
The key innovation in Intelligent Moving is a lightweight neural self-optimization system.
🧪 Virtual Trade Simulation
At regular intervals (e.g., every 100 bars), the indicator performs simulations:
- Virtual Buy Entry: When price closes below the lower band and then closes above.
- Virtual Sell Entry: When price closes above the upper band and then closes below.
- Virtual Stop-Losses:
- - For longs: one pip below the lowest low during the signal zone.
- - For shorts: one pip above the highest high during the signal zone.
- Virtual Take-Profit Conditions:
- - Longs close when price closes above the MA.
- - Shorts close when price closes below the MA.
Simulated profits are calculated for each combination of parameters.
🔄 Neural Optimization Process
Using the results of these virtual trades, the built-in perceptron neural network evaluates:
- A range of moving average periods
- A range of upper and lower deviation coefficients
You define the optimization boundaries through:
- Base value
- Step size
- Number of passes
- Whether to base the search on the original value or the last-best result
The perceptron selects the best-performing combination, which is then used until the next optimization cycle.
This enables the indicator to continuously adapt to changing market dynamics.
🚀 Why Use Intelligent Moving?
- ✅ Dynamic self-optimization using neural logic
- ✅ Reversion-based signal system
- ✅ Visual trend clarity through adaptive coloring
- ✅ No manual tuning required
- ✅ Customizable visuals and alerts
⚠️ Additional Notes
- This script is closed-source, but the description provides sufficient transparency about its logic and mechanisms as required by TradingView rules.
- It does not repaint signals.
- The built-in training is purely historical, and parameters are only updated between intervals — not retroactively.
- Due to the complexity of the internal training and optimization logic, the script may take longer to load, especially when deep simulation depth or a large number of passes is selected.
- In rare cases, TradingView may show a “Script execution timeout” error if the combined loop workload exceeds platform limits. If that happens, try reducing:
- - Neurolearning Rates Depth
- - Neurolearning Periods Passes
- - Neurolearning Deviations Passes
TMA + 3 Stoch + Label Buy/Sell📌 Part 1: Description in English
Indicator Name: TMA + 3 Stoch + Label Buy/Sell
Overview:
This custom indicator is designed for trend-following and reversal trading strategies. It combines concepts from multiple technical analysis sources, including a Triangular Moving Average (TMA) band and a triple-stochastic system. The indicator plots adaptive bands to reflect dynamic price zones and marks Buy/Sell opportunities using confluence signals from price action and stochastic momentum shifts.
Usage Instructions:
Timeframe Setup:
Use 1H (H1) timeframe to identify the main trend direction based on the TMA slope and band alignment.
Use 5-minute (M5) timeframe to enter trades when Buy or Sell labels appear, confirming short-term alignment with the larger trend.
BTCUSD Trading Strategy:
Stop Loss (SL): 200 pips
Take Profit (TP): 500 pips
Other Pairs:
For non-BTCUSD pairs, traders are encouraged to backtest and determine appropriate SL/TP levels based on instrument volatility and structure.
Need help?
If you have any questions or need assistance with tuning or interpreting the signals, feel free to reach out anytime.
Smart Gap Indicator + EMAs📈 Smart Gap Indicator + EMAs
Spot high-impact gaps with precision and confidence.
🔍 What it does:
This tool identifies and highlights strategic price gaps that often precede strong directional moves. It filters out noise by combining advanced logic with volume activity and trend bias, helping you focus on the most relevant setups.
📊 Key Features:
Smart Gap Detection – Automatically detects meaningful gap up/down events based on dynamic thresholds.
EMA Trend Filter – Optional multi-EMA filter (10, 21, 50) to help align trades with the prevailing market trend.
Volume Spike Signal – Highlights volume surges that may indicate institutional involvement.
Clean Visuals – Configurable labels, shapes, and optional gap fill lines to aid quick interpretation.
Gap Performance Table – Summarizes recent gap activity to assess directional bias.
⚠️ Built-in Alerts:
Gap Up
Gap Down
Gap + Volume Spike
💡 Made by a trader, for traders.
Whether you're a swing trader, gap hunter, or momentum follower—this tool was crafted to give you an edge where it matters most: timing.
Dynamic Gap Probability ToolDynamic Gap Probability Tool measures the percentage gap between price and a chosen moving average, then analyzes your chart history to estimate the likelihood of the next candle moving up or down. It dynamically adjusts its sample size to ensure statistical robustness while focusing on the exact deviation level.
Originality and Value:
• Combines gap-based analysis with dynamic sample aggregation to balance precision and reliability.
• Automatically extends the sample when exact matches are scarce, avoiding misleading signals on rare extreme moves.
• Provides real “next-candle” probabilities based on historical occurrences rather than fixed thresholds or untested heuristics.
• Adds value by giving traders an evidence-based edge: you see how similar past deviations actually played out.
How It Works:
1. Calculate gap = (close – moving average) / moving average * 100.
2. Round the absolute gap to nearest percent (X%).
3. Count historical bars where gap ≥ X% above or ≤ –X% below.
4. If exact X% count is below the minimum occurrences threshold, include gaps at X+1%, X+2%, etc., until threshold is reached.
5. Compute “next-candle” green vs. red probabilities from the aggregated sample.
6. Display current gap, sample size, green probability, and red probability in a table.
Inputs:
• Moving Average Type (SMA, EMA, WMA, VWMA, HMA, SMMA, TMA)
• Moving Average Period (default 200)
• Minimum Occurrences Threshold (default 50)
• Table position and styling options
Examples:
• If price is 3% above the 200-period SMA and 120 occurrences ≥3% are found, with 84 green next candles (70%) and 36 red (30%), the script displays “3% | 120 | 70% green | 30% red.”
• If price is 8% below the SMA but only 20 exact matches exist, the script will include 9% and 10% gaps until it reaches 50 samples, then calculate probabilities from that broader set.
Why It’s Useful:
• Mean-reversion traders see green-probability signals at extreme overbought or oversold levels.
• Trend-followers identify continuation likelihood when red probability is high.
• Risk managers gauge reliability by inspecting sample size before acting on any signal.
Limitations:
• Historical probabilities do not guarantee future performance.
• Results depend on timeframe and symbol, backtest with your data before trading.
• Use realistic slippage and commission when overlaying on strategy scripts.
SMA Crossing Background Color (Multi-Timeframe)When day trading or scalping on lower timeframes, it’s often difficult to determine whether the broader market trend is moving upward or downward. To address this, I usually check higher timeframes. However, splitting the layout makes the charts too small and hard to read.
To solve this issue, I created an indicator that uses the background color to show whether the current price is above or below a moving average from a higher timeframe.
For example, if you set the SMA Length to 200 and the MT Timeframe to 5 minutes, the indicator will display a red background on the 1-minute chart when the price drops below the 200 SMA on the 5-minute chart. This helps you quickly recognize that the trend on the higher timeframe has turned bearish—without having to open a separate chart.
デイトレード、スキャルピングで短いタイムフレームでトレードをするときに、大きな動きは上に向いているのか下に向いているのかトレンドがわからなくなることがあります。
その時に上位足を確認するのですが、レイアウトをスプリットすると画面が小さくて見えにくくなるので、バックグラウンドの色で上位足の移動平均線では価格が上なのか下なのかを表示させるインジケーターを作りました。
例えば、SMA Length で200を選び、MT Timeframeで5分を選べば、1分足タイムフレームでトレードしていて雲行きが怪しくなってくるとBGが赤になり、5分足では200線以下に突入しているようだと把握することができます。
KST Strategy [Skyrexio]Overview
KST Strategy leverages Know Sure Thing (KST) indicator in conjunction with the Williams Alligator and Moving average to obtain the high probability setups. KST is used for for having the high probability to enter in the direction of a current trend when momentum is rising, Alligator is used as a short term trend filter, while Moving average approximates the long term trend and allows trades only in its direction. Also strategy has the additional optional filter on Choppiness Index which does not allow trades if market is choppy, above the user-specified threshold. Strategy has the user specified take profit and stop-loss numbers, but multiplied by Average True Range (ATR) value on the moment when trade is open. The strategy opens only long trades.
Unique Features
ATR based stop-loss and take profit. Instead of fixed take profit and stop-loss percentage strategy utilizes user chosen numbers multiplied by ATR for its calculation.
Configurable Trading Periods. Users can tailor the strategy to specific market windows, adapting to different market conditions.
Optional Choppiness Index filter. Strategy allows to choose if it will use the filter trades with Choppiness Index and set up its threshold.
Methodology
The strategy opens long trade when the following price met the conditions:
Close price is above the Alligator's jaw line
Close price is above the filtering Moving average
KST line of Know Sure Thing indicator shall cross over its signal line (details in justification of methodology)
If the Choppiness Index filter is enabled its value shall be less than user defined threshold
When the long trade is executed algorithm defines the stop-loss level as the low minus user defined number, multiplied by ATR at the trade open candle. Also it defines take profit with close price plus user defined number, multiplied by ATR at the trade open candle. While trade is in progress, if high price on any candle above the calculated take profit level or low price is below the calculated stop loss level, trade is closed.
Strategy settings
In the inputs window user can setup the following strategy settings:
ATR Stop Loss (by default = 1.5, number of ATRs to calculate stop-loss level)
ATR Take Profit (by default = 3.5, number of ATRs to calculate take profit level)
Filter MA Type (by default = Least Squares MA, type of moving average which is used for filter MA)
Filter MA Length (by default = 200, length for filter MA calculation)
Enable Choppiness Index Filter (by default = true, setting to choose the optional filtering using Choppiness index)
Choppiness Index Threshold (by default = 50, Choppiness Index threshold, its value shall be below it to allow trades execution)
Choppiness Index Length (by default = 14, length used in Choppiness index calculation)
KST ROC Length #1 (by default = 10, value used in KST indicator calculation, more information in Justification of Methodology)
KST ROC Length #2 (by default = 15, value used in KST indicator calculation, more information in Justification of Methodology)
KST ROC Length #3 (by default = 20, value used in KST indicator calculation, more information in Justification of Methodology)
KST ROC Length #4 (by default = 30, value used in KST indicator calculation, more information in Justification of Methodology)
KST SMA Length #1 (by default = 10, value used in KST indicator calculation, more information in Justification of Methodology)
KST SMA Length #2 (by default = 10, value used in KST indicator calculation, more information in Justification of Methodology)
KST SMA Length #3 (by default = 10, value used in KST indicator calculation, more information in Justification of Methodology)
KST SMA Length #4 (by default = 15, value used in KST indicator calculation, more information in Justification of Methodology)
KST Signal Line Length (by default = 10, value used in KST indicator calculation, more information in Justification of Methodology)
User can choose the optimal parameters during backtesting on certain price chart.
Justification of Methodology
Before understanding why this particular combination of indicator has been chosen let's briefly explain what is KST, Williams Alligator, Moving Average, ATR and Choppiness Index.
The KST (Know Sure Thing) is a momentum oscillator developed by Martin Pring. It combines multiple Rate of Change (ROC) values, smoothed over different timeframes, to identify trend direction and momentum strength. First of all, what is ROC? ROC (Rate of Change) is a momentum indicator that measures the percentage change in price between the current price and the price a set number of periods ago.
ROC = 100 * (Current Price - Price N Periods Ago) / Price N Periods Ago
In our case N is the KST ROC Length inputs from settings, here we will calculate 4 different ROCs to obtain KST value:
KST = ROC1_smooth × 1 + ROC2_smooth × 2 + ROC3_smooth × 3 + ROC4_smooth × 4
ROC1 = ROC(close, KST ROC Length #1), smoothed by KST SMA Length #1,
ROC2 = ROC(close, KST ROC Length #2), smoothed by KST SMA Length #2,
ROC3 = ROC(close, KST ROC Length #3), smoothed by KST SMA Length #3,
ROC4 = ROC(close, KST ROC Length #4), smoothed by KST SMA Length #4
Also for this indicator the signal line is calculated:
Signal = SMA(KST, KST Signal Line Length)
When the KST line rises, it indicates increasing momentum and suggests that an upward trend may be developing. Conversely, when the KST line declines, it reflects weakening momentum and a potential downward trend. A crossover of the KST line above its signal line is considered a buy signal, while a crossover below the signal line is viewed as a sell signal. If the KST stays above zero, it indicates overall bullish momentum; if it remains below zero, it points to bearish momentum. The KST indicator smooths momentum across multiple timeframes, helping to reduce noise and provide clearer signals for medium- to long-term trends.
Next, let’s discuss the short-term trend filter, which combines the Williams Alligator and Williams Fractals. Williams Alligator
Developed by Bill Williams, the Alligator is a technical indicator that identifies trends and potential market reversals. It consists of three smoothed moving averages:
Jaw (Blue Line): The slowest of the three, based on a 13-period smoothed moving average shifted 8 bars ahead.
Teeth (Red Line): The medium-speed line, derived from an 8-period smoothed moving average shifted 5 bars forward.
Lips (Green Line): The fastest line, calculated using a 5-period smoothed moving average shifted 3 bars forward.
When the lines diverge and align in order, the "Alligator" is "awake," signaling a strong trend. When the lines overlap or intertwine, the "Alligator" is "asleep," indicating a range-bound or sideways market. This indicator helps traders determine when to enter or avoid trades.
The next indicator is Moving Average. It has a lot of different types which can be chosen to filter trades and the Least Squares MA is used by default settings. Let's briefly explain what is it.
The Least Squares Moving Average (LSMA) — also known as Linear Regression Moving Average — is a trend-following indicator that uses the least squares method to fit a straight line to the price data over a given period, then plots the value of that line at the most recent point. It draws the best-fitting straight line through the past N prices (using linear regression), and then takes the endpoint of that line as the value of the moving average for that bar. The LSMA aims to reduce lag and highlight the current trend more accurately than traditional moving averages like SMA or EMA.
Key Features:
It reacts faster to price changes than most moving averages.
It is smoother and less noisy than short-term EMAs.
It can be used to identify trend direction, momentum, and potential reversal points.
ATR (Average True Range) is a volatility indicator that measures how much an asset typically moves during a given period. It was introduced by J. Welles Wilder and is widely used to assess market volatility, not direction.
To calculate it first of all we need to get True Range (TR), this is the greatest value among:
High - Low
abs(High - Previous Close)
abs(Low - Previous Close)
ATR = MA(TR, n) , where n is number of periods for moving average, in our case equals 14.
ATR shows how much an asset moves on average per candle/bar. A higher ATR means more volatility; a lower ATR means a calmer market.
The Choppiness Index is a technical indicator that quantifies whether the market is trending or choppy (sideways). It doesn't indicate trend direction — only the strength or weakness of a trend. Higher Choppiness Index usually approximates the sideways market, while its low value tells us that there is a high probability of a trend.
Choppiness Index = 100 × log10(ΣATR(n) / (MaxHigh(n) - MinLow(n))) / log10(n)
where:
ΣATR(n) = sum of the Average True Range over n periods
MaxHigh(n) = highest high over n periods
MinLow(n) = lowest low over n periods
log10 = base-10 logarithm
Now let's understand how these indicators work in conjunction and why they were chosen for this strategy. KST indicator approximates current momentum, when it is rising and KST line crosses over the signal line there is high probability that short term trend is reversing to the upside and strategy allows to take part in this potential move. Alligator's jaw (blue) line is used as an approximation of a short term trend, taking trades only above it we want to avoid trading against trend to increase probability that long trade is going to be winning.
Almost the same for Moving Average, but it approximates the long term trend, this is just the additional filter. If we trade in the direction of the long term trend we increase probability that higher risk to reward trade will hit the take profit. Choppiness index is the optional filter, but if it turned on it is used for approximating if now market is in sideways or in trend. On the range bounded market the potential moves are restricted. We want to decrease probability opening trades in such condition avoiding trades if this index is above threshold value.
When trade is open script sets the stop loss and take profit targets. ATR approximates the current volatility, so we can make a decision when to exit a trade based on current market condition, it can increase the probability that strategy will avoid the excessive stop loss hits, but anyway user can setup how many ATRs to use as a stop loss and take profit target. As was said in the Methodology stop loss level is obtained by subtracting number of ATRs from trade opening candle low, while take profit by adding to this candle's close.
Backtest Results
Operating window: Date range of backtests is 2023.01.01 - 2025.05.01. It is chosen to let the strategy to close all opened positions.
Commission and Slippage: Includes a standard Binance commission of 0.1% and accounts for possible slippage over 5 ticks.
Initial capital: 10000 USDT
Percent of capital used in every trade: 60%
Maximum Single Position Loss: -5.53%
Maximum Single Profit: +8.35%
Net Profit: +5175.20 USDT (+51.75%)
Total Trades: 120 (56.67% win rate)
Profit Factor: 1.747
Maximum Accumulated Loss: 1039.89 USDT (-9.1%)
Average Profit per Trade: 43.13 USDT (+0.6%)
Average Trade Duration: 27 hours
These results are obtained with realistic parameters representing trading conditions observed at major exchanges such as Binance and with realistic trading portfolio usage parameters.
How to Use
Add the script to favorites for easy access.
Apply to the desired timeframe and chart (optimal performance observed on 1h BTC/USDT).
Configure settings using the dropdown choice list in the built-in menu.
Set up alerts to automate strategy positions through web hook with the text: {{strategy.order.alert_message}}
Disclaimer:
Educational and informational tool reflecting Skyrexio commitment to informed trading. Past performance does not guarantee future results. Test strategies in a simulated environment before live implementation.
Quantum Fibonacci Flow
Quantum Fib Ribbon (QFLOW)
📖 How It Works
A three-band ribbon built from Fibonacci-scaled moving averages, filled and colored to reflect current momentum strength and direction.
Green when bullish flow is strong, red when bearish flow dominates, and orange in between to highlight slowing momentum.
⚙️ Key Controls
* Base Length: Adjusts the ribbon’s overall lookback.
* Ribbon Opacity: How solid or translucent the fill appears.
* Momentum Scale & Exponent: Fine-tune how sensitively the ribbon reacts to price speed versus volatility.
* Override Threshold: Determines at what momentum level the ribbon “snaps” to full green or red.
🚨 Over-Extension Logic
When price extends significantly above or below the ribbon, it often signals exhaustion.
The first return to the ribbon after such an extension frequently acts as strong support or resistance — offering high-probability trade setups.
🔺 Optional Trade Signals
Enable the over-extension alert to mark these key areas:
* A green triangle shows price extended below the ribbon, then retested → potential long.
* A red triangle shows price extended above, then retested → potential short.
🎯 How to Trade
• Breakout-Retest Setup: Watch for over-extended price moves. The first comeback to the ribbon often marks key levels of interest for a reversal or continuation.
Fourier Weighted Moving Average-(FWMA)Fourier Weighted Moving Average (FWMA)
About Fourier and His Theory
Joseph Fourier (1768–1830) was a French mathematician and physicist best known for his work on heat transfer and periodic functions. His most significant contribution to science is what we now call Fourier Analysis.
What Is Fourier's Theory?
Fourier’s theory states that:
Any repeating (periodic) signal or pattern can be broken down into a sum of simple sine and cosine waves.
This idea became the foundation of signal processing, modern physics, and data smoothing techniques — including those used in financial markets.
Key Concepts of Fourier’s Theory
1. Decomposition of Signals
Complex waveforms can be expressed as combinations of basic sine waves with different frequencies and amplitudes.
2. Frequency Domain View
Instead of viewing data in time (or price), you can analyze its frequency — how often certain movements repeat.
3. Smoothing and Filtering
By focusing only on certain frequencies (e.g., slower or longer cycles), Fourier methods allow you to filter out short-term noise and focus on the trend.
4. Applications in Finance
In trading, Fourier principles help design indicators that:
* Remove short-term market noise
* Emphasize dominant cycles
* Provide cleaner trend direction
Why It Matters for This Indicator
The Fourier Weighted Moving Average (FWMA) used in this indicator applies a custom weight derived from a sin² function, inspired by Fourier’s work on wave behavior. This gives more influence to the mid-section of the price data, making the average line smoother and more stable than traditional methods like SMA or EMA.
Unlike basic moving averages, the FWMA reacts to price changes more fluidly while reducing whipsaws, which is especially useful for trend-following strategies.
Input Settings and Controls
This section outlines all configurable fields and buttons available in the indicator, grouped for clarity:
Main Settings
* Source
Defines the price source used in the FWMA calculation. Options typically include close, open, hl2, etc.
* FWMA – 1 (Length)
Sets the period for the first Fourier Weighted Moving Average. Shorter lengths produce faster, more sensitive lines.
* FWMA – 2 (Length)
Sets the period for the second FWMA, typically used as a slower or long-term trend filter.
* Weight Epsilon
A small constant added to the weight formula to prevent division by zero and improve numeric stability in the FWMA formula.
Slope Sensitivity
* Slope Sensitivity (Bars)
This field defines the number of bars used to calculate the slope of each FWMA. The slope determines whether the line is rising or falling and is used to change the line color accordingly.
* Enable Slope Coloring (Toggle)
When enabled, both FWMA lines change color based on their slope:
* Positive slope = trend up color
* Negative slope = trend down color
If disabled, lines are shown in a neutral (gray) color.
Ribbon Settings (Group: Ribbon)
* Enable Ribbon for FWMA-2 (Toggle)
Turns the ribbon feature on or off. When enabled, the script plots two additional lines slightly above and below FWMA-2.
* Ribbon Thickness
Controls the line width of the ribbon above and below FWMA-2. Values from 1 to 100 are allowed, giving full control over ribbon visual prominence.
Contrarian 100 MAPairs nicely with Enhanced-Stock-Ticker-with-50MA-vs-200MA located here:
Description
The Contrarian 100 MA is a sophisticated Pine Script v6 indicator designed for traders seeking to identify key market structure shifts and trend reversals using a combination of a 100-period Simple Moving Average (SMA) envelope and Inner Circle Trader (ICT) Break of Structure (BoS) and Market Structure Shift (MSS) logic. By overlaying a semi-transparent SMA-based shadow on the price chart and plotting bullish and bearish structure signals, this indicator helps traders visualize critical price levels and potential trend changes. It leverages higher timeframe (HTF) pivot points and dynamic logic to adapt to various chart timeframes, making it ideal for swing and contrarian trading strategies. Customizable colors, timeframes, and alert conditions enhance its versatility for manual and automated trading setups.
Key Features
SMA Envelope: Plots a 100-period SMA for high and low prices, creating a semi-transparent (50% opacity) purple shadow to highlight the price range and provide context for price movements.
ICT BoS/MSS Logic: Identifies Break of Structure (BoS) and Market Structure Shift (MSS) signals for both bullish and bearish conditions, based on HTF pivot points.
Dynamic Timeframe Support: Adjusts pivot detection based on user-selected HTF (default: 1D) and chart timeframe (1M, 5M, 15M, 30M, 1H, 4H, 1D), ensuring adaptability across markets.
Visual Signals: Draws dotted lines for BoS (bullish/bearish) and MSS (bullish/bearish) signals at pivot levels, with customizable colors for easy identification.
Contrarian Approach: Signals potential reversals by combining SMA context with ICT structure breaks, ideal for traders looking to capitalize on trend shifts.
Alert Conditions: Supports alerts for bullish/bearish BoS and MSS signals, enabling integration with TradingView’s alert system for automated trading.
Performance Optimization: Uses efficient pivot detection and line management to minimize resource usage while maintaining accuracy.
Technical Details
SMA Calculation:
Computes 100-period SMAs for high (smaHigh) and low (smaLow) prices.
Plots invisible SMAs (fully transparent) and fills the area between them with 50% transparent purple for visual context.
Pivot Detection:
Uses ta.pivothigh and ta.pivotlow to identify HTF swing points, with dynamic lookback periods (rlBars: 5 for daily, 2 for intraday).
Tracks pivot highs (pH, nPh) and lows (pL, nPl) using a custom piv type for price and time.
BoS/MSS Logic:
Bullish BoS: Triggered when price breaks above a pivot high in a bullish trend, drawing a line at the pivot level.
Bearish BoS: Triggered when price breaks below a pivot low in a bearish trend.
Bullish MSS: Occurs when price breaks a pivot high in a bearish trend, signaling a potential trend reversal.
Bearish MSS: Occurs when price breaks a pivot low in a bullish trend.
Lines are drawn using line.new with xloc.bar_time for precise alignment, styled as dotted with customizable colors.
HTF Integration: Fetches HTF close prices and pivot data using request.security with lookahead_on for accurate signal timing.
Line Management: Maintains an array of lines (lin), removing outdated lines when new MSS signals occur to keep the chart clean.
Pivot Reset: Clears broken pivots (e.g., when price exceeds a pivot high or falls below a pivot low) to ensure fresh signal generation.
How to Use
Add to Chart:
Copy the script into TradingView’s Pine Editor and apply it to your chart.
Configure Settings:
SMA Length: Adjust the SMA period (default: 100 bars) to suit your trading style.
Structure Timeframe: Set the HTF for pivot detection (default: 1D).
Chart Timeframe: Select the chart timeframe (1M, 5M, 15M, 30M, 1H, 4H, 1D) to adjust pivot sensitivity.
Colors: Customize bullish/bearish BoS and MSS line colors via input settings.
Interpret Signals:
Bullish BoS: White dotted line (default) at a broken pivot high in a bullish trend, indicating trend continuation.
Bearish BoS: White dotted line at a broken pivot low in a bearish trend.
Bullish MSS: White dotted line at a broken pivot high in a bearish trend, suggesting a reversal to bullish.
Bearish MSS: White dotted line at a broken pivot low in a bullish trend, suggesting a reversal to bearish.
Use the SMA shadow to gauge price position within the recent range.
Set Alerts:
Create alerts for bullish/bearish BoS and MSS signals using TradingView’s alert system.
Customize Visuals:
Adjust line colors or SMA fill transparency via TradingView’s settings for better visibility.
Example Use Cases
Swing Trading: Use MSS signals to enter trades at potential trend reversals, with the SMA envelope confirming price extremes.
Contrarian Trading: Capitalize on BoS and MSS signals to trade against prevailing trends, using the SMA shadow for context.
Automated Trading: Integrate BoS/MSS alerts with trading bots for systematic entries and exits.
Multi-Timeframe Analysis: Combine HTF signals (e.g., 1D) with lower timeframe charts (e.g., 1H) for precise entries.
Notes
Testing: Backtest the indicator on your chosen market and timeframe to validate performance.
Compatibility: Built for Pine Script v6 and tested on TradingView as of June 19, 2025.
Limitations: Signals rely on HTF pivot accuracy, which may lag in fast-moving markets. Adjust rlBars or timeframe for sensitivity.
Optional Enhancements: Consider uncommenting or adding a histogram for SMA divergence (e.g., smaHigh - smaLow) for additional insights.
Acknowledgments
This indicator combines ICT’s market structure concepts with a dynamic SMA envelope to provide a unique contrarian trading tool. Share your feedback or suggestions in the TradingView comments, and happy trading!
Trend Blend
Trend blend is my new indicator. I use it to identify my bias when trading and filter out fake setups that are going in the wrong direction.
Trend blend utilises the 9 EMA (Red), 21 EMA (Black), and if you trade futures or Bitcoin, you can also use the VWAP (Blue).
There is also a table at the top right that displays the chart time frame bias
I prefer to use the 1-hour time frame for bias and execute the trades on 5-minute charts, mainly, and sometimes on the 1-minute for a smaller stoploss.
Here's an example of the trade I took during the London session on XAU/USD
1 hour bias was Bearish
Price broke out of the range
I waited for the London session to open, where I ended up taking a short on the 5-minute time frame as we broke out of the pre-London range
Entry was at the Fair Value Gap (5-minute bias was also Bearish as price traded into the FVG)
Stoploss was at the last high
Take Profit was the next major support level
Another set that I like to trade with the Trend blend is when price is trending bullish and price trades inside the 9 and 21 EMA, and there is a bullish candle closer above the 9 EMA with Stoploss below the low of the bullish candle and Take profit between 1-2 Risk to Reward
Same when there's a bearish trend, I wait for price to trade inside the 9 and 21 EMA, and I'll take sells when a bearish candle closes below the 9 EMA.
This setup works best in strong trends, or it can be used to enter a trade on a pullback or to scale into an existing trade.
PRO Investing - LevelPRO Investing - Level
📊 Dynamic Support/Resistance
This indicator plots the PRO Investing Level, defined as the midpoint between the highest high and lowest low over the past 252 trading days (default lookback period, equivalent to ~1 year). It acts as a key mean-reversion reference level, useful for identifying potential support/resistance zones or market equilibrium levels.
Features:
🕰️ Option to display only today’s level or historical levels.
⚙️ Customizable lookback period for flexibility across timeframes and strategies.
📉 Teal line plotted directly on the chart, highlighting this institutional-grade level.
Ideal for traders looking to anchor price action to significant historical ranges—particularly useful in mean-reversion, breakout, or volatility compression strategies.
OBV with MA & Bollinger Bands by Marius1032OBV with MA & Bollinger Bands by Marius1032
This script adds customizable moving averages and Bollinger Bands to the classic OBV (On Balance Volume) indicator. It helps identify volume-driven momentum and trend strength.
Features:
OBV-based trend tracking
Optional smoothing: SMA, EMA, RMA, WMA, VWMA
Optional Bollinger Bands with SMA
Potential Combinations and Trading Strategies:
Breakouts: Look for price breakouts from the Bollinger Bands, and confirm with a rising OBV for an uptrend or falling OBV for a downtrend.
Trend Reversals: When the price touches a Bollinger Band, examine the OBV for divergence. A bullish divergence (price lower low, OBV higher low) near the lower band could signal a reversal.
Volume Confirmation: Use OBV to confirm the strength of the trend indicated by Bollinger Bands. For example, if the BBs indicate an uptrend and OBV is also rising, it reinforces the bullish signal.
1. On-Balance Volume (OBV):
Purpose: OBV is a momentum indicator that uses volume flow to predict price movements.
Calculation: Volume is added on up days and subtracted on down days.
Interpretation: Rising OBV suggests potential upward price movement. Falling OBV suggests potential lower prices.
Divergence: Divergence between OBV and price can signal potential trend reversals.
2. Moving Average (MA):
Purpose: Moving Averages smooth price fluctuations and help identify trends.
Combination with OBV: Pairing OBV with MAs helps confirm trends and identify potential reversals. A crossover of the OBV line and its MA can signal a trend reversal or continuation.
3. Bollinger Bands (BB):
Purpose: BBs measure market volatility and help identify potential breakouts and trend reversals.
Structure: They consist of a moving average (typically 20-period) and two standard deviation bands.
Combination with OBV: Combining BBs with OBV allows for a multifaceted approach to market analysis. For example, a stock hitting the lower BB with a rising OBV could indicate accumulation and a potential upward reversal.
Created by: Marius1032
Chebyshev-Gauss Convergence DivergenceThe Chebyshev-Gauss Convergence Divergence is a momentum indicator that leverages the Chebyshev-Gauss Moving Average (CG-MA) to provide a smoother and more responsive alternative to traditional oscillators like the MACD. For more information see the moving average script:
How it works:
It calculates a fast CG-MA and a slow CG-MA. The CG-MA uses Gauss-Chebyshev quadrature to compute a weighted average, which can offer a better trade-off between lag and smoothness compared to simple or exponential MAs.
The Oscillator line is the difference between the fast CG-MA and the slow CG-MA.
A Signal Line, which is a simple moving average of the Oscillator line, is plotted to show the average trend of the oscillator.
A Histogram is plotted, representing the difference between the Oscillator and the Signal Line. The color of the histogram bars changes to indicate whether momentum is strengthening or weakening.
How to use:
Crossovers: A buy signal can be generated when the Oscillator line crosses above the Signal line. A sell signal can be generated when it crosses below.
Zero Line: When the Oscillator crosses above the zero line, it indicates upward momentum (fast MA is above slow MA).When it crosses below zero, it indicates downward momentum.
Divergence: Like with the MACD, look for divergences between the oscillator and price action to spot potential reversals.
Histogram: The histogram provides a visual representation of the momentum. When the bars are growing, momentum is increasing. When they are shrinking, momentum is fading.
CGMALibrary "CGMA"
This library provides a function to calculate a moving average based on Chebyshev-Gauss Quadrature. This method samples price data more intensely from the beginning and end of the lookback window, giving it a unique character that responds quickly to recent changes while also having a long "memory" of the trend's start. Inspired by reading rohangautam.github.io
What is Chebyshev-Gauss Quadrature?
It's a numerical method to approximate the integral of a function f(x) that is weighted by 1/sqrt(1-x^2) over the interval . The approximation is a simple sum: ∫ f(x)/sqrt(1-x^2) dx ≈ (π/n) * Σ f(xᵢ) where xᵢ are special points called Chebyshev nodes.
How is this applied to a Moving Average?
A moving average can be seen as the "mean value" of the price over a lookback window. The mean value of a function with the Chebyshev weight is calculated as:
Mean = /
The math simplifies beautifully, resulting in the mean being the simple arithmetic average of the function evaluated at the Chebyshev nodes:
Mean = (1/n) * Σ f(xᵢ)
What's unique about this MA?
The Chebyshev nodes xᵢ are not evenly spaced. They are clustered towards the ends of the interval . We map this interval to our lookback period. This means the moving average samples prices more intensely from the beginning and the end of the lookback window, and less intensely from the middle. This gives it a unique character, responding quickly to recent changes while also having a long "memory" of the start of the trend.