Skip to content
All library documents

Kelly Position Sizing with Keltner Channel Breakouts

Article TradingView scripts

Summary

This strategy combines Keltner Channel breakouts with position sizing based on a Kelly fraction calculated from the strategy’s closed-trade record. It estimates win probability from winning versus total trades and compares average wins with average losses. When the resulting fraction is positive, order quantity scales with current equity; otherwise, the script falls back to a fixed cash amount. The sizing feature can also be disabled.

Entries use stop orders above or below the channel after price crosses its boundary, with pending orders canceled under specified price conditions. The strategy includes date-range controls and optional percentage-based take-profit and stop-loss exits. The document provides source code and describes the method, but reports no backtest results or evidence that the approach is profitable. Its Kelly estimate depends on historical outcomes and can be unstable with few trades or changing market conditions; the code does not describe safeguards such as fractional Kelly limits.

Key ideas

  • The strategy enters long or short positions after price crosses an upper or lower Keltner Channel boundary.
  • It estimates a Kelly fraction from the win rate and average win-to-loss relationship of closed trades.
  • When the estimated fraction is positive, position quantity is scaled to current equity; otherwise, a fixed cash-based quantity is used.
  • Take-profit and stop-loss exits are optional and can be enabled separately or together.
  • The document supplies code but no performance results or validation of the sizing method.

Tags

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