MACD StrategyThis script sends buy and sell signals as alerts to 3Commas (online software with trading bots in cryptocurreny)
It's based on 2 indicators:
- MACD
- 12 EMA and 26 EMA
When the 12 EMA and 26 EMA crossover, the MACD line crosses above 0. The goal here is to look for buy signals when the MACD and Signal are below 0, the histogram is positive, and there was or will be a 12 EMA and 26 EMA crossover.
I struggle with the following:
- There are multiple ways to use this as a crossover signal. I want to calculate the win rate of every posibility.
- What should be my take profit and my stoploss?
I think a 2:1 R/R,and a 60% win rate would make a great strategy! I could use some advice.
Recherche dans les scripts pour "12月4号是什么星座"
PowerX Strategy Bar Coloring [OFFICIAL VERSION]This script colors the bars according to the PowerX Strategy by Markus Heitkoetter:
The PowerX Strategy uses 3 indicators:
- RSI (7)
- Stochastics (14, 3, 3)
- MACD (12, 26 , 9)
The bars are colored GREEN if...
1.) The RSI (7) is above 50 AND
2.) The Stochastic (14, 3, 3) is above 50 AND
3.) The MACD (12, 26, 9) is above its Moving Average, i.e. MACD Histogram is positive.
The bars are colored RED if...
1.) The RSI (7) is below 50 AND
2.) The Stochastic (14, 3, 3) is below 50 AND
3.) The MACD (12, 26, 9) is below its Moving Average, i.e. MACD Histogram is negative.
If only 2 of these 3 conditions are met, then the bars are black (default color)
We highly recommend plotting the indicators mentioned above on your chart, too, so that you can see when bars are getting close to being "RED" or "GREEN", e.g. RSI is getting close to the 50 line.
Price Action and 3 EMAs Momentum plus Sessions FilterThis indicator plots on the chart the parameters and signals of the Price Action and 3 EMAs Momentum plus Sessions Filter Algorithmic Strategy. The strategy trades based on time-series (absolute) and relative momentum of price close, highs, lows and 3 EMAs.
I am still learning PS and therefore I have only been able to write the indicator up to the Signal generation. I plan to expand the indicator to Entry Signals as well as the full Strategy.
The strategy works best on EURUSD in the 15 minutes TF during London and New York sessions with 1 to 1 TP and SL of 30 pips with lots resulting in 3% risk of the account per trade. I have already written the full strategy in another language and platform and back tested it for ten years and it was profitable for 7 of the 10 years with average profit of 15% p.a which can be easily increased by increasing risk per trade. I have been trading it live in that platform for over two years and it is profitable.
Contributions from experienced PS coders in completing the Indicator as well as writing the Strategy and back testing it on Trading View will be appreciated.
STRATEGY AND INDICATOR PARAMETERS
Three periods of 12, 48 and 96 in the 15 min TF which are equivalent to 3, 12 and 24 hours i.e (15 min * period / 60 min) are the foundational inputs for all the parameters of the PA & 3 EMAs Momentum + SF Algo Strategy and its Indicator.
3 EMAs momentum parameters and conditions
• FastEMA = ema of 12 periods
• MedEMA = ema of 48 periods
• SlowEMA = ema of 96 periods
• All the EMAs analyse price close for up to 96 (15 min periods) equivalent to 24 hours
• There’s Upward EMA momentum if price close > FastEMA and FastEMA > MedEMA and MedEMA > SlowEMA
• There’s Downward EMA momentum if price close < FastEMA and FastEMA < MedEMA and MedEMA < SlowEMA
PA momentum parameters and conditions
• HH = Highest High of 48 periods from 1st closed bar before current bar
• LL = Lowest Low of 48 periods from 1st closed bar from current bar
• Previous HH = Highest High of 84 periods from 12th closed bar before current bar
• Previous LL = Lowest Low of 84 periods from 12th closed bar before current bar
• All the HH & LL and prevHH & prevLL are within the 96 periods from the 1st closed bar before current bar and therefore indicative of momentum during the past 24 hours
• There’s Upward PA momentum if price close > HH and HH > prevHH and LL > prevLL
• There’s Downward PA momentum if price close < LL and LL < prevLL and HH < prevHH
Signal conditions and Status (BuySignal, SellSignal or Neutral)
• The strategy generates Buy or Sell Signals if both 3 EMAs and PA momentum conditions are met for each direction and these occur during the London and New York sessions
• BuySignal if price close > FastEMA and FastEMA > MedEMA and MedEMA > SlowEMA and price close > HH and HH > prevHH and LL > prevLL and timeinrange (LDN&NY) else Neutral
• SellSignal if price close < FastEMA and FastEMA < MedEMA and MedEMA < SlowEMA and price close < LL and LL < prevLL and HH < prevHH and timeinrange (LDN&NY) else Neutral
Entry conditions and Status (EnterBuy, EnterSell or Neutral)(NOT CODED YET)
• ENTRY IS NOT AT THE SIGNAL BAR but at the current bar tick price retracement to FastEMA after the signal
• EnterBuy if current bar tick price <= FastEMA and current bar tick price > prevHH at the time of the Buy Signal
• EnterSell if current bar tick price >= FastEMA and current bar tick price > prevLL at the time of the Sell Signal
Smart labelling - Candlestick FunctionOftentimes a single look at the candlestick configuration happens to be enough to understand what is going on. The chandlestick function is an experiment in smart labelling that produces candles for various time frames, not only for the fixed 1m, 3m , 5m, 15m, etc. ones, and helps in decision-making when eye-balling the chart. This function generates up to 12 last candlesticks , which is generally more than enough.
Mind that since this is an experiment, the function does not cover all possible combinations. In some time frames the produced candles overlap. This is a todo item for those who are unterested. For instance, the current version covers the following TFs:
Chart - TF in the script
1m - 1-20,24,30,32
3m - 1-10
5m - 1-4,6,9,12,18,36
15m - 1-4,6,12
Tested chart TFs: 1m, 3m ,5m,15m. Tested securities: BTCUSD , EURUSD
[astropark] Power Tools Overlay//******************************************************************************
// Power Tools Overlay
// Inner Version 1.2.1 13/12/2018
// Developer: iDelphi
// Developer: astropark (Ichimoku Cloud), SMA EMA & Cross tools
//------------------------------------------------------------------------------
// 21/11/2018 Added EMA SMA WMA
// 21/11/2018 Added SMA-EMA EMA-WMA WMA-SMA (Thanks to mariobros1 for the idea of the Simultaneous MA)
// 21/11/2018 Added Bollinger Bands
// 21/11/2018 Added Ichimoku Cloud (Thanks to astropark for all the code of the Ichimoku Cloud)
// 23/11/2018 Show all the indicator as default
// 23/11/2018 Added a cross when single Moving Averages crossing (Thanks to astropark for the idea)
// 24/11/2018 Descriptions Fix
// 24/11/2018 Added Option to enable/disable all Moving Averages
// 10/12/2018 Added EMAs and Crosses
// 13/12/2018 indicator number fixes
//******************************************************************************
[Delphi] Power Tools OscillatorsFEATURES
- RSI
- Stochastic
//******************************************************************************
// Power Tools Oscillators
// Inner Version 1.0 04/12/2018
// Developer: iDelphi
//------------------------------------------------------------------------------
// 04/12/2018 Added RSI
// 04/12/2018 Added Stochastic
//******************************************************************************
Multi SMA EMA WMA HMA BB (4x3 MAs Bollinger Bands) Pro MTF - RRBMulti SMA EMA WMA HMA 4x3 Moving Averages with Bollinger Bands Pro MTF by RagingRocketBull 2018
Version 1.0
This indicator shows multiple MAs of any type SMA EMA WMA HMA etc with BB and MTF support, can show MAs as dynamically moving levels.
There are 4 MA groups + 1 BB group. You can assign any type/timeframe combo to a group, for example:
- EMAs 50,100,200 x H1, H4, D1, W1 (4 TFs x 3 MAs x 1 type)
- EMAs 8,13,21,55,100,200 x M15, H1 (2 TFs x 6 MAs x 1 type)
- D1 EMAs and SMAs 12,26,50,100,200,400 (1 TF x 6 MAs x 2 types)
- H1 WMAs 7,77,231; H4 HMAs 50,100,200; D1 EMAs 144,169,233; W1 SMAs 50,100,200 (4 TFs x 3 MAs x 4 types)
- +1 extra MA type/timeframe for BB
compile time: 25-30 sec
full redraw time after parameter change in UI: 3 sec
There are several versions: Simple, MTF, Pro MTF, Advanced MTF and Ultimate MTF. This is the Pro MTF version. The Differences are listed below. All versions have BB
- Simple: you have 2 groups of MAs that can be assigned any type (5+5)
- MTF: +2 custom Timeframes for each group (2x5 MTF)
- Pro MTF: +4 custom Timeframes for each group (4x3 MTF), MA levels and show max bars back options
- Advanced MTF: +2 extra MAs/group (4x5 MTF), custom Ticker/Symbol, backreferences for type, TF and MA lengths in UI
- Ultimate MTF: +individual settings for each MA, custom Ticker/Symbols
Features:
- 4x3 = 12 MAs of any type including Hull Moving Average (HMA)
- 4x MTF groups with step line smoothing
- BB +1 extra TF/type for BB MAs
- 12 MA levels with adjustable group offsets, indents and shift
- show max bars back
- you can show/hide both groups of MAs/levels and individual MAs
Notes:
1. based on 3EmaBB, uses plot*, barssince and security functions
2. you can't set certain constants from input due to Pinescript limitations - change the code as needed, recompile and use as a private version
3. Levels = trackprice implementation
4. Show Max Bars Back = show_last implementation
5. uses timeframe textbox instead of input resolution to allow for 120 240 and other custom TFs. Also supports TFs in hours: 2H or H2
6. swma has a fixed length = 4, alma and linreg have additional offset and smoothing params
7. Smoothing is applied by default for visual aesthetics on MTF. To use exact ma mtf values (lines with stair stepping) - disable it
MTF Notes:
- uses simple timeframe textbox instead of input resolution dropdown to allow for 120, 240 and other custom TFs, also supports timeframes in H: 2H, H2
- Groups that are not assigned a Custom TF will use Current Timeframe (0).
- MTF will work for any MA type assigned to the group
- MTF works both ways: you can display a higher TF MA/BB on a lower TF or a lower TF MA/BB on a higher TF.
- MTF MA values are normally aligned at the boundary of their native timeframe. This produces stair stepping when a higher TF MA is viewed on a lower TF.
Therefore X Y Point Density/Smoothing is applied by default on MA MTF for visual aesthetics. Set both to 0 to disable and see exact ma mtf values (lines with stair stepping and original mtf alignment).
- Smoothing is disabled for BB MTF bands because fill doesn't work with smoothed MAs after duplicate values are replaced with na.
- MTF MA Value fluctuation is possible on the current bar due to default security lookahead
Smoothing:
- X,Y == 0 - X,Y smoothing disabled (stair stepping on high TFs)
- X == 0, Y > 0 - X,Y smoothing applied to all TFs
- Y == 0, X > 0 - X smoothing applied to all TFs < deltaX_max_tf, Y smoothing disabled
- X > 0, Y > 0 - Y smoothing applied to all TFs, then X smoothing applied to all TFs < deltaX_max_tf
X Smoothing with Y == 0 - shows only every deltaX-th point starting from the first bar.
X Smoothing with Y > 0 - shows only every deltaX-th point starting from the last shown Y point, essentially filling huge gaps remaining after Y Smoothing with points and preserving the curve's general shape
X Smoothing on high TFs with already scarce points produces weird curve shapes, it works best only on high density lower TFs
Y Smoothing reduces points on all TFs, removes adjacent points with prices within deltaY, while preserving the smaller curve details.
A combination of X,Y produces the most accurate smoothing. Higher delta value - larger range, more points removed.
Show Max Bars Back:
- can't set plot show_last from input -> implemented using a timenow based range check
- you can't delete/modify history once plotted, so essentially it just sets a start point for plotting (from num_bars bars back) that works only in realtime mode (not in replay)
Levels:
You can plot current MA value using plot trackprice=true or by checking Show Price Line in Style. Problem is:
- you can only change color (not the dashed line style, width), have both ma + price line (not just the line), and it's full screen wide
- you can't set plot trackprice from input => implemented using plotshape/plotchar with fixed text labels serving as levels
- there's no other way of creating a dynamic level: hline, plot, offset - nothing else works.
- you can't plot a text var - all text strings must be constants, so you can't change the style, width and text labels without recompiling.
- from input you can only adjust offset, indent and shift for each level group, and change color
- the dot below each level line is the exact MA value. If you want just the line swap plotshape with plotchar, recompile and save as your private version, adjust Y shift.
To speed up redraw times: reduce last_bars to ~2000, recompile and use as your own private version
Pinescript is a rudimentary language (should be called Painscript instead) that can basically only plot data. You can't do much else. Please see the code for tips and hints.
Certain things just can't be done or require shady workarounds and weeks of testing trying to resolve weird node.js compiler errors.
Feel free to learn from/reuse/change the code as needed and use as your own private version. See comments in code. Good Luck!
Impulse Reactor RSI-SMA Trend Indicator [ApexLegion]Impulse Reactor RSI-SMA Trend Indicator
Introduction and Theoretical Background
Design Rationale
Standard indicators frequently generate binary 'BUY' or 'SELL' signals without accounting for the broader market context. This often results in erratic "Flip-Flop" behavior, where signals are triggered indiscriminately regardless of the prevailing volatility regime.
Impulse Reactor was engineered to address this limitation by unifying two critical requirements: Quantitative Rigor and Execution Flexibility.
The Solution
Composite Analytical Framework This script is not a simple visual overlay of existing indicators. It is an algorithmic synthesis designed to function as a unified decision-making engine. The primary objective was to implement rigorous quantitative analysis (Volatility Normalization, Structural Filtering) directly within an alert-enabled framework. This architecture is designed to process signals through strict, multi-factor validation protocols before generating real-time notifications, allowing users to focus on structurally validated setups without manual monitoring.
How It Works
This is not a simple visual mashup. It utilizes a cross-validation algorithm where the Trend Structure acts as a gatekeeper for Momentum signals:
Logic over Lag: Unlike simple moving average crossovers, this script uses a 15-layer Gradient Ribbon to detect "Laminar Flow." If the ribbon is knotted (Compression), the system mathematically suppresses all signals.
Volatility Normalization: The core calculation adapts to ATR (Average True Range). This means the indicator automatically expands in volatile markets and contracts in quiet ones, maintaining accuracy without constant manual tweaking.
Adaptive Signal Thresholding: It incorporates an 'Anti-Greed' algorithm (Dynamic Thresholding) that automatically adjusts entry criteria based on trend duration. This logic aims to mitigate the risk of entering positions during periods of statistical trend exhaustion.
Why Use It?
Market State Decoding: The gradient Ribbon visualizes the underlying trend phase in real-time.
◦ Cyan/Blue Flow: Strong Bullish Trend (Laminar Flow).
◦ Magenta/Pink Flow: Strong Bearish Trend.
◦ Compressed/Knotted: When the ribbon lines are tightly squeezed or overlapping, it signals Consolidation. The system filters signals here to avoid chop.
Noise Reduction: The goal is not to catch every pivot, but to isolate high-confidence setups. The logic explicitly filters out minor fluctuations to help maintain position alignment with the broader trend.
⚖️ Chapter 1: System Architecture
Introduction: Composite Analytical Framework
System Overview
Impulse Reactor serves as a comprehensive technical analysis engine designed to synthesize three distinct market dimensions—Momentum, Volatility, and Trend Structure—into a unified decision-making framework. Unlike traditional methods that analyze these metrics in isolation, this system functions as a central processing unit that integrates disparate data streams to construct a coherent model of market behavior.
Operational Objective
The primary objective is to transition from single-dimensional signal generation to a multi-factor assessment model. By fusing data from the Impulse Core (Volatility), Gradient Oscillator (Momentum), and Structural Baseline (Trend), the system aims to filter out stochastic noise and identify high-probability trade setups grounded in quantitative confluence.
Market Microstructure Analysis: Limitations of Conventional Models
Extensive backtesting and quantitative analysis have identified three critical inefficiencies in standard oscillator-based strategies:
• Bounded Oscillator Limitations (The "Oscillation Trap"): Traditional indicators such as RSI or Stochastics are mathematically constrained between fixed values (0 to 100). In strong trending environments, these metrics often saturate in "overbought" or "oversold" zones. Consequently, traders relying on static thresholds frequently exit structurally valid positions prematurely or initiate counter-trend trades against prevailing momentum, resulting in suboptimal performance.
• Quantitative Blindness to Quality: Standard moving averages and trend indicators often fail to distinguish the qualitative nature of price movement. They treat low-volume drift and high-velocity expansion identically. This inability to account for "Volatility Quality" leads to delayed responsiveness during critical market events.
• Fractal Dissonance (Timeframe Disconnect): Financial markets exhibit fractal characteristics where trends on lower timeframes may contradict higher timeframe structures. Manual integration of multi-timeframe analysis increases cognitive load and susceptibility to human error, often resulting in conflicting biases at the point of execution.
Core Design Principles
To mitigate the aforementioned systemic inefficiencies, Impulse Reactor employs a modular architecture governed by three foundational principles:
Principle A:
Volatility Precursor Analysis Market mechanics demonstrate that volatility expansion often functions as a leading indicator for directional price movement. The system is engineered to detect "Volatility Deviation" — specifically, the divergence between short-term and long-term volatility baselines—prior to its manifestation in price action. This allows for entry timing aligned with the expansion phase of market volatility.
Principle B:
Momentum Density Visualization The system replaces singular momentum lines with a "Momentum Density" model utilizing a 15-layer Simple Moving Average (SMA) Ribbon.
• Concept: This visualization represents the aggregate strength and consistency of the trend.
• Application: A fully aligned and expanded ribbon indicates a robust trend structure ("Laminar Flow") capable of withstanding minor counter-trend noise, whereas a compressed ribbon signals consolidation or structural weakness.
Principle C:
Adaptive Confluence Protocols Signal validity is strictly governed by a multi-dimensional confluence logic. The system suppresses signal generation unless there is synchronized confirmation across all three analytical vectors:
1. Volatility: Confirmed expansion via the Impulse Core.
2. Momentum: Directional alignment via the Hybrid Oscillator.
3. Structure: Trend validation via the Baseline. This strict filtering mechanism significantly reduces false positives in non-trending (choppy) environments while maintaining sensitivity to genuine breakouts.
🔍 Chapter 2: Core Modules & Algorithmic Logic
Module A: Impulse Core (Normalized Volatility Deviation)
Operational Logic The Impulse Core functions as a volatility-normalized momentum gauge rather than a standard oscillator. It is designed to identify "Volatility Contraction" (Squeeze) and "Volatility Expansion" phases by quantifying the divergence between short-term and long-term volatility states.
Volatility Z-Score Normalization
The formula implements a custom normalization algorithm. Unlike standard oscillators that rely on absolute price changes, this logic calculates the Z-Score of the Volatility Spread.
◦ Numerator: (atr_f - atr_s) captures the raw momentum of volatility expansion.
◦ Denominator: (std_f + 1e-6) standardizes this value against historical variance.
◦ Result: This allows the indicator scales consistently across assets (e.g., Bitcoin vs. Euro) without manual recalibration.
f_impulse() =>
atr_f = ta.atr(fastLen) // Fast Volatility Baseline
atr_s = ta.atr(slowLen) // Slow Volatility Baseline
std_f = ta.stdev(atr_f, devLen) // Volatility Standard Deviation
(atr_f - atr_s) / (std_f + 1e-6) // Normalized Differential Calculation
Algorithmic Framework
• Differential Calculation: The system computes the spread between a Fast Volatility Baseline (ATR-10) and a Slow Volatility Baseline (ATR-30).
• Normalization Protocol: To standardize consistency across diverse asset classes (e.g., Forex vs. Crypto), the raw differential is divided by the standard deviation of the volatility itself over a 30-period lookback.
• Signal Generation:
◦ Contraction (Squeeze): When the Fast ATR compresses below the Slow ATR, it registers a potential volatility buildup phase.
◦ Expansion (Release): A rapid divergence of the Fast ATR above the Slow ATR signals a confirmed volatility expansion, validating the strength of the move.
Module B: Gradient Oscillator (RSI-SMA Hybrid)
Design Rationale To mitigate the "noise" and "false reversal" signals common in single-line oscillators (like standard RSI), this module utilizes a 15-Layer Gradient Ribbon to visualize momentum density and persistence.
Technical Architecture
• Ribbon Array: The system generates 15 sequential Simple Moving Averages (SMA) applied to a volatility-adjusted RSI source. The length of each layer increases incrementally.
• State Analysis:
Momentum Alignment (Laminar Flow): When all 15 layers are expanded and parallel, it indicates a robust trend where buying/selling pressure is distributed evenly across multiple timeframes. This state helps filter out premature "overbought/oversold" signals.
• Consolidation (Compression): When the distance between the fastest layer (Layer 1) and the slowest layer (Layer 15) approaches zero or the layers intersect, the system identifies a "Non-Tradable Zone," preventing entries during choppy market conditions.
// Laminar Flow Validation
f_validate_trend() =>
// Calculate spread between Ribbon layers
ribbon_spread = ta.stdev(ribbon_array, 15)
// Only allow signals if Ribbon is expanded (Laminar Flow)
is_flowing = ribbon_spread > min_expansion_threshold
// If compressed (Knotted), force signal to false
is_flowing ? signal : na
Module C: Adaptive Signal Filtering (Behavioral Bias Mitigation)
This subsystem, operating as an algorithmic "Anti-Greed" Mechanism, addresses the statistical tendency for signal degradation following prolonged trends.
Dynamic Threshold Adjustment
• Win Streak Detection: The algorithm internally tracks the outcome of closed trade cycles.
• Sensitivity Multiplier: Upon detecting consecutive successful signals in the same direction, a Penalty_Factor is applied to the entry logic.
• Operational Impact: This effectively raises the Required_Slope threshold for subsequent signals. For example, after three consecutive bullish signals, the system requires a 30% steeper trend angle to validate a fourth entry. This enforces stricter discipline during extended trends to reduce the probability of entering at the point of trend exhaustion.
Anti-Greed Logic: Dynamic Threshold Calculation
f_adjust_threshold(base_slope, win_streak) =>
// Adds a 10% penalty to the difficulty for every consecutive win
penalty_factor = 0.10
risk_scaler = 1 + (win_streak * penalty_factor)
// Returns the new, harder-to-reach threshold
base_slope * risk_scaler
Module D: Trend Baseline (Triple-Smoothed Structure)
The Trend Baseline serves as the structural filter for all signals. It employs a Triple-Smoothed Hybrid Algorithm designed to balance lag reduction with noise filtration.
Smoothing Stages
1. Volatility Banding: Utilizes a SuperTrend-based calculation to establish the upper and lower boundaries of price action.
2. Weighted Filter: Applies a Weighted Moving Average (WMA) to prioritize recent price data.
3. Exponential Smoothing: A final Exponential Moving Average (EMA) pass is applied to create a seamless baseline curve.
Functionality
This "Heavy" baseline resists minor intraday volatility spikes while remaining responsive to sustained structural shifts. A signal is only considered valid if the price action maintains structural integrity relative to this baseline
🚦 Chapter 3: Risk Management & Exit Protocols
Quantitative Risk Management (TP/SL & Trailing)
Foundational Architecture: Volatility-Adjusted Geometry Unlike strategies relying on static nominal values, Impulse Reactor establishes dynamic risk boundaries derived from quantitative volatility metrics. This design aligns trade invalidation levels mathematically with the current market regime.
• ATR-Based Dynamic Bracketing:
The protocol calculates Stop-Loss and Take-Profit levels by applying Fibonacci coefficients (Default: 0.786 for SL / 1.618 for TP) to the Average True Range (ATR).
◦ High Volatility Environments: The risk bands automatically expand to accommodate wider variance, preventing premature exits caused by standard market noise.
◦ Low Volatility Environments: The bands contract to tighten risk parameters, thereby dynamically adjusting the Risk-to-Reward (R:R) geometry.
• Close-Validation Protocol ("Soft Stop"):
Institutional algorithms frequently execute liquidity sweeps—driving prices briefly below key support levels to accumulate inventory.
◦ Mechanism: When the "Soft Stop" feature is enabled, the system filters out intraday volatility spikes. The stop-loss is conditional; execution is triggered only if the candle closes beyond the invalidation threshold.
◦ Strategic Advantage: This logic distinguishes between momentary price wicks and genuine structural breakdowns, preserving positions during transient volatility.
• Step-Function Trailing Mechanism:
To protect unrealized PnL while allowing for normal price breathing, a two-phase trailing methodology is employed:
◦ Phase 1 (Activation): The trailing function remains dormant until the price advances by a pre-defined percentage threshold.
◦ Phase 2 (Dynamic Floor): Once armed, the stop level creates a moving floor, adjusting relative to price action while maintaining a volatility-based (ATR) buffer to systematically protect unrealized PnL.
• Algorithmic Exit Protocols (Dynamic Liquidity Analysis)
◦ Rationale: Inefficiencies of Static Targets Static "Take Profit" levels often result in suboptimal exits. They compel traders to close positions based on arbitrary figures rather than evolving market structure, potentially capping upside during significant trends or retaining positions while the underlying trend structure deteriorates.
◦ Solution: Structural Integrity Assessment The system utilizes a Dynamic Liquidity Engine to continuously audit the validity of the position. Instead of targeting a specific price point, the algorithm evaluates whether the trend remains statistically robust.
Multi-Factor Exit Logic (The Tri-Vector System)
The Smart Exit protocol executes only when specific algorithmic invalidation criteria are met:
• 1. Momentum Exhaustion (Confluence Decay): The system monitors a 168-hour rolling average of the Confluence Score. A significant deviation below this historical baseline indicates momentum exhaustion, signaling that the driving force behind the trend has dissipated prior to a price reversal. This enables preemptive exits before a potential drawdown.
• 2. Statistical Over-Extension (Mean Reversion): Utilizing the core volatility logic, the system identifies instances where price deviates beyond 2.0 standard deviations from the mean. While the trend may be technically bullish, this statistical anomaly suggests a high probability of mean reversion (elastic snap-back), triggering a defensive exit to capitalize on peak valuation.
• 3. Oscillator Rejection (Immediate Pivot): To manage sudden V-shaped volatility, the system monitors RSI pivots. If a sharp "Pivot High" or divergence is detected, the protocol triggers an immediate "Peak Exit," bypassing standard trend filters to secure liquidity during high-velocity reversals.
🎨 Chapter 4: Visualization Guide
Gradient Oscillator Ribbon
The 15-layer SMA ribbon visualized via plot(r1...r15) represents the "Momentum Density" of the market.
• Visuals:
◦ Cyan/Blue Ribbon: Indicates Bullish Momentum.
◦ Pink/Magenta Ribbon: Indicates Bearish Momentum.
• Interpretation:
◦ Laminar Flow: When the ribbon expands widely and flows in parallel, it signifies a robust trend where momentum is distributed evenly across timeframes. This is the ideal state for trend-following.
◦ Compression (Consolidation): If the ribbon becomes narrow, twisted, or knotted, it indicates a "Non-Tradable Zone" where the market lacks a unified direction. Traders are advised to wait for clarity.
◦ Over-Extension: If the top layer crosses the Overbought (85) or Oversold (15) lines, it visually warns of potential market overheating.
Trend Baseline
The thick, color-changing line plotted via plot(baseline) represents the Structural Backbone of the market.
• Visuals: Changes color based on the trend direction (Blue for Bullish, Pink for Bearish).
• Interpretation:
Structural Filter: Long positions are statistically favored only when price action sustains above this baseline, while short positions are favored below it.
Dynamic Support/Resistance: The baseline acts as a dynamic support level during uptrends and resistance during downtrends.
Entry Signals & Labels
Text labels ("Long Entry", "Short Entry") appear when the system detects high-probability setups grounded in quantitative confluence.
• Visuals: Labeled signals appear above/below specific candles.
• Interpretation:
These signals represent moments where Volatility (Expansion), Momentum (Alignment), and Structure (Trend) are synchronized.
Smart Exit: Labels such as "Smart Exit" or "Peak Exit" appear when the system detects momentum exhaustion or structural decay, prompting a defensive exit to preserve capital.
Dynamic TP/SL Boxes
The semi-transparent colored zones drawn via fill() represent the risk management geometry.
• Visuals: Colored boxes extending from the entry point to the Take Profit (TP) and Stop Loss (SL) levels.
• Function:
Volatility-Adjusted Geometry: Unlike static price targets, these boxes expand during high volatility (to prevent wicks from stopping you out) and contract during low volatility (to optimize Risk-to-Reward ratios).
SAR + MACD Glow
Small glowing shapes appearing above or below candles.
• Visuals: Triangle or circle glows near the price bars.
• Interpretation:
This visual indicates a secondary confirmation where Parabolic SAR and MACD align with the main trend direction. It serves as an additional confluence factor to increase confidence in the trade setup.
Support/Resistance Table
A small table located at the bottom-right of the chart.
• Function: Automatically identifies and displays recent Pivot Highs (Resistance) and Pivot Lows (Support).
• Interpretation: These levels can be used as potential targets for Take Profit or invalidation points for manual Stop Loss adjustments.
🖥️ Chapter 5: Dashboard & Operational Guide
Integrated Analytics Panel (Dashboard Overview)
To facilitate rapid decision-making without manual calculation, the system aggregates critical market dimensions into a unified "Heads-Up Display" (HUD). This panel monitors real-time metrics across multiple timeframes and analytical vectors.
A. Intermediate Structure (12H Trend)
• Function: Anchors the intraday analysis to the broader market structure using a 12-hour rolling window.
• Interpretation:
◦ Bullish (> +0.5%): Indicates a positive structural bias. Long setups align with the macro flow.
◦ Bearish (< -0.5%): Indicates structural weakness. Short setups are statistically favored.
◦ Neutral: Represents a ranging environment where the Confluence Score becomes the primary weighting factor.
B. Composite Confluence Score (Signal Confidence)
• Definition: A probability metric derived from the synchronization of Volatility (Impulse Core), Momentum (Ribbon), and Trend (Baseline).
• Grading Scale:
Strong Buy/Sell (> 7.0 / < 3.0): Indicates full alignment across all three vectors. Represents a "Prime Setup" eligible for standard position sizing.
Buy/Sell (5.0–7.0 / 3.0–5.0): Indicates a valid trend but with moderate volatility confirmation.
Neutral: Signals conflicting data (e.g., Bullish Momentum vs. Bearish Structure). Trading is not recommended ("No-Trade Zone").
C. Statistical Deviation Status (Mean Reversion)
• Logic: Utilizes Bollinger Band deviation principles to quantify how far price has stretched from the statistical mean (20 SMA).
• Alert States:
Over-Extended (> 2.0 SD): Warning that price is statistically likely to revert to the mean (Elastic Snap-back), even if the trend remains technically valid. New entries are discouraged in this zone.
Normal: Price is within standard distribution limits, suitable for trend-following entries.
D. Volatility Regime Classification
• Metric: Compares current ATR against a 100-period historical baseline to categorize the market state.
• Regimes:
Low Volatility (Lvl < 1.0): Market Compression. Often precedes volatility expansion events.
Mid Volatility (Lvl 1.0 - 1.5): Standard operating environment.
High Volatility (Lvl > 1.5): Elevated market stress. Risk parameters should be adjusted (e.g., reduced position size) to account for increased variance.
E. Performance Telemetry
• Function: Displays the historical reliability of the Trend Baseline for the current asset and timeframe.
• Operational Threshold: If the displayed Win Rate falls below 40%, it suggests the current market behavior is incoherent (choppy) and does not respect trend logic. In such cases, switching assets or timeframes is recommended.
Operational Protocols & Signal Decoding
Visual Interpretation Standards
• Laminar Flow (Trade Confirmation): A valid trend is visually confirmed when the 15-layer SMA Ribbon is fully expanded and parallel. This indicates distributed momentum across timeframes.
• Consolidation (No-Trade): If the ribbon appears twisted, knotted, or compressed, the market lacks a unified directional vector.
• Baseline Interaction: The Triple-Smoothed Baseline acts as a dynamic support/resistance filter. Long positions remain valid only while price sustains above this structure.
System Calibration (Settings)
• Adaptive Signal Filtering (Prev. Anti-Greed): Enabled by default. This logic automatically raises the required trend slope threshold following consecutive wins to mitigate behavioral bias.
• Impulse Sensitivity: Controls the reactivity of the Volatility Core. Higher settings capture faster moves but may introduce more noise.
⚙️ Chapter 6: System Configuration & Alert Guide
This section provides a complete breakdown of every adjustable setting within Impulse Reactor to assist you in tailoring the engine to your specific needs.
🌐 LANGUAGE SETTINGS (Localization)
◦ Select Language (Default: English):
Function: Instantly translates all chart labels, dashboard texts into your preferred language.
Supported: English, Korean, Chinese, Spanish
⚡ IMPULSE CORE SETTINGS (Volatility Engine)
◦ Deviation Lookback (Default: 30): The period used to calculate the standard deviation of volatility.
Role: Sets the baseline for normalizing momentum. Higher values make the core smoother but slower to react.
◦ Fast Pulse Length (Default: 10): The short-term ATR period.
Role: Detects rapid volatility expansion.
◦ Slow Pulse Length (Default: 30): The long-term ATR baseline.
Role: Establishes the background volatility level. The core signal is derived from the divergence between Fast and Slow pulses.
🎯 TP/SL SETTINGS (Risk Management)
◦ SL/TP Fibonacci (Default: 0.786 / 1.618): Selects the Fibonacci ratio used for risk calculation.
◦ SL/TP Multiplier (Default: 1.5 / 2): Applies a multiplier to the ATR-based bands.
Role: Expands or contracts the Take Profit and Stop Loss boxes. Increase these values for higher volatility assets (like Altcoins) to avoid premature stop-outs.
◦ ATR Length (Default: 14): The lookback period for calculating the Average True Range used in risk geometry.
◦ Use Soft Stop (Close Basis):
Role: If enabled, Stop Loss alerts only trigger if a candle closes beyond the invalidation level. This prevents being stopped out by wick manipulations.
🔊 RIBBON SETTINGS (Momentum Visualization)
◦ Show SMA Ribbon: Toggles the visibility of the 15-layer gradient ribbon.
◦ Ribbon Line Count (Default: 15): The number of SMA lines in the ribbon array.
◦ Ribbon Start Length (Default: 2) & Step (Default: 1): Defines the spread of the ribbon.
Role: Controls the "thickness" of the momentum density visualization. A wider step creates a broader ribbon, useful for higher timeframes.
📎 DISPLAY OPTIONS
◦ Show Entry Lines / TP/SL Box / Position Labels / S/R Levels / Dashboard: Toggles individual visual elements on the chart to reduce clutter.
◦ Show SAR+MACD Glow: Enables the secondary confirmation shapes (triangles/circles) above/below candles.
📈 TREND BASELINE (Structural Filter)
◦ Supertrend Factor (Default: 12) & ATR Period (Default: 90): Controls the sensitivity of the underlying Supertrend algorithm used for the baseline calculation.
◦ WMA Length (40) & EMA Length (14): The smoothing periods for the Triple-Smoothed Baseline.
◦ Min Trend Duration (Default: 10): The minimum number of bars the trend must be established before a signal is considered valid.
🧠 SMART EXIT (Dynamic Liquidity)
◦ Use Smart Exit: Enables the momentum exhaustion logic.
◦ Exit Threshold Score (Default: 3): The sensitivity level for triggering a Smart Exit. Lower values trigger earlier exits.
◦ Average Period (168) & Min Hold Bars (5): Defines the rolling window for momentum decay analysis and the minimum duration a trade must be held before Smart Exit logic activates.
🛡️ TRAILING STOP (Step)
◦ Use Trailing Stop: Activates the step-function trailing mechanism.
◦ Step 1 Activation % (0.5) & Offset % (0.5): The price must move 0.5% in your favor to arm the first trail level, which sets a stop 0.5% behind price.
◦ Step 2 Activation % (1) & Offset % (0.2): Once price moves 1%, the trail tightens to 0.2%, securing the position.
🌀 SAR & MACD SETTINGS (Secondary Confirmation)
◦ SAR Start/Increment/Max: Standard Parabolic SAR parameters.
◦ SAR Score Scaling (ATR): Adjusts how much weight the SAR signal has in the overall confluence score.
◦ MACD Fast/Slow/Signal: Standard MACD parameters used for the "Glow" signals.
🔄 ANTI-GREED LOGIC (Behavioral Bias)
◦ Strict Entry after Win: Enables the negative feedback loop.
◦ Strict Multiplier (Default: 1.1): Increases the entry difficulty by 10% after each win.
Role: Prevents overtrading and entering at the top of an extended trend.
🌍 HTF FILTER (Multi-Timeframe)
◦ Use Auto-Adaptive HTF Filter: Automatically selects a higher timeframe (e.g., 1H -> 4H) to filter signals.
◦ Bypass HTF on Steep Trigger: Allows an entry even against the HTF trend if the local momentum slope is exceptionally steep (catch powerful reversals).
📉 RSI PEAK & CHOPPINESS
◦ RSI Peak Exit (Instant): Triggers an immediate exit if a sharp RSI pivot (V-shape) is detected.
◦ Choppiness Filter: Suppresses signals if the Choppiness Index is above the threshold (Default: 60), indicating a flat market.
📐 SLOPE TRIGGER LOGIC
◦ Force Entry on Steep Slope: Overrides other filters if the price angle is extremely vertical (high velocity).
◦ Slope Sensitivity (1.5): The angle required to trigger this override.
⛔ FLAT MARKET FILTER (ADX & ATR)
◦ Use ADX Filter: Blocks signals if ADX is below the threshold (Default: 20), indicating no trend.
◦ Use ATR Flat Filter: Blocks signals if volatility drops below a critical level (dead market).
🔔 Alert Configuration Guide
Impulse Reactor is designed with a comprehensive suite of alert conditions, allowing you to automate your trading or receive real-time notifications for specific market events.
How to Set Up:
Click the "Alert" (Clock) icon in the TradingView toolbar.
Select "Impulse Reactor " from the Condition dropdown.
Choose one of the specific trigger conditions below:
🚀 Entry Signals (Trend Initiation)
Long Entry:
Trigger: Fires when a confirmed Bullish Setup is detected (Momentum + Volatility + Structure align).
Usage: Use this to enter new Long positions.
Short Entry:
Trigger: Fires when a confirmed Bearish Setup is detected.
Usage: Use this to enter new Short positions.
🎯 Profit Taking (Target Levels)
Long TP:
Trigger: Fires when price hits the calculated Take Profit level for a Long trade.
Usage: Automate partial or full profit taking.
Short TP:
Trigger: Fires when price hits the calculated Take Profit level for a Short trade.
Usage: Automate partial or full profit taking.
🛡️ Defensive Exits (Risk Management)
Smart Exit:
Trigger: Fires when the system detects momentum decay or statistical exhaustion (even if the trend hasn't fully reversed).
Usage: Recommended for tightening stops or closing positions early to preserve gains.
Overbought / Oversold:
Trigger: Fires when the ribbon extends into extreme zones.
Usage: Warning signal to prepare for a potential reversal or pullback.
💡 Secondary Confirmation (Confluence)
SAR+MACD Bullish:
Trigger: Fires when Parabolic SAR and MACD align bullishly with the main trend.
Usage: Ideal for Pyramiding (adding to an existing winning position).
SAR+MACD Bearish:
Trigger: Fires when Parabolic SAR and MACD align bearishly.
Usage: Ideal for adding to short positions.
⚠️ Chapter 7: Conclusion & Risk Disclosure
Methodological Synthesis
Impulse Reactor represents a shift from reactive price tracking to proactive energy analysis. By decomposing market activity into its atomic components — Volatility, Momentum, and Structure — and reconstructing them into a coherent decision model, the system aims to provide a quantitative framework for market engagement. It is designed not to predict the future, but to identify high-probability conditions where kinetic energy and trend structure align.
Disclaimer & Risk Warnings
◦ Educational Purpose Only
This indicator, including all associated code, documentation, and visual outputs, is provided strictly for educational and informational purposes. It does not constitute financial advice, investment recommendations, or a solicitation to buy or sell any financial instruments.
◦ No Guarantee of Performance
Past performance is not indicative of future results. All metrics displayed on the dashboard (including "Win Rate" and "P&L") are theoretical calculations based on historical data. These figures do not account for real-world trading factors such as slippage, liquidity gaps, spread costs, or broker commissions.
◦ High-Risk Warning
Trading cryptocurrencies, futures, and leveraged financial products involves a substantial risk of loss. The use of leverage can amplify both gains and losses. Users acknowledge that they are solely responsible for their trading decisions and should conduct independent due diligence before executing any trades.
◦ Software Limitations
The software is provided "as is" without warranty. Users should be aware that market data feeds on analysis platforms may experience latency or outages, which can affect signal generation accuracy.
RSI + MACD Day Trading Toolkit//@version=6
indicator("RSI + MACD Day Trading Toolkit", overlay = true)
//──────────────────────────────────────────────────────────────────────────────
// 1. INPUTS
//──────────────────────────────────────────────────────────────────────────────
// RSI settings
rsiLength = input.int(14, "RSI Length")
rsiOverbought = input.float(70, "RSI Overbought Level", minval = 50, maxval = 100)
rsiOversold = input.float(30, "RSI Oversold Level", minval = 0, maxval = 50)
// MACD settings (classic 12 / 26 / 9)
macdFastLength = input.int(12, "MACD Fast Length")
macdSlowLength = input.int(26, "MACD Slow Length")
macdSignalLength = input.int(9, "MACD Signal Length")
// Risk model selection
riskModel = input.string("ATR", "Risk Model", options = )
// ATR-based SL/TP
atrLength = input.int(14, "ATR Length")
atrSLMult = input.float(1.5, "SL ATR Multiplier", minval = 0.1, step = 0.1)
atrTPMult = input.float(2.5, "TP ATR Multiplier", minval = 0.1, step = 0.1)
// Percent-based SL/TP (for scalping on very tight spreads)
slPercent = input.float(0.5, "SL % (when Risk Model = Percent)", minval = 0.05, step = 0.05)
tpPercent = input.float(1.0, "TP % (when Risk Model = Percent)", minval = 0.05, step = 0.05)
// Visual / styling
showSLTPLines = input.bool(true, "Plot Stop Loss / Take Profit Lines")
//──────────────────────────────────────────────────────────────────────────────
// 2. CORE INDICATORS: RSI & MACD
//──────────────────────────────────────────────────────────────────────────────
rsiValue = ta.rsi(close, rsiLength)
// Manual MACD calculation (avoids tuple unpacking issues)
macdFastEMA = ta.ema(close, macdFastLength)
macdSlowEMA = ta.ema(close, macdSlowLength)
macdValue = macdFastEMA - macdSlowEMA
macdSignal = ta.ema(macdValue, macdSignalLength)
macdHist = macdValue - macdSignal
atrValue = ta.atr(atrLength)
// Hide internal plots from price scale (still accessible if you change display)
plot(rsiValue, "RSI", display = display.none)
plot(macdValue, "MACD", display = display.none)
plot(macdSignal, "MACD Sig", display = display.none)
plot(macdHist, "MACD Hist", display = display.none)
//──────────────────────────────────────────────────────────────────────────────
// 3. SIGNAL LOGIC (ENTRY CONDITIONS)
//──────────────────────────────────────────────────────────────────────────────
//
// Idea:
// - LONG bias: RSI emerges from oversold AND MACD crosses above signal below zero
// - SHORT bias: RSI falls from overbought AND MACD crosses below signal above zero
//
// Combines momentum (RSI) with trend confirmation (MACD).
//──────────────────────────────────────────────────────────────────────────────
// RSI events
rsiBullCross = ta.crossover(rsiValue, rsiOversold) // RSI crosses UP out of oversold
rsiBearCross = ta.crossunder(rsiValue, rsiOverbought) // RSI crosses DOWN from overbought
// MACD crossover with trend filter
macdBullCross = ta.crossover(macdValue, macdSignal) and macdValue < 0 // Bullish cross below zero-line
macdBearCross = ta.crossunder(macdValue, macdSignal) and macdValue > 0 // Bearish cross above zero-line
// Raw (ungated) entry signals
rawLongSignal = rsiBullCross and macdBullCross
rawShortSignal = rsiBearCross and macdBearCross
//──────────────────────────────────────────────────────────────────────────────
// 4. STATE MANAGEMENT (SIMULATED POSITION TRACKING)
//──────────────────────────────────────────────────────────────────────────────
//
// position: 1 = long
// -1 = short
// 0 = flat
//
// We track entry price and SL/TP levels as if this were a strategy.
// This is still an indicator – it just computes and plots the logic.
//──────────────────────────────────────────────────────────────────────────────
var int position = 0
var float longEntryPrice = na
var float shortEntryPrice = na
var float longSL = na
var float longTP = na
var float shortSL = na
var float shortTP = na
// Per-bar flags (for plotting / alerts)
var bool longEntrySignal = false
var bool shortEntrySignal = false
var bool longExitSignal = false
var bool shortExitSignal = false
// Reset per-bar flags each bar
longEntrySignal := false
shortEntrySignal := false
longExitSignal := false
shortExitSignal := false
//──────────────────────────────────────────────────────────────────────────────
// 5. EXIT LOGIC (STOP LOSS / TAKE PROFIT / OPPOSITE SIGNAL)
//──────────────────────────────────────────────────────────────────────────────
//
// Exits are evaluated BEFORE new entries on each bar.
//──────────────────────────────────────────────────────────────────────────────
// Stop-loss / take-profit hits for existing positions
longStopHit = position == 1 and not na(longSL) and low <= longSL
longTakeHit = position == 1 and not na(longTP) and high >= longTP
shortStopHit = position == -1 and not na(shortSL) and high >= shortSL
shortTakeHit = position == -1 and not na(shortTP) and low <= shortTP
// Opposite signals can also close positions
reverseToShort = position == 1 and rawShortSignal
reverseToLong = position == -1 and rawLongSignal
// Combine exit conditions
longExitNow = longStopHit or longTakeHit or reverseToShort
shortExitNow = shortStopHit or shortTakeHit or reverseToLong
// Register exits and flatten position
if longExitNow and position == 1
longExitSignal := true
position := 0
longEntryPrice := na
longSL := na
longTP := na
if shortExitNow and position == -1
shortExitSignal := true
position := 0
shortEntryPrice := na
shortSL := na
shortTP := na
//──────────────────────────────────────────────────────────────────────────────
// 6. ENTRY LOGIC WITH RISK MODEL (SL/TP CALCULATION)
//──────────────────────────────────────────────────────────────────────────────
//
// Only take a new trade when flat.
// SL/TP are calculated relative to entry price using either ATR or Percent.
//──────────────────────────────────────────────────────────────────────────────
if position == 0
// Long entry
if rawLongSignal
position := 1
longEntryPrice := close
if riskModel == "ATR"
longSL := longEntryPrice - atrValue * atrSLMult
longTP := longEntryPrice + atrValue * atrTPMult
else // Percent model
longSL := longEntryPrice * (1.0 - slPercent / 100.0)
longTP := longEntryPrice * (1.0 + tpPercent / 100.0)
longEntrySignal := true
// Short entry
else if rawShortSignal
position := -1
shortEntryPrice := close
if riskModel == "ATR"
shortSL := shortEntryPrice + atrValue * atrSLMult
shortTP := shortEntryPrice - atrValue * atrTPMult
else // Percent model
shortSL := shortEntryPrice * (1.0 + slPercent / 100.0)
shortTP := shortEntryPrice * (1.0 - tpPercent / 100.0)
shortEntrySignal := true
//──────────────────────────────────────────────────────────────────────────────
// 7. PLOTTING: ENTRIES, EXITS, STOPS & TARGETS
//──────────────────────────────────────────────────────────────────────────────
// Entry markers
plotshape(longEntrySignal, title = "Long Entry", style = shape.triangleup, location = location.belowbar, color = color.new(color.lime, 0), size = size.small, text = "LONG")
plotshape(shortEntrySignal, title = "Short Entry", style = shape.triangledown, location = location.abovebar, color = color.new(color.red, 0), size = size.small, text = "SHORT")
// Exit markers (generic exits: SL, TP or reversal)
plotshape(longExitSignal, title = "Long Exit", style = shape.xcross, location = location.abovebar, color = color.new(color.orange, 0), size = size.tiny, text = "LX")
plotshape(shortExitSignal, title = "Short Exit", style = shape.xcross, location = location.belowbar, color = color.new(color.orange, 0), size = size.tiny, text = "SX")
// Optional: show SL/TP levels on chart while in position
plot(showSLTPLines and position == 1 ? longSL : na, title = "Long Stop Loss", style = plot.style_linebr, color = color.new(color.red, 0), linewidth = 1)
plot(showSLTPLines and position == 1 ? longTP : na, title = "Long Take Profit", style = plot.style_linebr, color = color.new(color.lime, 0), linewidth = 1)
plot(showSLTPLines and position == -1 ? shortSL : na, title = "Short Stop Loss", style = plot.style_linebr, color = color.new(color.red, 0), linewidth = 1)
plot(showSLTPLines and position == -1 ? shortTP : na, title = "Short Take Profit", style = plot.style_linebr, color = color.new(color.lime, 0), linewidth = 1)
//──────────────────────────────────────────────────────────────────────────────
// 8. ALERT CONDITIONS
//──────────────────────────────────────────────────────────────────────────────
//
// Configure TradingView alerts using these conditions.
//──────────────────────────────────────────────────────────────────────────────
// Entry alerts
alertcondition(longEntrySignal, title = "Long Entry (RSI+MACD)", message = "RSI+MACD: Long entry signal")
alertcondition(shortEntrySignal, title = "Short Entry (RSI+MACD)", message = "RSI+MACD: Short entry signal")
// Exit alerts (by type: SL vs TP vs reversal)
alertcondition(longStopHit, title = "Long Stop Loss Hit", message = "RSI+MACD: Long STOP LOSS hit")
alertcondition(longTakeHit, title = "Long Take Profit Hit", message = "RSI+MACD: Long TAKE PROFIT hit")
alertcondition(shortStopHit, title = "Short Stop Loss Hit", message = "RSI+MACD: Short STOP LOSS hit")
alertcondition(shortTakeHit, title = "Short Take Profit Hit", message = "RSI+MACD: Short TAKE PROFIT hit")
alertcondition(reverseToShort, title = "Long Exit by Reverse Signal", message = "RSI+MACD: Long exit by SHORT reverse signal")
alertcondition(reverseToLong, title = "Short Exit by Reverse Signal", message = "RSI+MACD: Short exit by LONG reverse signal")
//──────────────────────────────────────────────────────────────────────────────
// 9. QUICK USAGE NOTES
//──────────────────────────────────────────────────────────────────────────────
//
// - Indicador, não estratégia: ele simula posição, SL/TP e sinais de saída.
// - Para backtest/auto, basta portar a mesma lógica para um script `strategy()`
// usando `strategy.entry` e `strategy.exit`.
// - Em day trade, teste ATR vs Percent e ajuste os multiplicadores ao ativo.
//──────────────────────────────────────────────────────────────────────────────
All Macro LevelsA comprehensive overlay indicator that displays key macro-level support and resistance zones using widely-followed moving averages across multiple timeframes.
Features
Bull Market Support Band (BMSB)
- Weekly 20 SMA and 21 EMA with customizable fill
- A popular indicator for identifying bull market trends - price holding above the band typically signals strength
Daily 12/21/25 EMA Bands
- Three daily EMAs (12, 21, 25) with fill between the outer bands
- Useful for tracking short-term momentum and trend direction
Long-Term Weekly Moving Averages
- 100-Week MA - Intermediate cycle support
- 200-Week MA - Major cycle support level
- 300-Week MA - Deep value zone
- Each MA can be configured as SMA or EMA
Customization
- Toggle each indicator group on/off independently
- Full color customization for lines, fills, and labels
- Adjustable line widths
- Optional custom symbol input to display levels from a different asset
- Real-time labels showing current values at chart edge
Use Cases
- Identify macro support/resistance levels
- Spot potential buy zones during corrections
- Confirm bull/bear market conditions
- Multi-timeframe analysis on a single chart
Helix Protocol 7HELIX PROTOCOL 7
Overview
Helix Protocol 7 is an advanced trend-adaptive signal engine that dynamically adjusts its buy/sell thresholds based on real-time market regime detection. Unlike static indicators that use fixed overbought/oversold levels, Helix 7 recognizes that optimal entry and exit points shift dramatically depending on whether the market is trending strongly, ranging, or reversing.
The indicator fuses multiple analytical frameworks—momentum oscillators, trend strength metrics, volatility analysis, volume confirmation, and price structure—into a unified signal system that adapts to changing market conditions in real-time.
Core Philosophy
"Don't fight the trend—adapt to it."
In a strong uptrend, you want to buy dips early (before extreme oversold) and let winners run longer
In a downtrend, you want to sell bounces quickly and only buy true capitulation
In a neutral/ranging market, standard overbought/oversold levels apply
Helix Protocol 7 automatically detects which regime you're in and applies the appropriate thresholds.
Key Features
🔄 Trend-Adaptive Signal Thresholds
The indicator classifies markets into four states and adjusts Fisher Transform and RSI thresholds accordingly:
Trend StateDetection CriteriaBUY TriggersSELL TriggersSTRONG UPTRENDADX rising, ADX > 25, +DI > -DIFisher < 1.0, RSI < 50Fisher > 2.5, RSI > 70STRONG DOWNTRENDADX rising, ADX > 25, -DI > +DIFisher < -2.5, RSI < 25Fisher > 1.5, RSI > 60WEAK DOWNTRENDADX falling, -DI > +DIFisher < -2.5, RSI < 25Fisher > 1.5, RSI > 60NEUTRALDefault fallbackFisher < -2.0, RSI < 30Fisher > 2.0, RSI > 65
📊 Dynamic Envelope Bands
Adaptive bands that expand and contract based on:
ATR (Average True Range) - Base volatility measure
ADX (Trend Strength) - Bands widen in strong trends
Chaikin Oscillator - Volume-weighted band adjustment
🎯 Multi-Trigger Signal System
Signals can fire from multiple sources:
Trend-Based Signals - Fisher + RSI thresholds met for current regime
Band Touch Signals - Price touches upper/lower band (support/resistance)
EXTREME Signals - Price penetrates band by significant amount (bypasses cooldown)
⚡ Extreme Move Detection
When price makes an explosive move that penetrates the band by more than 30% of ATR (configurable), the signal fires with EXTREME priority and bypasses the normal cooldown period. This ensures you never miss major reversal opportunities.
📈 GXS Scoring System
A proprietary multi-factor scoring system (-1.0 to +1.0) that weighs:
Trend Strength (30%) - ADX direction and magnitude
Momentum (25%) - RSI, MACD, Stochastic, CCI, ROC consensus
Volume (20%) - OBV trend and volume surge detection
Price Structure (15%) - Band position and volatility percentile
Price Action (10%) - Bullish/bearish candle ratio
🔀 RSI Divergence Detection
Automatically detects and displays:
Regular Bullish Divergence - Price lower low + RSI higher low (reversal up)
Regular Bearish Divergence - Price higher high + RSI lower high (reversal down)
Hidden Bullish Divergence - Trend continuation signal (uptrend)
Hidden Bearish Divergence - Trend continuation signal (downtrend)
📉 BBWP Volatility Meter
Bollinger Band Width Percentile measures current volatility relative to historical norms:
LOW (< 30%) - Volatility compression, breakout imminent
MEDIUM (30-70%) - Normal market conditions
HIGH (> 70%) - Extended volatility, potential exhaustion
Visual Components
Money Line
A dynamic centerline (Linear Regression or Weighted EMA) colored by slope:
🟢 Green - Rising (bullish momentum)
🔴 Red - Falling (bearish momentum)
🟡 Yellow - Flat (consolidation)
Envelope Cloud
Shaded region between upper and lower bands, colored by Money Line slope direction for instant trend visualization.
Signal Labels
Clear entry/exit labels showing:
Price level
Trigger type (UPTREND DIP, CAPITULATION, BAND TOUCH, EXTREME, etc.)
Color coding (Green=Buy, Red=Sell, Lime=Extreme Buy, Fuchsia=Extreme Sell)
ADX Trend Bar
Bottom indicator showing trend state:
🟢 Lime - Strong Uptrend
🔴 Red - Downtrend
🟠 Orange - Weak/Transitional (ADX 15-24)
⚪ White - Ranging (ADX < 15)
🔵 Blue - Strong trend, neutral direction
Info Panel
Real-time dashboard displaying:
Current trend state
GXS Score
Active divergences
Volatility level (BBWP)
ADX value and direction
DI Spread
Fisher Transform value
RSI value
Context-sensitive BUY/SELL thresholds for current regime
Alert System
JSON Webhook Alerts (Bot-Ready)
json{
"action": "BUY",
"symbol": "BTC/USDT",
"price": "93500.00",
"trigger": "EXTREME",
"rsi": "28.5",
"fisher": "-2.31",
"adx": "32.4",
"trend_state": "STRONG DOWN"
}
Available Alert Conditions
Buy Signal / Sell Signal
Lower Band Touch / Upper Band Touch
EXTREME Lower Band / EXTREME Upper Band
Strong Uptrend Started
Downtrend Started
Neutral Trend Started
Trend State Change
Recommended Settings
Scalping (1m-5m)
Signal Cooldown: 3-5 bars
Extreme Penetration: 0.2 (more sensitive)
ADX Length: 10-12
Swing Trading (15m-4H)
Signal Cooldown: 5-8 bars
Extreme Penetration: 0.3 (default)
ADX Length: 14 (default)
Position Trading (Daily+)
Signal Cooldown: 8-12 bars
Extreme Penetration: 0.4-0.5 (less sensitive)
ADX Length: 14-20
Input Parameters
Core Settings
Money Line Type (Linear Regression / Weighted EMA)
Money Line Length
RSI Period
Fisher Period
Dynamic Bands
ATR Period & Multiplier
Adaptive Bands toggle
Chaikin Weight
Extreme Band Penetration threshold
Trend Detection
ADX Length & Slope Lookback
Strong Trend ADX Threshold
DI Spread for Neutral detection
Signal Thresholds (by Trend State)
Fully customizable Fisher/RSI/ADX levels for each regime
Separate BUY and SELL parameters
Display Options
Toggle bands, cloud, labels, panels
Cooldown period
Debug panel for troubleshooting
Best Practices
Confirm with price action - Signals are high-probability setups, not guarantees
Respect the trend state - The panel shows current thresholds for a reason
Watch for EXTREME signals - These indicate significant reversals
Use divergences as confluence - Especially powerful at band touches
Monitor volatility - Low BBWP often precedes big moves
Version: 7.0
Author: ralis24
Advanced ICC Multi-Timeframe 1.0Advanced ICC Multi-Timeframe Trading System
A comprehensive implementation and interpretation of the Indication, Correction, Continuation (ICC) trading methodology made popular by Trades by Sci, enhanced with advanced multi-timeframe analysis and automation features.
⚠️ CRITICAL TRADING WARNINGS:
DO NOT blindly follow BUY/SELL signals from this indicator
This indicator shows potential entry points but YOU must validate each trade
PAPER TRADE EXTENSIVELY before risking real capital
BACKTEST THOROUGHLY on your chosen instruments and timeframes
The ICC methodology requires understanding and discretion - automated signals are guidance only
This tool aids analysis but does not replace proper trade planning, risk management, or trader judgment
⚠️ Important Disclaimers:
This indicator is not endorsed by or affiliated with Trades by Sci
This is an early implementation and interpretation of the ICC methodology
May not work exactly as Trades by Sci executes his trades and entries
Requires further debugging, backtesting, and real-world validation
Completely free to use - no purchase required
I'm just one person obsessed with this method and wanted some better visualization of the chart/entries
About ICC:
The ICC method identifies complete market cycles through three phases: Indication (breakout), Correction (pullback), and Continuation (entry). This indicator automates the identification of these phases and adds powerful features for modern traders.
Key Features:
Multi-Timeframe Capabilities:
Automatic timeframe detection with optimized settings for 5m, 15m, 30m, 1H, 4H, and Daily charts
Higher timeframe overlay to view HTF ICC levels on lower timeframe charts for precise entry timing
Smart defaults that adjust swing length and consolidation detection based on your timeframe
Advanced Phase Tracking:
Complete ICC cycle tracking: Indication, Correction, Consolidation, Continuation, and No Setup phases
Live structure detection shows potential peaks/troughs before full confirmation
Intelligent invalidation logic detects failed setups when market structure reverses
Dynamic phase backgrounds for instant visual confirmation
Three Types of Entry Signals:
Traditional Entries - Price crosses back through the original indication level (strongest signals)
"BUY" (green) / "SELL" (red)
Breakout Entries - Price breaks out of consolidation range in the same direction
"BUY" (green) / "SELL" (red)
Reversal Entries (Optional, can be toggled off) - Price breaks consolidation in opposite direction, indicating failed setup
"⚠ BUY" (yellow) / "⚠ SELL" (orange)
More aggressive, counter-trend signals
Can be disabled for more conservative trading
Professional Features:
Volatility-based support/resistance zones (ATR-adjusted) that adapt to market conditions
Historical zone tracking (0-3 configurable) with visual hierarchy
Comprehensive real-time info table displaying all key metrics
Full alert system for entries, indications, and consolidation detection
Visual distinction between high-confidence trend entries and cautionary reversal entries
📖 USAGE GUIDE
Entry Signal Types:
The indicator provides three types of entry signals with visual distinction:
Strong Entries (High Confidence):
"BUY" (bright green) / "SELL" (bright red)
Includes traditional entries (crossing back through indication level) and breakout entries (breaking consolidation in trend direction)
These are trend continuation or breakout signals with higher probability
Recommended for all traders
Reversal Entries (Caution - Counter-Trend):
"⚠ BUY" (yellow) / "⚠ SELL" (orange)
Triggered when price breaks out of correction/consolidation in the OPPOSITE direction
Indicates a failed setup and potential trend reversal
More aggressive, counter-trend plays
Can be toggled off in settings for more conservative trading
Recommended only for experienced traders or after thorough backtesting
Swing Length Settings:
The swing length determines how many bars on each side are needed to confirm a swing high/low. This is the most important setting for tuning the indicator to your style.
Auto Mode (Recommended for beginners): Toggle "Use Auto Timeframe Settings" ON
5-minute: 30 bars
15-minute: 20 bars
30-minute: 12 bars
1-hour: 7 bars
4-hour: 5 bars
Daily: 3 bars
Manual Mode: Toggle "Use Auto Timeframe Settings" OFF
Lower values (3-7): More aggressive, detects smaller swings
Pros: More signals, faster entries, catches smaller moves
Cons: More noise, more false signals, requires tighter stops
Best for: Scalping, active day trading, volatile markets
Higher values (12-20): More conservative, only major swings
Pros: More reliable signals, fewer false breakouts, clearer structure
Cons: Fewer signals, delayed entries, might miss smaller opportunities
Best for: Swing trading, position trading, trending markets
Default Manual Setting: 7 bars (balanced for 1H charts)
Minimum: 3 bars
Consolidation Bars Setting:
Determines how many bars without new structure are needed before flagging consolidation.
Lower values (3-10): Faster detection, catches brief pauses, more sensitive
Best for: Lower timeframes, volatile markets, avoiding any chop
Higher values (20-40): More reliable, only flags true extended consolidation
Best for: Higher timeframes, trending markets, patient traders
Current defaults scale with timeframe (more bars needed on shorter timeframes)
Historical S/R Zones:
Shows previous support and resistance levels to provide context.
Default: 2 historical zones (shows current + 2 previous)
Range: 0-3 zones
Visual Hierarchy: Older zones are more transparent with dashed borders
Usage: Higher numbers (2-3) show more historical context but can clutter the chart. Start with 2 and adjust based on your preference.
Live Structure Feature (Yellow Warning ⚠):
Provides early warning of potential structure changes before full confirmation.
What it does: Detects potential swing highs/lows after just 2 bars instead of waiting for full swing_length confirmation
Live Peak: Shows when a high is followed by 2 lower closes (potential top forming)
Live Trough: Shows when a low is followed by 2 higher closes (potential bottom forming)
Important: These are UNCONFIRMED - they may be invalidated if price reverses
Use case: Get early awareness of potential reversals while waiting for confirmation
Displayed in: Info table only (no visual markers on chart to reduce clutter)
Only shows: Peaks higher than last swing high, or troughs lower than last swing low (filters out noise)
Higher Timeframe (HTF) Analysis:
View higher timeframe ICC structure while trading on lower timeframes.
How to enable: Toggle "Show Higher Timeframe ICC" ON
Setup: Set "Higher Timeframe" to your reference timeframe
Example: Trading on 15-minute? Set HTF to 240 (4-hour) or 60 (1-hour)
Example: Trading on 5-minute? Set HTF to 60 (1-hour) or 15 (15-minute)
What it shows:
HTF indication levels displayed as dashed lines
Blue = HTF Bullish Indication
Purple = HTF Bearish Indication
HTF phase and levels shown in info table
Trading workflow:
Check HTF phase for overall market direction
Wait for HTF correction phase
Drop to lower timeframe to find precise entries
Enter when lower TF shows continuation in alignment with HTF
Best practice: HTF should be 3-4x your trading timeframe for best results
Reversal Entries Toggle:
Default: ON (shows all signal types)
Toggle OFF for more conservative trading (only trend continuation signals)
Recommended: Backtest with both settings to see which works better for your style
New traders should consider disabling reversal entries initially
Volatility-Based Zones:
When enabled, support/resistance zones automatically adjust their height based on ATR (Average True Range).
More volatile = wider zones
Less volatile = tighter zones
Toggle OFF for fixed-width zones
Community Feedback Welcome:
This is an evolving project and your input is valuable! Please share:
Bug reports and issues you encounter
Feature requests and suggestions for improvement
Results from your backtesting and live trading experience
Feedback on the reversal entry feature (too aggressive? working well?)
Ideas for better aligning with the ICC methodology
Perfect for traders learning or implementing the ICC methodology with the benefit of modern automation, multi-timeframe analysis, and flexible entry signal options.
One for AllOne for All (OFA) - Complete ICT Analysis Suite
Version 3.3.0 by theCodeman
📊 Overview
One for All (OFA) is a comprehensive TradingView indicator designed for traders who follow Inner Circle Trader (ICT) concepts. This all-in-one tool combines essential ICT analysis features—sessions, kill zones, previous period levels, and higher timeframe candles with Fair Value Gaps (FVGs) and Volume Imbalances (VIs)—into a single, highly customizable indicator. Whether you're a beginner learning ICT concepts or an experienced trader refining your edge, OFA provides the visual structure needed for precise market analysis and execution.
✨ Key Features
- 🏷️ Customizable Watermark**: Display your trading identity with customizable titles, subtitles, symbol info, and full style control
- 🌍 Trading Sessions**: Visualize Asian, London, and New York sessions with high/low lines, range boxes, and open/close markers
- 🎯 Kill Zones**: Highlight 5 critical ICT kill zones with precise timing and visual boxes
- 📈 Previous Period H/L**: Track Daily, Weekly, and Monthly highs/lows with customizable styles and lookback periods
- 🕐 Higher Timeframe Candles**: Display up to 5 HTF timeframes with OHLC trace lines, timers, and interval labels
- 🔍 FVG & VI Detection**: Automatically detect and visualize Fair Value Gaps and Volume Imbalances on HTF candles
- ⚙️ Universal Timezone Support**: Works globally with GMT-12 to GMT+14 timezone selection
- 🎨 Full Customization**: Control colors, styles, visibility, and layout for every feature
🚀 How to Use
Watermark Setup
The watermark overlay helps you identify your charts and maintain focus on your trading principles:
1. Enable/disable watermark via "Show Watermark" toggle
2. Customize the title (default: "Name") to display your trading name or account identifier
3. Set up to 3 subtitles (default: "Patience", "Confidence", "Execution") as trading reminders
4. Choose position (9 locations available), size, color, and transparency
5. Toggle symbol and timeframe display as needed
Use Case: Display your trading principles or account name for multi-monitor setups or content creation.
Trading Sessions Analysis
Sessions define market character and liquidity availability:
1. Enable "Show All Sessions" to visualize all three sessions
2. Adjust timezone to match your local market (default: UTC-5 for EST)
3. Customize session times if needed (defaults cover standard hours)
4. Enable session range boxes to see consolidation zones
5. Use session high/low lines to identify key levels for the current session
6. Enable open/close markers to track session transitions
Use Case: Identify which session you're trading in, track session highs/lows for liquidity, and anticipate session transition volatility.
Kill Zones Trading
Kill zones are ICT's high-probability trading windows:
1. Enable individual kill zones or use "Show All Kill Zones"
2. **Asian Kill Zone** (2000-0000 GMT): Early positioning and smart money accumulation
3. **London Kill Zone** (0300-0500 GMT): European market opening volatility
4. **NY AM Kill Zone** (0930-1100 EST): Post-NYSE open expansion
5. **NY Lunch Kill Zone** (1200-1300 EST): Midday consolidation or manipulation
6. **NY PM Kill Zone** (1330-1600 EST): Afternoon positioning and closes
7. Customize colors and times to match your trading style
8. Set max days display to control historical visibility (default: 30 days)
Use Case: Focus entries during high-probability windows. Watch for liquidity sweeps at kill zone openings and institutional positioning.
Previous Period High/Low Levels
Previous period levels act as magnetic price targets and support/resistance:
1. Enable Daily (PDH/PDL), Weekly (PWH/PWL), or Monthly (PMH/PML) levels individually
2. Set lookback period (how many previous periods to display)
3. Choose line style: Solid (current emphasis), Dashed (standard), or Dotted (subtle)
4. Customize colors per timeframe for visual hierarchy
5. Adjust line width (1-5) for visibility preference
6. Enable gradient effect to fade older periods
7. Position labels left or right based on chart layout
8. Customize label text for your preferred notation
Use Case: Identify key levels where price is likely to react. Daily levels work on intraday timeframes, Weekly on daily charts, Monthly for swing trading.
Higher Timeframe (HTF) Candles
HTF candles reveal the larger market context while trading lower timeframes:
1. Enable up to 5 HTF slots simultaneously (default: 5m, 15m, 1H, 4H, Daily)
2. Choose display mode: "Below Chart" (stacked rows) or "Right Side" (compact column)
3. Customize timeframe, colors (bull/bear), and titles for each slot
4. **OHLC Trace Lines**: Visual lines connecting HTF candle levels to chart bars
5. **HTF Timer**: Countdown showing time remaining until HTF candle close
6. **Interval Labels**: Display day of week (Daily+) or time (intraday) on each candle
7. For Daily candles: Choose open time (Midnight, 8:30, 9:30) to match your market structure preference
Use Case: Trade lower timeframes while respecting higher timeframe structure. Watch for HTF candle closes to confirm directional bias.
FVG & VI Detection
Fair Value Gaps and Volume Imbalances highlight inefficiencies that price often revisits:
1. **Fair Value Gaps (FVGs)**: Detected when HTF candle wicks don't overlap between 3 consecutive candles
- Bullish FVG: Gap between candle 1 high and candle 3 low (green box by default)
- Bearish FVG: Gap between candle 1 low and candle 3 high (red box by default)
2. **Volume Imbalances (VIs)**: Similar detection but focuses on body gaps
- Bullish VI: Gap between candle 1 close and candle 3 open
- Bearish VI: Gap between candle 1 open and candle 3 close
3. Enable FVG/VI detection per HTF slot individually
4. Customize colors and transparency for each imbalance type
5. Boxes appear on chart at formation and remain visible as retracement targets
**Use Case**: Identify high-probability retracement zones. Price often returns to fill FVGs and VIs before continuing the trend. Use as entry zones or profit targets.
🎨 Customization
OFA is built for flexibility. Every feature includes extensive customization options:
Visual Customization
- **Colors**: Independent color control for every element (sessions, kill zones, lines, labels, FVGs, VIs)
- **Transparency**: Adjust box and label transparency (0-100%) for clean charts
- **Line Styles**: Choose Solid, Dashed, or Dotted for previous period lines
- **Sizes**: Control text size, line width, and box borders
- **Positions**: Place watermark in 9 positions, labels left/right
Layout Control
- **HTF Display Mode**: "Below Chart" for detailed analysis, "Right Side" for space efficiency
- **Drawing Limits**: Set max days for sessions/kill zones to manage chart clutter
- **Lookback Periods**: Control how many previous periods to display (1-10)
- **Gradient Effects**: Enable fading for older previous period lines
Timing Adjustments
- **Timezone**: Universal GMT offset selector (-12 to +14) for global markets
- **Session Times**: Customize each session's start/end times
- **Kill Zone Times**: Adjust kill zone windows to match your market's characteristics
- **Daily Open**: Choose Midnight, 8:30, or 9:30 for Daily HTF candle open time
💡 Best Practices
1. Start Simple: Enable one feature at a time to learn how each element affects your analysis
2. Match Your Timeframe: Use Daily levels on intraday charts, Weekly on daily charts, HTF candles one or two levels above your trading timeframe
3. Kill Zone Focus: Concentrate your trading activity during kill zones for higher probability setups
4. HTF Confirmation: Wait for HTF candle closes before committing to directional bias
5. FVG/VI Entries: Look for price to return to unfilled FVGs/VIs for entry opportunities with favorable risk/reward
6. Customize Colors: Use a consistent color scheme that matches your chart theme and reduces visual fatigue
7. Reduce Clutter: Disable features you're not actively using in your current trading plan
8. Session Context: Understand which session controls the market—trade with session direction or anticipate reversals at session transitions
⚙️ Settings Guide
OFA organizes settings into logical groups for easy navigation:
- **═══ WATERMARK ═══**: Title, subtitles, position, style, symbol/timeframe display
- **═══ SESSIONS ═══**: Enable/disable sessions, times, colors, high/low lines, boxes, markers
- **═══ KILL ZONES ═══**: Individual kill zone toggles, times, colors, max days display
- **═══ PREVIOUS H/L - DAILY ═══**: Daily high/low lines, style, color, lookback, labels
- **═══ PREVIOUS H/L - WEEKLY ═══**: Weekly high/low lines, style, color, lookback, labels
- **═══ PREVIOUS H/L - MONTHLY ═══**: Monthly high/low lines, style, color, lookback, labels
- **═══ HTF CANDLES ═══**: Global display mode, layout settings
- **═══ HTF SLOT 1-5 ═══**: Individual HTF configuration (timeframe, colors, title, FVG/VI detection, trace lines, timer, interval labels)
Each setting includes tooltips explaining its function. Hover over any input for detailed guidance.
📝 Final Notes
One for All (OFA) represents a complete ICT analysis toolkit in a single indicator. By combining watermark customization, session visualization, kill zone highlighting, previous period levels, and higher timeframe candles with FVG/VI detection, OFA eliminates the need for multiple indicators cluttering your chart.
**Version**: 3.3.0
**Author**: theCodeman
**Pine Script**: v6
**License**: Mozilla Public License 2.0
Start with default settings to learn the indicator's structure, then customize extensively to match your personal trading style. Remember: tools provide information, but your edge comes from disciplined execution of a proven strategy.
Happy Trading! 📈
67 2.0Major Market Trading Hours
New York Stock Exchange (NYSE)
Open: 9:30 AM (ET)
Close: 4:00 PM (ET)
Pre-Market: 4:00 AM – 9:30 AM (ET)
After Hours: 4:00 PM – 8:00 PM (ET)
Nasdaq
Open: 9:30 AM (ET)
Close: 4:00 PM (ET)
Pre-Market: 4:00 AM – 9:30 AM (ET)
After Hours: 4:00 PM – 8:00 PM (ET)
London Stock Exchange (LSE)
Open: 8:00 AM (GMT)
Close: 4:30 PM (GMT)
Tokyo Stock Exchange (TSE)
Open: 9:00 AM (JST)
Lunch Break: 11:30 AM – 12:30 PM (JST)
Close: 3:00 PM (JST)
Hong Kong Stock Exchange (HKEX)
Open: 9:30 AM (HKT)
Lunch Break: 12:00 PM – 1:00 PM (HKT)
Close: 4:00 PM (HKT)
67 2.0Major Market Trading Hours
New York Stock Exchange (NYSE)
Open: 9:30 AM (ET)
Close: 4:00 PM (ET)
Pre-Market: 4:00 AM – 9:30 AM (ET)
After Hours: 4:00 PM – 8:00 PM (ET)
Nasdaq
Open: 9:30 AM (ET)
Close: 4:00 PM (ET)
Pre-Market: 4:00 AM – 9:30 AM (ET)
After Hours: 4:00 PM – 8:00 PM (ET)
London Stock Exchange (LSE)
Open: 8:00 AM (GMT)
Close: 4:30 PM (GMT)
Tokyo Stock Exchange (TSE)
Open: 9:00 AM (JST)
Lunch Break: 11:30 AM – 12:30 PM (JST)
Close: 3:00 PM (JST)
Hong Kong Stock Exchange (HKEX)
Open: 9:30 AM (HKT)
Lunch Break: 12:00 PM – 1:00 PM (HKT)
Close: 4:00 PM (HKT)
Trend Trader//@version=6
indicator("Trend Trader", shorttitle="Trend Trader", overlay=true)
// User-defined input for moving averages
shortMA = input.int(10, minval=1, title="Short MA Period")
longMA = input.int(100, minval=1, title="Long MA Period")
// User-defined input for the instrument selection
instrument = input.string("US30", title="Select Instrument", options= )
// Set target values based on selected instrument
target_1 = instrument == "US30" ? 50 :
instrument == "NDX100" ? 25 :
instrument == "GER40" ? 25 :
instrument == "GOLD" ? 5 : 5 // default value
target_2 = instrument == "US30" ? 100 :
instrument == "NDX100" ? 50 :
instrument == "GER40" ? 50 :
instrument == "GOLD" ? 10 : 10 // default value
// User-defined input for the start and end times with default values
startTimeInput = input.int(12, title="Start Time for Session (UTC, in hours)", minval=0, maxval=23)
endTimeInput = input.int(17, title="End Time Session (UTC, in hours)", minval=0, maxval=23)
// Convert the input hours to minutes from midnight
startTime = startTimeInput * 60
endTime = endTimeInput * 60
// Function to convert the current exchange time to UTC time in minutes
toUTCTime(exchangeTime) =>
exchangeTimeInMinutes = exchangeTime / 60000
// Adjust for UTC time
utcTime = exchangeTimeInMinutes % 1440
utcTime
// Get the current time in UTC in minutes from midnight
utcTime = toUTCTime(time)
// Check if the current UTC time is within the allowed timeframe
isAllowedTime = (utcTime >= startTime and utcTime < endTime)
// Calculating moving averages
shortMAValue = ta.sma(close, shortMA)
longMAValue = ta.sma(close, longMA)
// Plotting the MAs
plot(shortMAValue, title="Short MA", color=color.blue)
plot(longMAValue, title="Long MA", color=color.red)
// MACD calculation for 15-minute chart
= request.security(syminfo.tickerid, "15", ta.macd(close, 12, 26, 9))
macdColor = macdLine > signalLine ? color.new(color.green, 70) : color.new(color.red, 70)
// Apply MACD color only during the allowed time range
bgcolor(isAllowedTime ? macdColor : na)
// Flags to track if a buy or sell signal has been triggered
var bool buyOnce = false
var bool sellOnce = false
// Tracking buy and sell entry prices
var float buyEntryPrice_1 = na
var float buyEntryPrice_2 = na
var float sellEntryPrice_1 = na
var float sellEntryPrice_2 = na
if not isAllowedTime
buyOnce :=false
sellOnce :=false
// Logic for Buy and Sell signals
buySignal = ta.crossover(shortMAValue, longMAValue) and isAllowedTime and macdLine > signalLine and not buyOnce
sellSignal = ta.crossunder(shortMAValue, longMAValue) and isAllowedTime and macdLine <= signalLine and not sellOnce
// Update last buy and sell signal values
if (buySignal)
buyEntryPrice_1 := close
buyEntryPrice_2 := close
buyOnce := true
if (sellSignal)
sellEntryPrice_1 := close
sellEntryPrice_2 := close
sellOnce := true
// Apply background color for entry candles
barcolor(buySignal or sellSignal ? color.yellow : na)
/// Creating buy and sell labels
if (buySignal)
label.new(bar_index, low, text="BUY", style=label.style_label_up, color=color.green, textcolor=color.white, yloc=yloc.belowbar)
if (sellSignal)
label.new(bar_index, high, text="SELL", style=label.style_label_down, color=color.red, textcolor=color.white, yloc=yloc.abovebar)
// Creating labels for 100-point movement
if (not na(buyEntryPrice_1) and close >= buyEntryPrice_1 + target_1)
label.new(bar_index, high, text=str.tostring(target_1), style=label.style_label_down, color=color.green, textcolor=color.white, yloc=yloc.abovebar)
buyEntryPrice_1 := na // Reset after label is created
if (not na(buyEntryPrice_2) and close >= buyEntryPrice_2 + target_2)
label.new(bar_index, high, text=str.tostring(target_2), style=label.style_label_down, color=color.green, textcolor=color.white, yloc=yloc.abovebar)
buyEntryPrice_2 := na // Reset after label is created
if (not na(sellEntryPrice_1) and close <= sellEntryPrice_1 - target_1)
label.new(bar_index, low, text=str.tostring(target_1), style=label.style_label_up, color=color.red, textcolor=color.white, yloc=yloc.belowbar)
sellEntryPrice_1 := na // Reset after label is created
if (not na(sellEntryPrice_2) and close <= sellEntryPrice_2 - target_2)
label.new(bar_index, low, text=str.tostring(target_2), style=label.style_label_up, color=color.red, textcolor=color.white, yloc=yloc.belowbar)
sellEntryPrice_2 := na // Reset after label is created
QQQ Quant Power STRATEGY v13.3 (Ribbon + TQQQ Specs)1. The Quant Engine (Data Processing)
Weighted Scoring: It assigns specific weights to stocks (e.g., NVDA gets 8.5% weight, TXN gets 1.0%).
Z-Score Pressure: It calculates how "unusual" the current buying/selling pressure is compared to the average (Standard Deviation).
Alignment Bonus: It boosts the "Conviction Score" if Mega Caps (Top 8) and Large Caps (Next 12) are moving in the same direction.
2. The Dashboard (Mission Control)
The dashboard gives you an X-Ray view of the market:
Main Status: Tells you if the market is BULLISH, BEARISH, or CHOP (Sit Out).
Conviction %: A probability score (0-99%). Higher = Safer trade.
Breadth: Counts how many of the top 20 stocks are above their EMA.
Chop Logic: If Breadth is mixed (between 6 and 14 stocks above EMA), it declares "CHOP" and blocks trades.
Mega/Large Net: Shows the net buying/selling pressure for each group.
3. Visuals
Pressure Line: The line on the chart isn't just a Moving Average; it's the Net Pressure of the 20 stocks pushing price up or down.
Conviction Ribbon: The squares at the bottom of the screen.
🟩 Green: High Probability Long (>77%).
🟥 Red: High Probability Short (>77%).
⬜ Gray: Low Conviction / Holding.
4. Strategy Logic (Automated Trading)
Entry: Enters when the "Basket" of stocks is aligned (Bull/Bear Pressure) AND the Conviction Score is high (>77%).
Exit: Closes the trade if Conviction drops (Signal fades) or hits a Hard Stop Loss.
Time Filters: Includes strict trading windows (e.g., No trading during lunch 12-1pm, closes all positions on Friday).
Summary
This is a Market Breadth & Momentum Strategy. It assumes that QQQ cannot sustain a trend unless its underlying components (NVDA, AAPL, etc.) are pushing it. It filters out "fake moves" where QQQ moves but the components don't support it.
Macros+AMD [NW]Macros + AMD - Daily & Weekly Time-Based Analysis
Multi-timeframe AMD (Accumulation, Manipulation, Distribution) visualization with ICT Macro timing windows for time-based market analysis.
Overview
This indicator visualizes the AMD (Accumulation, Manipulation, Distribution) framework on both daily and weekly timeframes, combined with ICT Macro timing windows. It is designed as an educational tool to help traders study time-based market structure and algorithmic price delivery concepts.
The AMD model is based on the idea that markets move through distinct phases within each trading period:
Accumulation (A) - Initial range formation, liquidity building
Manipulation (M) - False moves to trap traders, liquidity sweeps
Distribution (D) - True directional move, price delivery to targets
What This Indicator Displays
Daily AMD Phases
Displays the intraday AMD cycle based on New York trading hours:
A Phase (Blue): 4:00 AM - 8:35 AM EST — Morning accumulation, Asian/London overlap
M Phase (Red): 8:35 AM - 11:25 AM EST — NY session manipulation, news events
D Phase (Green): 11:25 AM - 4:00 PM EST — Afternoon distribution and price delivery
Weekly AMD Phases
Displays the weekly AMD cycle from Monday to Monday:
A Phase: Monday 00:00 - Tuesday 21:56 EST — Weekly high/low formation begins
M Phase: Tuesday 21:56 - Thursday 02:04 EST — Mid-week reversal zone
D Phase: Thursday 02:04 - Monday 00:00 EST — Weekly price delivery
Inner M Phase Fibs
When enabled, subdivides the M (Manipulation) phase using Fibonacci levels:
0.382 level — Inner accumulation ends
0.500 level — Mid-point of manipulation
0.618 level — Inner distribution begins
This helps identify potential reversal points within the manipulation phase.
ICT Macro Windows
Horizontal lines marking the XX:42 to XX:15 macro periods (33-minute windows):
2:42 - 3:15 AM
3:42 - 4:15 AM (London)
7:42 - 8:15 AM
8:42 - 9:15 AM
9:42 - 10:15 AM (Prime AM session)
10:42 - 11:15 AM
11:42 - 12:15 PM
12:42 - 1:15 PM
1:42 - 2:15 PM
2:42 - 3:15 PM
These windows represent times when algorithmic price delivery is more likely to occur.
How To Use
Understanding the AMD Framework
During the A Phase:
Observe range formation and initial liquidity pools
Note the high and low established during this phase
Wait for manipulation before committing to direction
During the M Phase:
Watch for false breakouts and stop hunts
Look for reversal patterns after liquidity sweeps
The inner fibs (0.382, 0.5, 0.618) can help time entries within this phase
Mid-week (Wednesday) often sees key reversals on weekly AMD
During the D Phase:
This is typically when the true move occurs
Price tends to deliver toward draw on liquidity targets
The direction is often opposite to the manipulation move
Using the Macro Windows
The XX:42 to XX:15 windows are times to pay attention to price action:
These 33-minute periods often see increased algorithmic activity
Look for displacement, fair value gaps, or order blocks forming
The 9:42-10:15 AM window is considered particularly significant for NY session
Weekly Day Labels
Monday/Tuesday: "H/L of Week" — Watch for weekly high or low formation
Wednesday: "Reversal Day" — Mid-week reversal probability increases
Thursday/Friday: "Reversal Day" — Continuation or secondary reversal
Settings Guide
Main Settings
Timezone: Set to your broker's timezone or preferred timezone
Macros On Top: Toggle macro lines above or below AMD boxes
Show All Text Labels: Master toggle for all text (turn off for clean charts on HTF)
Daily/Weekly AMD
Show: Enable/disable the AMD visualization
Opacity: Adjust transparency of the phase boxes (higher = more transparent)
AMD Colors
Customize colors for each phase (A, M, D)
Default: Blue (A), Red (M), Green (D)
Inner M Style
Customize the inner M phase fib lines and text colors
Default: Black lines for clean visibility
Macro Settings
Adjust macro line color and thickness
Toggle individual macro windows on/off
Important Notes
This indicator is for educational purposes and time-based analysis
It does not provide buy/sell signals
Always use in conjunction with proper price action analysis
Past price behavior during these time windows does not guarantee future results
The AMD framework is one lens for viewing market structure — use it as part of a complete methodology
Credits
This indicator is based on concepts taught by ICT (Inner Circle Trader) and the broader Smart Money Concepts community. The AMD framework, macro timing windows, and weekly profile concepts are derived from this educational methodology.
Timeframe Recommendations
Best viewed on 1-minute to 15-minute charts
Text labels automatically hide on 9-minute and higher timeframes for cleaner visualization
Indicator hides completely on 1-hour and higher timeframes
Changelog
v1.0 - Initial release
Daily AMD phases (4am-4pm EST)
Weekly AMD phases (Monday-Monday)
Inner M phase Fibonacci subdivisions
10 ICT Macro timing windows
Full customization options
Automatic 9-day cleanup
Donchian ForecastDonchian Forecast – multi-timeframe Donchian/ATR bias with ADX regime blending
Donchian Forecast is a multi-timeframe bias tool that turns classic Donchian channels into a normalized trend/mean-reversion “forecast” and a single bias value in .
It projects a short polyline path from the current price and shows how that path adapts when the market shifts from ranging to trending (via ADX).
---
Concept
1. Donchian position → direction
For each timeframe, the script measures where price sits inside its Donchian channel:
-1 = near channel low
0 = middle
+1 = near channel high
This Donchian position is multiplied by ATR to create a **price delta** (how far the forecast moves from current price).
2. Local behavior: trend vs mean-reversion around Donchian
The indicator treats the edges vs middle of the Donchian channel differently:
* By default, edges behave more “trend-like”, middle more “mean-reverting”.
* If you enable the reversed option, this logic flips (edges = mean-reverting, middle = trend-
like).
* This “local” behavior is controlled smoothly by the absolute Donchian position |pos| (not by hard zone switches).
3. Global ADX modulation (regime aware)
ADX is mapped from your chosen low → high thresholds into a signed factor in :
* ADX ≤ low → -1 (fully reversed behavior, more range/mean-reversion oriented)
* ADX ≥ high → +1 (fully normal behavior, more trend oriented)
* Values in between create a **smooth transition**.
* This global factor can:
* Keep the local behavior as is (trending regime),
* Flip it (range regime), or
* Neutralize it (indecisive regime).
4. Multi-timeframe aggregation (1x–12x chart timeframe)
* The script repeats the same logic across 12 horizons:
* 1x = chart timeframe
* 2x..12x = multiples of the chart timeframe (e.g., 5m → 10m, 15m, …; 1h → 2h, 3h, …).
* For each horizon it builds:
* Donchian position
* ATR-scaled delta (in price units)
* Locally + globally blended delta (after Donchian + ADX logic).
* These blended deltas are ATR-weighted and summed into a single bias in , which is then shown as Bias % in the on-chart table.
---
### What you see on the chart
* Forecast polyline
* Starting at the current close, the indicator draws a short chain of **up to 12 segments**:
* Segment 1: from current price → 1x projection
* Segment 2: 1x → 2x projection
* … up to 12x.
* Each segment is:
* Green when its blended delta is ≥ 0 (upward bias)
* Red when its blended delta is < 0 (downward bias)
* This is not future price, but a synthetic path showing how the Donchian/ATR/ADX model “expects” price to drift across multiple horizons.
* Bias table (top-center)
* `Bias: X.Y%`
* > 0% (green) → net upward bias across horizons
* < 0% (red) → net downward bias
* Magnitude (e.g., ±70–100%) ≈ strength of the directional skew.
* `ADX:` current ADX value (from your DMI settings).
* `ADXBlend:` the signed ADX factor in :
* +1 ≈ fully “trend-interpretation” of Donchian behavior
* 0 ≈ neutral / mixed regime
* -1 ≈ fully “reversed/mean-reversion interpretation”
---
Inputs & settings
Core Donchian / ATR
* Donchian Length – lookback for Donchian high/low on each horizon.
* Price Source – input series used for position inside the Donchian channel (default: close).
* ATR Length – ATR lookback for all horizons.
* ATR Multiplier – scales the size of each forecast step in price units (higher = longer segments / more aggressive forecast).
*Local behavior at high ADX
* Reversed local blend at high ADX?
* Off (default) – edges behave more trend-like, middle more mean-reverting.
* On – flips that logic (edges more mean-reverting, middle more trend-like).
* The actual effect is always modulated by the global ADX factor, so you can experiment with how the regime logic feels in different markets.
Global ADX blending
* DMI DI Length – period for the DI+ and DI- components.
* ADX Smoothing – smoothing length for ADX.
* ADX low (mean-rev zone) – below this level, the global factor pushes behavior toward reversal/range logic .
* ADX high (trend zone) – above this level, the global factor pushes behavior toward **trend logic**.
* Values between low and high create a smooth blend rather than a hard on/off switch.
---
How to use it (examples)
* Directional bias dashboard
* Use the Bias % as a compact summary of multi-horizon Donchian/ATR/ADX conditions:
* Consider only trades aligned with the sign of Bias (e.g., longs only when Bias > 0).
* Use the magnitude to filter for **strong vs weak** directional contexts.
* Regime-aware context
* Watch ADX and ADXBlend:
* High ADX & ADXBlend ≈ +1 → favor trend-continuation ideas.
* Low ADX & ADXBlend ≈ -1 → favor range/mean-reversion ideas.
* Around 0 → mixed/transition regimes; forecasts will be more muted.
* Visual sanity check for systems
* Overlay Donchian Forecast on your usual entries/exits to see:
* When your system trades **with** the multi-TF Donchian bias.
* When it trades **against** it (possible fade setups or no-trade zones).
This script does not generate entry or exit signals by itself. It is a contextual/forecast tool meant to sit on top of your own trading logic.
---
Notes
* Works on most symbols and timeframes; higher-timeframe multiples are built from the chart timeframe.
* The forecast line is a model-based projection, not a prediction or guarantee of future price.
* Always combine this with your own risk management, testing, and judgement. This is for educational and analytical purposes only and is not financial advice.
Vinz Win BTC – STRATEGY AUTO 1m🚀 VinzWin BTC Strategy – BTC Scalping AUTO 1 min
The VinzWin strategy is based on a simple and highly effective price action pattern:
✅ 2 red candles followed by 1 green candle
✅ Doji filter set to 0
✅ Trading exclusively on BTC
✅ Session from 12:00 to 12:00 (24/7)
✅ Fixed Risk/Reward at 1:2
✅ Stop Loss set in fixed € amount
✅ Automatic risk management based on the Stop Loss
On every trade:
The Stop Loss is defined in fixed euros,
The Take Profit is always set at twice the risk,
The lot size is automatically adjusted to market conditions,
ensuring clean, stable, and fully controlled risk management.
📊 Multi-year backtests are available and show truly outstanding results, with strong consistency and an excellent profit/loss ratio.
👉 A simple, mechanical strategy with no over-optimization, perfectly suited for BTC scalping with fully controlled capital management in euros.
Dr. Barbara Star: Dual Strategies Combined [Merged] - geminiDr. Barbara Star: Dual Strategy Suite (Merged)
Overview
This script integrates two distinct but complementary trading methodologies developed by Dr. Barbara Star: "Capture Direction & Momentum" and "Profit with Dual Oscillators & Bands." While both strategies utilize price channels to filter noise, they approach entry and exit timing from different angles—one focusing on momentum shifts (Stochastic/EMA) and the other on cyclical price deviations (DPO/Bollinger Bands).
This tool allows the user to run either strategy independently or combine them to find high-confluence setups where momentum and cyclical structure align.
Strategy A: Capture Direction & Momentum
Source: Capture Direction And Momentum
1. Purpose & Theory
The goal of this method is to filter out the "noise" of choppy markets and identify the specific point where price direction aligns with momentum strength. It moves away from trying to catch exact tops or bottoms and instead focuses on catching the "meat" of the trend (continuation).
2. Implementation
Structure (The Channel): A 13-period SMA of the Highs and Lows creates a "No Trade Zone". When price is inside this channel, the market is considered directionless.
Direction (5 EMA): A fast 5-period EMA acts as a directional trigger. When it breaks outside the SMA channel, it signals acceleration.
Momentum (Modified Stochastic): A Slow Stochastic (14,2) is used, but with a crucial modification: the overbought/oversold levels are shifted to 40 and 60 (instead of 20/80).
3. How to Use It
The "Trend Zones" (Background Colors):
Green Background (Bullish): The 5 EMA is above the channel AND the Stochastic is > 60. This is the "Go" zone.
Red Background (Bearish): The 5 EMA is below the channel AND the Stochastic is < 40.
Yellow Background: The "No Trade Zone." The price is consolidating, or the indicators disagree.
The Continuation Signal (Marked by "U" or "D"):
Why it matters: This is the most powerful setup in the system. It detects when price pulls back (retracement) but momentum remains strong.
The Signal: If the 5 EMA dips back into the SMA channel (weakness) but the Stochastic stays above 60 (strength), a blue "U" (Up) marker appears. This indicates the pullback is likely a buying opportunity, not a reversal. Conversely, a yellow "D" appears in downtrends if Stoch stays below 40.
Exits (Marked by "X"):
Signals to take profit when the 5 EMA closes back inside the channel and the Stochastic crosses back into the neutral 40–60 zone.
Strategy B: Dual Oscillators & Bands
Source: Profit With Dual Oscillators & Bands
1. Purpose & Theory
This strategy uses "Dual Bollinger Bands" to define the volatility structure of the trend and "Dual Detrended Price Oscillators" (DPO) to time the entries based on cycle shifts.
2. Implementation
Structure (Dual Bands):
Inner Bands (1 SD): These define the "Trend Channel." Strong trends tend to ride between the 1 SD and 3 SD bands.
Outer Bands (3 SD): These represent extremes (containing 99.5% of price action). Hits here often signal exhaustion.
Timing (Dual DPOs):
Long Oscillator (DPO 20): Identifies the broader trend direction (Positive = Bullish).
Short Oscillator (DPO 9): Identifies shorter-term timing and potential divergences.
3. How to Use It
Identifying the Trend State:
Strong Uptrend: Price holds above the Upper Inner Band (1 SD).
Strong Downtrend: Price holds below the Lower Inner Band (1 SD).
Transition/Neutral: Price is stuck between the Upper and Lower Inner bands.
Entry Signals (Triangles on Chart & Circles in Pane):
Aggressive Entry: When the fast DPO 9 crosses zero. This signals early momentum shifts.
Conservative Entry: Wait for the slow DPO 20 to cross zero, confirming the broader trend has shifted.
Visuals: The script plots triangles on the main chart when these cross. In the lower pane, a Blue Circle indicates a bullish cross and a Yellow Circle indicates a bearish cross.
Continuation Setup:
Similar to Strategy A, look for moments where the DPO 9 dips below zero (pullback) while the DPO 20 remains above zero (trend intact). This is often a reload opportunity.
Combined Mode: The "Power Couple"
When selecting "Both" in the settings, the indicator merges these tools for maximum confirmation:
Visual filtering: The lower pane automatically scales the DPO lines to fit inside the 0–100 Stochastic range (centering the DPO zero line at 50). This allows you to read both momentum and cycles in a single glance.
Confluence Trading:
Look for the Background to turn Green (Strategy A Trend) coincident with a Blue Triangle/Circle (Strategy B Momentum Cross).
Use the Inner Bollinger Bands (Strategy B) as your trailing stop-loss while riding the SMA Channel (Strategy A) trend.
Reference Settings
Strategy A: SMA Channel (13), EMA (5), Stochastic (14, 2, 40/60 levels).
Strategy B: Bollinger Bands (20 SMA, 1.0 & 3.0 deviations), DPO (9 & 20).
Sources: of the methodologies
1-Stocks & Commodities V. 32:7 (10-16): Profit With Dual Oscillators & Bands by Barbara Star, PhD
2-Stocks & Commodities V. 43:12 (8–12): Capture Direction And Momentum by Barbara Star, PhD
VCP Base Detector
📊 VCP BASE DETECTOR - AUTO-DETECT CONSOLIDATION ZONES
🎯 WHAT IS THIS INDICATOR?
This indicator automatically detects and marks ALL consolidation bases (VCP bases) on your chart. It:
✅ Auto-detects when price enters consolidation
✅ Measures base tightness (volatility contraction)
✅ Tracks base duration (how long consolidating)
✅ Rates base quality (1-5 stars)
✅ Shows volume drying confirmation
✅ Detects base breakouts
✅ Shows progression of multiple bases (VCP pattern)
Use this WITH the "Mark Minervini SEPA Balanced" indicator for complete trading setups!
✅ Mark Minervini SEPA Balanced = Trend + RS + Stage
✅ VCP Base Detector = Base Quality + Progression
Combined = Complete professional trading system!
🎨 WHAT YOU SEE ON YOUR CHART
1️⃣ COLORED BOXES (Base Zones):
🟦 Aqua Box = ⭐⭐⭐⭐⭐ Excellent base (tightest)
🔵 Blue Box = ⭐⭐⭐⭐ Very good base
🟣 Purple Box = ⭐⭐⭐ Good base
🟠 Orange Box = ⭐⭐ Fair base
⬜ Gray Box = ⭐ Weak base
2️⃣ BASE LABELS (With Metrics):
Shows above each base:
• Duration: 20 days
• Tightness: 0.9%
• Quality: ⭐⭐⭐⭐⭐
3️⃣ BREAKOUT LABELS (When price exits base):
Green "BREAKOUT ✓" label shows:
• Price: ₹800
• Volume: 1.6x
4️⃣ DASHBOARD (Top-Left Panel):
Real-time base metrics showing:
• In Base: YES/NO
• Tightness: 0.8%
• Duration: 22 days
• Range: 3.5%
• Volume: Drying/Normal
• Quality: ⭐⭐⭐⭐
📊 UNDERSTANDING BASE QUALITY (⭐ Rating System)
⭐⭐⭐⭐⭐ (EXCELLENT)
├─ Tightness: < 0.8% ATR
├─ Duration: 15-40 days
├─ Volume: Significantly drying
├─ Price Range: < 5%
└─ Result: Most explosive breakouts (best quality)
⭐⭐⭐⭐ (VERY GOOD)
├─ Tightness: 0.8-1.0% ATR
├─ Duration: 15-35 days
├─ Volume: Very dry
├─ Price Range: < 7%
└─ Result: High probability breakouts
⭐⭐⭐ (GOOD)
├─ Tightness: 1.0-1.3% ATR
├─ Duration: 15-30 days
├─ Volume: Drying
├─ Price Range: < 8%
└─ Result: Decent breakout probability
⭐⭐ (FAIR)
├─ Tightness: 1.3-1.5% ATR
├─ Duration: 15-25 days
├─ Volume: Moderate drying
├─ Price Range: < 10%
└─ Result: Lower quality, riskier
⭐ (WEAK)
├─ Tightness: > 1.5% ATR
├─ Duration: Varies
├─ Volume: Not drying enough
├─ Price Range: > 10%
└─ Result: Low quality, skip these
📈 HOW TO USE - STEP BY STEP
STEP 1: ADD INDICATOR TO CHART
────────────────────────────────
1. Open any stock chart (use 1D timeframe for swing trading)
2. Click "Indicators"
3. Search "VCP Base Detector"
4. Click to add to chart
5. Wait a moment for boxes to appear
STEP 2: SCAN FOR BASES
───────────────────────
Look for:
✓ Colored boxes appearing on chart (bases forming)
✓ Dashboard showing "In Base: YES"
✓ Tightness below 1.5%
✓ Volume Dry: YES
STEP 3: MONITOR BASE QUALITY
──────────────────────────────
Dashboard shows stars:
⭐⭐⭐⭐⭐ = Wait for breakout (best setup)
⭐⭐⭐⭐ = Good quality, watch for breakout
⭐⭐⭐ = Decent, but not ideal
⭐⭐ or ⭐ = Skip (lower probability)
STEP 4: WAIT FOR BREAKOUT
──────────────────────────
When price breaks above the box:
✓ Green "BREAKOUT ✓" label appears
✓ Shows breakout price and volume
✓ If volume shows 1.3x+, breakout is confirmed
✓ This is your entry signal!
STEP 5: CHECK MINERVINI CRITERIA (Use Both Indicators)
───────────────────────────────────────────────────────
Before entering:
✓ VCP Base Detector shows ⭐⭐⭐⭐+ quality base
✓ Mark Minervini indicator shows BUY SIGNAL
✓ Dashboard shows 10+ criteria GREEN
✓ Stage shows S2
Result: HIGH-PROBABILITY SETUP! 🎯
📋 DASHBOARD INDICATORS - WHAT EACH MEANS
BASE METRICS SECTION:
─────────────────────
In Base = ✓ YES or ✗ NO
Show if price is currently consolidating
Tightness = 0-3% (lower = tighter = better)
< 0.8% = ⭐⭐⭐⭐⭐ (excellent)
0.8-1.0% = ⭐⭐⭐⭐ (very good)
1.0-1.3% = ⭐⭐⭐ (good)
1.3-1.5% = ⭐⭐ (fair)
> 1.5% = ⭐ (weak)
Duration = Number of days in consolidation
15 days = ⭐ (too short, weak)
20 days = ⭐⭐⭐ (ideal)
30 days = ⭐⭐⭐⭐ (very long, strong)
> 40 days = ⚠️ (too long, may break down)
Range = % movement within the base
< 5% = ⭐⭐⭐⭐⭐ (excellent, very tight)
5-8% = ⭐⭐⭐ (good)
> 10% = ⭐ (loose, not ideal)
Vol Dry = Volume status during consolidation
✓ YES = Volume contracting (good)
✗ NO = Normal/high volume (weak setup)
QUALITY SECTION:
────────────────
Stars = Overall base quality rating
⭐⭐⭐⭐⭐ = Best quality bases (most explosive)
⭐⭐⭐⭐ = Excellent quality
⭐⭐⭐ = Good quality
⭐⭐ = Fair quality
⭐ = Weak quality (skip)
52W INFO SECTION:
─────────────────
From 52W Hi = How far below 52-week high is price?
< 25% = In sweet zone ✓
> 25% = Too far from highs ✗
From 52W Lo = How far above 52-week low is price?
> 30% = In sweet zone ✓
< 30% = Too close to lows ✗
⚙️ CUSTOMIZATION GUIDE
Click ⚙️ gear icon next to indicator to adjust:
MINIMUM BASE DAYS (Default: 15)
──────────────────────────────
Current: 15 = Include shorter bases
Change to 20 = Longer bases only (higher quality)
Change to 10 = Include very short bases (more frequent)
Why: Longer bases = better breakouts, but fewer opportunities
ATR% TIGHTNESS THRESHOLD (Default: 1.5)
────────────────────────────────────────
Current: 1.5 = BALANCED for Indian stocks
Change to 1.0 = ONLY very tight bases (⭐⭐⭐⭐⭐)
Change to 2.0 = Looser bases included (more frequent)
Why: Lower = tighter bases = better quality, fewer signals
VOLUME DRYING THRESHOLD (Default: 0.7)
──────────────────────────────────────
Current: 0.7 = Volume at 70% of average (good drying)
Change to 0.6 = Stricter (more volume drying required)
Change to 0.8 = Looser (less volume drying required)
Why: Volume drying = consolidation confirmation
52W PERIOD (Default: 252)
─────────────────────────
Current: 252 = Full year lookback
Don't change unless you know what you're doing
📈 REAL TRADING EXAMPLE
SCENARIO: Trading MARUTI over 6 weeks
WEEK 1: Nothing happening
─────────────────────────
- No boxes on chart
- Dashboard: "In Base: NO"
- Action: SKIP (not consolidating)
WEEK 2: Base Starting to Form
─────────────────────────────
- Purple box appears (⭐⭐⭐ quality)
- Dashboard: "In Base: YES"
- Tightness: 1.2%
- Duration: 3 days (too new)
- Action: MONITOR (let it develop)
WEEK 3-4: Base Tightening
──────────────────────────
- Box color changes from Purple → Blue (⭐⭐⭐⭐ quality)
- Dashboard: Duration: 12 days
- Tightness: 0.9%
- Vol Dry: YES
- Action: GET READY (high-quality base forming)
WEEK 4-5: Perfect Base Formed
──────────────────────────────
- Box changes to Aqua (⭐⭐⭐⭐⭐ EXCELLENT!)
- Dashboard: Duration: 22 days ✓
- Tightness: 0.8% ✓
- Vol Dry: YES ✓
- Range: 4.2% ✓
- Action: WATCH FOR BREAKOUT
WEEK 5: BREAKOUT HAPPENS!
──────────────────────────
- Price closes above box
- Green "BREAKOUT ✓" label appears
- Shows: Price ₹850, Volume 1.6x
- Mark Minervini indicator: BUY SIGNAL ✓
- Dashboard all GREEN ✓
- Action: ENTER TRADE
Entry: ₹850
Stop: Box low (₹820)
Target: ₹980 (20% move)
RESULT: +15.3% profit in 2 weeks! ✅
💡 PRO TIPS FOR BEST RESULTS
1. COMBINE WITH MINERVINI INDICATOR
Use BOTH indicators together:
✓ VCP Detector = Base quality
✓ Minervini = Trend + RS + Volume
Result = Best high-probability setups
2. PREFER ⭐⭐⭐⭐+ QUALITY BASES
Don't trade ⭐⭐ or ⭐ quality bases
Only trade ⭐⭐⭐+ (ideally ⭐⭐⭐⭐+)
Higher quality = Higher win rate
3. WAIT FOR VOLUME CONFIRMATION
Base must show "Vol Dry: YES"
Breakout must have 1.3x+ volume
Low volume breakouts fail often
4. USE 1D TIMEFRAME ONLY
This indicator optimized for daily charts
Intraday = Too many false signals
Weekly = Misses good setups
5. MONITOR MULTIPLE BASES (VCP PATTERN)
Multiple bases getting tighter = VCP pattern
Each base should be better quality than last
Tightest base = Biggest breakout
6. COMBINE WITH 52W CONTEXT
Dashboard shows "From 52W Hi" and "From 52W Lo"
Price should be in sweet zone:
< 25% from 52W high (uptrend territory)
> 30% above 52W low (not oversold)
7. BACKTEST FIRST
Use TradingView Replay
Go back 6-12 months
See how many bases appeared
See which were profitable
❌ BASES TO SKIP (Lower Probability)
Skip if:
❌ Quality rating < ⭐⭐⭐ (only 1-2 stars)
❌ Tightness > 1.5% (too loose)
❌ Duration < 10 days (too short, weak)
❌ Duration > 50 days (too long, may break down)
❌ Vol Dry: NO (volume not contracting)
❌ Range > 10% (not tight consolidation)
❌ Price < 30% from 52W low (too weak)
❌ Price > 30% from 52W high (too far up, late entry)
⚠️ IMPORTANT DISCLAIMERS
✓ This indicator is for educational purposes only
✓ Past performance does not guarantee future results
✓ Always use proper risk management (position sizing, stop loss)
✓ Never risk more than 2% of your account on one trade
✓ Base detection is technical analysis, not investment advice
✓ Losses can occur - trade at your own risk
✓ Combine with other indicators for best results
🎓 LEARNING RESOURCES
To understand VCP bases better:
→ Study "Trade Like a Stock Market Wizard" by Mark Minervini
→ Watch: "VCP Pattern" videos on YouTube
→ Practice: Backtest on 1-2 years of historical data
→ Learn: How consolidation precedes breakouts
🚀 YOU'RE READY!
Happy trading! 📈🎯
67Major Market Trading Hours
New York Stock Exchange (NYSE)
Open: 9:30 AM (ET)
Close: 4:00 PM (ET)
Pre-Market: 4:00 AM – 9:30 AM (ET)
After Hours: 4:00 PM – 8:00 PM (ET)
Nasdaq
Open: 9:30 AM (ET)
Close: 4:00 PM (ET)
Pre-Market: 4:00 AM – 9:30 AM (ET)
After Hours: 4:00 PM – 8:00 PM (ET)
London Stock Exchange (LSE)
Open: 8:00 AM (GMT)
Close: 4:30 PM (GMT)
Tokyo Stock Exchange (TSE)
Open: 9:00 AM (JST)
Lunch Break: 11:30 AM – 12:30 PM (JST)
Close: 3:00 PM (JST)
Hong Kong Stock Exchange (HKEX)
Open: 9:30 AM (HKT)
Lunch Break: 12:00 PM – 1:00 PM (HKT)
Close: 4:00 PM (HKT)
If you'd like anything bigger, bold, color‑coded, or reorganized, just tell me and I’ll adjust it!






















