TebotechSignals EA MQL5 Source Code (VIP)

TL;DR:
- Full MQL5 source code for the TebotechSignals Auto-Execution EA
- Available for VIP subscribers ($10/mo)
- Includes: API polling, risk-based lot sizing, order execution, breakeven, partial close, session filters, spread protection

Input Parameters

mql5

input string ApiUrl = "https://tebotechsignals.com/api/signals/active";

input string ApiKey = "";

input double RiskPercent = 1.0;

input int MaxPositions = 5;

input int MaxSpreadPoints = 30;

input bool TradeLondon = true;

input bool TradeNewYork = true;

input bool TradeAsian = false;

input bool PartialCloseTP1 = true;

input bool MoveToBE = true;

input int PollIntervalSec = 10;

input int MagicNumber = 770077;

Core Functions

Lot Size Calculator (Risk-Based)

mql5

double CalculateLotSize(string symbol, double entryPrice,

double stopLoss, double riskPercent)

{

double balance = AccountInfoDouble(ACCOUNT_BALANCE);

double riskAmount = balance * (riskPercent / 100.0);

double tickValue = SymbolInfoDouble(symbol, SYMBOL_TRADE_TICK_VALUE);

double tickSize = SymbolInfoDouble(symbol, SYMBOL_TRADE_TICK_SIZE);

if(tickSize == 0 || tickValue == 0) return 0.0;

double slDistance = MathAbs(entryPrice - stopLoss);

double slInTicks = slDistance / tickSize;

if(slInTicks == 0) return 0.0;

double lot = riskAmount / (slInTicks * tickValue);

double step = SymbolInfoDouble(symbol, SYMBOL_VOLUME_STEP);

double minLot = SymbolInfoDouble(symbol, SYMBOL_VOLUME_MIN);

double maxLot = SymbolInfoDouble(symbol, SYMBOL_VOLUME_MAX);

lot = MathFloor(lot / step) * step;

return MathMax(MathMin(lot, maxLot), minLot);

}

Order Execution

mql5

void PlaceOrder(string symbol, int direction, double lotSize,

double sl, double tp)

{

MqlTradeRequest req; MqlTradeResult res;

ZeroMemory(req); ZeroMemory(res);

req.action = TRADE_ACTION_DEAL;

req.symbol = symbol;

req.volume = lotSize;

req.type = (direction == ORDER_TYPE_BUY) ? ORDER_TYPE_BUY : ORDER_TYPE_SELL;

req.price = (direction == ORDER_TYPE_BUY) ?

SymbolInfoDouble(symbol, SYMBOL_ASK) :

SymbolInfoDouble(symbol, SYMBOL_BID);

req.sl = sl;

req.tp = tp;

req.deviation = 20;

req.magic = MagicNumber;

req.comment = "TebotechSignals Auto";

req.type_filling = ORDER_FILLING_IOC;

if(!OrderSend(req, res))

{

Print("Order failed: ", res.retcode, " - ", res.comment);

if(res.retcode == 10004 || res.retcode == 10021)

{ Sleep(2000); OrderSend(req, res); }

}

else

Print("Order placed: ", symbol, " ", lotSize, " lots");

}

Session Filter (Kill Zones)

mql5

bool IsTradingSessionAllowed()

{

MqlDateTime dt; TimeToStruct(TimeCurrent(), dt);

int h = dt.hour;

if(TradeLondon && h >= 7 && h < 16) return true;

if(TradeNewYork && h >= 12 && h < 21) return true;

if(TradeAsian && (h >= 23 || h < 8)) return true;

if(!TradeLondon && !TradeNewYork && !TradeAsian) return true;

return false;

}

Breakeven + Partial Close at TP1

mql5

void ManageOpenPositions()

{

for(int i = PositionsTotal()-1; i >= 0; i--)

{

ulong ticket = PositionGetTicket(i);

if(!PositionSelectByTicket(ticket)) continue;

if(PositionGetInteger(POSITION_MAGIC) != MagicNumber) continue;

double entry = PositionGetDouble(POSITION_PRICE_OPEN);

double sl = PositionGetDouble(POSITION_SL);

double tp = PositionGetDouble(POSITION_TP);

long type = PositionGetInteger(POSITION_TYPE);

string sym = PositionGetString(POSITION_SYMBOL);

double vol = PositionGetDouble(POSITION_VOLUME);

double bid = SymbolInfoDouble(sym, SYMBOL_BID);

double ask = SymbolInfoDouble(sym, SYMBOL_ASK);

bool tpHit = (type == POSITION_TYPE_BUY && bid >= tp) ||

(type == POSITION_TYPE_SELL && ask <= tp);

if(tpHit && MoveToBE)

{

MqlTradeRequest req; MqlTradeResult res;

ZeroMemory(req); ZeroMemory(res);

req.action = TRADE_ACTION_SLTP;

req.symbol = sym;

req.sl = entry;

req.tp = tp;

req.position = ticket;

OrderSend(req, res);

Print("Moved SL to breakeven for ", sym);

}

}

}

