StockFetcher Forums · Filter Exchange · Pre Breakout<< >>Post Follow-up
DMOBRIEN
374 posts
msg #161891
Ignore DMOBRIEN
7/20/2025 9:07:21 AM

Made this yesterday. It's designed to catch pre breakout opportunities, has a redundancy or two, but looks really sharp in the results it produces. Trying to capture expansion from Accumulation/Distribution compression where the the close is very near the HOD.

/* A/D Line Tightening and Expansion Scanner for StockFetcher */
/* === Parameters === */
set{ma_length, 17}
set{bb_length, 20}
set{tightening_threshold, 0.85}
set{obv_min_delta, 0}
/* === Close Location Value (CLV) & Money Flow === */
set{high_low_diff, high - low}
set{close_low_diff, close - low}
set{high_close_diff, high - close}
set{clv_numerator, close_low_diff - high_close_diff}
set{clv, clv_numerator / high_low_diff}
set{money_flow, clv * volume}
/* === Accumulation/Distribution Line (100-day sum) === */
set{ad_line, sum(money_flow, 100)}
/* === A/D Line Early Tightening Detection === */
set{ad_stddev, standard deviation(ad_line, bb_length)}
set{ad_stddev_7, ad_stddev 7 days ago}
set{ad_stddev_avg, cma(ad_stddev, 14)}
/* Look for declining volatility trend (early tightening signal) */
set{volatility_declining, ad_stddev < ad_stddev_7}
set{below_avg_volatility, ad_stddev < ad_stddev_avg}
set{early_tightening, volatility_declining * below_avg_volatility}
/* Also look for A/D line showing accumulation pattern */
set{ad_line_5, ad_line 5 days ago}
set{ad_trending_up, ad_line > ad_line_5}
set{pre_breakout, early_tightening * ad_trending_up}
/* === Price Above Trend === */
set{ema34, ema(34)}
set{ma20, ma(20)}
set{above_ema34, close > ema34}
set{above_ma20, close > ma20}
set{price_strength, above_ema34 * above_ma20}
/* === Trend Strength (ADX approximation) === */
set{adx14, adx(14,14)}
set{trend_strength, adx14 > 20}
/* === OBV Delta === */
set{obv_today, obv}
set{obv_yesterday, obv 1 day ago}
set{obv_delta, obv_today - obv_yesterday}
set{obv_strong, obv_delta > obv_min_delta}
/* === Final Filter Condition === */
pre_breakout is above 0.5
and price_strength is above 0.5
and obv_strong is above 0.5
and set{close_to_high, close / high}
close_to_high > 0.85
ADX(14,14) > 20


/* Additional filters for practicality */
and average volume(30) is above 500000
and close is above 1
and close is below 7
and shares outstanding < 100
add column shares outstanding
and not etf
do not draw obv_strong
add column close_to_high
sort column 6 descending
do not draw OBV_Delta
draw ad_line

DMOBRIEN
374 posts
msg #161893
Ignore DMOBRIEN
7/20/2025 9:44:21 AM

I would add, in fact I just did .... Volume > 500000, then it sorts by close position relative to the days high.

snappyfrog
749 posts
msg #161900
Ignore snappyfrog
7/20/2025 10:59:43 AM

Making it clickable.

Fetcher[
/* A/D Line Tightening and Expansion Scanner for StockFetcher */
/* === Parameters === */
set{ma_length, 17}
set{bb_length, 20}
set{tightening_threshold, 0.85}
set{obv_min_delta, 0}
/* === Close Location Value (CLV) & Money Flow === */
set{high_low_diff, high - low}
set{close_low_diff, close - low}
set{high_close_diff, high - close}
set{clv_numerator, close_low_diff - high_close_diff}
set{clv, clv_numerator / high_low_diff}
set{money_flow, clv * volume}
/* === Accumulation/Distribution Line (100-day sum) === */
set{ad_line, sum(money_flow, 100)}
/* === A/D Line Early Tightening Detection === */
set{ad_stddev, standard deviation(ad_line, bb_length)}
set{ad_stddev_7, ad_stddev 7 days ago}
set{ad_stddev_avg, cma(ad_stddev, 14)}
/* Look for declining volatility trend (early tightening signal) */
set{volatility_declining, ad_stddev < ad_stddev_7}
set{below_avg_volatility, ad_stddev < ad_stddev_avg}
set{early_tightening, volatility_declining * below_avg_volatility}
/* Also look for A/D line showing accumulation pattern */
set{ad_line_5, ad_line 5 days ago}
set{ad_trending_up, ad_line > ad_line_5}
set{pre_breakout, early_tightening * ad_trending_up}
/* === Price Above Trend === */
set{ema34, ema(34)}
set{ma20, ma(20)}
set{above_ema34, close > ema34}
set{above_ma20, close > ma20}
set{price_strength, above_ema34 * above_ma20}
/* === Trend Strength (ADX approximation) === */
set{adx14, adx(14,14)}
set{trend_strength, adx14 > 20}
/* === OBV Delta === */
set{obv_today, obv}
set{obv_yesterday, obv 1 day ago}
set{obv_delta, obv_today - obv_yesterday}
set{obv_strong, obv_delta > obv_min_delta}
/* === Final Filter Condition === */
pre_breakout is above 0.5
and price_strength is above 0.5
and obv_strong is above 0.5
and set{close_to_high, close / high}
close_to_high > 0.85
ADX(14,14) > 20


/* Additional filters for practicality */
and average volume(30) is above 500000
and close is above 1
and close is below 7
and shares outstanding < 100
add column shares outstanding
and not etf
do not draw obv_strong
add column close_to_high
sort column 6 descending
do not draw OBV_Delta
draw ad_line
]



StockFetcher Forums · Filter Exchange · Pre Breakout<< >>Post Follow-up

*** Disclaimer *** StockFetcher.com does not endorse or suggest any of the securities which are returned in any of the searches or filters. They are provided purely for informational and research purposes. StockFetcher.com does not recommend particular securities. StockFetcher.com, Vestyl Software, L.L.C. and involved content providers shall not be liable for any errors or delays in the content, or for any actions taken based on the content.


Copyright 2022 - Vestyl Software L.L.C.Terms of Service | License | Questions or comments? Contact Us
EOD Data sources: DDFPlus & CSI Data Quotes delayed during active market hours. Delay times are at least 15 mins for NASDAQ, 20 mins for NYSE and Amex. Delayed intraday data provided by DDFPlus


This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.