RSI Threshold Crossings with Stateful Spot Entries and Exits
Summary
This document describes a simple RSI-based trading bot for a spot account. It calculates RSI over a configurable period and uses configurable buy and sell thresholds to trigger trades. The entry logic compares recent RSI readings to detect a turn across a threshold, then the bot buys with available quote balance or sells the held asset. Its state machine tracks whether it is entering, waiting for an opposite signal, or covering a position. A configurable price offset is applied to orders, and the bot repeatedly cancels pending orders before proceeding.
The document provides parameters and source code, but no backtest results, market specification, or performance evidence. The heading mentions default sell and buy bands, while the parameter values shown are 50; actual behavior depends on those configured thresholds. The implementation also has limitations: it uses account balances rather than explicit position sizing, and execution, fees, slippage, and handling of partially filled orders are not evaluated. Treat it as an example of signal and order-state logic, not evidence of profitability.
Key ideas
- The bot uses recent RSI readings and configurable thresholds to identify directional turns.
- Its state machine alternates between entering a trade and waiting for a later signal to exit or cover it.
- Order prices are adjusted by a configurable offset, and pending orders are repeatedly canceled.
- The document supplies implementation details but no empirical evidence about returns or risk.
Tags
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.