Previous High/Low
Previous High/Low connects the high and the low of the previous bar — a two-level channel, each side widened by a vertical shift in points. Orders at the previous extremes are the classic stop orders for a range breakout.
Role in the strategy
| Slot | Available | Role |
|---|---|---|
| Entry Point | Yes | Enters at the previous bar's high or low. |
| Entry Rule | Yes | Filters entries by the bar open or the bar close relative to the channel. |
| Exit Point | Yes | Exits at the previous bar's high or low. |
| Exit Rule | Yes | Triggers exits by the bar close relative to the channel. |
As a point the two channel levels are the pending order prices; as a rule the indicator contributes only the long/short signal arrays. It uses the same band logic as Bollinger Bands: Upper Band is the previous high plus the shift, Lower Band the previous low minus the shift.
As an exit point it places resting orders the bar reaches, so it carries no Exit Rules. Only Bar Open and Bar Close allow them.
Logic rules
- Entry Point: Enter long at Upper Band, Enter long at Lower Band.
- Exit Point: Exit long at Upper Band, Exit long at Lower Band.
- Rule slots:
| Rule | Long order price | Short order price |
|---|---|---|
| Enter/Exit long at Upper Band | Previous High + shift | Previous Low − shift |
| Enter/Exit long at Lower Band | Previous Low − shift | Previous High + shift |
- Entry Rule / Exit Rule:
| Rule | Long signal is 1 when | Short signal is 1 when |
|---|---|---|
| The bar opens above Upper Band | bar open is above the previous high | bar open is below the previous low |
| The bar opens below Lower Band | bar open is below the previous low | bar open is above the previous high |
| The bar opens below Upper Band after opening above it | bar open fell back below the previous high | bar open rose back above the previous low |
| The bar opens above Upper Band after opening below it | bar open rose above the previous high | bar open fell below the previous low |
| The bar opens below Lower Band after opening above it | bar open fell below the previous low | bar open rose above the previous high |
| The bar opens above Lower Band after opening below it | bar open rose above the previous low | bar open fell below the previous high |
| The bar closes above Upper Band | bar close is above the previous high | bar close is below the previous low |
| The bar closes below Lower Band | bar close is below the previous low | bar close is above the previous high |
| The bar closes below Upper Band after closing above it | bar close fell back below the previous high | bar close rose back above the previous low |
| The bar closes above Upper Band after closing below it | bar close rose above the previous high | bar close fell below the previous low |
| The bar closes below Lower Band after closing above it | bar close fell below the previous low | bar close rose above the previous high |
| The bar closes above Lower Band after closing below it | bar close rose above the previous low | bar close fell below the previous high |
The six The bar closes lines are exit-only (Exit Rules). The six The bar opens lines always read the previous bar's channel whatever the slot's execution time: a channel that contains its own bar would make them structurally false. This is the same pin the Donchian Channel uses.
Parameters
| Parameter | Type | Default | Range | Purpose |
|---|---|---|---|---|
| Vertical shift | number | 0 | −2000 to 2000 | Points added above the previous high and subtracted below the previous low |
Calculation
- The read bar's high and low are taken from the previous bar;
- the upper line is
previous high + shift, the lower lineprevious low − shift, both in points; - the channel is drawn on the main price chart as two level lines.
Backtesting
- As an entry point the pending orders sit at the two channel levels; the long and short levels differ, so both orders can be placed and the intrabar interpolation decides which side fills first.
- As a rule the indicator contributes only long/short signals. Comparisons use the standard dead zone (
SIGMA = 0.000001). - A level the price gapped across moves to the bar open, so an order is never missed on a gap.