Tarea técnica

//+------------------------------------------------------------------+
//| EA_VAULT_V5_1_Otsile_Classic.mq5 |
//| v5.11: CLASSIC VAULT EDITION - Smart Risk + License|
//| Author: Otsile Trading |
//| Icon: Bank Vault Guardian |
//+------------------------------------------------------------------+
#property strict
#property version "5.11"
#property description "EA VAULT V5.1 CLASSIC EDITION"
#property icon "\\Files\\EA_VAULT_V5_Logo.bmp" // <-- YOUR VAULT IMAGE

//================= LICENSE SYSTEM V1.0 =================
input group "=== LICENSE SETTINGS ==="
input string LicenseKey = "OTSILE-V5-2026-MASTER"; // Paste your key here
input int LicenseAccount = 0; // 0 = any account

string ValidKeys[] = {
   "OTSILE-V5-2026-MASTER", // Master Key - Never Expires
   "OTSILE-V5-2026-DEMO01", // Demo Key
   "OTSILE-V5-2026-CLASSIC01" // Classic Edition Key
};
datetime KeyExpiry[] = {
   D'2099.12.31',
   D'2026.06.30',
   D'2099.12.31'
};
bool LicenseOK = false;

bool CheckLicense()
{
   int keyIndex = -1;
   for(int i=0; i<ArraySize(ValidKeys); i++)
      if(LicenseKey == ValidKeys[i]){ keyIndex = i; break; }

   if(keyIndex == -1){ Alert("LICENSE ERROR: Invalid Key"); Comment("LICENSE ERROR: Invalid Key"); return false; }
   if(TimeCurrent() > KeyExpiry[keyIndex]){ Alert("LICENSE EXPIRED"); Comment("LICENSE ERROR: Expired"); return false; }
   if(LicenseAccount!= 0 && LicenseAccount!= AccountInfoInteger(ACCOUNT_LOGIN)){ Alert("WRONG ACCOUNT"); Comment("LICENSE ERROR: Wrong Account"); return false; }
   LicenseOK = true;
   Comment(EA_Name,"\nLICENSE: ACTIVE until ",TimeToString(KeyExpiry[keyIndex]));
   return true;
}
//================= END LICENSE SYSTEM =================

input group "=== VAULT SETTINGS ==="
input string EA_Name = "EA VAULT V5.1 CLASSIC - Otsile";
input string VaultMode = "VAULT SECURED"; // Branding

input group "=== GENERAL ==="
input bool Trade_EURUSD = true;
input bool Trade_XAUUSD = false;
input double RiskPercent = 1.0; // Smart Risk
input int MagicNumber = 29072025;

// TRADING HOURS SAST
input group "=== TRADING HOURS SAST ==="
input bool UseTradingHours = true;
input int StartHour = 10; input int StartMinute = 0;
input int StopHour = 19; input int StopMinute = 30;

// FRIDAY CLOSE
input group "=== FRIDAY VAULT CLOSE ==="
input bool UseFridayClose = true;
input int FridayCloseHour = 19; input int FridayCloseMin = 55;

// STRATEGY
input group "=== VAULT STRATEGY ==="
input bool UseFixedSLTP = true;
input int FixedSL_Pips = 250;
input int FixedTP_Pips = 500;
input int EMA_Fast = 50;
input int EMA_Slow = 200;
input int RSI_Period = 14;
input int RSI_BuyLevel = 55;
input int RSI_SellLevel = 45;

// V5.1 FEATURES
input group "=== VAULT PROTECTION ==="
input bool UseBreakeven = true; input int BE_Trigger_Pips = 250;
input bool UseTrailing = true; input int Trail_Start_Pips = 300; input int Trail_Step_Pips = 100;
input bool UseDailyMaxLoss = true; input double DailyMaxLossUSD = 50.0;
input bool UseEquityGuard = true; input double MaxDrawdownPercent = 3.0;

#include <Trade\Trade.mqh>
CTrade trade;
double DayStartBalance = 0;
double PeakBalance = 0;
datetime LastDay = 0;

