Specification
//+------------------------------------------------------------------+
//| EA Divergence SR + RSI & MACD Confirmation (MT5) |
//+------------------------------------------------------------------+
#property strict
#include <Trade/Trade.mqh>
CTrade trade;
input double RiskPercent = 2.0;
input int StopLoss = 100;
input int TakeProfit = 200;
input int TrailingStop = 50;
input int SRLookback = 20;
input int StartHour = 9;
input int EndHour = 16;
input int RSI_Period = 14;
input int MACD_FastEMA = 12;
input int MACD_SlowEMA = 26;
input int MACD_SignalSMA = 9;
input int RSI_Lower = 30;
input int RSI_Upper = 70;
//+------------------------------------------------------------------+
//| Hitung lot berdasarkan risiko |
//+------------------------------------------------------------------+
double CalculateLotSize(double slPoints) {
double riskMoney = AccountInfoDouble(ACCOUNT_EQUITY) * (RiskPercent / 100.0);
double tickValue = SymbolInfoDouble(_Symbol, SYMBOL_TRADE_TICK_VALUE);
double tickSize = SymbolInfoDouble(_Symbol, SYMBOL_TRADE_TICK_SIZE);
double contractSize = SymbolInfoDouble(_Symbol, SYMBOL_TRADE_CONTRACT_SIZE);
double pricePerPoint = (tickValue / tickSize) * contractSize;
double lot = riskMoney / (slPoints * pricePerPoint);
return NormalizeDouble(lot, 2);
}
//+------------------------------------------------------------------+
//| Cari area support dan resistance |
//+------------------------------------------------------------------+
double GetSupportLevel() {
return iLow(_Symbol, _Period, iLowest(_Symbol, _Period, MODE_LOW, SRLookback, 1));
}
double GetResistanceLevel() {
return iHigh(_Symbol, _Period, iHighest(_Symbol, _Period, MODE_HIGH, SRLookback, 1));
}
//+------------------------------------------------------------------+
//| Trailing Stop |
//+------------------------------------------------------------------+
void ManageTrailingStop() {
for (int i = PositionsTotal() - 1; i >= 0; i--) {
if (PositionSelectByIndex(i)) {
double openPrice = PositionGetDouble(POSITION_PRICE_OPEN);
double currentPrice = (PositionGetInteger(POSITION_TYPE) == POSITION_TYPE_BUY) ?
SymbolInfoDouble(_Symbol, SYMBOL_BID) : SymbolInfoDouble(_Symbol, SYMBOL_ASK);
double sl = PositionGetDouble(POSITION_SL);
double newSL;
if (PositionGetInteger(POSITION_TYPE) == POSITION_TYPE_BUY) {
newSL = currentPrice - TrailingStop * _Point;
if (newSL > sl && newSL > openPrice)
trade.PositionModify(_Symbol, newSL, PositionGetDouble(POSITION_TP));
} else {
newSL = currentPrice + TrailingStop * _Point;
if ((sl == 0.0 || newSL < sl) && newSL < openPrice)
trade.PositionModify(_Symbol, newSL, PositionGetDouble(POSITION_TP));
}
}
}
}
//+------------------------------------------------------------------+
//| Konfirmasi RSI dan MACD |
//+------------------------------------------------------------------+
bool ConfirmIndicators(bool isBuy) {
double rsi[], macd_main[], macd_signal[];
if (CopyBuffer(iRSI(_Symbol, _Period, RSI_Period, PRICE_CLOSE), 0, 1, 1, rsi) < 1) return false;
if (CopyBuffer(iMACD(_Symbol, _Period, MACD_FastEMA, MACD_SlowEMA, MACD_SignalSMA, PRICE_CLOSE), 0, 1, 1, macd_main) < 1) return false;
if (CopyBuffer(iMACD(_Symbol, _Period, MACD_FastEMA, MACD_SlowEMA, MACD_SignalSMA, PRICE_CLOSE), 1, 1, 1, macd_signal) < 1) return false;
if (isBuy)
return (rsi[0] < RSI_Upper && macd_main[0] > macd_signal[0]);
else
return (rsi[0] > RSI_Lower && macd_main[0] < macd_signal[0]);
}
//+------------------------------------------------------------------+
//| Fungsi utama EA |
//+------------------------------------------------------------------+
void OnTick() {
datetime now = TimeLocal();
int hour = TimeHour(now);
if (hour < StartHour || hour >= EndHour) return;
if (PositionsTotal() > 0) {
ManageTrailingStop();
return;
}
double support = GetSupportLevel();
double resistance = GetResistanceLevel();
MqlRates price[];
ArraySetAsSeries(price, true);
if (CopyRates(_Symbol, _Period, 0, 3, price) < 3) return;
double open1 = price[1].open;
double close1 = price[1].close;
double open2 = price[2].open;
double close2 = price[2].close;
double lotSize = CalculateLotSize(StopLoss);
// Entry Buy
if (close1 > open1 && close2 < open2 && price[1].high < price[2].high && price[1].low < price[2].low &&
price[1].low <= (support + _Point * 10) && ConfirmIndicators(true)) {
double sl = NormalizeDouble(SymbolInfoDouble(_Symbol, SYMBOL_ASK) - StopLoss * _Point, _Digits);
double tp = NormalizeDouble(SymbolInfoDouble(_Symbol, SYMBOL_ASK) + TakeProfit * _Point, _Digits);
trade.Buy(lotSize, _Symbol, SymbolInfoDouble(_Symbol, SYMBOL_ASK), sl, tp, "Buy Divergence + Indikator");
}
// Entry Sell
if (close1 < open1 && close2 > open2 && price[1].high > price[2].high && price[1].low > price[2].low &&
price[1].high >= (resistance - _Point * 10) && ConfirmIndicators(false)) {
double sl = NormalizeDouble(SymbolInfoDouble(_Symbol, SYMBOL_BID) + StopLoss * _Point, _Digits);
double tp = NormalizeDouble(SymbolInfoDouble(_Symbol, SYMBOL_BID) - TakeProfit * _Point, _Digits);
trade.Sell(lotSize, _Symbol, SymbolInfoDouble(_Symbol, SYMBOL_BID), sl, tp, "Sell Divergence + Indikator");
}
}
Responded
1
Rating
Projects
56
34%
Arbitration
1
0%
/
0%
Overdue
1
2%
Working
2
Rating
Projects
0
0%
Arbitration
0
Overdue
0
Free
3
Rating
Projects
0
0%
Arbitration
0
Overdue
0
Free
4
Rating
Projects
222
80%
Arbitration
18
33%
/
44%
Overdue
10
5%
Working
Published: 24 articles, 1882 codes
5
Rating
Projects
34
24%
Arbitration
3
0%
/
33%
Overdue
2
6%
Working
6
Rating
Projects
0
0%
Arbitration
0
Overdue
0
Free
7
Rating
Projects
12
8%
Arbitration
0
Overdue
3
25%
Working
8
Rating
Projects
90
39%
Arbitration
26
4%
/
77%
Overdue
40
44%
Free
9
Rating
Projects
241
31%
Arbitration
0
Overdue
3
1%
Free
Published: 2 codes
10
Rating
Projects
265
77%
Arbitration
10
80%
/
0%
Overdue
4
2%
Working
Similar orders
Looking for an experienced MQL5 developer to build a custom Expert Advisor that combines Simple & Exponential MAs , market structure (swing highs/lows) , and 2 bullish + 2 bearish candle patterns to generate 2 Buy and 2 Sell setups . ✅ EA Features: MA Filters : Customizable SMA & EMA Market Structure : Detect basic swing highs/lows, identify bias Candle Patterns : 2 bullish + 2 bearish (logic will be provided) Trade
I NEED SKILL MT5/4 CODER
50+ USD
I have a method I need converted to MT 4/5 EA, both. It uses two common indictors. See attached Note: Whoever want to message me must be an experienced developer
Mt4 robot programmer needed(easy project)
30 - 50 USD
program ussd zar cad adsafafaefefefqfeqfeqfqefqefesaddqdqDDF FAEWF FA RWFWEF ERWF WE FAEW FRE FA EWRF EF EW FAEW F EWF EW FEW F EWF SADASDW WDA WD AWDW DWA DEAW DEAE D ADADEA DAEDE D EDEADAEDADEDEA D ED AED AED AD
Hey mql5 commmunities, I am a seasoned trader wanting to turn my manual trading script into a well functional trading robot, you will just have to implement the exact ideas as environed then build a reliable trading bot expert advisor, and able to share a test version for backtesting, running thorough backtesting and share backtesting reports for the metrics I am requesting, would also love to have the mql4 version
i need a simple but super fast local trade copier copy everything exactly whatever is put in master with 3 simple lot options: 1) fixed (not relative to master's size), 2) % of equity (not relative to master's size) and 3) lot zize, relative to master's size instal master to 1 chart instal client (slave) to 1 chart if client terminal has the pair or instruments traded in master will be copied any extra features will
EA SIMPLE ROBOT FOR SCALPING
30 - 40 USD
Hi, could someone help me in developing a simple EA forex robot which has following features: 1. Open 2 trades at the same time i.e. 1 buy trade and 1 sell trade of the same currency pair. 2. The lot size of each trade should be 0.05 lots and there should be a flexibility to modify this lot size. 2. On opening the buy trade, it should have a Take profit of 40pips and Stop loss of 30 pips. These TP and stop loss can
hello great developer i want to fix this script This arrow shouldn’t of printed because the renko brick ended red{ check the image} One other guy said this ‘okay I am seeing, arrow sticks because your code plots it conditionally but never deletes it later. This is expected behavior unless you add cleanup logic like -- Chart.RemoveObject(...) for outdated arrows... not sure if you understand the technical parts
Simple RSI Strategy Bot for MT5
80 - 200 USD
im looking for a developer to build a fully automated trading robot Expert Advisor for Metatrader 5. The EA must do the following open buy sell orders based on a custom strategy details below place take profit and stop loss automatically Lot size should be adjustable Should avoid overtrading e.g. max 3 trades per day Close trades automatically based on criteria Work on multiple pairs if possible News filler optional
I need an Expert advisor (EA) for metatrader 5 (MT5), coded in MQL5. The EA should open and close trades based on the RSI indicator. A buy trade is triggered when RSI crosses below 30 and then moves back above it. A sell trade when RSI crosses above 70 and then drops below. The EA must include customizable input settings such as RSI period, lot size, stop loss, take profit, maximum number of trades, and trading time
MT4 Expert Advisor for Volume Generation via Hedging (Rebate-Focused EA) Project Goal: To develop a fully automated MT4 Expert Advisor that generates high trading volume on XAU/USD (Gold) for the purpose of earning broker rebates — not trading profits. The EA must operate with minimal or zero market exposure using a hedging strategy that cycles simultaneous BUY and SELL positions safely and efficiently. Key
Project information
Budget
50+ USD
Customer
Placed orders1
Arbitrage count0