Specification
#include <Trade/Trade.mqh>
CTrade trade;
//+------------------------------------------------------------------+
//| Gold Auto Trader EA with Trailing Stop |
//+------------------------------------------------------------------+
#property strict
#include <Trade/Trade.mqh>
CTrade trade;
// إعدادات الدخول
input double BuyZoneLow = 3678.0;
input double BuyZoneHigh = 3680.0;
input double SellZoneLow = 3695.0;
input double SellZoneHigh = 3700.0;
// إعدادات الصفقة
input double LotSize = 0.10; // حجم العقد
input double StopLoss = 10; // وقف الخسارة (بالدولار)
input double TakeProfit = 20; // الهدف (بالدولار)
input double TrailingStop = 5; // وقف خسارة متحرك (بالدولار)
//+------------------------------------------------------------------+
void OnTick()
{
double price = SymbolInfoDouble(_Symbol, SYMBOL_BID);
// فتح صفقات جديدة إذا لا توجد صفقات مفتوحة
if(PositionsTotal() == 0)
{
// 🚀 شراء
if(price >= BuyZoneLow && price <= BuyZoneHigh)
{
double sl = price - StopLoss;
double tp = price + TakeProfit;
trade.Buy(LotSize, _Symbol, price, sl, tp, "Buy Gold");
}
// 📉 بيع
if(price >= SellZoneLow && price <= SellZoneHigh)
{
double sl = price + StopLoss;
double tp = price - TakeProfit;
trade.Sell(LotSize, _Symbol, price, sl, tp, "Sell Gold");
}
}
// تطبيق Trailing Stop على الصفقات المفتوحة
for(int i=0; i<PositionsTotal(); i++)
{
string symbol = PositionGetSymbol(i);
if(PositionSelect(symbol))
{
long type = PositionGetInteger(POSITION_TYPE);
double open = PositionGetDouble(POSITION_PRICE_OPEN);
double sl = PositionGetDouble(POSITION_SL);
double priceB = SymbolInfoDouble(symbol, SYMBOL_BID);
double priceA = SymbolInfoDouble(symbol, SYMBOL_ASK);
// للشراء
if(type == POSITION_TYPE_BUY)
{
double newSL = priceB - TrailingStop;
if(newSL > sl && priceB - open >= TrailingStop)
trade.PositionModify(symbol, newSL, PositionGetDouble(POSITION_TP));
}
// للبيع
if(type == POSITION_TYPE_SELL)
{
double newSL = priceA + TrailingStop;
if((sl == 0 || newSL < sl) && open - priceA >= TrailingStop)
trade.PositionModify(symbol, newSL, PositionGetDouble(POSITION_TP));
}
}
}
}
Responded
1
Rating
Projects
74
20%
Arbitration
12
17%
/
25%
Overdue
7
9%
Working
2
Rating
Projects
0
0%
Arbitration
0
Overdue
0
Free
3
Rating
Projects
2
0%
Arbitration
1
0%
/
0%
Overdue
0
Free
4
Rating
Projects
0
0%
Arbitration
0
Overdue
0
Working
5
Rating
Projects
6
17%
Arbitration
0
Overdue
2
33%
Working
6
Rating
Projects
0
0%
Arbitration
2
0%
/
0%
Overdue
0
Working
7
Rating
Projects
0
0%
Arbitration
0
Overdue
0
Free
8
Rating
Projects
18
39%
Arbitration
1
0%
/
100%
Overdue
3
17%
Working
9
Rating
Projects
0
0%
Arbitration
1
0%
/
0%
Overdue
0
Free
10
Rating
Projects
0
0%
Arbitration
0
Overdue
0
Free
11
Rating
Projects
0
0%
Arbitration
0
Overdue
0
Loaded
12
Rating
Projects
0
0%
Arbitration
0
Overdue
0
Free
Similar orders
Hello Developer I need a custom breakout + retest scoring system in TrendSpider . Breakout: valid if candle closes ≥ 0.4 × ATR20 above the line (lookback 8 bars, daily/weekly). Retest: valid within 20 bars if price low is within ±0.2 × ATR20 of the line → must trigger an alert. Scoring: add points for RVOL ≥ 1.3, SMA50 strong close, RSI 54–71, channel breakout, retest & hold, ATR expansion, undervaluation, SMA50
Hello! I'm looking to hire a developer to create a custom trading bot for MetaTrader 5 (MT5) that automates hedged trading across two separate MT5 accounts (e.g., one for a prop firm and one for a broker). The bot should open opposite positions simultaneously on both accounts, with customizable parameters for lot sizes, stop-loss (SL), and take-profit (TP). It needs to support both market orders and pending orders
Looking to develop an effective bot for Boom Index - effective and accurate bot Tight spreads, Broker is Deriv. It should be timely and accruate and timely. will test it live
I scalp XAU (gold) in 1 min chart. Into the chart I have placed 3 emas: 9, 20 and 50 and they follow the 5-min chart. When trading I have market order window in MT5 open and I´m ready to hit the button at anytime price action tells me. There are a major problem setting SL and TP: - I can only set fixed price in SL and TP. Price moves very quickly so I´m constantly behind. For example let say I want to buy gold at
Develop an Expert Advisor trading trend reversals. Reversal signals will be generated based on Price Action patterns. Trend will be determined based on ADX, Alligator and MACD, while the indicator selection should be available in the EA's input parameters
TradeCopier
30 - 40 USD
Hello! I'm looking to hire a developer to create a custom trading bot for MetaTrader 5 (MT5) that automates hedged trading across two separate MT5 accounts (e.g., one for a prop firm and one for a broker). The bot should open opposite positions simultaneously on both accounts, with customizable parameters for lot sizes, stop-loss (SL), and take-profit (TP). It needs to support both market orders and pending orders
Small modification in pinescript, adding inputs like starting time for counting indicator 1 cycle and end ime for counting indicator 1 cycle and create based on this indicator Simple EA. I want to backtest this strategy on historical data. My budget is 30 USD and I think it's very fair price
I need experience EA programmer to fix my existing one EA. Job Description for EA Bug Fixing (MetaTrader 5) Title: Fix Bugs in Existing MT5 Expert Advisor (Simple EMA Strategy) Platform: MetaTrader 5 (MQL5) Type: Bug fixing & optimization or fixing program
Here's a detailed description of three independent Expert Advisors (EAs), each based on a different strategy: EA 1: Trend Following Strategy Strategy Overview The EA will implement a trend following strategy, identifying trending markets and riding the trend. Key Features 1. *Trend Identification*: The EA will use technical indicators to identify trending markets, such as: - Moving Averages (MA) - Average
Tradingview to Ninjatrader developer
100+ USD
hello great developer I want to make sure the project is clear: Take alerts from TradingView. Read the details from each alert: Symbol Buy or Sell Entry price Take profit targets (T1, T2, T3) Stop loss Place the trade in NinjaTrader automatically using these details. After the trade is executed in NinjaTrader, send a confirmation back to TradingView. Test everything first on a demo account to make sure it works
Project information
Budget
30+ USD
VAT (19%):
5.7
USD
Total:
36
USD
For the developer
27
USD
Customer
Placed orders1
Arbitrage count0