// === TRADING HOURS ===
bool IsTradingTime()
{
   if(!UseTradingHours) return true;
   datetime now = TimeCurrent();
   MqlDateTime tm; TimeToStruct(now, tm);
   int current = tm.hour*60 + tm.min;
   int start = StartHour*60 + StartMinute;
   int stop = StopHour*60 + StopMinute;
   if(tm.day_of_week==0 || tm.day_of_week==6) return false;
   if(tm.day_of_week==5 && current>=FridayCloseHour*60) return false;
   return (current>=start && current<=stop);
}

// === SL TP CALC ===
double GetSL(string symbol){ return FixedSL_Pips * 10 * _Point; }
double GetTP(string symbol){ return FixedTP_Pips * 10 * _Point; }

// === SIGNALS ===
bool BuySignal(string symbol)
{
   double ema50 = iMA(symbol,PERIOD_CURRENT,EMA_Fast,0,MODE_EMA,PRICE_CLOSE,0);
   double ema200 = iMA(symbol,PERIOD_CURRENT,EMA_Slow,0,MODE_EMA,PRICE_CLOSE,0);
   double rsi = iRSI(symbol,PERIOD_CURRENT,RSI_Period,PRICE_CLOSE,0);
   double price = SymbolInfoDouble(symbol,SYMBOL_CLOSE);
   return (price > ema50 && ema50 > ema200 && rsi > RSI_BuyLevel);
}

bool SellSignal(string symbol)
{
   double ema50 = iMA(symbol,PERIOD_CURRENT,EMA_Fast,0,MODE_EMA,PRICE_CLOSE,0);
   double ema200 = iMA(symbol,PERIOD_CURRENT,EMA_Slow,0,MODE_EMA,PRICE_CLOSE,0);
   double rsi = iRSI(symbol,PERIOD_CURRENT,RSI_Period,PRICE_CLOSE,0);
   double price = SymbolInfoDouble(symbol,SYMBOL_CLOSE);
   return (price < ema50 && ema50 < ema200 && rsi < RSI_SellLevel);
}

int CountMyTrades(string symbol)
{
   int count=0;
   for(int i=0;i<PositionsTotal();i++)
      if(PositionGetTicket(i)>0 && PositionGetSymbol(i)==symbol && PositionGetInteger(POSITION_MAGIC)==MagicNumber)
         count++;
   return count;
}

// === DAILY RISK + EQUITY GUARD ===
void CheckDailyReset()
{
   datetime now = TimeCurrent(); MqlDateTime tm; TimeToStruct(now, tm);
   if(tm.day!= LastDay){ DayStartBalance = AccountInfoDouble(ACCOUNT_BALANCE); LastDay = tm.day; }
}

bool DailyLossHit()
{
   if(!UseDailyMaxLoss) return false;
   double loss = DayStartBalance - AccountInfoDouble(ACCOUNT_BALANCE);
   if(loss >= DailyMaxLossUSD){ Comment(EA_Name,"\nVAULT LOCKED: Daily Loss Hit"); return true; }
   return false;
}

void FridayCloseAll()
{
   datetime now = TimeCurrent(); MqlDateTime tm; TimeToStruct(now, tm);
   if(UseFridayClose && tm.day_of_week==5 && tm.hour==FridayCloseHour && tm.min>=FridayCloseMin)
      for(int i=PositionsTotal()-1; i>=0; i--)
         if(PositionGetInteger(POSITION_MAGIC) == MagicNumber)
            trade.PositionClose(PositionGetTicket(i));
}

bool EquityGuardHit()
{
   if(!UseEquityGuard) return false;
   double equity = AccountInfoDouble(ACCOUNT_EQUITY);
   if(equity > PeakBalance) PeakBalance = equity;
   double dd = PeakBalance>0? (PeakBalance - equity)/PeakBalance * 100.0 : 0;
   if(dd >= MaxDrawdownPercent)
   {
      for(int i=PositionsTotal()-1; i>=0; i--)
         if(PositionGetInteger(POSITION_MAGIC) == MagicNumber)
            trade.PositionClose(PositionGetTicket(i));
      Comment(EA_Name,"\nVAULT LOCKED: ",DoubleToString(dd,2),"% DD");
      return true;
   }
   return false;
}

