Knowledge Base

Every metric and signal the screener computes, what it measures, and how to read its value. Fundamentals describe the business; technical signals describe the price.

Fundamentals

Computed once per ticker per run from EDGAR + yfinance fundamentals. Each metric is winsorized at the 5th/95th percentile of the universe and converted to a 0–100 score by direction-aware percentile rank, then weight-combined into the fundamentals subscore.

Valuation

P/E Ratio ↓ lower is better x

#pe_ratio

Price you pay per dollar of trailing earnings.

Multiple of trailing-twelve-month earnings the market has assigned to the company. Lower means cheaper relative to current earnings power, but a single low P/E can also mean the market expects earnings to fall.

Formula
P/E = market_cap / net_income_ttm
Typical range
5x to 40x
When the value is high
Investors are paying a premium relative to current earnings, betting on growth, margin expansion, or perceived quality.
When the value is low
Cheap on current earnings - either an opportunity or a value trap if earnings are about to deteriorate.
References

P/B Ratio ↓ lower is better x

#pb_ratio

Price relative to book value of common equity.

How many dollars of book equity each share represents. Useful for asset-heavy businesses (banks, industrials) where book value approximates liquidation floor; less informative for asset-light franchises whose value is in intangibles.

Formula
P/B = market_cap / common_equity
Typical range
1x to 15x
When the value is high
Market values the franchise far above its book equity - common for branded consumer or software businesses.
When the value is low
Trading near or below book - sometimes a margin of safety, sometimes a sign book value will be impaired.
References

PEG Ratio ↓ lower is better x

#peg_ratio

P/E adjusted for earnings growth - cheap relative to growth when below 1.

Divides P/E by the annualized EPS growth rate (in percent points). Below 1.0 is conventionally read as 'cheap relative to growth.' Sensitive to which growth window you use; can flip sign if earnings are negative.

Formula
PEG = (P/E) / eps_growth_3y_pct
Typical range
0.5x to 3.0x
When the value is high
Multiple is rich relative to growth - either growth disappoints or the multiple needs to compress.
When the value is low
Multiple looks cheap relative to growth - watch for one-time growth that won't repeat.
References

EV/EBITDA ↓ lower is better x

#ev_ebitda

Enterprise value relative to operating cash earnings before D&A.

Capital-structure-agnostic valuation multiple. Useful for comparing levered companies because it adds debt and removes cash from the numerator and uses pre-interest, pre-tax, pre-depreciation earnings in the denominator.

Formula
EV = market_cap + total_debt + preferred_equity + minority_interest - cash; EV/EBITDA = EV / ebitda_ttm
Typical range
6x to 25x
When the value is high
Operating profile commands a premium - usually associated with high-margin, high-growth, or scarce assets.
When the value is low
Cheap on cash earnings - check whether D&A is masking real reinvestment needs that EBITDA doesn't capture.
References

P/S Ratio ↓ lower is better x

#ps_ratio

Price per dollar of trailing revenue.

Useful when earnings are negative or noisy (early-stage companies, restructurings). Works best within an industry because gross margin profiles vary wildly.

Formula
P/S = market_cap / revenue_ttm
Typical range
0.5x to 15x
When the value is high
Market is paying up for revenue - implicitly betting on margin expansion or revenue growth.
When the value is low
Cheap on revenue - investigate whether margins are structurally low or revenue quality is poor.
References

EV/Sales ↓ lower is better x

#ev_sales

EV-based revenue multiple - capital-structure-neutral version of P/S.

Adjusts the numerator for debt and cash so heavily-levered or cash-rich companies are comparable. Particularly useful for cross-industry valuation work.

Formula
EV/Sales = (market_cap + total_debt - cash) / revenue_ttm
Typical range
0.5x to 15x
When the value is high
Premium revenue multiple even after netting cash - usually high gross-margin businesses.
When the value is low
Cheap on revenue when you account for the balance sheet.
References

EV/FCF ↓ lower is better x

#ev_fcf

Enterprise value relative to free cash flow generation.

Valuation expressed against the cash actually available to all capital providers. Often more honest than EV/EBITDA when capex is meaningful relative to D&A.

Formula
EV/FCF = (market_cap + total_debt - cash) / free_cash_flow_ttm
Typical range
10x to 40x
When the value is high
Expensive on cash generation - growth or quality must justify the premium.
When the value is low
Cheap on free cash flow - confirm FCF is sustainable and not propped up by working capital release.
References

Income

Earnings Yield ↑ higher is better %

#earnings_yield

Inverse of P/E - earnings as a percentage of market cap.

