Cicli
Sweep2Trade Pro [CHE]Sweep2Trade Pro \ — Liquidity Sweep → Trend → Confirmation
Sweep2Trade Pro \ helps you catch high-probability reversals or continuations that start with a liquidity sweep, align with the T3 trend, and finalize with a structure confirmation (BOS). It’s designed to reduce noise, time your entries, and keep you out of weak, chop-driven signals.
What’s a “sweep”?
A liquidity sweep happens when price briefly breaks a prior swing high/low (where many stops sit), triggers those stops, and then snaps back. This “stop-hunt” creates liquidity for bigger players and often precedes a sharp move in the opposite direction if the break fails, or fuels continuation if structure actually shifts.
What’s a BOS (Break of Structure)?
A BOS is a price action event where the market takes out a recent swing level in the trend’s direction, signaling continuation and confirming that structure has shifted (bullish BOS through a recent swing high, bearish BOS through a recent swing low).
How the indicator works (at a glance)
1. Regime Filter (T3 + R²)
T3 Moving Average: A smoother, faster-responding moving average that aims to reduce lag while filtering noise, so trend direction changes are clearer.
R² (Coefficient of Determination): Measures how “linear” the recent price path is (0→1). Higher values = stronger, cleaner trend; lower values = more chop. Used here to allow trades only when trend quality exceeds a user-set threshold.
2. Sweep Detection
Bullish sweep: price pokes below a prior swing low and closes back above it.
Bearish sweep: price pokes above a prior swing high and closes back below it.
Lookback length is configurable.
3. Sequence Lock (built-in FSM)
The script manages state in phases so you don’t jump the gun:
Phase 1: Sweep detected → wait for T3 to turn in the corresponding direction.
Phase 2: T3 direction confirmed → show “SWEEP OK” and wait for final confirmation.
Trade Signal: Only fires if confirmation arrives before a timeout.
4. Confirmation Layer
BOS via wick or close (you choose),
Strong close toward the signal (top/bottom quartile of the candle),
Optional “close above/below T3” condition.
These checks help avoid weak sweeps that immediately fade.
5. Alerts & Visuals
“SWEEP OK” markers show when the sweep + T3 direction align.
Final BUY/SELL arrows appear only when the confirmation layer passes.
Ready-made alert conditions for automation.
What you can do with it
Time reversals after sweeps: Enter when a stop-hunt fades and structure confirms.
Ride continuations: Use BOS with the T3 trend to pyramid or re-enter with structure on your side.
Filter chop: Let R² gate entries to periods with cleaner directional drift.
Automate: Use the included alerts with your platform or webhook setup.
Inputs (key settings)
Regime Filter
T3 Length / Volume Factor: Controls smoothness and responsiveness. Smaller length → faster, more sensitive; higher volume factor → smoother curve.
R² Lookback & Threshold: Length of the linear fit window and the minimum “trend quality” required. Higher thresholds mean fewer, cleaner signals.
Sweep / Sequence
Swing Lookback: How far back to define the “reference” high/low for sweeps.
Timeout: Maximum bars allowed between phases to keep signals fresh.
Restart timeout on Phase 2: Optional safety so entries don’t go stale.
Confirmation
BOS Lookback: Micro-pivot window for structure breaks.
Wick vs Close BOS: Conservative traders may prefer close.
Require close above/below T3: Tightens confirmation with trend alignment.
Practical guide (quick start)
1. Timeframe & markets: Works across majors, indices, and crypto. Start with 5m–1h intraday or 1h–4h swing; adjust R² threshold upward on noisier pairs.
2. Entry recipe (Long):
Bullish sweep of a prior low → T3 turns up → BOS/strong close.
Optional: enable “close above T3” for extra confirmation.
3. Entry recipe (Short): Mirror the above.
4. Stops: Common choices are just beyond the sweep wick (tighter) or past the BOS invalidation (safer).
5. Targets: Previous structural levels, measured move, or a T3 trail (exit when price closes back through T3).
6. Avoid low-quality contexts: If R² is very low, market is likely ranging erratically—skip or widen filters.
Tips & best practices
Context first: The same sweep means different things in a strong trend vs. flat regime; that’s why the T3+R² filter exists.
BOS choice: Wick-based BOS is earlier but noisier; close-based BOS is slower but cleaner. Tune per market.
Backtest -> Forward test: Validate settings per symbol/timeframe; then paper trade before going live.
Risk: Fixed fractional risk with asymmetric R\:R (e.g., 1:1.5–1:3) generally performs better than “all-in” discretionary sizing.
Behind the scenes (for the curious)
T3 is a multi-stage EMA construction that produces a smooth curve with reduced lag versus simple/standard EMAs.
R² is the square of correlation (0–1). Here it’s used as a moving gauge of how well price aligns to a linear path—our “trend quality” dial.
Stop-hunts / sweeps are a recognized microstructure phenomenon where clustered stops provide the liquidity that fuels the next move.
Disclaimer
No indicator guarantees profits. Sweep2Trade Pro \ is a decision aid; always combine with solid risk management and your own judgment. Backtest, forward test, and size responsibly.
The content provided, including all code and materials, is strictly for educational and informational purposes only. It is not intended as, and should not be interpreted as, financial advice, a recommendation to buy or sell any financial instrument, or an offer of any financial product or service. All strategies, tools, and examples discussed are provided for illustrative purposes to demonstrate coding techniques and the functionality of Pine Script within a trading context.
Any results from strategies or tools provided are hypothetical, and past performance is not indicative of future results. Trading and investing involve high risk, including the potential loss of principal, and may not be suitable for all individuals. Before making any trading decisions, please consult with a qualified financial professional to understand the risks involved.
By using this script, you acknowledge and agree that any trading decisions are made solely at your discretion and risk.
Enhance your trading precision and confidence 🚀
Happy trading
Chervolino
[blackcat] L1 Dual Ehlers Bandpass FilterOVERVIEW
The Dual Ehlers Bandpass Filter combines two bandpass filters tuned to the dominant and subdominant market cycles, creating a powerful signal extraction tool. This indicator uses John Ehlers' advanced digital signal processing techniques to isolate specific frequency components from price data. By mixing the outputs of two bandpass filters, it provides a smoother, more responsive signal that captures both primary and secondary market cycles. The indicator includes divergence detection capabilities and multiple mixing methods for customizable signal extraction.
FEATURES
- Dual bandpass filtering with dominant and subdominant cycle detection
- Multiple dominant cycle calculation methods (HoDyDC, PhAcDC, DuDiDC, CycPer, BPZC)
- Flexible mixing options: weighted, sum, difference, dominant-only, or subdominant-only
- Adjustable bandwidth parameters for both filters
- Built-in divergence detection with customizable lookback periods
- Optional display of individual filter components
- Color-coded signals and alerts for bullish/bearish divergences
HOW TO USE
1. Select your preferred price source (close, high, low, etc.)
2. Choose the dominant cycle calculation method from the available options
3. Set the subdominant cycle ratio (typically 0.1-0.9 of the dominant cycle)
4. Adjust bandwidth parameters for both filters (0.1-1.0 range)
5. Select your preferred mixing method:
- Weighted: Mix based on adjustable weights
- Sum: Add both filter outputs
- Difference: Subtract subdominant from dominant
- Dominant: Show only the dominant filter
- Subdominant: Show only the subdominant filter
6. Enable divergence detection to identify potential trend reversals
7. Optionally enable individual filter plots for analysis
LIMITATIONS
- The indicator requires sufficient historical data for accurate cycle detection
- Dominant cycle calculations may vary significantly during low volatility periods
- Divergence signals are lagging indicators and should be used with confirmation
- Bandpass filters may produce false signals during choppy market conditions
- The indicator is not suitable for all trading styles and timeframes
NOTES
- The indicator uses the blackcat1402/dc_ta library for advanced cycle calculations
- Zero line crossing can indicate potential trend changes
- Positive values typically suggest bullish momentum, negative values bearish momentum
- Divergence signals appear as colored dots and labels on the chart
- Alert conditions are available for both bullish and bearish divergences
THANKS
Special thanks to John Ehlers for his pioneering work in digital signal processing for financial markets.
Smart Money Concepts //@deepak
//@version=5
indicator(title='Custom Also Builder - v1', shorttitle="Custom Also Builder - v1", overlay=true, max_bars_back=500)
ma(_source, _length, _type) =>
switch _type
"SMA" => ta.sma (_source, _length)
"EMA" => ta.ema (_source, _length)
"RMA" => ta.rma (_source, _length)
"WMA" => ta.wma (_source, _length)
"VWMA" => ta.vwma(_source, _length)
alarm(_osc, _message) =>
alert(syminfo.ticker + ' ' + _osc + ' : ' + _message + ', price (' + str.tostring(close, format.mintick) + ')')
//Conditional Sampling EMA Function
Cond_EMA(x, cond, n) =>
var val = array.new_float(0)
var ema_val = array.new_float(1)
if cond
array.push(val, x)
if array.size(val) > 1
array.remove(val, 0)
if na(array.get(ema_val, 0))
array.fill(ema_val, array.get(val, 0))
array.set(ema_val, 0, (array.get(val, 0) - array.get(ema_val, 0)) * (2 / (n + 1)) + array.get(ema_val, 0))
EMA = array.get(ema_val, 0)
EMA
//Conditional Sampling SMA Function
Cond_SMA(x, cond, n) =>
var vals = array.new_float(0)
if cond
array.push(vals, x)
if array.size(vals) > n
array.remove(vals, 0)
SMA = array.avg(vals)
SMA
//Standard Deviation Function
Stdev(x, n) =>
math.sqrt(Cond_SMA(math.pow(x, 2), 1, n) - math.pow(Cond_SMA(x, 1, n), 2))
//Range Size Function
rng_size(x, scale, qty, n) =>
ATR = Cond_EMA(ta.tr(true), 1, n)
AC = Cond_EMA(math.abs(x - x ), 1, n)
SD = Stdev(x, n)
rng_size = scale == 'Pips' ? qty * 0.0001 : scale == 'Points' ? qty * syminfo.pointvalue : scale == '% of Price' ? close * qty / 100 : scale == 'ATR' ? qty * ATR : scale == 'Average Change' ? qty * AC : scale == 'Standard Deviation' ? qty * SD : scale == 'Ticks' ? qty * syminfo.mintick : qty
rng_size
//Two Type Range Filter Function
rng_filt(h, l, rng_, n, type, smooth, sn, av_rf, av_n) =>
rng_smooth = Cond_EMA(rng_, 1, sn)
r = smooth ? rng_smooth : rng_
var rfilt = array.new_float(2, (h + l) / 2)
array.set(rfilt, 1, array.get(rfilt, 0))
if type == 'Type 1'
if h - r > array.get(rfilt, 1)
array.set(rfilt, 0, h - r)
if l + r < array.get(rfilt, 1)
array.set(rfilt, 0, l + r)
if type == 'Type 2'
if h >= array.get(rfilt, 1) + r
array.set(rfilt, 0, array.get(rfilt, 1) + math.floor(math.abs(h - array.get(rfilt, 1)) / r) * r)
if l <= array.get(rfilt, 1) - r
array.set(rfilt, 0, array.get(rfilt, 1) - math.floor(math.abs(l - array.get(rfilt, 1)) / r) * r)
rng_filt1 = array.get(rfilt, 0)
hi_band1 = rng_filt1 + r
lo_band1 = rng_filt1 - r
rng_filt2 = Cond_EMA(rng_filt1, rng_filt1 != rng_filt1 , av_n)
hi_band2 = Cond_EMA(hi_band1, rng_filt1 != rng_filt1 , av_n)
lo_band2 = Cond_EMA(lo_band1, rng_filt1 != rng_filt1 , av_n)
rng_filt = av_rf ? rng_filt2 : rng_filt1
hi_band = av_rf ? hi_band2 : hi_band1
lo_band = av_rf ? lo_band2 : lo_band1
ma_function(source, length, type) =>
if type == 'RMA'
ta.rma(source, length)
else if type == 'SMA'
ta.sma(source, length)
else if type == 'EMA'
ta.ema(source, length)
else if type == 'WMA'
ta.wma(source, length)
else if type == 'HMA'
if(length<2)
ta.hma(source,2)
else
ta.hma(source, length)
else
ta.vwma(source, length)
// Get Table Size
table_size(s) =>
switch s
"Auto" => size.auto
"Huge" => size.huge
"Large" => size.large
"Normal" => size.normal
"Small" => size.small
=> size.tiny
setup_group= "████████ Indicator Setup ████████"
signalexpiry = input.int(defval=3, title='Signal Expiry Candle Count',group=setup_group, inline='expiry',tooltip="Number of candles to wait for all indicators to confirm a signal. Default is 3 which means if leading indicator print the signal, it will wait for max 3 more candles for rest of the indicators to print signal, if not then this setup is invalided and will have to wait for another signal form the leading indicator.")
alternatesignal = input.bool (true, "Alternate Signal", group=setup_group, inline='alternate')
showsignal = input.bool (true, "Show Long/Short Signal", group=setup_group,inline='showsignal',tooltip="Option to turn on/off the Long/Short signal shown on the chart. by default it will print Long/ Short signal on the chart.")
showdashboard = input.bool (true, "Show Dashboard", group=setup_group,inline='dashboard')
string i_tab1Ypos = input.string('bottom', 'Dashboard Position',group=setup_group, inline='dashboard2', options= )
string i_tab1Xpos = input.string('right', '', inline='dashboard2', group=setup_group,options= )
in_dashboardtab_size = input.string(title="Dashboard Size ", defval="Normal",
options= ,
group= setup_group , inline= "dashboard3")
///////////////////////////////////////////////
///// Signal filters
/////////////////////////////////////////////
leadingindicator = input.string(title="Leading Indicator", defval="Range Filter",
options= , group='████████ Main Indicator (signal) ████████', inline='li')
confirmation_group = "████████ Confirmation Indicators (filter) ████████ "
ema_tooltip = "EMA filter for confirmation. Validates Long signal if price is above the EMA FILTER level, and validates Short signal if price is below the EMA FILTER level. Default is 200, you can change that to meet your requiremnt."
respectema = input.bool (false, "EMA Filter", group=confirmation_group, inline='respectema')
respectemaperiod = input.int(defval=200, minval=1, title='', group=confirmation_group, inline='respectema', tooltip=ema_tooltip)
ema2_tooltip = "Generates Long signal if Fast EMA cross above Slow EMA. Generates Short signal when Fast EMA cross below the Slow EMA. Default values are 50 and 200. you can change that to meet your requirement."
respect2ma = input.bool (false, "2 EMA Cross : ", group=confirmation_group, inline='2ma')
respect2maperiod_1 = input.int(defval=50, title='',group=confirmation_group, inline='2ma')
respect2maperiod_2 = input.int(defval=200, title='',group=confirmation_group, inline='2ma',tooltip=ema2_tooltip)
ema3_tooltip = "Generates Long signal if first EMA (Fastest) cross above 2nd and 3rd EMA and 2nd EMA cross above 3rd EMA. Generates Short signal if first EMA (Fastest) cross below 2nd and 3rd EMA and 2nd EMA cross below 3rd EMA . Default values are 9,21 and 55. you can change that to meet your requirement."
respect3ma = input.bool (false, "3 EMA Cross : ", group=confirmation_group, inline='3ma',tooltip=ema3_tooltip)
respect3maperiod_1 = input.int(defval=9, title='',group=confirmation_group, inline='3ma',tooltip=ema3_tooltip)
respect3maperiod_2 = input.int(defval=21, title='',group=confirmation_group, inline='3ma',tooltip=ema3_tooltip)
respect3maperiod_3 = input.int(defval=55, title='',group=confirmation_group, inline='3ma',tooltip=ema3_tooltip)
respectrf = input.bool (false, "Range Filter", group=confirmation_group, inline='rf')
rftype = input.string(title="", defval="Default", options= , group=confirmation_group, inline='rf')
respectrqk = input.bool (true, "Rational Quadratic Kernel (RQK)", group=confirmation_group, inline='rqk',tooltip="Nadaraya Watson: Rational Quadratic Kernel (RQK)")
respectst = input.bool (false, "SuperTrend", group=confirmation_group, inline='st')
respectht = input.bool (false, "Half Trend", group=confirmation_group, inline='ht')
respectdonchian = input.bool (false, "Donchian Trend Ribbon", group=confirmation_group, inline='donchian')
respectroc = input.bool (false, "Rate of Change (ROC)", group=confirmation_group, inline='roc')
respecttsi = input.bool (false, "True Strength Indicator (TSI)", group=confirmation_group, inline='tsi')
tsitooltip = "Signal Crossover: TSI crossover or greater than signal line for long, and TSI crossunder signal line for short. Zero Line Cross: TSI cross above zero line and signal line for long signal. Tsi Cross below zero and signal line for short signal."
tsitype = input.string(title="", defval="Signal Cross", options= ,tooltip=tsitooltip, group=confirmation_group, inline='tsi')
respecttdfi = input.bool (false, "Trend Direction Force Index (TDFI)", group=confirmation_group, inline='tdfi')
respectmd = input.bool (false, "McGinley Dynamic", group=confirmation_group, inline='md')
respectdpo = input.bool (false, "Detrended Price Oscillator (DPO)", group=confirmation_group, inline='dpo')
respectichi = input.bool (false, "Ichimoku Cloud", group=confirmation_group, inline='ichi')
respectsuperichi = input.bool (false, "SuperIchi", group=confirmation_group, inline='ichi',tooltip="Ichimoku Cloud Conditions: 1. Candle above cloud 2. Converstion Line above base line 3. Leading 26 bar cloud is green 4. lagging span is above the cloud")
respecttrendline_breakout = input.bool (false, "Trendline Breakout", group=confirmation_group, inline='tb')
respectrd = input.bool (false, "Range Detector", group=confirmation_group, inline='rd',tooltip="Range Detector: if used as leading indicator, it will be based on range breakout. If used as confirmation indicator, it will be used to filter entries within the active range area.")
respecthacolt = input.bool (false, "Heiken-Ashi Candlestick Oscillator", group=confirmation_group, inline='hacolt',tooltip="Vervoort LongTerm Heiken-Ashi Candlestick Oscillator: If oscilliation is above 0 line, then long signal is issued and if below zero line, short signal is issued.")
respectbx = input.bool (false, "B-Xtrender", group=confirmation_group, inline='bx')
bxtype = input.string(title="", defval="Short and Long term trend", options= , group=confirmation_group, inline='bx', tooltip = "Short term trend: ===================== For buy signal the short term trend line must turn green, and for the sell signal, the short term trend line must turn red. Short and Long term trend: ===================== For buy signal, the short term trend must change from red to green and long term trend cross above zero line, for Sell signal the short term trend must turn red and long term trend line cross down the zero line..")
respectbbpt = input.bool (false, "Bull bear Power Trend", group=confirmation_group, inline='bbpt')
bbpttype = input.string(title="", defval="Follow Trend", options= , group=confirmation_group, inline='bbpt', tooltip = "Follow Trend: ===================== Buy signal will be validated if the BBPT trend line is above 2, and Sell signal will be validated if BBPT trend line is below -2. Without Trend: ===================== Ignore the BBPT trend line.")
respectvwap = input.bool (false, "VWAP", group=confirmation_group, inline='vwap')
respectbbosc = input.bool (false, "BB Oscillator", group=confirmation_group, inline='bbosc')
bbtype = input.string(title="", defval="Entering Lower/Upper Band", options= , group=confirmation_group, inline='bbosc')
respecttm = input.bool (false, "Trend Meter", group=confirmation_group, inline='tm')
tmtype = input.string(title="", defval="3 TM and 2 TB change to same color", options= , group=confirmation_group, inline='tm')
respectce = input.bool (false, "Chandelier Exit", group=confirmation_group, inline='ce')
respectcci = input.bool (false, "CCI", group=confirmation_group, inline='cci')
respectao = input.bool (false, "Awesome Oscillator", group=confirmation_group, inline='ao')
aotype = input.string(title="", defval="Zero Line Cross", options= , group=confirmation_group, inline='ao', tooltip = "Zero Line Cross: If AO value cross the zero line up, Buy signal will be generated, and if AO value cross down the zero line, sell signal will be generated.")
respectadx = input.bool (false, "DMI (ADx)", group=confirmation_group, inline='adx')
adxtype = input.string(title="", defval="Adx & +Di -Di", options= , group=confirmation_group, inline='adx', tooltip = "Adx Only: If Adx value is above the defined level. Adx & +Di -DI : When Adx value is above the defined level and croseeover between +di and -di. Di will determine the direction of the movement. Advance: ")
respectsar = input.bool (false, "Parabolic SAR (PSAR)", group=confirmation_group, inline='sar')
respectwae = input.bool (false, "Waddah Attar Explosion", group=confirmation_group, inline='wae')
vo_tooltip = "Volatility Oscillator: ======================= If the spike line is above the upper line, buy signal is generated (or validated). If the spike line is below the lower line, sell signal is generated (or validated)."
respectvo = input.bool (false, "Volatility Oscillator", group=confirmation_group, inline='vo', tooltip = vo_tooltip)
ci_tooltip = "Choppiness index: ======================= If the index is below the defined threshold (default 61.8) then asset is considered trending and signal will be validated, if index is above 61.8 then asset is considered having sideway movement."
respectci = input.bool (false, "Choppiness Index ", group=confirmation_group, inline='ci')
ci_limit = input.float(61.8,title=" ", inline='ci',group=confirmation_group, tooltip = ci_tooltip)
respectdv = input.bool (false, "Damiani Volatility (DV)", group=confirmation_group, inline='dv')
dvtype = input.string(title="", defval="Simple", options= , group=confirmation_group, inline='dv', tooltip = "Simple Volatility is green. Threshold Volatility green and >1.1")
stochtooltip="CrossOver: ------------------ CrossOver of K and D line at any level. CrossOver in OB & OS levels: Generate buy signal if crossover happens in oversold area and crossing up oversold level. Generate sell signal on crossover in overbought area and cross down upper level. ------------------ %K above/below %D ------------------ : Generate Buy signal or validate other signal if %K is above %D and opposite for Sell Signal."
respectstochastic = input.bool (false, "Stochastic", group=confirmation_group, inline='stoch')
stochtype = input.string(title="", defval="CrossOver", options= ,tooltip=stochtooltip, group=confirmation_group, inline='stoch')
rsi_tooltip = "RSI MA Cross: ============= Generate buy signal when RSI cross up RSI MA line and sell signal when RSI cross down RSI MA line. RSI Exits OB/OS zones: ================== Generate Buy signal when RSI crosses down the overbough zone and sell signal when RSI crosses up the oversold zone. RSI Level: ========== Generate buy signal if RSI cross above the specific level and sell signal when RSI crossdown the level. +++++ You can change the setting to define the OB/OS and MidLine Levels"
respectrsi = input.bool (false, "RSI", group=confirmation_group, inline='rsi')
rsitype = input.string(title="", defval="RSI MA Cross", options= , tooltip=rsi_tooltip, group=confirmation_group, inline='rsi')
rsima_tooltip = "RSI MA Direction: ============= The buy and sell signal will respect the RSI MA direction. For buy signal, the RSI MA should be increasing or same compared to previous RSI MA. for SHORT, the RSI MA should be same or decreasing compared to last RSI MA"
respectrsima = input.bool (false, "RSI MA Direction", group=confirmation_group, inline='rsi2',tooltip=rsima_tooltip)
rsilimit_tooltip = "RSI Limit: ============= This is to allow you to set limit for the RSI value for long and short. default value for long is 40, which means if the RSI is 40 or above, only then BUY signal will be validated. for short if RSI is 60 or less, only then sell signal willbe validated."
respectrsilimit = input.bool (false, "RSI Limit : ", group=confirmation_group, inline='rsi3',tooltip=rsilimit_tooltip)
rsilimitup = input.int(40, title="Long",inline='rsi3', group=confirmation_group)
rsilimitdown = input.int(60, title="short",inline='rsi3', group=confirmation_group)
rsimalimit_tooltip = "RSI MA Limit: ============= This is to allow you to set limit for the RSI MA value for long and short. default value for long is 40, which means if the RSI MA is 40 or above, only then BUY signal will be validated. for short if RSI MA is 60 or less, only then sell signal willbe validated."
respectrsimalimit = input.bool (false, "RSI MA Limit : ", group=confirmation_group, inline='rsi4',tooltip=rsimalimit_tooltip)
rsimalimitup = input.int(40, title="Long",inline='rsi4', group=confirmation_group)
rsimalimitdown = input.int(60, title="short",inline='rsi4', group=confirmation_group)
macdtooltip="MACD Crossover: ------------------ CrossOver of MACD and the Signal line. Generates Long signal when MACD cross up Signal line and Short signal when MACD cross down Signal Line. . Zero line crossover: ------------------ Generate buy signal when MACD cross up the zero line and Sell signal when MACD cross down the zero line."
respectmacd = input.bool (false, "MACD", group=confirmation_group, inline='macd')
macdtype = input.string(title="", defval="MACD Crossover", options= ,tooltip=macdtooltip, group=confirmation_group, inline='macd')
respectssl = input.bool (false, "SSL Channel", group=confirmation_group, inline='ssl')
respectstc = input.bool (false, "Schaff Trend Cycle (STC)", group=confirmation_group, inline='stc')
respectchaikin = input.bool (false, "Chaikin Money Flow", group=confirmation_group, inline='chaikin')
respectvol = input.bool (false, "Volume", group=confirmation_group, inline='volume')
volumetype = input.string(title="", defval="volume above MA", options= , group=confirmation_group, inline='volume', tooltip = "Simple volume is comparing the up/down volme with previous candle. Volume delta will compare the delta or difference between up and down volume with previous candle. Example: up volume = 100 Down volume=-1100 Delta = -1000 Satisfy the bear flag condition if previous -ve delta is lower")
respectwolf = input.bool (false, "Wolfpack Id", group=confirmation_group, inline='wolf')
respectqqe = input.bool (false, "QQE Mod", group=confirmation_group, inline='qqe')
qqetype = input.string(title="", defval="Line", options= , group=confirmation_group, inline='qqe', tooltip = "Line: signal generated when QQE line is above or below 0. Bar: when Blue bar is above 0 or Red bar below 0 Line & Bar: Both Bar and Line to be above(bullist) or below (beari
[blackcat] L3 Improved Dual Ehlers BPF for Volatility DetectionOVERVIEW
This script implements an advanced L3 Improved Dual Ehlers Bandpass Filter (BPF) for volatility detection, combining both L1 and L2 calculation methods to create a comprehensive trading signal. The script leverages John Ehlers' sophisticated digital signal processing techniques to identify market cycles and extract meaningful trading signals from price action. By combining multiple cycle detection methods and filtering approaches, it provides traders with a powerful tool for identifying trend changes, momentum shifts, and potential reversal points across various market conditions and timeframes. The L3 approach uniquely combines the outputs of both L1 (01 range) and L2 (-11 range) methods, creating a signal that ranges from -1~2 and provides enhanced sensitivity to market dynamics.
FEATURES
🔄 Dual Calculation Methods: Choose between L1 (01 range), L2 (-11 range), or combine both for L3 signal (-1~2 range) to match your trading style
📊 Multiple Cycle Detection: Seven different dominant cycle calculation methods including HoDyDC (Hilbert Transform Dominant Cycle), PhAcDC (Phase Accumulation Dominant Cycle), DuDiDC (Duane Dominant Cycle), CycPer (Cycle Period), BPZC (Bandpass Zero Crossing), AutoPer (Autocorrelation Period), and DFTDC (Discrete Fourier Transform Dominant Cycle)
🎛️ Flexible Mixing Options: Six sophisticated mixing methods including weighted averaging, simple sum, difference extraction, dominant-only, subdominant-only, and adaptive mixing that adjusts based on signal strength
🌊 Bandpass Filtering: Precise bandwidth control for both dominant and subdominant filters, allowing fine-tuning of frequency response characteristics
📈 Advanced Divergence Detection: Robust algorithm for identifying bullish and bearish divergences with customizable lookback periods and range constraints
🎨 Comprehensive Visualization: Extensive customization options for all signals, colors, plot styles, and display elements
🔔 Comprehensive Alert System: Built-in alerts for divergence signals, zero line crosses, and various market conditions
📊 Real-time Cycle Information: Optional display of dominant and subdominant cycle periods for educational purposes
🔄 Adaptive Signal Processing: Dynamic adjustment of parameters based on market conditions and volatility
🎯 Multiple Signal Outputs: Simultaneous generation of L1, L2, and L3 signals for different trading strategies
HOW TO USE
Select Calculation Method: Choose between "l1" (01 range), "l2" (-11 range), or "both" (L3, -1~2 range) in the Calculation Method settings based on your preferred signal characteristics
Configure Cycle Detection: Select your preferred Dominant Cycle Method from the seven available options and adjust the Cycle Part parameter (0.1-0.9) to fine-tune cycle sensitivity
Set Subdominant Parameters: Configure the subdominant cycle either as a ratio of the dominant cycle or as a fixed period, depending on your analysis approach
Adjust Filter Bandwidth: Fine-tune the bandwidth settings for both dominant and subdominant filters (0.1-1.0) to control the frequency response and signal smoothing
Choose Mixing Method: Select how to combine the filters - weighted averaging for balance, sum for maximum sensitivity, difference for trend isolation, or adaptive mixing for dynamic response
Configure Smoothing: Select from SMA, EMA, or HMA smoothing methods with adjustable length (1-20 bars) to reduce noise in the final signal
Customize Visualization: Enable/disable individual plots, divergence detection, zero line, fill areas, and customize all colors to match your chart preferences
Set Divergence Parameters: Configure lookback ranges (5-60 bars) for divergence detection to match your trading timeframe and style
Monitor Signals: Watch for crosses above/below zero line and divergence patterns, paying attention to signal strength and consistency
Set Up Alerts: Configure alerts for divergence signals, zero line crosses, and other market conditions to stay informed of trading opportunities
LIMITATIONS
The script requires the dc_ta library from blackcat1402 for several advanced cycle calculation methods (HoDyDC, PhAcDC, DuDiDC, CycPer, BPZC, AutoPer, DFTDC)
L1 method operates in 01 range while L2 method uses -11 range, requiring different interpretation approaches
Combined L3 signal ranges from -1~2 when both methods are selected, creating unique signal characteristics that traders must adapt to
Divergence detection accuracy depends on proper lookback period settings and market volatility conditions
Performance may be impacted with very long lookback ranges (>60 bars) or when multiple plots are simultaneously enabled
The script is designed for non-overlay use and may not display correctly on certain chart types or with conflicting indicators
Adaptive mixing method requires careful threshold tuning to avoid excessive signal fluctuation
Cycle detection algorithms may produce unreliable results during low volatility or highly choppy market conditions
The script assumes regular price data and may not perform optimally with irregular or gapped price sequences
NOTES
The script implements advanced mathematical calculations including bandpass filters, Hilbert transforms, and various cycle detection algorithms developed by John Ehlers
For optimal results, experiment with different cycle detection methods and bandwidth settings across various market conditions and timeframes
The adaptive mixing method automatically adjusts weights based on signal strength, providing dynamic response to changing market conditions
Divergence detection works best when the "Plot Divergence" option is enabled and when combined with other technical analysis tools
Zero line crosses can indicate potential trend changes or momentum shifts, especially when confirmed by volume or other indicators
The script includes commented code for cycle information display that can be enabled if you want to monitor cycle periods in real-time
Different calculation methods may perform better in different market environments - L1 tends to be smoother while L2 is more sensitive
The subdominant cycle helps filter out noise and provides additional confirmation for signals generated by the dominant cycle
Bandwidth settings control the filter's frequency response - lower values provide more smoothing while higher values increase sensitivity
Mixing methods offer different approaches to combining signals - weighted averaging is generally most reliable for most trading applications
THANKS
Special thanks to John Ehlers for his pioneering work in cycle analysis and digital signal processing for financial markets. This script implements and significantly improves upon his bandpass filter methodology, incorporating multiple advanced techniques from his extensive body of work. Also heartfelt thanks to blackcat1402 for the dc_ta library that provides essential cycle calculation methods and for maintaining such a valuable resource for the Pine Script community. Additional appreciation to the TradingView platform for providing the tools and environment that make sophisticated technical analysis accessible to traders worldwide. This script represents a collaborative effort in advancing the field of algorithmic trading and technical analysis.
SHHHHHHH“Round Numbers — 100/50/25”
lines… endless lines… they whisper in 25s, scream in 50s, collapse in 100s.
price dances on the grid, you don’t trade it, it trades you.
blue for the void. orange for the in-between. green for the fracture.
extend both. never stop. above and below. above and below.
do not ask why 25. do not ask why 50. the 100s already know.
quarter. half. whole. repeat until delirium.
add it to chart → stare too long → numbers start staring back.
Dove Capital Liquidity Expansion Map — Weekly 250‑pip Bands (v6)The Best Market Maker Liqudation zone Trap. Trade The highs and lows and make some money
Path of the Planets🪐 Path of the Planets
Path of the Planets is an open-source Pine Script™ v6 indicator. It is inspired by W.D. Gann’s Path of Planets chart, specifically the Chart 5-9 artistic replica by Patrick Mikula "shown below". The script visualizes planetary positions so you can explore possible correlations with price. It overlays geocentric and heliocentric longitudes and declinations using the AstroLib library and includes an optional positions table that shows, at a glance, each body’s geocentric longitude, heliocentric longitude, and declination. This is an educational tool only and not trading advice.
Key Features
Start point: Choose a date and time to begin plotting so studies can align with market events.
Adjustments: Mirror longitudes and shift by 360° multiples to re-frame cycles.
Planets: Toggle geocentric and heliocentric longitudes and declinations for Sun, Mercury, Venus, Earth, Mars, Jupiter, Saturn, Uranus, Neptune, and Pluto. Moon declination is available.
Positions table: Optional color-coded table (bottom-right) with three columns labeled Geo, Helio, and Dec. Values show degrees with the zodiac sign for the longitudes and degrees for declinations.
Visualization: Solid lines for geocentric longitudes, circles for heliocentric longitudes, and columns for declinations. Includes a zero-declination reference line.
How It Works
Converts bar timestamps to Julian days via AstroLib.
Fetches positions with AstroLib types: geocentric (0), heliocentric (1), and declination (3).
Normalizes longitudes to the −180° to +180° range, applies optional mirroring and 360° shifts, and converts longitudes to zodiac sign labels for the table.
Plots and the table update only on and after the selected start time.
Usage Tips
Apply on daily or higher timeframes when studying broader cycles. For degrees, use the left scale.
Limitations at the moment: default latitude, longitude, and timezone are set to 0; aspects and retrogrades are not included; the focus is on raw paths.
License and Credits
Dependency: @BarefootJoey Astrolib
Contributions and observations are welcome.
FVG Zones – shrink on fill (bull/bear)Detects classic 3-candle FVGs (ICT definition).
Draws zones as boxes that extend to the right.
On each bar close:
Checks overlap with the current candle.
Shrinks the zone when price wicks into it (bullish: top moves down; bearish: bottom moves up).
Deletes the zone once it’s completely filled/closed.
Inputs: bullish/bearish zone color, border color, and max number of visible FVGs.
Possible extensions:
Multi-timeframe FVGs (e.g. H1 FVGs shown on M5).
Separate limits for bullish and bearish zones.
Alerts for new FVG, partial fill, or closed FVG.
Option “Body only” (ignore wicks when detecting overlap).
Minimum FVG size filter (ticks/ATR).
Pr0fit Circle 0rbThis indicator automatically plots dynamic support and resistance zones on the chart using swing highs and swing lows. The levels are drawn as dotted lines that extend into the future, making it easy to identify key areas where price may react.
Ludvig Indicator PROThe Ludvig Indicator is designed to identify high-probability breakout setups by combining trend, volume, volatility, and relative strength filters. It helps you enter stocks (or ETFs/crypto) when institutional money is likely flowing in, while avoiding false breakouts and weak trends.
🔑 Core Features
Zero-Lag EMA (ZLEMA)
Faster, less lagging trend detection compared to traditional EMAs.
Used as the basis for dynamic ATR bands.
ATR Volatility Bands
Adaptive bands based on the Average True Range (ATR).
Define the zone where price must close outside to confirm trend strength.
Breakout Confirmation
Requires price to close above recent highs (lookback configurable).
Ensures signals are “true breakouts,” not just noise around moving averages.
Volume Filter (Relative Volume)
Validates breakouts with significantly higher volume than average.
Prevents low-liquidity signals from triggering.
Trend Strength (ADX)
Built-in ADX calculation ensures only strong, trending moves are considered.
Default filter: ADX ≥ 18 (configurable).
Relative Strength vs. Benchmark
Compares the asset’s momentum against a benchmark (default: SPY).
Only signals when the asset is outperforming the benchmark.
Useful for sector rotation and picking leaders instead of laggards.
Alerts & Signals
Breakout entries are marked with small green triangles.
Built-in alerts for automated notifications (TradingView alerts).
Institutional Candles (4H @ Monthly Extremes)Market Structure and institutional accounts for higher markers and has built a system that developed reversals
Liquidity-Weighted Business Cycle (Satoshi Global Base)🌍 BTC-Affinity Global Liquidity Business Cycle (MACD Model)
This indicator models Bitcoin’s macroeconomic business cycle using a BTC-weighted global liquidity index as its foundation. It adapts a MACD-based framework to visualize expansions and contractions in fiat liquidity across major economies with high Bitcoin affinity.
🔍 What It Does:
🧠 Constructs a Global M2 Liquidity Index from the top 10 most BTC-relevant fiat currencies
(USD, EUR, JPY, GBP, INR, CNY, KRW, BRL, CAD, AUD)
— each weighted by its Bitcoin adoption score and FX-converted into USD.
📊 Applies a MACD (Moving Average Convergence Divergence) signal to the index to detect macro liquidity trends.
🟢 Plots a histogram of business cycle momentum (red = expansion, green = contraction).
🔴 Marks potential cycle peaks, useful for macro trading alignment.
⚖️ BTC Affinity-Weighted Countries:
🇺🇸 United States
🇪🇺 Eurozone
🇯🇵 Japan
🇬🇧 United Kingdom
🇮🇳 India
🇨🇳 China
🇰🇷 South Korea
🇧🇷 Brazil
🇨🇦 Canada
🇦🇺 Australia
Weights are user-adjustable to reflect evolving capital controls, regulation, and real-world BTC adoption trends.
✅ Use Cases:
Confirm macro risk-on vs risk-off regimes for BTC and crypto.
Identify ideal entry and exit zones in macro pair trades (e.g., MSTR vs MSTY).
Monitor how global monetary expansion feeds into BTC valuations.
US Liquidity-Weighted Business Cycle📈 BTC Liquidity-Weighted Business Cycle
This indicator models the Bitcoin macro cycle by comparing its logarithmic price against a log-transformed liquidity proxy (e.g., US M2 Money Supply). It helps visualize cyclical tops and bottoms by measuring the relative expansion of Bitcoin price versus fiat liquidity.
🧠 How It Works:
Transforms both BTC and M2 using natural logarithms.
Computes a liquidity ratio: log(BTC) – log(M2) (i.e., log(BTC/M2)).
Runs MACD on this ratio to extract business cycle momentum.
Plots:
🔴 Histogram bars showing cyclical growth or contraction.
🟢 Top line to track the relative price-to-liquidity trend.
🔴 Cycle peak markers to flag historical market tops.
⚙️ Inputs:
Adjustable MACD lengths
Toggle for liquidity trend line overlay
🔍 Use Cases:
Identifying macro cycle tops and bottoms
Timing long-term Bitcoin accumulation or de-risking
Confirming global liquidity's influence on BTC price movement
Note: This version currently uses US M2 (FRED:M2SL) as the liquidity base. You can easily expand it with other global M2 sources or adjust the weights.
Institutional Candles at Weekly/Monthly ExtremesMarket Makers use institutional candles to reverse price and they profit on the short and the long. That being said its important to know they will always come back and reverse price to close out their losing positions.
Custom Support & Resistance Levels (Manual Input)This indicator lets you plot your own support levels (and can be extended for resistance) directly on the chart by entering them as comma-separated values.
📌 Supports manual input for multiple price levels.
📊 Lines are extended across the chart for clear visualization.
🎨 Dynamic coloring:
Green if the current price is above the level.
Red if the current price is below the level.
🧹 Old lines are automatically cleared to avoid clutter.
This tool is ideal if you:
Prefer to mark your own key zones instead of relying only on auto-detected levels.
Want clean and simple visualization of critical price areas.
👉 Coming soon: Resistance levels input (commented in the code, can be enabled).
Psych Zones – 000/250/500/750 (250-pip bands, 500 emphasis)Market makers Strategy that helps all traders make money overtime
Psych Zones – Single 750-pip Range (000 to 750)Market structure on each range of the market, use this if you are counter-trend trading or looking to exit out of a trade.
Psych Levels – 250 pip gridMarket Test: Each 250 Pip, Institutional market behavior works in market rotations
Same Day Past CandlesSame-Day Past Candles
This indicator is a tool that plots the shapes of the candles from the same date one and two years ago directly on the current chart. By visually comparing past price movements, it can help you analyze seasonality and cyclical patterns.
Key Features
Plots Past Candles: Displays candles from the same date one and two years ago on your current chart.
Toggle Visibility: You can individually turn the display of the "1 year ago candle" and "2 years ago candle" on or off in the indicator's settings.
Candle Shape: The open, high, low, and close prices of the past candles are plotted, scaled to the current price range.
How to Use
Add this indicator to a daily chart for best results. The plotted candles are slightly offset upwards so they don't overlap with the current price, making it easier to compare the shape of the past candles with the current chart movement.
Visually checking how specific past price changes are reflected on the same day this year can provide insights for your trading strategy.
I do not speak English at all. Please understand that if you send me a message, I may not be able to reply, or my reply may have a different meaning. Thank you for your understanding.
Institutional Candles (4H @ Monthly Extremes)Market Institutional Candle formation before reversal on the down or upside. Usually, the market will reverse after an institutional candle.