Five-Bar Rising and Falling High-Low Sequence Strategy
Summary
This Pine strategy defines upward and downward wave patterns by comparing rolling highs and lows across five successive, offset five-bar windows. It signals an upward pattern when each newer rolling high is lower than the prior one, and a downward pattern when each newer rolling low is higher than the prior one, as expressed in the code’s indexed conditions. These labels may seem counterintuitive, so users should check how the window offsets and comparisons map to actual price sequences before relying on the pattern names.
When the upward condition is met, the strategy submits a long stop entry at the low from four bars earlier. Otherwise, when the downward condition is met, it submits a short stop entry at the corresponding earlier high. The document provides implementation logic and chart markers, but no performance results, exit rules, position sizing rationale, or broader risk controls. Its usefulness is therefore as a compact example of rolling-extreme pattern signals rather than evidence of a validated trading edge.
Key ideas
- The strategy compares rolling highs and lows from five successively shifted five-bar windows.
- The upward and downward conditions are defined by strict sequences of lower highs and higher lows, respectively.
- Long and short entries use stop prices based on the low or high from four bars earlier.
- The document provides no exit plan, risk controls, or performance evidence.
Tags
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.