Şartname
```mql4
//+------------------------------------------------------------------+
//| XAUUSD_M1_150ZAR_BE_Trail.mq4 |
//| For Exness/Grand Capital Standard Cent Account |
//| 150 ZAR Account - M1 Scalper with BE + Trailing |
//+------------------------------------------------------------------+
#property strict
#property link "MetaAI EA"
#property version "1.00"
extern double FixedLot = 0.01; // Cent: 0.01 = 0.0001 real lot
extern int EMA_Fast = 9;
extern int EMA_Slow = 21;
extern int RSI_Period = 14;
extern double SL_Pips = 200; // 20$
extern double TP_Pips = 300; // 30$
extern double BE_At_Pips = 100; // Move to BE at +10$
extern double Trail_Start_Pips = 100; // Start trailing at +10$
extern double Trail_Distance_Pips = 50; // Trail 5$ behind
extern int MaxSpreadPoints = 600; // 6$ max spread
extern int Slippage = 150; // 15$
extern int MagicNumber = 33333;
extern int TradeCooldownSeconds = 600; // 10 min
extern double DailyLossLimitCents = 300; // -3.00$ = 55 ZAR
datetime lastTradeTime = 0;
double dailyLoss = 0;
int lastDay = -1;
string GoldSymbol = "";
int OnInit()
{
if(SymbolInfoExists("XAUUSD")) GoldSymbol = "XAUUSD";
else if(SymbolInfoExists("XAUUSDs")) GoldSymbol = "XAUUSDs"; // Exness Cent
else if(SymbolInfoExists("XAUUSD.m")) GoldSymbol = "XAUUSD.m"; // Grand
else { Alert("XAUUSD symbol not found. Check Market Watch"); return(INIT_FAILED); }
Print("EA Started on: ", GoldSymbol);
return(INIT_SUCCEEDED);
}
double PipsToPrice(double pips){ return pips * _Point * 100; }
void ManageTrade(int ticket)
{
if(!OrderSelect(ticket, SELECT_BY_TICKET)) return;
double openPrice = OrderOpenPrice();
double currentSL = OrderStopLoss();
if(OrderType() == OP_BUY)
{
double bid = MarketInfo(GoldSymbol, MODE_BID);
double profitPips = (bid - openPrice) / (_Point * 100);
if(profitPips >= BE_At_Pips && currentSL < openPrice)
{
double newSL = openPrice + 10 * _Point;
OrderModify(ticket, openPrice, newSL, OrderTakeProfit(), 0, clrBlue);
Print("BE moved to entry for ticket ", ticket);
}
if(profitPips >= Trail_Start_Pips)
{
double newSL = bid - PipsToPrice(Trail_Distance_Pips);
if(newSL > currentSL && newSL > openPrice)
OrderModify(ticket, openPrice, newSL, OrderTakeProfit(), 0, clrBlue);
}
}
if(OrderType() == OP_SELL)
{
double ask = MarketInfo(GoldSymbol, MODE_ASK);
double profitPips = (openPrice - ask) / (_Point * 100);
if(profitPips >= BE_At_Pips && (currentSL > openPrice || currentSL == 0))
{
double newSL = openPrice - 10 * _Point;
OrderModify(ticket, openPrice, newSL, OrderTakeProfit(), 0, clrRed);
Print("BE moved to entry for ticket ", ticket);
}
if(profitPips >= Trail_Start_Pips)
{
double newSL = ask + PipsToPrice(Trail_Distance_Pips);
if((currentSL == 0 || newSL < currentSL) && newSL < openPrice)
OrderModify(ticket, openPrice, newSL, OrderTakeProfit(), 0, clrRed);
}
}
}
bool HasOpenTrade()
{
for(int i=0; i<OrdersTotal(); i++)
if(OrderSelect(i, SELECT_BY_POS) && OrderMagicNumber() == MagicNumber && OrderSymbol() == GoldSymbol)
return true;
return false;
}
void CheckDailyLoss()
{
int today = TimeDay(TimeCurrent());
if(today != lastDay){ dailyLoss = 0; lastDay = today; }
for(int i=0; i<OrdersHistoryTotal(); i++)
if(OrderSelect(i, SELECT_BY_POS, MODE_HISTORY) && OrderMagicNumber() == MagicNumber && TimeDay(OrderCloseTime()) == lastDay)
dailyLoss += OrderProfit();
}
void OnTick()
{
CheckDailyLoss();
if(dailyLoss <= -DailyLossLimitCents) { Comment("Daily limit: ", DoubleToString(dailyLoss,2), " cents"); return; }
for(int i=0; i<OrdersTotal(); i++)
if(OrderSelect(i, SELECT_BY_POS) && OrderMagicNumber() == MagicNumber && OrderSymbol() == GoldSymbol)
ManageTrade(OrderTicket());
if(TimeCurrent() - lastTradeTime < TradeCooldownSeconds) return;
double spread = (MarketInfo(GoldSymbol, MODE_ASK) - MarketInfo(GoldSymbol, MODE_BID)) / _Point;
if(spread > MaxSpreadPoints) return;
int gmtHour = TimeHour(TimeGMT());
if(gmtHour < 13 || gmtHour > 19) return;
double emaFast = iMA(GoldSymbol, PERIOD_M1, EMA_Fast, 0, MODE_EMA, PRICE_CLOSE, 0);
double emaSlow = iMA(GoldSymbol, PERIOD_M1, EMA_Slow, 0, MODE_EMA, PRICE_CLOSE, 0);
double rsi = iRSI(GoldSymbol, PERIOD_M1, RSI_Period, PRICE_CLOSE, 0);
double atr = iATR(GoldSymbol, PERIOD_M1, 14, 0);
if(HasOpenTrade()) return;
if(atr < 150 * _Point) return;
double sl, tp;
double ask = MarketInfo(GoldSymbol, MODE_ASK);
double bid = MarketInfo(GoldSymbol, MODE_BID);
if(emaFast > emaSlow && rsi > 65)
{
sl = ask - PipsToPrice(SL_Pips);
tp = ask + PipsToPrice(TP_Pips);
if(OrderSend(GoldSymbol, OP_BUY, FixedLot, ask, Slippage, sl, tp, "XAU 150", MagicNumber, 0, clrGold))
lastTradeTime = TimeCurrent();
}
if(emaFast < emaSlow && rsi < 35)
{
sl = bid + PipsToPrice(SL_Pips);
tp = bid - PipsToPrice(TP_Pips);
if(OrderSend(GoldSymbol, OP_SELL, FixedLot, bid, Slippage, sl, tp, "XAU 150", MagicNumber, 0, clrOrange))
lastTradeTime = TimeCurrent();
}
}
```
### *2. How to install in MT4*
1. MT4 > `File` > `Open Data Folder`
2. Go to `MQL4` > `Experts`
3. Paste the `.mq4` file there
4. Restart MT4 or right click `Experts` > `Refresh`
5. Compile: Open MetaEditor > Press `F7`. Should say "0 errors"
6. Drag EA to `XAUUSDs` chart on `M1` timeframe
7. Enable `AutoTrading` button. Check "Allow Algo Trading"
### *3. Settings to check on chart*
| Input | Value for 150 ZAR Cent |
| --- | --- |
| FixedLot | 0.01 |
| DailyLossLimitCents | 300 |
| Trading Hours | 13:00 - 19:00 GMT only |
### *4. 3 Rules before going live*
1. *Demo first*: Run 5 days on demo. Check "Journal" tab for errors
2. *VPS*: Get $5/mo London VPS. From Makhado your ping will be 250ms+. You’ll get killed by slippage
3. *News*: Turn off EA 30min before NFP/CPI/FOMC
Yanıtlandı
1
Derecelendirme
Projeler
20
15%
Arabuluculuk
5
40%
/
40%
Süresi dolmuş
0
Serbest
2
Derecelendirme
Projeler
5
0%
Arabuluculuk
5
0%
/
40%
Süresi dolmuş
0
Serbest
3
Derecelendirme
Projeler
0
0%
Arabuluculuk
0
Süresi dolmuş
0
Serbest
4
Derecelendirme
Projeler
0
0%
Arabuluculuk
0
Süresi dolmuş
0
Serbest
5
Derecelendirme
Projeler
0
0%
Arabuluculuk
0
Süresi dolmuş
0
Serbest
6
Derecelendirme
Projeler
0
0%
Arabuluculuk
0
Süresi dolmuş
0
Serbest
7
Derecelendirme
Projeler
0
0%
Arabuluculuk
0
Süresi dolmuş
0
Serbest
8
Derecelendirme
Projeler
0
0%
Arabuluculuk
0
Süresi dolmuş
0
Serbest
9
Derecelendirme
Projeler
836
61%
Arabuluculuk
33
27%
/
45%
Süresi dolmuş
24
3%
Çalışıyor
Yayınlandı: 1 kod
10
Derecelendirme
Projeler
267
30%
Arabuluculuk
0
Süresi dolmuş
3
1%
Çalışıyor
Yayınlandı: 2 kod
11
Derecelendirme
Projeler
0
0%
Arabuluculuk
0
Süresi dolmuş
0
Serbest
12
Derecelendirme
Projeler
0
0%
Arabuluculuk
0
Süresi dolmuş
0
Serbest
13
Derecelendirme
Projeler
0
0%
Arabuluculuk
0
Süresi dolmuş
0
Serbest
14
Derecelendirme
Projeler
0
0%
Arabuluculuk
0
Süresi dolmuş
0
Serbest
15
Derecelendirme
Projeler
565
35%
Arabuluculuk
81
31%
/
44%
Süresi dolmuş
204
36%
Serbest
16
Derecelendirme
Projeler
872
48%
Arabuluculuk
29
38%
/
17%
Süresi dolmuş
63
7%
Serbest
17
Derecelendirme
Projeler
744
56%
Arabuluculuk
48
31%
/
31%
Süresi dolmuş
120
16%
Serbest
Yayınlandı: 1 kod
18
Derecelendirme
Projeler
442
55%
Arabuluculuk
22
50%
/
14%
Süresi dolmuş
30
7%
Yüklendi
19
Derecelendirme
Projeler
0
0%
Arabuluculuk
0
Süresi dolmuş
0
Serbest
20
Derecelendirme
Projeler
0
0%
Arabuluculuk
0
Süresi dolmuş
0
Serbest
Benzer siparişler
Hi MQL5 Community, With over 10 years of live market experience as a Quantitative & Trading System Developer, I specialize in building robust, highly scalable Expert Advisors (EAs), custom indicators, and automated architectures. I’ve recently put together a comprehensive showcase demonstrating my flagship Modular Multi-Engine Architecture , designed to bring institutional-grade logic and real-time telemetry into
I need a developer that can make my trading strategies into a working perfect EA Robot working on Mt5. Candlestick pattern confirmation through PDH, PDL, PWH, PWL, Liquidities, HTF OB
Xau trading bot with 99.9% profit
2000+ USD
I need a trading bot specially for XAU, high profit gain. Requirements bot analyzes the market places trades closes with 2 to 3 profit per trades daily profit should be 50 to 100 dollars
EA Needed for a Professional Forex Fund Management Firm
500 - 2000 USD
We are looking for an experienced MQL5 developer to provide a stable, consistently profitable Forex Expert Advisor (EA) capable of generating 10–15% average monthly returns while maintaining the lowest possible drawdown . Our Requirements The EA must have a proven track record of consistent performance. A long-term trading history (live or verified) will be considered a significant advantage. Before final selection
I am looking for a professional MQL5/MT5 Expert Advisor developer to build a fully automated trading bot based on my custom strategy. Requirements: Strong experience in MQL5 (MetaTrader 5) Previous experience developing Forex/Gold Expert Advisors Ability to convert a trading strategy into a fully automated EA Clean, well-structured, and optimized code Good communication and willingness to provide updates during
Forex Growth
60 - 100 USD
Customer Information Name: John Smith Email: john.smith@example.com Company: ABC Trading Ltd. Platform MetaTrader 5 (MT5) Market Forex Trading Instruments EURUSD GBPUSD XAUUSD Trading Strategy The robot should trade based on a trend-following strategy: Buy: When the 50 EMA crosses above the 200 EMA and RSI is above 55. Sell: When the 50 EMA crosses below the 200 EMA and RSI is below 45. Close trades when Take Profit
I am going to create EA based on orderflow
500 - 5000 USD
Only programmers with experience with orderflow please, it's not the easiest project, I don't want to have arbitration etc. I am not expert in orderflow yet, if you have suggestion about strategy it would be very nice. Source of code required, I am searching a programmer for a longer co-operation
Please create an simple EA in mql5 based on RSI indicator with e-mail, sounds and push notification alerts, of course can't be any bugs, errors, but I think it's obvious. I am searching a programmer for longer co-operation. Thank you for your attention, Have a nice day
Looking for an already made profitable EA
100 - 6000 USD
Hi, I am looking for an already made profitable EA. It can be an indicator but then it must be possible to make an EA from the indicator. Will need to test before payment (this can be in demo or limited time test). I will pay up to $6000. Do not apply if you want an upfront payment. I need to test for a few times first. Mostly only pips matters. I look much the risk safety, money management, risk reward, and overall
Macd Rsi stochastic vwap Bot. I have code.
150 - 300 USD
Привіт. Шукаю когось, хто б застосував мій код як бота . Я торгую індексом Aus_200 SFE (не XJO). Бот базується на MACD входу/виходу, RSI, стохастиці та vwap. Як тільки роботу приймуть, мені потрібно внести кілька коректив; однак, нічого суттєвого. Дякую
Proje bilgisi
Bütçe
30 - 50 USD
Son teslim tarihi
from 10 to 66 gün
Müşteri
Verilmiş siparişler1
Arabuluculuk sayısı0