Skip to content
All library documents

Long-Only Entries and Exits from Consecutive Up and Down Days

Article Strategy library · Author: ChaoZhang

Summary

This document outlines a simple strategy that counts consecutive daily advances and declines in closing prices. It enters a long position after the number of rising days reaches a chosen threshold and exits after a separate threshold of falling days. The parameters shown default to one day for each condition. Although the prose describes long-only trading, the included source code submits a short entry on the falling-day condition, so the implementation does not match that description. The listed start and finish dates are also not used by the code’s time condition, which is set to always be true.

The strategy is presented as a low-frequency way to track medium- to long-term trends while filtering brief fluctuations. Its simplicity comes with delayed entries and exits, no ability to benefit from short positions under the prose’s stated design, and potential for large losses without a stop. The document supplies rules and configuration details but no reported backtest results, so claims about stable returns or reduced whipsaws are not supported by evidence here.

Key ideas

  • The strategy enters long after a chosen run of rising closes and exits after a chosen run of falling closes.
  • Its parameters control the lengths of the upward and downward runs.
  • The prose says the system is long-only, but the supplied code places short entries on the exit condition.
  • Delayed signals and the absence of a stated stop-loss rule create risk.
  • The document provides settings but no measured performance results.

Tags

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.