Guide
How does the Highest High and Lowest Low Channel Strategy strategy work ?
The Highest High and Lowest Low Channel Strategy utilizes the concept of tracking the highest and lowest values within a specified period on a chart. The strategy creates a channel defined by the highest high (HH) and the lowest low (LL) of the traded asset during a user-defined period. A signal is generated for a long entry when the price closes above the HH of the channel, suggesting bullish momentum. Conversely, a signal for a short entry is triggered when the price closes below the LL, indicating bearish momentum.
- Indicator Calculation:
- The highest high value (HH) is calculated over a given period using
ta.highest(high, length)
. - The lowest low value (LL) is calculated over the same period using
ta.lowest(low, length)
.
- The highest high value (HH) is calculated over a given period using
- Trade Execution:
- A long position is initiated with
strategy.entry('Long', strategy.long)
when the close price is greater than the previous highest high. - A short position is taken with
strategy.entry('Short', strategy.short)
when the close price falls below the previous lowest low.
- A long position is initiated with
- Reversals: The script includes an option to trade reversals by setting the
reverse
input totrue
. In reversal mode, the strategy takes the opposite signals. - The strategy's visualization includes bar coloring where long signals are marked with green, shorts with red, and neutral with blue. Additionally, the highest high and lowest low are plotted on the chart for visual reference.