OPEN-SOURCE SCRIPT
已更新 BitMode TheurgyLabs

BitMode is a long-only mean-reversion signal engine from TheurgyLabs, built for crypto perpetuals and tuned on BTC. It marks high-probability reversion entries and structurally patient exits directly on the chart, and pairs with the BitMode H oscillator companion for a full read of what the engine is doing on every bar.
How it works. BitMode requires two independent things to agree before it acts, rather than firing on a single crossover. The first layer is structural: penetration-learned Donchian bands that adapt their width from the market's own wick history, so "extreme" is measured against how far this instrument actually tends to overshoot rather than a fixed setting. The second layer is engine state: a volume-expansion check, an efficiency-ratio regime read, and a pressure z-score that measures how stretched price is from its recent value area. A standard buy fires when price flushes into the lower band on expanded volume while the regime permits reversion. A separate deep-capitulation path lets an extreme pressure reading take an entry on its own, so genuine washouts are not filtered away.
Exits are built around patience, not speed. Sells are partial — a percentage of the remaining position — and the engine is long-only by design; it never flips short and rarely closes the whole position at once. When the higher-timeframe sell-band gate is enabled (recommended, and on by default), every exit is held back until price reaches a genuine higher-timeframe structural high, which is what keeps the engine from dumping a fresh entry into a spike-then-fade. An optional sell cooldown adds bar-spacing where a market's reversions are slow enough to reward it. On the chart this appears as a stepped higher-timeframe band drawn above the standard chart bands; the step pattern is normal and reflects the higher-timeframe update clock.
Regime handling is asset-aware. An efficiency-ratio gate suppresses entries when the tape is trending too cleanly to revert. An optional ribbon trend-veto adds a second regime filter, but because counter-trend dips behave differently across assets, this filter is treated as per-asset rather than a global default — it helps on some instruments and hurts on others, so it is exposed as a toggle. An Auto Preset applies BTC-appropriate volume and cooldown settings automatically on BTC; every other asset falls back to manual inputs so nothing is silently mis-applied.
Deployment sizing (optional, off by default). Out of the box BitMode places a flat base-dollar buy on every signal, which keeps the signal read clean. For users who want to study position deployment rather than pure signal quality, three optional levers are included: a max-buys-per-cycle cap, geometric position tiering, and a pressure-scaled conviction multiplier that adds more on deeper capitulation. All three default to neutral, so enabling them changes only the sizing and never the signal itself. When sizing is active, buy markers shade progressively deeper blue for larger positions, and a faded marker shows where a signal fired but the cap held the deploy — a quick visual read of how the deployment is behaving.
On the chart you get adaptive buy/sell bands, the higher-timeframe patience band, clean triangle entry/exit markers, and a compact diagnostic panel reporting the live regime, volume ratio, pressure reading, band-gate status, and the effective preset in force. A signal value is also exported to the data window for external logging and scoring.
BitMode is a decision-support and research tool, not financial advice or a guarantee of results. Mean-reversion methods assume a market keeps reverting; they underperform in persistent one-way trends, and past behavior does not predict future results. Test on your own instruments and timeframes and manage risk accordingly.
How it works. BitMode requires two independent things to agree before it acts, rather than firing on a single crossover. The first layer is structural: penetration-learned Donchian bands that adapt their width from the market's own wick history, so "extreme" is measured against how far this instrument actually tends to overshoot rather than a fixed setting. The second layer is engine state: a volume-expansion check, an efficiency-ratio regime read, and a pressure z-score that measures how stretched price is from its recent value area. A standard buy fires when price flushes into the lower band on expanded volume while the regime permits reversion. A separate deep-capitulation path lets an extreme pressure reading take an entry on its own, so genuine washouts are not filtered away.
Exits are built around patience, not speed. Sells are partial — a percentage of the remaining position — and the engine is long-only by design; it never flips short and rarely closes the whole position at once. When the higher-timeframe sell-band gate is enabled (recommended, and on by default), every exit is held back until price reaches a genuine higher-timeframe structural high, which is what keeps the engine from dumping a fresh entry into a spike-then-fade. An optional sell cooldown adds bar-spacing where a market's reversions are slow enough to reward it. On the chart this appears as a stepped higher-timeframe band drawn above the standard chart bands; the step pattern is normal and reflects the higher-timeframe update clock.
Regime handling is asset-aware. An efficiency-ratio gate suppresses entries when the tape is trending too cleanly to revert. An optional ribbon trend-veto adds a second regime filter, but because counter-trend dips behave differently across assets, this filter is treated as per-asset rather than a global default — it helps on some instruments and hurts on others, so it is exposed as a toggle. An Auto Preset applies BTC-appropriate volume and cooldown settings automatically on BTC; every other asset falls back to manual inputs so nothing is silently mis-applied.
Deployment sizing (optional, off by default). Out of the box BitMode places a flat base-dollar buy on every signal, which keeps the signal read clean. For users who want to study position deployment rather than pure signal quality, three optional levers are included: a max-buys-per-cycle cap, geometric position tiering, and a pressure-scaled conviction multiplier that adds more on deeper capitulation. All three default to neutral, so enabling them changes only the sizing and never the signal itself. When sizing is active, buy markers shade progressively deeper blue for larger positions, and a faded marker shows where a signal fired but the cap held the deploy — a quick visual read of how the deployment is behaving.
On the chart you get adaptive buy/sell bands, the higher-timeframe patience band, clean triangle entry/exit markers, and a compact diagnostic panel reporting the live regime, volume ratio, pressure reading, band-gate status, and the effective preset in force. A signal value is also exported to the data window for external logging and scoring.
BitMode is a decision-support and research tool, not financial advice or a guarantee of results. Mean-reversion methods assume a market keeps reverting; they underperform in persistent one-way trends, and past behavior does not predict future results. Test on your own instruments and timeframes and manage risk accordingly.
版本注释
test版本注释
cosmetic版本注释
test开源脚本
秉承TradingView的精神,该脚本的作者将其开源,以便交易者可以查看和验证其功能。向作者致敬!您可以免费使用该脚本,但请记住,重新发布代码须遵守我们的网站规则。
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。
开源脚本
秉承TradingView的精神,该脚本的作者将其开源,以便交易者可以查看和验证其功能。向作者致敬!您可以免费使用该脚本,但请记住,重新发布代码须遵守我们的网站规则。
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。