AI GOLD SCALPER

MQL5 EA

명시


```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

응답함

1
개발자 1
등급
(16)
프로젝트
20
15%
중재
5
40% / 40%
기한 초과
0
무료
2
개발자 2
등급
(5)
프로젝트
5
0%
중재
5
0% / 40%
기한 초과
0
무료
3
개발자 3
등급
프로젝트
0
0%
중재
0
기한 초과
0
무료
4
개발자 4
등급
프로젝트
0
0%
중재
0
기한 초과
0
무료
5
개발자 5
등급
프로젝트
0
0%
중재
0
기한 초과
0
무료
6
개발자 6
등급
프로젝트
0
0%
중재
0
기한 초과
0
무료
7
개발자 7
등급
프로젝트
0
0%
중재
0
기한 초과
0
무료
8
개발자 8
등급
프로젝트
0
0%
중재
0
기한 초과
0
무료
9
개발자 9
등급
(549)
프로젝트
836
61%
중재
33
27% / 45%
기한 초과
24
3%
작업중
게재됨: 1 코드
10
개발자 10
등급
(258)
프로젝트
267
30%
중재
0
기한 초과
3
1%
작업중
게재됨: 2 코드
11
개발자 11
등급
프로젝트
0
0%
중재
0
기한 초과
0
무료
12
개발자 12
등급
프로젝트
0
0%
중재
0
기한 초과
0
무료
13
개발자 13
등급
프로젝트
0
0%
중재
0
기한 초과
0
무료
14
개발자 14
등급
프로젝트
0
0%
중재
0
기한 초과
0
무료
15
개발자 15
등급
(318)
프로젝트
565
35%
중재
81
31% / 44%
기한 초과
204
36%
무료
16
개발자 16
등급
(645)
프로젝트
872
48%
중재
29
38% / 17%
기한 초과
63
7%
무료
17
개발자 17
등급
(499)
프로젝트
744
56%
중재
48
31% / 31%
기한 초과
120
16%
무료
게재됨: 1 코드
18
개발자 18
등급
(365)
프로젝트
442
55%
중재
22
50% / 14%
기한 초과
30
7%
로드됨
19
개발자 19
등급
프로젝트
0
0%
중재
0
기한 초과
0
무료
20
개발자 20
등급
프로젝트
0
0%
중재
0
기한 초과
0
무료
비슷한 주문
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
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
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
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
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
Привіт. Шукаю когось, хто б застосував мій код як бота . Я торгую індексом Aus_200 SFE (не XJO). Бот базується на MACD входу/виходу, RSI, стохастиці та vwap. Як тільки роботу приймуть, мені потрібно внести кілька коректив; однак, нічого суттєвого. Дякую

프로젝트 정보

예산
30 - 50 USD
기한
에서 10  66 일

고객

넣은 주문1
중재 수0