Lets you compare equity earning power directly to bond yields. A 6% earnings yield is the equity-side analog to a 6% coupon, with the difference being earnings can grow (or contract).

Formula
Earnings Yield = (net_income_ttm / market_cap) * 100
Typical range
2% to 15%
When the value is high
Earnings stream is large relative to price - attractive when treasury yields are low.
When the value is low
You're earning a small income yield on the cap - the rest of the return has to come from growth.
References

Free Cash Flow Yield ↑ higher is better %

#fcf_yield

Free cash flow as a percentage of market cap - the cash version of earnings yield.

FCF the business throws off relative to what you pay for the equity. Treats the equity as a perpetual claim on cash. Cyclicals can swing below zero in a downturn.

Formula
FCF Yield = (free_cash_flow_ttm / market_cap) * 100
Typical range
1% to 8%
When the value is high
Strong cash income relative to price - attractive when growth doesn't have to do all the work.
When the value is low
Most of the expected return has to come from growth or multiple expansion, not current cash.
References

Dividend Yield ↑ higher is better %

#dividend_yield

Annualized dividend per share, as a percentage of the share price.

Direct income from holding the share. Stable dividend yield often signals capital discipline; abnormally high yield can be a warning that the dividend isn't covered by FCF and may be cut.

Formula
Dividend Yield = (dividends_per_share_ttm / price) * 100
Typical range
0% to 8%
When the value is high
Real income today - sustainability depends on payout ratio and free cash flow coverage.
When the value is low
Most of the return must come from price appreciation rather than income.
References

Profitability

Return on Equity ↑ higher is better %

#roe

Net income earned per dollar of common equity.

Headline profitability metric. High ROE compounds book value if the business can reinvest at the same return. Beware of buybacks artificially inflating ROE by shrinking the denominator.

Formula
ROE = (net_income_ttm / average_common_equity) * 100
Typical range
10% to 40%
When the value is high
Capital is being put to work effectively - sustainable when supported by real economic moats.
When the value is low
Equity earning power is weak - sometimes due to over-capitalization, sometimes due to genuine underperformance.
References

ROIC (Greenblatt ROC) ↑ higher is better %

#roic

After-tax operating return on the capital invested in the business.

Measures how productive the actual operating capital base is, independent of capital structure. The benchmark is the company's cost of capital - sustained ROIC above WACC creates value, below WACC destroys it.

Formula
NOPAT = operating_income_ttm * (1 - effective_tax_rate); ROIC = (NOPAT / average_invested_capital) * 100
Typical range
8% to 30%
When the value is high
Strong economic engine - business earns well above its cost of capital.
When the value is low
Operating capital is being deployed unproductively - watch for businesses earning less than they pay for capital.
References

Return on Assets ↑ higher is better %

#roa

Net income per dollar of total assets.

Capital-efficiency measure that ignores how the assets are financed. Useful for comparing within a sector but biased low for asset-heavy businesses (banks, utilities) and high for asset-light ones.

Formula
ROA = (net_income_ttm / average_total_assets) * 100
Typical range
2% to 20%
When the value is high
Assets are working hard - typical of asset-light, high-margin businesses.
When the value is low
Heavy asset base is needed to generate each dollar of profit - common in capital-intensive industries.
References

Operating Margin ↑ higher is better %

#operating_margin

Operating profit per dollar of revenue, before interest and tax.

Captures the leverage between revenue and operating profit. Core test of whether a business converts sales into income at the operating level.

Formula
Operating Margin = (operating_income_ttm / revenue_ttm) * 100
Typical range
5% to 35%
When the value is high
Pricing power and operating leverage - software and platform models commonly run above 30%.
When the value is low
Thin profit per dollar of revenue - exposed to input cost or wage shocks.
References

Net Margin ↑ higher is better %

#net_margin

Bottom-line earnings per dollar of revenue.

Operating margin minus interest, tax, and below-the-line items. Useful but noisy because tax rate and debt service distort year-to-year comparability.

Formula
Net Margin = (net_income_ttm / revenue_ttm) * 100
Typical range
3% to 30%
When the value is high
Strong all-in profitability after every expense category.
When the value is low
Either operating margins are thin or below-the-line items are eating earnings.
References

Gross Margin ↑ higher is better %

#gross_margin

Revenue minus COGS, as a percentage of revenue.

First-line profitability measure - how much revenue is left after the direct cost of producing it. Stable gross margin suggests pricing power and low input-cost exposure.

Formula
Gross Margin = ((revenue_ttm - cogs_ttm) / revenue_ttm) * 100
Typical range
20% to 80%
When the value is high
Strong unit economics - software, branded consumer, and IP-heavy businesses cluster here.
When the value is low
Heavy COGS load - typical of commodity producers, contract manufacturers, retail.
References

