# 3-Day High / Low Bot This strategy was taken from chapter 2 of [*High Probability ETF Trading*](https://moshferatu.dev/moshferatu/high-probability-etf-trading) (2009) by Larry Connors. ## Rules **Long Trades** 1. The ETF (e.g., SPY) is above its 200-day moving average. 2. The ETF closes below its 5-day moving average. 3. The ETF must make a lower high and lower low for 3 consecutive days. 4. Enter a long if the above conditions are met. 5. **Aggressive Version** (optional): Enter a second long if price closes lower than the initial entry at any point during the trade. 6. Exit when the ETF closes above its 5-day moving average. **Short Trades** The inverse of the long trade rules, but stated explicitly: 1. The ETF (e.g., SPY) is below its 200-day moving average. 2. The ETF closes above its 5-day moving average. 3. The ETF must make a higher high and higher low for 3 consecutive days. 4. Enter a short if the above conditions are met. 5. **Aggressive Version** (optional): Enter a second short if price closes higher than the initial entry at any point during the trade. 6. Exit when the ETF closes below its 5-day moving average. **NOTE**: The strategy will work on any asset, not just ETFs. ## Parameters **Consecutive Days**: The number of days in a row in which higher highs / lows or lower highs / lows must be made. (Default: 3) **Long-Term Trend Period**: The period to use in the long-term trend calculation as measured using a simple moving average. (Default: 200) **Short-Term Trend Period**: The period to use in the short-term trend calculation as measured using a simple moving average. (Default: 5) **Enable Long Trades**: Whether to allow going long in the strategy. (Default: true) **Enable Short Trades**: Whether to allow going short in the strategy. (Default: true) **Enable Aggressive Entries**: Whether to allow for entering a second trade when price initially moves against the first. (Default: true) ## Backtest Results ### SPY ![SPY Analysis](https://static.moshington.com/images/strategies/3-day-high-low/spy-analysis.png) ![SPY Summary](https://static.moshington.com/images/strategies/3-day-high-low/spy-summary.png) ### QQQ ![QQQ Analysis](https://static.moshington.com/images/strategies/3-day-high-low/qqq-analysis.png) ![QQQ Summary](https://static.moshington.com/images/strategies/3-day-high-low/qqq-summary.png) ### DIA ![DIA Analysis](https://static.moshington.com/images/strategies/3-day-high-low/dia-analysis.png) ![DIA Summary](https://static.moshington.com/images/strategies/3-day-high-low/dia-summary.png) ### IWM ![IWM Analysis](https://static.moshington.com/images/strategies/3-day-high-low/iwm-analysis.png) ![IWM Summary](https://static.moshington.com/images/strategies/3-day-high-low/iwm-summary.png) ### Sector ETFs This backtest is an aggregation of the results of the following sector ETFs: XLB, XLC, XLE, XLF, XLI, XLK, XLP, XLU, XLV, XLY ![Sector ETFs](https://static.moshington.com/images/strategies/3-day-high-low/sector-etfs.png) ---