Interactive advisor for passing the Breakout Prop 1-step evaluation. Uses your existing Lv1/Lv2/Lv3/RME intelligence stack for signal analysis and exit recommendations; you execute manually on Breakout Terminal.
| File | Purpose |
|---|---|
advisor.py |
Main interactive REPL (~900 lines) |
advisor_state.py |
Persistent state at ~/.breakout_advisor/state.json |
advisor_notify.py |
ntfy client lifted from kraken_bull_bot_v8_1 |
wedge_detector.py |
Rising/falling wedge pattern recognition |
position_sizer.py |
Breakout-native sizer (daily + max DD constraints) |
Lv3_quant_trader.py |
Your Lv3 with collision bugs fixed — REVIEW DIFF before replacing your prod copy |
- Python 3.9+
pip install ccxt requests(pandas/pandas_ta not needed — advisor uses pure-Python indicators)- Your existing
Lv1_quant_trader.py,Lv2_quant_trader.py,RiskEngine_quant_trader.py(unchanged) in the same directory asadvisor.py - Replace your
Lv3_quant_trader.pywith the patched version in this bundle (see "Lv3 changes" below)
Drop all files in one directory on your EC2 or local machine:
quant_trader/
├── advisor.py # NEW
├── advisor_state.py # NEW
├── advisor_notify.py # NEW
├── wedge_detector.py # NEW
├── position_sizer.py # NEW
├── Lv1_quant_trader.py # existing — unchanged
├── Lv2_quant_trader.py # existing — unchanged
├── Lv3_quant_trader.py # REPLACE with patched version
├── RiskEngine_quant_trader.py # existing — unchanged
└── (your existing bots continue to live here)
Run:
python3 advisor.pyAdd --debug for tracebacks on errors during development.
Your original Lv3_quant_trader.py had a **base collision bug: seven
_check_* functions took adx, rsi, vol_ratio, mfi, bb_pct_b as
both positional arguments AND via **base kwargs, causing
"got multiple values for argument 'adx'" TypeErrors on every scan.
The patched version removes those indicators from the positional parameter
lists and pulls them from **kwargs inside each function body:
# Before
def _check_reversal_long(self, closes, highs, lows, volumes,
rsi, adx, vol_ratio,
rsi_floor, vol_min, **kwargs):
# After
def _check_reversal_long(self, closes, highs, lows, volumes,
rsi_floor, vol_min, **kwargs):
rsi = kwargs.get("rsi")
adx = kwargs.get("adx")
vol_ratio = kwargs.get("vol_ratio", 1.0)Same pattern applied to: _check_macd_cross, _check_zero_line_cross,
_check_bb_mean_rev, _check_breakout, _check_macd_bear_cross,
_check_bb_upper_reject, _check_reversal_short.
The base dict in SignalRouter.route() is unchanged. The call sites are
simplified to remove redundant positional passes.
If you're currently running a bot against this Lv3, test in paper first. The fix is mechanical — the logic of the checks is untouched — but anything that touches live orders deserves a paper session before you trust it.
Type ? at the prompt for the full command list. Key ones:
scan— asks for symbol + equity + current price, runs the full Lv1→Lv2→Lv3 pipeline against Kraken data, returns entry verdict with size, stop, TP, and wedge analysistrack— register a position you opened manually on Breakout Terminal. Asks for side, entry, size, stop, TP. Persists to disk.exit— asks current price, runs the RME wave model against your tracked position, returns CLOSE/TIGHTEN/HOLD with adaptive detailupdate— modify stop/TP/size on an existing tracked positionclose— mark position as closed, update equity from Breakout Terminalstatus— full dashboard: equity, daily budget, DD floor, open positions, cooldownssize— standalone sizer: "how much can I risk given current state?"wedge— dedicated wedge pattern scan (select 1h/4h/1d timeframe)equity— update your current equity when it drifts from Breakout Terminal
- Brackets
[default]show the remembered value — press Enter to keep it - Type
qat any prompt to abort the current command $5,000/5000/5_000all parse as5000BTCauto-completes toBTC/USD- Type
quitat the main prompt to save state and exit
Defaults are set to Breakout 1-step:
- Daily limit: 4% (resets 00:30 UTC)
- Max drawdown: 6% static (from $5,000 starting balance = $4,700 floor)
If you bought the 2-step instead, edit ~/.breakout_advisor/state.json
after first run:
"eval": {
"daily_limit_pct": 5.0,
"max_drawdown_pct": 8.0,
"drawdown_type": "trailing"
}- Copy all files to your working directory
- Replace Lv3 with the patched version (review diff first)
- Run
python3 advisor.py— it creates~/.breakout_advisor/state.jsonwith defaults - Type
equityto set your starting equity - Type
scan BTC/USDto verify the pipeline runs end-to-end - Once you open a position on Breakout Terminal, type
trackto register it - Every time you're considering an exit, type
exitand feed it the current price - Type
statusanytime to see daily budget and DD room
- Watch mode is a stub.
--watchdoesn't start a background monitor yet. Add that in a second session once the interactive flow feels right. - Peak equity drift. If you close a winning position on Breakout Terminal
but forget to
closein the advisor, the peak won't update. Runequityperiodically to resync. - Kraken data ≠ Breakout data. The advisor scans Kraken spot as the proxy market. Prices are close but not identical. For critical entry/exit decisions, verify the level on Breakout Terminal itself.
- No API trading. By design. Breakout doesn't allow it; this tool is decision support, not execution.
The default topic is quant-crystal-ball (same as v8.1). Subscribe once
in your phone's ntfy app. Priority-max alerts bypass Do Not Disturb, which
is intentional for exit triggers.
Test from terminal:
python3 advisor_notify.py "Test message"There's no EMERGENCY_STOP file handling in the advisor because the
advisor doesn't execute trades. The only thing to "stop" is the REPL:
Ctrl-C or type quit. Your state is saved.