指定
//+------------------------------------------------------------------+
//| XAUUSD Automated Forex Robot |
//| Enhanced Version with Error Handling and Improvements |
//+------------------------------------------------------------------+
input int FastMA = 10; // Fast moving average period
input int SlowMA = 50; // Slow moving average period
input int RSI_Period = 14; // RSI period
input double Overbought = 70; // RSI overbought level
input double Oversold = 30; // RSI oversold level
input double RiskPercent = 1.0; // Risk per trade as a percentage of account equity
input double ATRMultiplier = 2.0; // ATR multiplier for stop-loss
input double TrailingStop = 300; // Trailing stop in points
input double MinLotSize = 0.01; // Minimum lot size
input double LotStep = 0.01; // Lot size increment
input int ATR_Period = 14; // ATR period
input int MaxSlippage = 3; // Maximum slippage in points
input int MAGIC_NUMBER = 123456; // Unique identifier for trades
input string TradeComment = "XAUUSD Bot"; // Trade comment
//+------------------------------------------------------------------+
//| OnTick Function - Main Logic |
//+------------------------------------------------------------------+
void OnTick() {
// Calculate indicators
static double fastMA, slowMA, rsi, atr;
fastMA = iMA(NULL, 0, FastMA, 0, MODE_EMA, PRICE_CLOSE, 0);
slowMA = iMA(NULL, 0, SlowMA, 0, MODE_EMA, PRICE_CLOSE, 0);
rsi = iRSI(NULL, 0, RSI_Period, PRICE_CLOSE, 0);
atr = iATR(NULL, 0, ATR_Period, 0);
// Check for existing trades
bool buyOpen = IsTradeOpen(OP_BUY);
bool sellOpen = IsTradeOpen(OP_SELL);
// Entry logic
if (fastMA > slowMA && rsi > Oversold && rsi < 50 && !buyOpen) {
// Buy Signal
double sl = Bid - ATRMultiplier * atr;
double tp = Bid + ATRMultiplier * atr * 2;
double lotSize = CalculateLotSize(sl);
OpenTrade(OP_BUY, lotSize, sl, tp);
}
if (fastMA < slowMA && rsi < Overbought && rsi > 50 && !sellOpen) {
// Sell Signal
double sl = Ask + ATRMultiplier * atr;
double tp = Ask - ATRMultiplier * atr * 2;
double lotSize = CalculateLotSize(sl);
OpenTrade(OP_SELL, lotSize, sl, tp);
}
// Exit logic (Close trades when conditions reverse)
if (buyOpen && (fastMA < slowMA || rsi >= Overbought)) {
CloseTrade(OP_BUY);
}
if (sellOpen && (fastMA > slowMA || rsi <= Oversold)) {
CloseTrade(OP_SELL);
}
// Manage Trailing Stop
ManageTrailingStop();
}
//+------------------------------------------------------------------+
//| Calculate Lot Size Based on Risk |
//+------------------------------------------------------------------+
double CalculateLotSize(double stopLossPrice) {
double accountEquity = AccountEquity();
double riskAmount = (RiskPercent / 100) * accountEquity;
double stopLossDistance = MathAbs(Bid - stopLossPrice);
double lotSize = riskAmount / (stopLossDistance * MarketInfo(Symbol(), MODE_TICKVALUE));
// Adjust lot size to broker limits
lotSize = MathMax(lotSize, MinLotSize);
lotSize = NormalizeDouble(MathFloor(lotSize / LotStep) * LotStep, 2);
return lotSize;
}
//+------------------------------------------------------------------+
//| Open Trade Function |
//+------------------------------------------------------------------+
void OpenTrade(int tradeType, double lotSize, double stopLoss, double takeProfit) {
double price = tradeType == OP_BUY ? Ask : Bid;
int ticket = OrderSend(Symbol(), tradeType, lotSize, price, MaxSlippage, stopLoss, takeProfit, TradeComment, MAGIC_NUMBER, 0, Blue);
if (ticket < 0) {
int errorCode = GetLastError();
Print("Error opening trade: ", errorCode, ". Retrying...");
Sleep(1000); // Retry after 1 second
ticket = OrderSend(Symbol(), tradeType, lotSize, price, MaxSlippage, stopLoss, takeProfit, TradeComment, MAGIC_NUMBER, 0, Blue);
if (ticket < 0) {
Print("Failed to open trade after retry. Error: ", GetLastError());
}
} else {
Print("Trade opened: ", ticket);
}
}
//+------------------------------------------------------------------+
//| Close Trade Function |
//+------------------------------------------------------------------+
void CloseTrade(int tradeType) {
for (int i = OrdersTotal() - 1; i >= 0; i--) {
if (OrderSelect(i, SELECT_BY_POS, MODE_TRADES)) {
if (OrderSymbol() == Symbol() && OrderType() == tradeType && OrderMagicNumber() == MAGIC_NUMBER) {
int ticket = OrderClose(OrderTicket(), OrderLots(), tradeType == OP_BUY ? Bid : Ask, MaxSlippage, Red);
if (ticket < 0) {
Print("Error closing trade: ", GetLastError());
} else {
Print("Trade closed: ", ticket);
}
}
}
}
}
//+------------------------------------------------------------------+
//| Manage Trailing Stop Function |
//+------------------------------------------------------------------+
void ManageTrailingStop() {
for (int i = OrdersTotal() - 1; i >= 0; i--) {
if (OrderSelect(i, SELECT_BY_POS, MODE_TRADES)) {
if (OrderSymbol() == Symbol() && OrderMagicNumber() == MAGIC_NUMBER) {
double newStopLoss;
if (OrderType() == OP_BUY) {
newStopLoss = Bid - TrailingStop * Point;
if (newStopLoss > OrderStopLoss()) {
OrderModify(OrderTicket(), OrderOpenPrice(), newStopLoss, OrderTakeProfit(), 0, Blue);
}
} else if (OrderType() == OP_SELL) {
newStopLoss = Ask + TrailingStop * Point;
if (newStopLoss < OrderStopLoss()) {
OrderModify(OrderTicket(), OrderOpenPrice(), newStopLoss, OrderTakeProfit(), 0, Blue);
}
}
}
}
}
}
//+------------------------------------------------------------------+
//| Check if Trade Exists |
//+------------------------------------------------------------------+
bool IsTradeOpen(int tradeType) {
for (int i = OrdersTotal() - 1; i >= 0; i--) {
if (OrderSelect(i, SELECT_BY_POS, MODE_TRADES)) {
if (OrderSymbol() == Symbol() && OrderType() == tradeType && OrderMagicNumber() == MAGIC_NUMBER) {
return true;
}
}
}
return false;
}
反馈
1
等级
项目
188
57%
仲裁
10
80%
/
0%
逾期
0
空闲
发布者: 1 代码
2
等级
项目
301
28%
仲裁
33
24%
/
61%
逾期
9
3%
工作中
3
等级
项目
38
21%
仲裁
5
0%
/
60%
逾期
0
空闲
4
等级
项目
499
19%
仲裁
33
42%
/
30%
逾期
32
6%
已载入
5
等级
项目
20
10%
仲裁
4
50%
/
50%
逾期
5
25%
空闲
6
等级
项目
622
54%
仲裁
29
55%
/
24%
逾期
6
1%
已载入
7
等级
项目
8
13%
仲裁
3
0%
/
33%
逾期
2
25%
空闲
发布者: 1 代码
8
等级
项目
13
23%
仲裁
7
0%
/
71%
逾期
3
23%
工作中
9
等级
项目
105
60%
仲裁
0
逾期
0
空闲
10
等级
项目
6
17%
仲裁
0
逾期
3
50%
空闲
11
等级
项目
2
0%
仲裁
5
0%
/
80%
逾期
1
50%
空闲
12
等级
项目
134
66%
仲裁
36
25%
/
56%
逾期
22
16%
空闲
发布者: 10 代码
13
等级
项目
483
75%
仲裁
5
80%
/
0%
逾期
0
工作中
14
等级
项目
158
21%
仲裁
23
9%
/
78%
逾期
16
10%
工作中
15
等级
项目
620
33%
仲裁
36
39%
/
53%
逾期
11
2%
已载入
16
等级
项目
1
0%
仲裁
1
0%
/
100%
逾期
0
空闲
17
等级
项目
0
0%
仲裁
0
逾期
0
空闲
发布者: 1 代码
18
等级
项目
81
43%
仲裁
27
11%
/
70%
逾期
8
10%
空闲
19
等级
项目
0
0%
仲裁
0
逾期
0
工作中
相似订单
Make it work -Expert advisor
30+ USD
//+------------------------------------------------------------------+ //| EMA + Resistance Break & First Retest EA - ATR SL/TP - Risk 3% | //| Fully working MT4 EA | //+------------------------------------------------------------------+ #property strict //---- Inputs input double RiskPercent = 3.0; input int ATR_Period = 14; input double SL_ATR_Multiplier = 1.5; input double TP_ATR_Multiplier
SMC Trading Bot
50 - 100 USD
📌 Looking for MQL5 Developer – Institutional SMC EA Specification Hello everyone, I am looking for a highly experienced MQL5 developer to build a fully automated Expert Advisor (EA) based strictly on Smart Money Concepts (SMC) , designed to operate and pass prop firm accounts . 🔍 Core Strategy Requirements (SMC Only) The EA must be based on institutional Smart Money Concepts , including: ✅ Market Structure (BOS
Create simple EA
30 - 60 USD
Start BUY:- when i click start BUY button new panel should open which should contain bellow points:- Trigger Price Time frame Cross/Close RR ration Trailing Stop ratio Maximum Trade count Risk (percentage or cash) (Option to Increase risk when SL hit) Remove Trigger (True/False ) I will explain above point one by one here bellow •Trigger price :- here we enter price at which when market cross or
MT5 EA Developement
60+ USD
I’m a trader looking to develop a non-repainting indicator intended for integration with an EA. I identified a comparable indicator on the MQL5 Market, but it’s unclear whether its logic can be accessed or automated for algorithmic execution
Tradingview indicator
30+ USD
I want to check if this indicator is repainting or not Whick mean the results of back testing is legit or not if anyone can help me to review it kindly to well to contact me i will be happy to work and go on long term work with anyone thanks
Bot sympaFX
30+ USD
Stratégie : "Institutional Flow Scalper" La stratégie repose sur la confluence de la tendance structurelle et de la valeur moyenne pondérée . Actifs cibles : EURUSD, GBPUSD (Spread faible, forte liquidité). Sessions : Londres (09h00 - 12h00) et New York (14h30 - 17h30 GMT+1). Indicateurs : EMA 200 : Filtre de tendance long terme (M5). VWAP : Ancre du prix institutionnel. On achète sous le VWAP en tendance haussière
PrimeFlowEA — v1 Specification Objective: PrimeFlowEA v1 is designed to enforce disciplined, rule-based execution within a single daily trading session. The goal of v1 is correct behavior and execution discipline , not optimization or performance tuning. 1. Market & Time Platform: MetaTrader 5 (MQL5) Symbol(s): User-selectable (single symbol per chart) Execution timeframe: Configurable (default: M5 / M15)
Top manager
70 - 120 USD
A multi-symbol, rule-based trade management Expert Advisor designed to recover, neutralize, and scale out of DCA baskets using intelligent closing logic and full manual control through an on-chart dashboard. The EA continuously scans multiple symbols and monitors all open trades with a specific magic number. Based on trader-enabled rules (R1–R4) and Break-Even modes (BE1–BE3), it selectively closes trades when
Development of an MQL5 Expert Advisor (Reverse Engineering)
1000 - 2000 USD
Specifications – Development of an MQL5 Expert Advisor (Reverse Engineering) Project context: I have access to a real trading history consisting of more than 500 trades executed over a period of approximately 3 years. These trades have been exported into a CSV file containing all available information, including date, time, symbol, order type, entry price, and exit price. Important: I do not have access to the
1.Sinyal Perdagangan : Sinyal beli: garis MACD utama memotong garis sinyal ke atas (macd_current>signal_current && macd_previous<signal_previous). Sinyal jual: garis MACD utama memotong garis sinyal ke bawah (macd_current<signal_current && macd_previous>signal_previous). Gambar di bawah menunjukkan kasus beli dan jual. 2. Posisi ditutup pada sinyal yang berlawanan: Posisi beli ditutup pada sinyal jual, dan posisi
项目信息
预算
100+ USD