Asset Turnover ↑ higher is better x

#asset_turnover

Revenue generated per dollar of assets.

Productivity of the asset base. Combined with net margin, this is the DuPont decomposition of ROA: ROA = net_margin * asset_turnover.

Formula
Asset Turnover = revenue_ttm / average_total_assets
Typical range
0.3x to 2.5x
When the value is high
Revenue compounds quickly off the asset base - retail and asset-light services run high here.
When the value is low
Heavy assets needed per dollar of revenue - utilities, telecoms, capital goods.
References

FCF Margin ↑ higher is better %

#fcf_margin

Free cash flow per dollar of revenue.

End-to-end conversion ratio: of every dollar of revenue, how much falls through to genuine free cash flow available to capital providers? More honest than net margin because it accounts for capex needed to maintain the business.

Formula
FCF Margin = (free_cash_flow_ttm / revenue_ttm) * 100
Typical range
5% to 30%
When the value is high
Cash flowing through to owners - the hallmark of high-quality compounders.
When the value is low
Revenue isn't translating into cash - either capex is heavy or working capital is consuming it.
References

Cash Conversion ↑ higher is better x

#cash_conversion

How much of accounting net income converts to free cash flow.

Sanity-check on earnings quality. Persistently below 1 means working capital or capex is consuming earnings; persistently above 1 is unusual and may flag accounting conservatism or non-cash drags.

Formula
Cash Conversion = free_cash_flow_ttm / net_income_ttm
Typical range
0.6x to 1.4x
When the value is high
Earnings quality is good - real cash arriving in step with reported income.
When the value is low
Earnings exceed cash - common late-cycle warning when receivables and inventories are building.
References

OCF to Net Income ↑ higher is better x

#ocf_to_net_income

Operating cash flow vs. net income - earnings-quality cross-check.

Pre-capex version of cash conversion. Numbers persistently below 1 suggest accruals are doing the work; numbers persistently above 1 are a (mild) positive sign.

Formula
OCF/NI = operating_cash_flow_ttm / net_income_ttm
Typical range
0.8x to 1.6x
When the value is high
Operating cash flow validates net income.
When the value is low
Net income running ahead of operating cash - check accruals (receivables, deferred revenue, inventories).
References

Balance Sheet Health

Debt-to-Equity ↓ lower is better x

#debt_to_equity

Capital-structure leverage - debt relative to equity book value.

How much the company funds itself with debt vs. equity. Higher leverage amplifies both returns and risks; the appropriate level varies wildly by industry.

Formula
Debt-to-Equity = total_debt / common_equity
Typical range
0.0x to 2.0x
When the value is high
Capital structure is debt-heavy - amplifies equity returns but also stress in downturns.
When the value is low
Conservative balance sheet - lower bankruptcy risk, but may be under-levered for shareholder returns.
References

LT Debt-to-Equity ↓ lower is better x

#lt_debt_to_equity

Long-term debt portion of leverage - structural balance-sheet risk.

Strips out short-term operating debt and revolver use to focus on permanent capital structure. Useful when comparing companies that fund working capital differently.

Formula
LT D/E = long_term_debt / common_equity
Typical range
0.0x to 1.5x
When the value is high
Permanent leverage is high - watch coverage ratios and refinancing windows.
When the value is low
Permanent debt is low - balance sheet flexibility for opportunistic deals.
References

Current Ratio ↑ higher is better x

#current_ratio

Short-term liquidity - current assets relative to current liabilities.

Whether the company can cover near-term obligations from near-term assets. Below 1.0 doesn't mean insolvent (cash flow can cover the gap) but is worth a closer look.

Formula
Current Ratio = current_assets / current_liabilities
Typical range
1.0x to 3.0x
When the value is high
Comfortable liquidity buffer - large working-capital cushion.
When the value is low
Short-term obligations exceed short-term assets - watch cash flow timing.
References

Cash Ratio ↑ higher is better x

#cash_ratio

Pure-cash coverage of current liabilities - the strictest liquidity test.

Strips out receivables and inventory, leaving only cash and equivalents over current liabilities. Stress-tests whether the business can meet obligations even if collections seize up.

Formula
Cash Ratio = cash_and_equivalents / current_liabilities
Typical range
0.1x to 1.5x
When the value is high
Heavy cash backstop - common with profitable cash-rich franchises.
When the value is low
Liquidity depends on receivables and inventory turning - vulnerable to working-capital shocks.
References

Altman Z-Score ↑ higher is better score

