A Profitable Trading Strategy on the Keltner Channel.

Coding a New Trading Strategy in Python.

Sofien Kaabar, CFA
7 min readNov 11, 2021



We do not have to stick to theoretical and classical strategies that are presented with indicators. The default version is rarely if ever profitable or even useful which is why we must become creative with them. This article presents a type of strategy to be used with volatility bands such as the Keltner channel.

I have just released a new book after the success of my previous one “The Book of Trading Strategies”. It features advanced trend-following indicators and strategies with a GitHub page dedicated to the continuously updated code. Also, this book features the original colors after having optimized for printing costs. If you feel that this interests you, feel free to visit the below Amazon link, or if you prefer to buy the PDF version, you could contact me on LinkedIn.

The Keltner Channel

The Keltner channel is a volatility-based technical indicator that resembles the Bollinger bands, only it uses an exponential moving average as the mean calculation and the average true range as a volatility proxy. First of all, we need to define and understand two concepts:

  • Exponential moving averages.
  • The average true range.

Moving averages help us confirm and ride the trend. They are the most known technical indicator and this is because of their simplicity and their proven track record of adding value to the analyses. We can use them to find support and resistance levels, stops and targets, and to understand the underlying trend. This versatility makes them an indispensable tool in our trading arsenal.

The idea of an exponential moving average is to give more weight to the more recent values so that it reduces the lag between the price and the average.

def adder(Data, times):

for i in range(1, times + 1):

new = np.zeros((len(Data), 1), dtype = float)
Data =…



Sofien Kaabar, CFA

Top writer in Finance, Investing, Business | Trader & Author

Recommended from Medium


See more recommendations