Loading...
Buy when RSI(14) crosses below 30, sell when it crosses above 70. Let's see if it actually works.
We load BTC daily bars and call your strategy(bar, state) function on each bar. It must return one of:
'buy' — go long with all available cash'sell' — close the positionNone — do nothingUse the state dict to stash data across bars (like a rolling window of closes).
At the end you get a summary: final equity, trades, win rate, max drawdown.
Make money — or at least show a real trade pattern. Your strategy must: