Kelly Position Sizing for a Keltner Channel Breakout Strategy
Summary
This script combines a Keltner channel breakout strategy with position sizing based on a Kelly-style fraction. Channel bands are built around a selectable simple or exponential moving average, using average true range, true range, or the high-low range. Breaks above the upper band place stop entries for longs, while breaks below the lower band place stop entries for shorts; conditions can cancel pending entries. Optional take-profit and stop-loss exits are also provided.
The sizing fraction uses the strategy’s historical win rate and average winning and losing trade amounts, then applies a positive fraction to current equity. If the calculated fraction is not positive, the script falls back to a fixed cash-based quantity. It exposes basic trade statistics and equity for display, but the supplied page gives no performance results or validation. Because the sizing inputs come from the strategy’s own prior results, they can be unstable, especially with few trades; zero wins, losses, or closed trades can also make the calculation undefined. The displayed excerpt ends before explaining its purpose in full.
Key ideas
- The strategy enters long or short on breaks of volatility-based Keltner channel bands.
- Its channel center can use a simple or exponential moving average, with several range choices.
- The Kelly-style fraction estimates position size from historical win rate and average win and loss amounts.
- Optional percentage-based profit targets and stop losses can be applied to either direction.
- The fraction depends on prior strategy results and may be undefined or unreliable with sparse trade history.
Tags
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.