Two-Candle Open and Close Rules for Opening and Closing Trades
Summary
This document outlines a simple automated trading rule based on comparing the opens and closes of the two most recent completed candles. When no position is open, it enters a buy if the newer candle opens above the older candle but closes below the older candle. It enters a sell under the opposite comparison: the newer candle opens below the older candle and closes above it. When a position exists, separate comparisons of the two candles’ opens and closes trigger closure of a buy or sell position.
The description gives rule conditions and example code, but no market, candle interval, transaction costs, stop loss, or backtest results. It also does not explain why these candle relationships should predict future price movement. Position size is delegated to an optimization function whose method is unspecified, and the rules appear to allow only one market position at a time. The idea is therefore a minimal entry-and-exit specification rather than a validated strategy; implementation details and out-of-sample testing would be needed to assess it.
Key ideas
- The entry rules compare opens and closes across two adjacent completed candles.
- A buy or sell entry is allowed only when there is no open position.
- Separate two-candle comparisons determine when existing buy or sell positions close.
- The example delegates trade sizing to an unspecified optimization function.
- No instrument, timeframe, costs, risk controls, or performance evidence is provided.
Tags
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.