Stochastic RSI MA Expert Advisor
Info
The Stochastic RSI MA Expert Advisor is a Expert Advisor for MetaTrader 4 that this expert advisor utilizes three indicators: ma (150 periods), rsi (3 periods) with levels at 80 and 20, and stochastic (6, 3, 3) with levels at 70 and 30. These parameters are customizable.
Usage
This tool is typically used for automated trading on major forex pairs and gold.
Platform
This Expert Advisor works exclusively on MetaTrader 4 (both build 600+ and newer versions).
Setup
Place the downloaded file in MQL4/Experts folder via File ? Open Data Folder in MetaTrader 4.
How to Install and Use Stochastic RSI MA Expert Advisor
1. Installation: Open the "File" menu, select "Open Data Folder," navigate to MQL/Experts, paste your file, and restart the terminal.
2. Activation: Drag the EA from the Navigator onto a chart, ensure "Allow live trading" is checked in the Common tab, and verify the AutoTrading button is green.
3. Optimization: Right-click your chart, choose "Expert List," click "Properties" to adjust inputs, and save your preferred setup as a set file for future use.
4. Maintenance: Regularly check the "Experts" tab in the terminal window to monitor trade logs and potential execution errors.
Frequently Asked Questions
Q: Why is my EA not opening trades? A: Check the "AutoTrading" button, ensure "Allow live trading" is enabled, and verify your broker allows automated trading on your account type.
Q: Can I run multiple EAs on one chart? A: No, each chart can only host one active EA; however, you can open multiple charts for different currency pairs to run several EAs.
Q: What does the "smiley face" icon mean? A: A smiley face in the top-right corner of the chart indicates the EA is successfully running; a frowny face means it is disabled.
What this tool does
This Expert Advisor utilizes three indicators: MA (150 periods), RSI (3 periods) with levels at 80 and 20, and Stochastic (6, 3, 3) with levels at 70 and 30.
Typical Use Case
This Expert Advisor excels in automated trading and technical analysis on MetaTrader 4.
Compatible Platform & Setup
This Expert Advisor works on MetaTrader 4. Place the file in the MQL4/Experts folder and restart the terminal.
Description & Settings
Related: e-trailing2: enhanced trailing stop expert advisor - another powerful expert for MetaTrader 4 traders.
This Expert Advisor utilizes three indicators: MA (150 periods), RSI (3 periods) with levels at 80 and 20, and Stochastic (6, 3, 3) with levels at 70 and 30. These parameters are customizable.Also recommended: e-signal of trade expert advisor - similar expert with strong performance on MetaTrader 4.
For non-5-digit quotes, adjust the input parameters accordingly.
Deal Entry Direction
The direction of trade entry is determined by the Moving Average (MA). Only one trade per side is permitted.
Consider BUY direction if Bid > MA.
Consider SELL direction if Ask < MA.
Position Entry Conditions
Entry occurs when RSI and Stochastic conditions are met.
For BUY: RSI < 20 and Stochastic < 30.
For SELL: RSI > 80 and Stochastic > 70.
Trade Exit Strategy
Exit is managed by the Stochastic indicator. Profit can be secured in points.
Exit Method 1: Exit by Stochastic Level (Trailing Stop = 0)
If the trailing stop input parameter is zero, the position is closed once the Stochastic indicator reaches the opposite level, provided the trade is currently profitable.
- Close BUY if Stochastic > 70 and Open Price <= Bid.
- Close SELL if Stochastic < 30 and Open Price >= Ask.
Exit Method 2: Trailing Stop Exit (Trailing Stop > 0)
If a trailing stop is configured, once the Stochastic indicator reaches the opposite level, the stop loss is trailed with each new candlestick. The trailing distance is set relative to the price. Profit can be secured via this method, though a negative closure (stop loss not immediately moving to breakeven) is possible.
Closure at a Loss (Allow Loss)
Exit Method 3: Loss Closure by Stochastic Level (Allow Loss = 0)
If the Allow Loss input parameter is zero, the position is closed once the Stochastic indicator reaches the opposite level, if the trade is currently at a loss.
- Close BUY if Stochastic > 70 and Open Price > Bid.
- Close SELL if Stochastic < 30 and Open Price < Ask.
Exit Method 4: Loss Closure by Allow Loss Value (Allow Loss > 0)
If Allow Loss is set and the Stochastic indicator is outside the trade entry zone, and the position loss meets or exceeds the specified Allow Loss amount, the position is closed.
- Close BUY if Stochastic > 30 and Open Price - Bid >= Allow Loss (in points).
- Close SELL if Stochastic < 70 and Ask - Open Price >= Allow Loss (in points).
Important Note:
The primary purpose of this Expert Advisor is research into market behavior using RSI and Stochastic indicators. With thorough understanding and potential refinement, a profitable trading result may be achievable. This tool is intended for use with MetaTrader 4 and MetaTrader 5 platforms and was updated in 2026.
You may also like: e-news-lucky$ - automated news trading expert advisor - excellent alternative for expert users on MetaTrader 4.
Source Code
#property copyright "robotfx"
#property link "https://robotfx.org"
#property version "1.00"
#property strict
extern string nameind1 = "___________rsi__________"; // rsi
extern int rsi_period = 3; // rsi period
extern enum_applied_price rsi_applied_price = price_close; // rsi applied price
extern int rsi_up_level = 80; // level up - rsi
extern int rsi_dn_level = 20; // level down - rsi
extern string nameind2 = "________stochastic______"; // stochastic
.......
⚠ Limitations & Risk Warning
- This tool is provided for educational and testing purposes only.
- Past performance does not guarantee future results.
- Trading involves substantial risk of loss. Use on a demo account first.
- Results may vary depending on market conditions, broker, and settings.
- We recommend thorough backtesting and forward testing before using with real funds.