The Easiest Way to Add the RSI Indicator to Your MetaTrader 5 EA

James Hinton
6 min readJun 12, 2024

Adding the RSI (or Relative Strength Indicator) to your MT5 Expert Advisor can be a great way to give your EA insight into market conditions. The RSI is one of the world's most popular technical indicators, and it is used by many traders to identify overbought and oversold conditions.

However, actually GETTING the value of the RSI from MetaTrader 5 in a format your EA can use is…non-intuitive.

In this article, I’ll show you the easiest way to get it and add it to the rest of your trading bot.

About This Series

In this series, I cover everything you need to build your own advanced Expert Advisor from scratch. I cover:

  • How to get started
  • Using built in technical indicators from MetaTrader
  • Making your EA autotrade
  • Adding some simple-yet-powerful risk management techniques to your EA
  • Backtesting and Optimizing your soon-to-be-awesome algorithm
  • Adding some advanced features

All of the code that I use is available on my public GitHub repo, and each episode contains working code snippets you can immediately use in your own trading bot.

If you’d like some more general help, join our Discord server here, and if you prefer content in a video format, you can check out my YouTube channel here.



James Hinton

Passionate algorithmic trader and Cyber Security expert. Love developing helpful content.