Simple RSI, ATR based EA


Is anyone in knowledge of a below existing EA? Or someone can code this for me?

Much appreciated!

Inputs: RSI, ATR, MA (Exponential)

RSI to have input parameters

ATR to have input parameters

MA to have input parameters and type of MA: EMA, SMA


  • Entry: sell when RSI is OB/ buy when RSI is OS, but Reverse Signal to be defined by True/False ( sell when RSI is OS/ buy when RSI is OB ) / or I can invert parameters

  • SL/TP: SL input of multiplier of ATR, TP input of multiplier of ATR-> for example SL: 1xATR, TP: 2xATR

  • Lots: position size to be used-> for example if SL is 5pips this should be equal 1% of balance, then the lot size shall be calculated based on this. So the input should be % of balance

  • Optional: if price above/below MA, enable only buy/sell orders

Lots of places will code stuff for you now. A forum like mql5 i think can.

Hi, I don’t thin someone will write code for free. Consider, writing an order in mql5 web or others freelancers site. Regards Greg

I use a similar one by the sounds of it… It uses RSI, bollinger bands and stochastic. Been great

I will code it, but please give me few days. Once I have some free time to allocate for this I will drop the EA in this topic. Cheers!

Please clarify below:
“sell when RSI is OB” does it mean:

  • Sell on every candle, if RSI for previous period is OB - if RSI stays above eg. 70 for 10 days, there will be 10 trades opened
  • Sell only once after RSI crosses to OB - if RSI crosses from 65 to 71 open a trade and don’t open new one in the same direction until this one is closed.

There are bound to be some that exist out there using something similar so make sure you scout for that first. Might be cheaper than paying someone to code one for you.

I already have most of the coding done :slight_smile: I will drop it (of course for free) with some additional settings available hopefully this evening (in CET)

As long as strategy is simple, I can code it for free (in my free time). I’ve got ready to use functions as building blocks for most strategies, so it’s fun, quick and easy. Glad to help. Cheers!

Attached is the draft version of EA, please test it and don’t use for live trading.
Naturally, I will take no responsibility for any losses caused by using this EA :slight_smile:

Below description of settings:

  • FIXED_VAR = Fixed Value At Risk. If true, your position will be calculated based on FIXED_VAR_AMOUNT parameter instead of % of balance
  • FIXED_VAR_AMOUNT = fixed amount which will be taken as risk (Stop Loss) for single trade
  • ACCOUNT_RISK_PERCENT = if FIXED_VAR is false, this percentage defines the risk for each trade. Calculated from current account balance.
  • SL_MULTIPLIER = multiplier of ATR to be used as Stop Loss for trade. Can be decimal (e.g. 1.5)
  • TP_MULTIPLIER = multiplier of ATR to be used as Take Profit for trade. Can be decimal (e.g. 1.5)
  • ATR_PERIOD = Period for ATR
  • RSI_PERIOD = Period for RSI
  • RSI_THRESHOLD = to set the Overbought/Oversold areas. Default is 30 for 70/30. If set to 10, EA will use 90/10 as OB/OS areas etc.
  • RSI_REVERSE = if false, Overbought will trigger short position open (Oversold long), if true Overbought will trigger long position open (Oversold short)
  • USE_MA_FILTER = if true, long trades will be taken only if previous candle close is above Moving Average and short trades will be taken only if previous candle close is below Moving Average
  • MA_PERIOD = Period for Moving Average used as filter
  • MA_TYPE = Type of Moving Average used as filter (e.g. EMA, SMA etc.)

SimpleRSI.ex4 (17.3 KB)

Please test and let me know, if it works for you.

wow…many thanks, top man!

Unfortunately I did test it but didn’t show any good results.

So…keep trying :slight_smile:

Simple RSI strategies rarely give good results. At least without incorporating market environment or having some crazy ideas (e.g. grid RSI scalping)

If your results are not good due to my poor coding, please let me know what is not working :slight_smile:


No, you coded well, thank you again for this!

Only that I back test it this strat for the last weeks and I was curios what are the results on longer time.