#altman_z

Composite bankruptcy-risk score - higher is safer.

Five-factor distress signal originally calibrated for US public manufacturers. Above 3.0 is the conventional 'safe' zone, 1.8-3.0 is the grey zone, below 1.8 historically associates with elevated bankruptcy risk.

Formula
Z = 1.2X1 + 1.4X2 + 3.3X3 + 0.6X4 + 1.0X5; X1=working_capital/total_assets, X2=retained_earnings/total_assets, X3=ebit/total_assets, X4=market_cap/total_liabilities, X5=revenue/total_assets
Typical range
1.0 to 10.0+
When the value is high
Far from distress on Altman's classic formulation.
When the value is low
Distress zone - tight balance sheet, weak earnings power, or both.
References

Composite

Piotroski F-Score ↑ higher is better points

#piotroski

Nine-question fundamentals checklist - 8 or 9 is strong, 0-2 is weak.

Joseph Piotroski's score for distinguishing winners from losers among low-P/B stocks. Each of 9 questions answers 0 or 1; the more 'yes' answers, the higher quality the recent year-over-year improvements.

Formula
Sum of 9 binary indicators across profitability (ROA>0, CFO>0, ROA improving, CFO>NI), leverage (LT debt/assets falling, current ratio rising, no share issuance), and operating efficiency (gross margin rising, asset turnover rising)
Typical range
0 to 9
When the value is high
Clean fundamentals scorecard - profitability, leverage, and efficiency all moving the right way.
When the value is low
Fundamentals deteriorating across the board - turnaround story or value trap.
References

Sloan Ratio ↓ lower is better ratio

#sloan_ratio

Accruals as a fraction of assets - high-magnitude values are a yellow flag.

Richard Sloan's accruals-quality measure. Persistent positive accruals (NI exceeds OCF) tend to mean-revert, often via earnings disappointments. Magnitude over ~10% in either direction warrants closer accounting review.

Formula
Sloan = (net_income_ttm - operating_cash_flow_ttm) / average_total_assets
Typical range
-0.10 to +0.10
When the value is high
Net income outpacing cash by an unusual amount - earnings quality may be deteriorating.
When the value is low
Cash outpacing net income - usually fine, sometimes a sign of conservatism or a one-time working-capital release.
References

Technical Signals

Computed from ~2 years of OHLCV history per ticker. Each signal returns a series of triggers; the runner records the most recent trigger, its value, how many bars ago it fired, and the trigger count over the last 60 bars. The technicals subscore = 50 + 50 × sign(value) × exp(−bars_since/20), weight-averaged across signals.

Momentum

RSI Divergence

#rsi_divergence

Detects bullish/bearish divergence between price pivots and RSI.

When price prints a lower low while RSI prints a higher low at those same bars, momentum is improving even though price is still falling - a classic bullish divergence. The bearish mirror fires when price makes a higher high but RSI prints a lower high.

Trigger rule
+1 at the right-hand pivot of a (lower-low price, higher-low RSI) pair; -1 at the right-hand pivot of a (higher-high price, lower-high RSI) pair; 0 otherwise.
Value meaning
+1 = bullish divergence, -1 = bearish divergence, 0 = no divergence at this bar.
When bullish
Momentum strengthening even as price prints lower lows — a reversal-up tell.
When bearish
Momentum weakening even as price prints higher highs — a reversal-down tell.
When idle
RSI and price are aligned; no divergence in the recent window.
Default parameters
period=14, pivot_window=5, lookback=60
References

MACD Divergence

#macd_divergence

Same divergence rule as RSI, applied to the MACD histogram.

Compares price pivots against the MACD histogram (MACD line minus signal line) at those same bars. Bullish divergence: price lower-low, histogram higher-low. Bearish divergence: price higher-high, histogram lower-high.

Trigger rule
+1 at right-hand pivot of bullish divergence; -1 at right-hand pivot of bearish divergence; 0 otherwise.
Value meaning
+1 = bullish divergence, -1 = bearish divergence.
When bullish
MACD histogram printing higher lows beneath lower lows in price — reversal-up tell.
When bearish
MACD histogram printing lower highs beneath higher highs in price — reversal-down tell.
When idle
MACD and price agreeing; no divergence to act on.
Default parameters
fast=12, slow=26, signal=9, pivot_window=5
References

Connors RSI(2)

#rsi2_signal

Larry Connors' short-term mean-reversion signal using a 2-period RSI.

Buys oversold pullbacks within an established uptrend (price above the 200-day SMA). Holds while RSI(2) is below an exit threshold; exits when RSI(2) crosses above 60.

