Triple Confirmation Trading Strategy

An Innovative Way to Trade Expected Reactions

Sofien Kaabar, CFA
6 min readAug 2, 2022


Trading strategies are composed of multiple conditions. Technical trading strategies are the same but use conditions from technical indicators. This article presents an example of a strategy that can use technical rules.

I have released a new book called “Contrarian Trading Strategies in Python”. It features a lot of advanced contrarian indicators and strategies with a GitHub page dedicated to the continuously updated code. If you are interested, you could buy the PDF version directly through a PayPal payment of 9.99 EUR.

Please include your email in the note before paying so that you receive it on the right address. Also, once you receive it, make sure to download it through google drive.

The Basic Ingredients of the Strategy

The strategy is composed of three known technical indicators:

  • A 2-period relative strength index (RSI).
  • A 14-period stochastic oscillator.
  • A MACD oscillator.

As a refresher, the RSI and the stochastic oscillator are normalization technique that trap the price action between 0 and 100 while the MACD is the difference between two moving averages that gives out trend following signals.

To code the indicators in Python while you have a numpy array, you can use the following:

def add_column(data, times):

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

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

data = np.append(data, new, axis = 1)
return datadef delete_column(data, index, times):

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

data = np.delete(data, index, axis = 1)
return datadef delete_row(data, number):

data = data[number:, ]

return data



Sofien Kaabar, CFA

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

Recommended from Medium


See more recommendations