Şartname

//+------------------------------------------------------------------+
//| 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,"%");
}
//+------------------------------------------------------------------+

Yanıtlandı

1
Geliştirici 1
Derecelendirme
(17)
Projeler
21
19%
Arabuluculuk
5
40% / 40%
Süresi dolmuş
0
Serbest
2
Geliştirici 2
Derecelendirme
(3)
Projeler
9
67%
Arabuluculuk
0
Süresi dolmuş
0
Çalışıyor
3
Geliştirici 3
Derecelendirme
(3)
Projeler
4
0%
Arabuluculuk
1
100% / 0%
Süresi dolmuş
1
25%
Serbest
4
Geliştirici 4
Derecelendirme
(1)
Projeler
1
0%
Arabuluculuk
0
Süresi dolmuş
1
100%
Serbest
5
Geliştirici 5
Derecelendirme
(1)
Projeler
1
0%
Arabuluculuk
1
0% / 100%
Süresi dolmuş
0
Çalışıyor
6
Geliştirici 6
Derecelendirme
(1)
Projeler
1
0%
Arabuluculuk
0
Süresi dolmuş
0
Serbest
Yayınlandı: 1 kod
7
Geliştirici 7
Derecelendirme
(28)
Projeler
34
35%
Arabuluculuk
0
Süresi dolmuş
2
6%
Serbest
8
Geliştirici 8
Derecelendirme
(551)
Projeler
839
61%
Arabuluculuk
33
27% / 45%
Süresi dolmuş
24
3%
Serbest
Yayınlandı: 1 kod
9
Geliştirici 9
Derecelendirme
(8)
Projeler
8
0%
Arabuluculuk
2
50% / 0%
Süresi dolmuş
1
13%
Çalışıyor
10
Geliştirici 10
Derecelendirme
(6)
Projeler
8
38%
Arabuluculuk
0
Süresi dolmuş
1
13%
Çalışıyor
Yayınlandı: 1 kod
11
Geliştirici 11
Derecelendirme
Projeler
1
0%
Arabuluculuk
0
Süresi dolmuş
0
Serbest
12
Geliştirici 12
Derecelendirme
(2)
Projeler
2
0%
Arabuluculuk
1
0% / 0%
Süresi dolmuş
0
Serbest
13
Geliştirici 13
Derecelendirme
Projeler
0
0%
Arabuluculuk
0
Süresi dolmuş
0
Serbest
14
Geliştirici 14
Derecelendirme
Projeler
0
0%
Arabuluculuk
0
Süresi dolmuş
0
Serbest
15
Geliştirici 15
Derecelendirme
(3)
Projeler
1
0%
Arabuluculuk
5
0% / 100%
Süresi dolmuş
0
Serbest
16
Geliştirici 16
Derecelendirme
(5)
Projeler
7
29%
Arabuluculuk
0
Süresi dolmuş
1
14%
Çalışıyor
17
Geliştirici 17
Derecelendirme
(366)
Projeler
449
55%
Arabuluculuk
23
57% / 17%
Süresi dolmuş
30
7%
Çalışıyor
18
Geliştirici 18
Derecelendirme
(396)
Projeler
511
23%
Arabuluculuk
60
57% / 25%
Süresi dolmuş
60
12%
Çalışıyor
19
Geliştirici 19
Derecelendirme
Projeler
1
0%
Arabuluculuk
0
Süresi dolmuş
0
Serbest
Yayınlandı: 6 kod
20
Geliştirici 20
Derecelendirme
(1)
Projeler
1
0%
Arabuluculuk
0
Süresi dolmuş
0
Serbest
21
Geliştirici 21
Derecelendirme
(4)
Projeler
8
0%
Arabuluculuk
3
33% / 67%
Süresi dolmuş
4
50%
Serbest
22
Geliştirici 22
Derecelendirme
Projeler
0
0%
Arabuluculuk
0
Süresi dolmuş
0
Serbest
23
Geliştirici 23
Derecelendirme
(134)
Projeler
174
40%
Arabuluculuk
10
40% / 10%
Süresi dolmuş
30
17%
Serbest
24
Geliştirici 24
Derecelendirme
(64)
Projeler
144
46%
Arabuluculuk
20
40% / 20%
Süresi dolmuş
32
22%
Çalışıyor
25
Geliştirici 25
Derecelendirme
Projeler
0
0%
Arabuluculuk
0
Süresi dolmuş
0
Serbest
Benzer siparişler
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

Proje bilgisi

Bütçe
30 - 200 USD
Son teslim tarihi
from 1 to 10 gün

Müşteri

Verilmiş siparişler1
Arabuluculuk sayısı0