Trigger rule
+1 when price is above regime_ma and RSI(2) drops below oversold; held while inside the trade; back to 0 when RSI(2) crosses above exit.
Value meaning
+1 = pullback-buy state active, 0 = flat. Bear-side variant uses the symmetric short rule.
When bullish
Active pullback-buy in an established uptrend — price bouncing off a 2-period oversold reading.
When bearish
Active pullback-short in an established downtrend — short-term pop into resistance fading.
When idle
No active 2-period RSI setup; trade only when one fires.
Default parameters
period=2, oversold=10, exit=60, regime_ma=200
References

Stochastic Cross

#stochastic_signal

Slow-stochastic %K/%D crossovers in oversold or overbought territory.

Bullish when %K crosses above %D while both lines are below the oversold threshold; bearish when %K crosses below %D while both are above overbought.

Trigger rule
+1 on bullish cross in oversold; -1 on bearish cross in overbought; 0 otherwise.
Value meaning
+1 = oversold bullish cross, -1 = overbought bearish cross.
When bullish
%K crossed up through %D from oversold — short-term buy trigger.
When bearish
%K crossed down through %D from overbought — short-term sell trigger.
When idle
No fresh oversold/overbought stochastic cross; wait for one to set up.
Default parameters
k=14, d=3, smooth=3, ob=80, os=20
References

Volume

Volume Climax

#volume_climax

Wide-range bar on a volume spike with a small candle body - capitulation/exhaustion read.

Identifies bars whose volume is well above their recent average AND whose body is small relative to the bar's true range - the classic 'climax' shape that often marks short-term turning points.

Trigger rule
+1 (long-side capitulation) when the climax bar prints near its low; -1 (distribution) when it prints near its high.
Value meaning
+1 = capitulation/buying climax (potential reversal lower-to-higher), -1 = distribution/selling climax (potential reversal higher-to-lower).
When bullish
Capitulation bar with heavy volume and small body near the low — sellers may be exhausted.
When bearish
Distribution bar with heavy volume and small body near the high — buyers may be exhausted.
When idle
No climax bar in the recent window; volume profile is unremarkable.
Default parameters
vol_ma=20, spike_mult=2.5, body_range_max=0.4
References

Declining Volume

#declining_volume

Falling volume during a price trend - confirmation weakness.

Trends backed by declining volume tend to lose conviction. The signal compares the slope of price against the slope of volume over a rolling window.

Trigger rule
+1 when price is rising but volume slope is negative (weak rally); -1 when price is falling but volume slope is negative (weak decline / potential reversal).
Value meaning
+1 = weak uptrend (sell into strength), -1 = weak downtrend (cover or buy into weakness).
When bullish
Decline running on falling volume — sellers losing conviction, reversal candidate.
When bearish
Rally running on falling volume — buyers losing conviction, sell into strength.
When idle
Volume tracking with the trend; no conviction divergence yet.
Default parameters
trend_window=20
References

OBV Divergence

#obv_divergence

Price/On-Balance-Volume divergence at swing pivots.

OBV cumulates signed volume - rising OBV reflects accumulation, falling OBV distribution. Same pivot-pair rule as RSI/MACD divergence: when price makes a new low but OBV doesn't, big-money has stopped selling.

Trigger rule
+1 at right-hand pivot of (price lower-low, OBV higher-low); -1 at right-hand pivot of (price higher-high, OBV lower-high).
Value meaning
+1 = bullish OBV divergence, -1 = bearish OBV divergence.
When bullish
Accumulation strengthening even as price breaks lower — smart money may be early to a turn.
When bearish
Distribution beginning even as price breaks higher — smart money may be quietly exiting.
When idle
OBV and price moving together; accumulation/distribution is in line with the tape.
Default parameters
pivot_window=5, lookback=60
References

Price Action

Multi Top/Bottom

#multi_top_bottom

Double/triple top or bottom pattern detection.

Finds two or more pivot highs (tops) or lows (bottoms) within a price tolerance and minimum bar separation. Confirmed multi-bottom is bullish; multi-top is bearish.

Trigger rule
+1 at confirmation of a multi-bottom (price retests prior low and holds); -1 at confirmation of a multi-top.
Value meaning
+1 = multi-bottom (support pattern), -1 = multi-top (resistance pattern).
When bullish
Price retested a prior low and held — multi-bottom support confirmed.
When bearish
Price retested a prior high and rolled — multi-top resistance confirmed.
When idle
No clean multi-touch top or bottom recently; structure is not yet defined.
Default parameters
peak_count=2, tolerance=0.02, min_sep=10
References

Pin Bar