// === SMART LOT SIZE ===
double CalculateLotSize(string symbol, double sl_price_dist)
{
   double riskUSD = AccountInfoDouble(ACCOUNT_BALANCE) * RiskPercent / 100.0;
   double tickValue = SymbolInfoDouble(symbol,SYMBOL_TRADE_TICK_VALUE);
   double tickSize = SymbolInfoDouble(symbol,SYMBOL_TRADE_TICK_SIZE);
   double sl_points = sl_price_dist / tickSize;
   double lot = riskUSD / (sl_points * tickValue);
   lot = MathMax(SymbolInfoDouble(symbol,SYMBOL_VOLUME_MIN), MathMin(lot, SymbolInfoDouble(symbol,SYMBOL_VOLUME_MAX)));
   return NormalizeDouble(lot,2);
}

// === BE + TRAIL ===
void ManageTrades(string sym)
{
   for(int i=0; i<PositionsTotal(); i++)
   {
      ulong ticket = PositionGetTicket(i);
      if(ticket<0 || PositionGetString(POSITION_SYMBOL)!= sym || PositionGetInteger(POSITION_MAGIC)!= MagicNumber) continue;
      double openPrice = PositionGetDouble(POSITION_PRICE_OPEN);
      double currentPrice = PositionGetDouble(POSITION_PRICE_CURRENT);
      double sl = PositionGetDouble(POSITION_SL);
      double profitPoints = PositionGetInteger(POSITION_TYPE)==POSITION_TYPE_BUY?
                           (currentPrice - openPrice)/_Point : (openPrice - currentPrice)/_Point;

      if(UseBreakeven && profitPoints >= BE_Trigger_Pips && MathAbs(sl - openPrice) > 10*_Point)
         trade.PositionModify(ticket, openPrice, PositionGetDouble(POSITION_TP));

      if(UseTrailing && profitPoints >= Trail_Start_Pips)
      {
         double newSL = PositionGetInteger(POSITION_TYPE)==POSITION_TYPE_BUY?
                        currentPrice - Trail_Step_Pips*_Point : currentPrice + Trail_Step_Pips*_Point;
         if((PositionGetInteger(POSITION_TYPE)==POSITION_TYPE_BUY && newSL > sl + Trail_Step_Pips*_Point) ||
            (PositionGetInteger(POSITION_TYPE)==POSITION_TYPE_SELL && newSL < sl - Trail_Step_Pips*_Point))
            trade.PositionModify(ticket, newSL, PositionGetDouble(POSITION_TP));
      }
   }
}

// === ENTRY ===
void CheckAndTrade(string symbol)
{
   if(CountMyTrades(symbol) > 0) return;
   double sl_dist = GetSL(symbol);
   double tp_dist = GetTP(symbol);
   double lot = CalculateLotSize(symbol, sl_dist);

   if(BuySignal(symbol))
   {
      double price = SymbolInfoDouble(symbol,SYMBOL_ASK);
      trade.SetExpertMagicNumber(MagicNumber);
      trade.Buy(lot,symbol,price,price-sl_dist,price+tp_dist,EA_Name);
   }
   if(SellSignal(symbol))
   {
      double price = SymbolInfoDouble(symbol,SYMBOL_BID);
      trade.SetExpertMagicNumber(MagicNumber);
      trade.Sell(lot,symbol,price,price+sl_dist,price-tp_dist,EA_Name);
   }
}

// === INIT + MAIN WITH VAULT BRANDING ===
int OnInit()
{
   if(!CheckLicense()) return(INIT_FAILED);
   CheckDailyReset();
   PeakBalance = AccountInfoDouble(ACCOUNT_BALANCE);
   Print(EA_Name, " VAULT SECURED. License OK.");
   return(INIT_SUCCEEDED);
}

