RSI Threshold Entries with Stop Loss and Time-Based Exits
Summary
This strategy uses the relative strength index to open a long position when RSI crosses a lower threshold and to close it when RSI reaches an upper threshold. The documented defaults are a 9-period RSI, buy and sell levels of 30 and 70, a fixed order size, and a one-percent stop loss. The configuration also offers two trigger modes: act when a threshold is reached or wait for a recross. A maximum holding duration can close the position regardless of its profit or loss.
The accompanying test settings specify BTC/USDT futures on hourly bars during May 2024, but include no reported returns or risk statistics. The prose presents the idea as a way to trade overbought and oversold conditions, while the code only opens longs and closes them; it does not open shorts. The source also hardcodes a start date after the stated test window, so the published configuration may not yield the intended sample. RSI signals can fail in strong trends, and fixed stops and parameters may behave differently as volatility changes.
Key ideas
- The strategy opens a long when RSI crosses below its buy threshold and closes it at an upper-threshold signal.
- A selectable trigger mode determines whether entries and exits act on threshold attainment or recrossing.
- A fixed percentage stop and maximum holding time provide additional exit conditions.
- The code manages long positions only, despite the prose’s general buy-and-sell framing.
- The hardcoded start date falls after the published backtest period, limiting interpretation of that setup.
Tags
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.