#pin_bar

Reversal candle: small body, long wick rejecting the prior swing.

A pin bar has a small real body (under ~30% of the bar's range) and a long wick (over ~60%) on one side, sticking out beyond the prior trend. Bullish pin: long lower wick after a downtrend. Bearish pin: long upper wick after an uptrend.

Trigger rule
+1 for bullish pin (long lower wick, body near top, after downtrend); -1 for bearish pin.
Value meaning
+1 = bullish reversal candle, -1 = bearish reversal candle.
When bullish
Long lower wick rejected the prior downswing — buyers stepped in at the low.
When bearish
Long upper wick rejected the prior upswing — sellers stepped in at the high.
When idle
No pin-bar rejection in the recent window.
Default parameters
body_max=0.3, wick_min=0.6, prior_trend=5
References

Sushi Roll

#sushi_roll

Mark Fisher's reversal pattern - second window's range engulfs the first.

Two consecutive non-overlapping windows where the second window's high is above the first's high AND the second's low is below the first's low (an outside range). Reads as a reversal signal off the prior trend.

Trigger rule
+1 if prior trend was down and current outside-range closes higher than it opens; -1 in the symmetric down-reversal case.
Value meaning
+1 = bullish outside reversal, -1 = bearish outside reversal.
When bullish
Outside-range bar after a downtrend closed up — reversal-up reversal pattern.
When bearish
Outside-range bar after an uptrend closed down — reversal-down reversal pattern.
When idle
No outside-range reversal recently.
Default parameters
window=10
References

MA Rejection

#ma_rejection

Price tags a moving average and rejects - classic trend-pullback entry.

When price comes within a small band of a key moving average (typically 50- or 200-period) and reverses without closing through it, the MA is acting as support (uptrend) or resistance (downtrend).

Trigger rule
+1 when price prints a low near the MA in an uptrend and closes back above; -1 when price prints a high near the MA in a downtrend and closes back below.
Value meaning
+1 = bullish MA rejection (support held), -1 = bearish MA rejection (resistance held).
When bullish
Price tagged a key MA and bounced — moving average held as support.
When bearish
Price tagged a key MA and rolled — moving average held as resistance.
When idle
No clean MA rejection in the recent window.
Default parameters
ma_periods=[50,200], proximity=0.01
References

Double 7s

#double_seven

Larry Connors mean-reversion: buy 7-day low in uptrend, sell on 7-day high.

While price is above its 200-day MA (uptrend regime), buy when today's close is the lowest in 7 sessions; exit when today's close is the highest in 7 sessions.

Trigger rule
+1 on entry day (new 7-day low above regime); held until exit on new 7-day high; back to 0 on exit.
Value meaning
+1 = pullback-buy state active, 0 = flat.
When bullish
Active Connors Double-7 pullback in an uptrend — buy the 7-day low, sell the 7-day high.
When bearish
Active short setup on the bearish mirror — fade the 7-day high in a downtrend.
When idle
No active Double-7 trade; wait for the setup to print.
Default parameters
lookback=7, regime_ma=200
References

Head and Shoulders

#head_and_shoulders

Three-peak reversal pattern - center peak (head) above the two shoulders.

Bearish head-and-shoulders: left shoulder, higher head, right shoulder of comparable height to left, broken by a close below the neckline. Inverse pattern (three troughs) is bullish.

Trigger rule
+1 at neckline break of inverse-H&S; -1 at neckline break of standard H&S.
Value meaning
+1 = bullish inverse H&S confirmed, -1 = bearish H&S confirmed.
When bullish
Inverse H&S confirmed — three-trough bottoming pattern that broke its neckline up.
When bearish
Standard H&S confirmed — three-peak topping pattern that broke its neckline down.
When idle
No completed H&S pattern in the recent window.
Default parameters
shoulder_tol=0.03, head_prom=0.02
References

Wedge

#wedge_pattern

Converging trendlines - rising wedge bearish, falling wedge bullish.

A wedge is a price compression where two trendlines converge. Rising wedge (both lines sloping up but upper less steep) typically resolves down; falling wedge resolves up.

Trigger rule
+1 on confirmed break above falling wedge; -1 on confirmed break below rising wedge.
Value meaning
+1 = bullish wedge resolution, -1 = bearish wedge resolution.
When bullish
Falling wedge resolved up — compression broke in favor of buyers.
When bearish
Rising wedge resolved down — compression broke in favor of sellers.
When idle
No completed wedge resolution recently; price compression hasn't broken.
Default parameters
lookback=40, min_touches=2
References

Trendline Break

#trendline_break

Decisive close through a fitted trendline - regime change candidate.

Fits a trendline through pivot points and flags decisive closes through the line. Distinguishes a clean break from a wick-test by requiring the close to violate the line.

Trigger rule
+1 on close above a downward trendline; -1 on close below an upward trendline.
Value meaning
+1 = bullish breakout above resistance line, -1 = bearish breakdown below support line.
When bullish
Decisive close above a downward trendline — resistance line gave way.
When bearish
Decisive close below an upward trendline — support line gave way.
When idle
No clean trendline break recently; the prevailing line is still respected.
Default parameters
lookback=60, min_touches=2
References

Doji

#doji_pattern

Indecision candle - tiny body, balanced wicks.

Open and close are nearly equal (tiny body, under ~5% of range) with comparable upper and lower wicks. Marks indecision; meaningful when it appears at trend extremes or after extended runs.

Trigger rule
+1 on doji (the bar marks the indecision candle regardless of direction).
Value meaning
+1 = doji formed; direction depends on context (use with prior trend).
When bullish
Indecision candle after a downtrend — buyers and sellers in balance, watch for follow-through.
When bearish
Indecision candle after an uptrend — buyers and sellers in balance, watch for follow-through.
When idle
No notable doji in the recent window.
Default parameters
body_max=0.05, wick_balance=0.3
References

Engulfing

#engulfing_pattern

Two-candle reversal: current body fully engulfs the prior body.

Bullish engulfing: down candle followed by an up candle whose body fully covers the prior body. Bearish engulfing: up candle followed by a larger down candle covering the prior body. Strongest after a trend.

Trigger rule
+1 on bullish engulfing after a downtrend; -1 on bearish engulfing after an uptrend.
Value meaning
+1 = bullish engulfing reversal, -1 = bearish engulfing reversal.
When bullish
Up candle fully engulfed the prior down body after a downtrend — reversal-up tell.
When bearish
Down candle fully engulfed the prior up body after an uptrend — reversal-down tell.
When idle
No engulfing reversal in the recent window.
Default parameters
prior_trend_window=5
References

Star

#star_pattern

Three-candle reversal with a small-body middle candle (the 'star').

Morning star (bullish): big down candle, small-body middle, big up candle that closes well into the first body. Evening star is the bearish mirror at a top.

Trigger rule
+1 on confirmed morning star; -1 on confirmed evening star.
Value meaning
+1 = morning star (bullish reversal), -1 = evening star (bearish reversal).
When bullish
Morning star printed at a low — small-body middle bar bridged a down day and a strong up day.
When bearish
Evening star printed at a high — small-body middle bar bridged an up day and a strong down day.
When idle
No completed star pattern recently.
Default parameters
middle_body_max=0.3, penetration=0.5
References

Fibonacci Retracement

#fibonacci_retracement

Distance from price to the nearest Fibonacci retracement level of the recent swing.

Identifies the most recent significant swing high and low, projects standard Fibonacci levels (23.6%, 38.2%, 50%, 61.8%, 78.6%), and tags bars where price interacts with one of those levels.

Trigger rule
Reports the level price is closest to, in price units, when price is within the proximity band.
Value meaning
Magnitude is the level (e.g. 281.13 = the price level itself), not -1/+1. Sign carries direction-of-move when present.
When bullish
Price interacted with a key Fibonacci level on its way up — likely springboard or resistance to clear.
When bearish
Price interacted with a key Fibonacci level on its way down — likely backstop or support to defend.
When idle
Price is not actively engaging a Fibonacci level.
Default parameters
swing_lookback=60, levels=[0.236,0.382,0.5,0.618,0.786]
References

Trend

Donchian Breakout

#donchian_breakout

Close above N-day high (long) or below N-day low (short) - classic breakout state.

Turtle-style breakout signal: enters long on a close above the highest high of the lookback window, short on a close below the lowest low. Holds the position for a fixed number of bars.

Trigger rule
+1 on long entry, held for hold_bars; -1 on short entry, held for hold_bars.
Value meaning
+1 = long breakout state, -1 = short breakout state.
When bullish
Active long breakout state — close above the N-day highest high.
When bearish
Active short breakout state — close below the N-day lowest low.
When idle
Price is mid-range; no Donchian breakout active.
Default parameters
period=20, hold_bars=20
References

MA Crossover

#ma_crossover

Fast MA crossing slow MA - directional bias state.

Holds +1 while the fast moving average is above the slow one (bullish bias), -1 when below (bearish bias). Whipsaws in chop; works best when combined with a regime filter.

Trigger rule
+1 while fast > slow, -1 while fast < slow.
Value meaning
+1 = bullish state (fast above slow), -1 = bearish state.
When bullish
Fast MA above slow MA — bullish bias state held.
When bearish
Fast MA below slow MA — bearish bias state held.
When idle
MAs are crossed and chopping; bias state is unstable.
Default parameters
fast=5, slow=10, ma_type=ema
References

ADX Trend Weakness

#adx_trend_weakness

Flags bars where ADX is below the weak-trend threshold.

ADX (Average Directional Index) measures trend strength regardless of direction. Below ~20 historically associates with sideways/choppy markets unfavorable to trend strategies.

Trigger rule
+1 while ADX is below the threshold (weak trend); 0 otherwise.
Value meaning
+1 = weak trend (chop) - typically a signal to disable trend strategies, not to trade direction.
When bullish
ADX below threshold — trend is weak, prefer mean-reversion to trend strategies right now.
When bearish
ADX below threshold — same chop warning regardless of price direction.
When idle
ADX is above the weak threshold — trend strategies are workable.
Default parameters
period=14, weak_threshold=20
References

Regime Filter

#regime_filter

Whether price is above or below the long-term moving average.

Simplest possible regime filter: long-only when price is above its long-term MA, flat or short-only when below. Often used to gate other signals.

Trigger rule
+1 while close > MA, -1 while close < MA.
Value meaning
+1 = bullish regime (above 200dma), -1 = bearish regime (below 200dma).
When bullish
Price above the long-term MA — bullish regime, gate longs on.
When bearish
Price below the long-term MA — bearish regime, gate shorts on or stand aside.
When idle
Regime filter is unset; no long-term bias gate active.
Default parameters
ma_period=200
References

Ichimoku

#ichimoku_signal

Ichimoku Cloud bias - position relative to the Kumo and component crosses.

Composite trend system: bullish when price is above the cloud, tenkan crosses above kijun, and the cloud ahead is green. Bearish on the symmetric short-side configuration.

Trigger rule
+1 on bullish trigger conditions, -1 on bearish, 0 otherwise.
Value meaning
+1 = full Ichimoku bullish setup, -1 = full bearish setup.
When bullish
Full Ichimoku bull setup — price above cloud, tenkan over kijun, cloud projecting green.
When bearish
Full Ichimoku bear setup — price below cloud, tenkan under kijun, cloud projecting red.
When idle
Ichimoku components disagree; no clean setup either direction.
Default parameters
tenkan=9, kijun=26, senkou_b=52
References

Parabolic SAR Flip

#parabolic_sar_flip

Parabolic SAR side-flip events.

The Parabolic SAR plots a stop-and-reverse dot above or below price; when price crosses the SAR, the trend side flips. The signal fires on the flip bar.

Trigger rule
+1 on flip from above-price (bearish) to below-price (bullish); -1 on flip the other way.
Value meaning
+1 = bullish flip, -1 = bearish flip.
When bullish
SAR flipped from above to below price — switch to long bias.
When bearish
SAR flipped from below to above price — switch to short bias.
When idle
No recent SAR flip; trend bias hasn't switched.
Default parameters
accel=0.02, max_accel=0.2
References

Volatility

Bollinger Reentry

#bollinger_reentry

Single-bar event: close re-enters Bollinger bands after closing outside.

Fires on the bar where the close returns inside the bands after the prior close was outside. Long reentry from below the lower band, short reentry from above the upper band.

Trigger rule
+1 when prior close < lower band and current close inside; -1 when prior close > upper band and current close inside.
Value meaning
+1 = long-side reentry from oversold, -1 = short-side reentry from overbought.
When bullish
Price closed back inside the bands from below — short-term reversion-long signal.
When bearish
Price closed back inside the bands from above — short-term reversion-short signal.
When idle
Price hasn't recently exited and re-entered the Bollinger envelope.
Default parameters
period=20, std=2
References

Bollinger Mean Reversion

#bollinger_mean_reversion

Held state: long while pulled below lower band, exits at midline.

Enters +1 when close <= lower band, holds until close >= middle band. Symmetric short-side state. Captures reversion-to-mean trades inside Bollinger bands.

Trigger rule
+1 enter on close <= lower band, exit on close >= middle. -1 enter on close >= upper, exit on close <= middle.
Value meaning
+1 = long mean-reversion held, -1 = short mean-reversion held, 0 = flat.
When bullish
Active long mean-reversion held — price tagged the lower band, exits at the midline.
When bearish
Active short mean-reversion held — price tagged the upper band, exits at the midline.
When idle
No mean-reversion state active; price is between the bands.
Default parameters
period=20, std=2
References