void OnTick()
{
   if(!LicenseOK) if(!CheckLicense()) return;

   CheckDailyReset();
   if(EquityGuardHit() || DailyLossHit()) return;
   FridayCloseAll();
   if(!IsTradingTime())
   {
      Comment(EA_Name,"\nVAULT STATUS: LOCKED",
              "\nOutside 10:00-19:30 SAST");
      return;
   }

   if(Trade_EURUSD){ ManageTrades("EURUSD"); CheckAndTrade("EURUSD"); }
   if(Trade_XAUUSD){ ManageTrades("XAUUSD"); CheckAndTrade("XAUUSD"); }

   double dayProfit = AccountInfoDouble(ACCOUNT_BALANCE) - DayStartBalance;
   Comment(EA_Name,"\nVAULT STATUS: ",VaultMode,
           "\nTime: ",TimeToString(TimeCurrent(),TIME_MINUTES)," SAST",
           "\nToday P/L: $",DoubleToString(dayProfit,2),
           "\nRisk: ",RiskPercent,"%");
}
//+------------------------------------------------------------------+

Han respondido

1
Desarrollador 1
Evaluación
(17)
Proyectos
21
19%
Arbitraje
5
40% / 40%
Caducado
0
Libre
2
Desarrollador 2
Evaluación
(3)
Proyectos
9
67%
Arbitraje
0
Caducado
0
Trabaja
3
Desarrollador 3
Evaluación
(3)
Proyectos
4
0%
Arbitraje
1
100% / 0%
Caducado
1
25%
Libre
4
Desarrollador 4
Evaluación
(1)
Proyectos
1
0%
Arbitraje
0
Caducado
1
100%
Libre
5
Desarrollador 5
Evaluación
(1)
Proyectos
1
0%
Arbitraje
1
0% / 100%
Caducado
0
Trabaja
6
Desarrollador 6
Evaluación
(1)
Proyectos
1
0%
Arbitraje
0
Caducado
0
Libre
Ha publicado: 1 ejemplo
7
Desarrollador 7
Evaluación
(28)
Proyectos
34
35%
Arbitraje
0
Caducado
2
6%
Libre
8
Desarrollador 8
Evaluación
(551)
Proyectos
839
61%
Arbitraje
33
27% / 45%
Caducado
24
3%
Libre
Ha publicado: 1 ejemplo
9
Desarrollador 9
Evaluación
(8)
Proyectos
8
0%
Arbitraje
2
50% / 0%
Caducado
1
13%
Trabaja
10
Desarrollador 10
Evaluación
(6)
Proyectos
8
38%
Arbitraje
0
Caducado
1
13%
Trabaja
Ha publicado: 1 ejemplo
11
Desarrollador 11
Evaluación
Proyectos
1
0%
Arbitraje
0
Caducado
0
Libre
12
Desarrollador 12
Evaluación
(2)
Proyectos
2
0%
Arbitraje
1
0% / 0%
Caducado
0
Libre
13
Desarrollador 13
Evaluación
Proyectos
0
0%
Arbitraje
0
Caducado
0
Libre
14
Desarrollador 14
Evaluación
Proyectos
0
0%
Arbitraje
0
Caducado
0
Libre
15
Desarrollador 15
Evaluación
(3)
Proyectos
1
0%
Arbitraje
5
0% / 100%
Caducado
0
Libre
16
Desarrollador 16
Evaluación
(5)
Proyectos
7
29%
Arbitraje
0
Caducado
1
14%
Trabaja
17
Desarrollador 17
Evaluación
(366)
Proyectos
449
55%
Arbitraje
23
57% / 17%
Caducado
30
7%
Trabaja
18
Desarrollador 18
Evaluación
(396)
Proyectos
511
23%
Arbitraje
60
57% / 25%
Caducado
60
12%
Trabaja
19
Desarrollador 19
Evaluación
Proyectos
1
0%
Arbitraje
0
Caducado
0
Libre
Ha publicado: 6 ejemplos
20
Desarrollador 20
Evaluación
(1)
Proyectos
1
0%
Arbitraje
0
Caducado
0
Libre
21
Desarrollador 21
Evaluación
(4)
Proyectos
8
0%
Arbitraje
3
33% / 67%
Caducado
4
50%
Libre
22
Desarrollador 22
Evaluación
Proyectos
0
0%
Arbitraje
0
Caducado
0
Libre
23
Desarrollador 23
Evaluación
(134)
Proyectos
174
40%
Arbitraje
10
40% / 10%
Caducado
30
17%
Libre
24
Desarrollador 24
Evaluación
(64)
Proyectos
144
46%
Arbitraje
20
40% / 20%
Caducado
32
22%
Trabaja
25
Desarrollador 25
Evaluación
Proyectos
0
0%
Arbitraje
0
Caducado
0
Libre
Solicitudes similares
I am looking for a professional MT5 EA developer to build a high-performance trading bot specifically for XAUUSD (Gold). My target is approximately 200% return within 3 months, while keeping the drawdown and risk as controlled as reasonably possible. Requirements: MT5 Expert Advisor (EA) XAUUSD only Fully automated trading Clear risk management Stop Loss and Take Profit on trades No martingale or grid strategy unless
Hello, I’m looking for an experienced MT5 developer to build a professional Expert Advisor (EA) for trading Gold (XAUUSD). My requirements: Platform: MT5 Instrument: XAUUSD (Gold) Fully automatic trading Both BUY and SELL trades Adjustable lot size Stop Loss and Take Profit Trailing Stop / Break Even Daily maximum loss limit Maximum drawdown protection Maximum number of open trades Trading hours/session filter Spread
B6 EA 30 - 50 USD
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
PROJECT OVERVIEW I need an experienced MQL5 developer to build a production-grade Expert Advisor for XAUUSD (Gold) on MT5, intended for continuous, unattended live operation. This is a trend-confirmed grid recovery system. Execution speed and reliability are the top priorities — every recovery level must be a real pending order resting on the broker's server, not something the EA monitors and reacts to on ticks. No
1. PROJECT OVERVIEW Development of a custom automated and manual trading bot for NinjaTrader 8, primarily designed for Nasdaq Futures (NQ/MNQ). The bot will contain the original trading strategy, configurable risk management, automatic and manual operating modes, alerts, profit/loss management, partial profit taking, Break Even, backtesting functionality, and the additional configurable contract-averaging system
Hello, I have a custom indicator with a specific line. Logic I want: 1. When a candle closes and crosses the indicator line (I will tell you the buffer number of this line), start counting. 2. After the cross, wait for 3 consecutive candles with the same color / same direction. 3. If the 3 candles are bullish, open a BUY trade on the next candle open. 4. If the 3 candles are bearish, open a SELL trade on the
Ich möchte einen professionellen Expert Advisor (EA) für MetaTrader 5 entwickeln lassen, der sich funktional am ThunderGold Scalper orientiert. Instrument: XAUUSD / GOLD Zeitrahmen: M15 Plattform: MetaTrader 5 / MQL5 Der EA soll eine eigene, nachprogrammierte Strategie verwenden und keine geschützten Quellcodes oder proprietären Dateien des Originalprodukts kopieren. Gewünschte Funktionen: automatischer Handel auf
I need a fully automated Expert Advisor (EA) written in MQL5 for MetaTrader 5. The EA must work directly inside MT5 and must NOT require TradingView, PineConnector, webhooks, or another external connector to place trades. Trading Instrument Primary symbol: XAGUSD (Silver) My broker may display the symbol as XAGUSD-ECN, so the EA should work with the broker’s available XAGUSD symbol. Main entry timeframe: 5-minute
RECHERCHE DÉVELOPPEUR MQL5 — PARTENARIAT 50/50 Objectif : développer un EA de trading automatisé en 11 jours maximum pour participer à plusieurs concours de trading démo. Je recherche un développeur MQL5 expérimenté, capable de développer, tester et optimiser un EA proprement, avec une vraie maîtrise de la gestion du risque. CONCOURS VISÉS 🥇 XM — Weekly Demo Contest - Concours récurrent - Prize pool annoncé : 25 000
GoldTrade EA 89+ USD
//+------------------------------------------------------------------+ //| XAUUSD Wolfe + SMC Quick Profit EA | //| MT5 / MQL5 | //+------------------------------------------------------------------+ #property strict #include <Trade/Trade.mqh> CTrade trade; //================================================================== // INPUTS //================================================================== //--- General

Información sobre el proyecto

Presupuesto
30 - 200 USD
Plazo límite de ejecución
de 1 a 10 día(s)

Cliente

Encargos realizados1
Número de arbitrajes0