API Polling (Every 10 Seconds)

mql5

string FetchActiveSignals()

{

char data[], result[];

string headers = "Content-Type: application/json\r\n";

if(ApiKey != "") headers += "Authorization: Bearer " + ApiKey + "\r\n";

bool ok = WebRequest("GET", ApiUrl, headers, 10000,

data, result, result_headers);

if(!ok) { Print("API error: ", GetLastError()); return ""; }

return CharArrayToString(result, 0, WHOLE_ARRAY, CP_UTF8);

}

Installation

Risk Disclaimer

⚠️ Full source code provided for educational purposes. Trading involves significant risk. Test on demo first.

*VIP plan: $10/mo → Upgrade →*

Blog | Tebotechsignals
Skip to main content
XAU/USD2342.50
US3039245.00
NAS10017854.00
XAU/USD2342.50
US3039245.00
NAS10017854.00
TebotechSignals EA MQL5 Source Code (VIP)
tutorials
September 22, 2026

TebotechSignals Research Team

Institutional FX Analysts · ICT Smart Money Concepts Specialists

TebotechSignals EA MQL5 Source Code (VIP)

Full MQL5 source code for the TebotechSignals Auto-Execution EA. Available for VIP subscribers ($10/mo). Includes lot size calculator, order execution, session filters, breakeven, partial close, and API polling.

#MQL5
#source_code
#VIP
#EA
#MT5
#automation

📘 Reading Price Like the Big Players

Liquidity, order blocks and market structure — explained in plain English. Just $10.00.

Get It

📘 Trading Without the Drama

Fixing risk management, discipline and misinformation — explained in plain English. Just $10.00.

Get It
✨
Sponsored · Keller, TX

Turn Your Profits Into Memories 🎉

TebotechSignals EA MQL5 Source Code (VIP)

TL;DR:

  • Full MQL5 source code for the TebotechSignals Auto-Execution EA
  • Available for VIP subscribers ($10/mo)
  • Includes: API polling, risk-based lot sizing, order execution, breakeven, partial close, session filters, spread protection

Input Parameters

input string   ApiUrl          = "https://tebotechsignals.com/api/signals/active";
input string   ApiKey          = "";
input double   RiskPercent     = 1.0;
input int      MaxPositions    = 5;
input int      MaxSpreadPoints = 30;
input bool     TradeLondon     = true;
input bool     TradeNewYork    = true;
input bool     TradeAsian      = false;
input bool     PartialCloseTP1 = true;
input bool     MoveToBE        = true;
input int      PollIntervalSec = 10;
input int      MagicNumber     = 770077;

Core Functions

Lot Size Calculator (Risk-Based)

double CalculateLotSize(string symbol, double entryPrice,
                        double stopLoss, double riskPercent)
{
   double balance = AccountInfoDouble(ACCOUNT_BALANCE);
   double riskAmount = balance * (riskPercent / 100.0);
   double tickValue = SymbolInfoDouble(symbol, SYMBOL_TRADE_TICK_VALUE);
   double tickSize  = SymbolInfoDouble(symbol, SYMBOL_TRADE_TICK_SIZE);

   if(tickSize == 0 || tickValue == 0) return 0.0;

   double slDistance = MathAbs(entryPrice - stopLoss);
   double slInTicks  = slDistance / tickSize;
   if(slInTicks == 0) return 0.0;

   double lot = riskAmount / (slInTicks * tickValue);
   double step = SymbolInfoDouble(symbol, SYMBOL_VOLUME_STEP);
   double minLot = SymbolInfoDouble(symbol, SYMBOL_VOLUME_MIN);
   double maxLot = SymbolInfoDouble(symbol, SYMBOL_VOLUME_MAX);

   lot = MathFloor(lot / step) * step;
   return MathMax(MathMin(lot, maxLot), minLot);
}

Order Execution

