OPEN-SOURCE SCRIPT
Oracle Protocol — Arch Public (Testing Clone)

Oracle Protocol — Arch Public Series (testing clone)
This model implements the Arch Public Oracle structure: a systematic accumulation-and-distribution engine built around a dynamic Accumulation Cost Base (ACB), strict profit-gate exit logic, and a capital-bounded flywheel reinvestment system.
It is designed for transparent execution, deterministic behaviour, and rule-based position management.
Core Function Set
1. Accumulation Framework (ACB-Driven)
The accumulation engine evaluates market movement against defined entry conditions, including:
Percentage-based entry-drop triggers
Optional buy-below-ACB mode
Capital-gated entries tied to available ledger balance
Fixed-dollar and min-dollar entry rules (as seen in Arch public materials)
Automated sizing through flywheel capital
Range-bounded ledger for controlled backtesting input
Each qualifying buy updates the live ACB, maintains the internal ledger, and forms the next reference point for exit evaluation.
No forecasting mechanisms are included.
2. Profit-Gate Exit System
Exits are governed by the standard Arch public approach:
A sealed ACB reference for threshold evaluation
Optional live-ACB visibility
Profit-gate triggers defined per asset class
Candle-confirmation integration (“ProfitGate + Candle” mode)
Distribution only when the smallest active threshold is met
This provides a consistent cadence with published Arch diagrams and PDFs.
3. Once-Per-Rally Governance
After a distribution, the algorithm locks until price retraces below the most recent accumulation base.
Only after re-arming can the next profit gate activate.
This prevents over-frequency selling and aligns with the public-domain Oracle behaviour.
4. Quiet-Bars & Threshold Cluster Control
A volatility-stabilisation layer prevents multiple exits from micro-fluctuations or transient spikes.
This ensures clean execution during fast markets and high volatility.
5. Flywheel Reinvestment
Distribution proceeds automatically return to the capital pool where permitted, creating a closed system of:
Entry sizing
Exit proceeds
Ledger-managed capital state
All sizing respects capital boundaries and does not breach dollar floors or overrides.
6. Automation Hooks and Integration
The script exposes:
3Commas-compatible JSON sizing
Entry/exit signalling via alertcondition()
Deterministic event reporting suitable for external automation
This allows consistent deployment across automated execution environments.
7. Visual Tooling
Optional displays include:
Live ACB line
Exit-guide markers
Capital, state, and ledger panels
Realized/unrealized outcome tracking based on internal logic only
Visual components do not influence execution rules.
Operating Notes
This model is rule-based, deterministic, and non-predictive.
It executes only according to the explicit thresholds, capital limits, and state transitions defined within the script.
No discretionary or forward-looking logic is included.
This model implements the Arch Public Oracle structure: a systematic accumulation-and-distribution engine built around a dynamic Accumulation Cost Base (ACB), strict profit-gate exit logic, and a capital-bounded flywheel reinvestment system.
It is designed for transparent execution, deterministic behaviour, and rule-based position management.
Core Function Set
1. Accumulation Framework (ACB-Driven)
The accumulation engine evaluates market movement against defined entry conditions, including:
Percentage-based entry-drop triggers
Optional buy-below-ACB mode
Capital-gated entries tied to available ledger balance
Fixed-dollar and min-dollar entry rules (as seen in Arch public materials)
Automated sizing through flywheel capital
Range-bounded ledger for controlled backtesting input
Each qualifying buy updates the live ACB, maintains the internal ledger, and forms the next reference point for exit evaluation.
No forecasting mechanisms are included.
2. Profit-Gate Exit System
Exits are governed by the standard Arch public approach:
A sealed ACB reference for threshold evaluation
Optional live-ACB visibility
Profit-gate triggers defined per asset class
Candle-confirmation integration (“ProfitGate + Candle” mode)
Distribution only when the smallest active threshold is met
This provides a consistent cadence with published Arch diagrams and PDFs.
3. Once-Per-Rally Governance
After a distribution, the algorithm locks until price retraces below the most recent accumulation base.
Only after re-arming can the next profit gate activate.
This prevents over-frequency selling and aligns with the public-domain Oracle behaviour.
4. Quiet-Bars & Threshold Cluster Control
A volatility-stabilisation layer prevents multiple exits from micro-fluctuations or transient spikes.
This ensures clean execution during fast markets and high volatility.
5. Flywheel Reinvestment
Distribution proceeds automatically return to the capital pool where permitted, creating a closed system of:
Entry sizing
Exit proceeds
Ledger-managed capital state
All sizing respects capital boundaries and does not breach dollar floors or overrides.
6. Automation Hooks and Integration
The script exposes:
3Commas-compatible JSON sizing
Entry/exit signalling via alertcondition()
Deterministic event reporting suitable for external automation
This allows consistent deployment across automated execution environments.
7. Visual Tooling
Optional displays include:
Live ACB line
Exit-guide markers
Capital, state, and ledger panels
Realized/unrealized outcome tracking based on internal logic only
Visual components do not influence execution rules.
Operating Notes
This model is rule-based, deterministic, and non-predictive.
It executes only according to the explicit thresholds, capital limits, and state transitions defined within the script.
No discretionary or forward-looking logic is included.
Open-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.
Open-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.