Trend-following strategy that bets on the same outcome as the previous market result
The PREVIOUS strategy is a simple trend-following approach that assumes recent market outcomes will continue. When a new KXBTC15M market opens, it places a bet on the same side (YES or NO) that won in the previous market.
The strategy operates on a straightforward hypothesis: if Bitcoin’s price moved up (or down) in the last 15-minute window, it’s likely to continue in the same direction for the next window.
The bot determines which side won by checking the market result:
# bot.py:76-82def get_settled_side(market): """Return 'yes' or 'no' if market is settled, else None.""" result = market.get("result") if result in ("yes", "no"): return result return None
Simplicity: Easy to understand and debugLow Latency: Executes immediately when previous market settlesTrend Capture: Performs well during sustained directional moves
Mean Reversion: Loses money when trends reverseNo Price Filter: Will pay any price for the signalNo Risk Management: Fixed stake regardless of bankroll or drawdowns
Trending markets: When Bitcoin price shows sustained directional movement
High momentum environments: During periods of strong buying or selling pressure
Testing and baseline: As a benchmark to compare more sophisticated strategies against
Avoid using PREVIOUS as your only strategy. It has no awareness of price inefficiencies or bankroll management, which can lead to significant drawdowns during choppy or mean-reverting markets.
# bot.py:619-643if ("PREVIOUS_2", ticker) not in traded_keys: prev_signal = signals[ticker].get("PREVIOUS") if prev_signal: price = yes_ask if prev_signal == "yes" else no_ask if 0 < price <= DEAL_MAX_PRICE: # Only buy if price is good contracts = STAKE_USD / price trade = { "time": now.isoformat(), "strategy": "PREVIOUS_2", "previous_ticker": pending_previous or "", "previous_result": prev_signal, "buy_ticker": ticker, "buy_side": prev_signal, "stake_usd": STAKE_USD, "price_usd": round(price, 4), "contracts": round(contracts, 4), "outcome": "", "payout_usd": "", "profit_usd": "", } trades.append(trade) save_trades(trades) traded_keys.add(("PREVIOUS_2", ticker)) print(f" -> [PREVIOUS_2] BUY {prev_signal} ${STAKE_USD} @ ${price:.4f}")
PREVIOUS_2 waits for the PREVIOUS signal side to reach $0.45 or less before entering. This filters for better risk/reward opportunities but may miss trades when markets are trending strongly.