void PlaceOrder(string symbol, int direction, double lotSize,
                double sl, double tp)
{
   MqlTradeRequest req;  MqlTradeResult res;
   ZeroMemory(req);      ZeroMemory(res);

   req.action    = TRADE_ACTION_DEAL;
   req.symbol    = symbol;
   req.volume    = lotSize;
   req.type      = (direction == ORDER_TYPE_BUY) ? ORDER_TYPE_BUY : ORDER_TYPE_SELL;
   req.price     = (direction == ORDER_TYPE_BUY) ?
                   SymbolInfoDouble(symbol, SYMBOL_ASK) :
                   SymbolInfoDouble(symbol, SYMBOL_BID);
   req.sl        = sl;
   req.tp        = tp;
   req.deviation = 20;
   req.magic     = MagicNumber;
   req.comment   = "TebotechSignals Auto";
   req.type_filling = ORDER_FILLING_IOC;

   if(!OrderSend(req, res))
   {
      Print("Order failed: ", res.retcode, " - ", res.comment);
      if(res.retcode == 10004 || res.retcode == 10021)
      { Sleep(2000); OrderSend(req, res); }
   }
   else
      Print("Order placed: ", symbol, " ", lotSize, " lots");
}

Session Filter (Kill Zones)

bool IsTradingSessionAllowed()
{
   MqlDateTime dt; TimeToStruct(TimeCurrent(), dt);
   int h = dt.hour;

   if(TradeLondon  && h >= 7  && h < 16) return true;
   if(TradeNewYork && h >= 12 && h < 21) return true;
   if(TradeAsian   && (h >= 23 || h < 8)) return true;
   if(!TradeLondon && !TradeNewYork && !TradeAsian) return true;
   return false;
}

Breakeven + Partial Close at TP1

void ManageOpenPositions()
{
   for(int i = PositionsTotal()-1; i >= 0; i--)
   {
      ulong ticket = PositionGetTicket(i);
      if(!PositionSelectByTicket(ticket)) continue;
      if(PositionGetInteger(POSITION_MAGIC) != MagicNumber) continue;

      double entry = PositionGetDouble(POSITION_PRICE_OPEN);
      double sl    = PositionGetDouble(POSITION_SL);
      double tp    = PositionGetDouble(POSITION_TP);
      long   type  = PositionGetInteger(POSITION_TYPE);
      string sym   = PositionGetString(POSITION_SYMBOL);
      double vol   = PositionGetDouble(POSITION_VOLUME);
      double bid   = SymbolInfoDouble(sym, SYMBOL_BID);
      double ask   = SymbolInfoDouble(sym, SYMBOL_ASK);

      bool tpHit = (type == POSITION_TYPE_BUY && bid >= tp) ||
                   (type == POSITION_TYPE_SELL && ask <= tp);

      if(tpHit && MoveToBE)
      {
         MqlTradeRequest req; MqlTradeResult res;
         ZeroMemory(req); ZeroMemory(res);
         req.action = TRADE_ACTION_SLTP;
         req.symbol = sym;
         req.sl = entry;
         req.tp = tp;
         req.position = ticket;
         OrderSend(req, res);
         Print("Moved SL to breakeven for ", sym);
      }
   }
}

API Polling (Every 10 Seconds)

string FetchActiveSignals()
{
   char data[], result[];
   string headers = "Content-Type: application/json\r\n";
   if(ApiKey != "") headers += "Authorization: Bearer " + ApiKey + "\r\n";

   bool ok = WebRequest("GET", ApiUrl, headers, 10000,
                        data, result, result_headers);
   if(!ok) { Print("API error: ", GetLastError()); return ""; }
   return CharArrayToString(result, 0, WHOLE_ARRAY, CP_UTF8);
}

Installation

  1. Copy source to MQL5/Experts/TebotechSignals_EA.mq5
  2. Compile in MetaEditor (F7)
  3. Enable WebRequest for tebotechsignals.com in Tools → Options → EA
  4. Drag onto chart, enter your API key, click OK

Risk Disclaimer

⚠️ Full source code provided for educational purposes. Trading involves significant risk. Test on demo first.

VIP plan: $10/mo → Upgrade →

✨
Sponsored · Keller, TX

Turn Your Profits Into Memories 🎉

📲 Get Free Daily Signals on WhatsApp

Follow our free channel for daily market briefs, ICT signals, and SMC education — delivered straight to your WhatsApp.

Join Free →

Disclaimer: This site is an educational platform. All content — including courses, articles, and any market commentary — is for educational and informational purposes only and does not constitute financial, investment, or professional advice, a recommendation, or a solicitation to trade. It is general in nature and does not take into account your individual financial situation, objectives, or needs. All trading and investing involve risk of loss; past performance is not indicative of future results. Always conduct your own research and consult a licensed professional before making any financial decisions. Client and testimonial experiences may not be typical — individual results will vary. Full fee structure is disclosed on our Pricing page.

We use cookies for essential site functionality and, with your consent, for analytics and advertising (Google Analytics, Facebook, Bing) to understand traffic and improve TebotechSignals. See our Privacy Policy for details.