🏷 Risk Management

LotSmith | MQLicense.com — User Guide

Eki 27, 2026 ⏱ 11 dk okuma 1 görüntülenme

1. What is LotSmith?

LotSmith is a risk-management Expert Advisor for MetaTrader 5. It does NOT generate trading signals. Instead, it:

  • Calculates the exact lot size you should trade based on how much money you're willing to risk.

  • Lets you set your stop loss by points, ATR, candle, or a draggable line.

  • Shows you a live preview of the trade (lots, risk, R:R, margin) before you click.

  • Sends the trade with a single click.

  • Provides quick management buttons (Close All, Breakeven, etc.).

Ideal for:

  • Manual traders who want consistent 0.5%–2% risk per trade.

  • Traders switching between Forex, Gold, Indices, and Crypto — LotSmith handles all instrument types correctly.

  • Users of the MQLicense.com risk-management suite (PropGuard, TradeGate, RiskRadar).


2. Installation

Step 1 — Copy files

Place these files in the correct folder:

Method File locations
Recommended (Include) LotSmith.mq5 → MQL5/Experts/
MQLicense_Common.mqh → MQL5/Include/
Alternative (same folder) Both files → MQL5/Experts/

Step 2 — Compile

  1. Open MetaEditor (F4 in MT5).

  2. Open LotSmith.mq5.

  3. Press F7 (Compile).

  4. You should see: 0 errors, 0 warnings.

Step 3 — Attach to a chart

  1. In MT5, open any chart (e.g., EURUSD H1).

  2. Drag LotSmith from Navigator → Expert Advisors onto the chart.

  3. Make sure Algo Trading button is green.


3. First Launch

When you attach LotSmith for the first time, an Inputs dialog appears. The defaults are tuned for a retail trader with a 1% risk mindset:

Input Default Meaning
Risk basis % of Balance Risk 1% of your balance per trade
Risk percent 1.0 1%
SL mode Fixed SL by fixed points
SL points 200 200 points below/above entry
TP mode Risk:Reward TP by R:R ratio
R:R 2.0 2× the risk
Magic number 20241101 Unique ID for LotSmith trades
Panel theme Dark Dark panel

Click OK. The panel appears in the top-left corner.


4. Panel Overview

text

┌──────────────────────────────────────────────────┐
│  LotSmith | MQLicense.com                    [_] │  ← Title bar (drag to move)
├──────────────────────────────────────────────────┤
│  Risk basis:                                     │
│  Risk: 1.00% Bal                                 │  ← Current risk setting
│  SL: 1.0850                                      │  ← Computed Stop Loss
│  TP: 1.0950                                      │  ← Computed Take Profit
│  Lots: 0.45                                      │  ← ★ Your lot size
│  Risk $: 98.50 (0.99%)                           │  ← Money + % of equity
│  R:R: 2.00                                       │
│  Margin: 197.00                                  │  ← Required margin
│  Spread: 12.5 pts                                │
│                                                  │
│  ┌──────────────┐  ┌──────────────┐             │
│  │     BUY      │  │     SELL     │             │
│  └──────────────┘  └──────────────┘             │
│  ┌────────┐┌────────┐┌────────┐                 │
│  │CloseAll││CloseBuy││CloseSell│                │
│  └────────┘└────────┘└────────┘                 │
│  ┌────────┐┌────────┐┌────────┐                 │
│  │ BE All ││ DelPend││Reverse │                 │
│  └────────┘└────────┘└────────┘                 │
│  ┌────────┐┌────────┐┌────────┐                 │
│  │ Basis  ││SL Mode ││TP Mode │                 │
│  └────────┘└────────┘└────────┘                 │
│  MQLicense.com                                   │  ← Footer
└──────────────────────────────────────────────────┘

Panel elements

Element Function
Title bar Click-drag to move the panel (planned for future release)
_ button Minimize / restore the panel
Risk basis line Shows the current risk configuration
SL / TP line Computed prices based on your mode
Lots line ★ The recommended lot size
Risk $ line Expected loss in money and % of equity
R:R line Reward-to-risk ratio
Margin line Required margin for this trade
Spread line Current spread in points
Warning line Red text if anything is wrong (spread too high, insufficient margin, etc.)
BUY / SELL Send the trade with the computed lots, SL, and TP
CloseAll / CloseBuy / CloseSell Close matching positions (LotSmith's magic only)
BE All Move all SL to breakeven (entry price)
DelPend Delete all pending orders with LotSmith's magic
Reverse (Reserved for future — currently no action)
Basis Cycle through the 5 risk bases
SL Mode Cycle through the 4 SL modes
TP Mode Cycle through the 4 TP modes

Colors:

  • 🟩 Green BUY button — long positions

  • 🟥 Red SELL button — short positions

  • 🟧 Orange warning text — action required

  • 🟩 Green warning text — all OK


5. Risk Basis Explained

LotSmith computes lots based on how much money you're willing to lose if the SL is hit.

5 risk bases (click Basis button to cycle)

# Mode Formula Use case
1 % of Balance Risk = Balance × RiskPercent / 100 Classic fixed-fractional. Stable even with floating loss.
2 % of Equity Risk = Equity × RiskPercent / 100 More conservative when in drawdown.
3 % of Free Margin Risk = FreeMargin × RiskPercent / 100 Aggressive — risk grows when no positions are open.
4 Fixed Money Risk = InpRiskMoney Exact dollar amount. Good for prop-firm rules.
5 Fixed Lot Ignores risk — uses InpFixedLot Legacy manual trading.

Example:

  • Balance = $10,000, risk = 1% → risk amount = $100

  • SL distance = 50 points on EURUSD

  • Loss per lot at SL ≈ $50 (5 digits, 1 standard lot)

  • → Lots = $100 / $50 = 2.00 lots (before clamping)

Important: LotSmith uses OrderCalcProfit() — the broker's own calculation — so it's accurate for every instrument:

  • Forex majors, minors, exotics

  • XAUUSD, XAGUSD

  • Indices (US30, NAS100, GER40)

  • Crypto (BTCUSD, ETHUSD)

  • Stocks CFDs

  • Non-USD accounts


6. Stop Loss Modes

Click SL Mode to cycle through 4 modes:

Mode 1 — Fixed points

mql5

InpSLMode = SL_FIXED
InpSLPoints = 200   // 200 points below (BUY) or above (SELL) entry

Simple. Consistent.

Mode 2 — ATR-based

mql5

InpSLMode = SL_ATR
InpATRPeriod = 14
InpATRTimeframe = PERIOD_H1
InpATRMult = 1.5

SL = 1.5 × ATR(14, H1). Adapts to volatility. Good for gold and indices.

Mode 3 — Draggable line

mql5

InpSLMode = SL_LINE

A red horizontal line named LotSmith_SL appears on the chart. Drag it to set your SL. The preview updates live (<200 ms).

If the line is deleted, LotSmith falls back with a warning: "SL not defined".

Mode 4 — Candle-based

mql5

InpSLMode = SL_CANDLE
InpCandleCount = 3
InpCandleBuffer = 20   // points
  • BUY: SL = lowest low of last 3 closed candles − 20 points

  • SELL: SL = highest high of last 3 closed candles + 20 points

Classic swing-trader approach.


7. Take Profit Modes

Click TP Mode to cycle through 4 modes:

Mode 0 — None

No TP is sent. You manage the exit yourself.

Mode 1 — Fixed points

mql5

InpTPMode = TP_FIXED
InpTPPoints = 400

mql5

InpTPMode = TP_RR
InpRR = 2.0   // 2:1 reward-to-risk

TP = entry + (2 × |entry − SL|) for a BUY.

This is what most professional traders use.

Mode 3 — Draggable line

A green horizontal line named LotSmith_TP appears. Drag it to set your TP. Preview updates live.


8. Pending Orders Mode

Enable with:

mql5

InpUsePending = true

A gold horizontal line (LotSmith_ENTRY) appears. Drag it where you want to enter.

When you click BUY or SELL, LotSmith auto-selects the correct pending type:

Entry line vs price BUY becomes SELL becomes
Entry below Ask (BUY) / above Bid (SELL) Buy Limit Sell Limit
Entry above Ask (BUY) / below Bid (SELL) Buy Stop Sell Stop

Optional expiration:

mql5

InpExpiryMinutes = 60   // 0 = GTC

9. The Preview Block

Every value in the preview is live — it updates on every tick (throttled to 200 ms) and on every line drag.

Field What it means
Risk Your current basis (e.g. "1.00% Bal")
SL Computed Stop Loss price
TP Computed Take Profit price (or "none")
Lots ★ The lot size LotSmith will send
Risk $ Real money at SL (uses OrderCalcProfit) + commission
R:R Reward-to-Risk ratio
Margin Required margin (OrderCalcMargin)
Spread Current spread in points
Warning Empty (green) = OK. Orange/red = problem.

Example warnings:

  • "Spread too high"

  • "Insufficient margin"

  • "SL inside stops level or wrong side"

  • "Min lot risk exceeds requested"

  • "Lots exceed max cap"

  • "Max positions reached"

  • "Max total risk exceeded"

  • "Lots auto-reduced"


10. Safety Limits

All configurable inputs:

Input Default Effect
InpMaxLot 100 Hard cap on lot size
InpMaxPositions 10 Max open positions per symbol with this magic
InpMaxTotalRiskPct 5% Total open risk (all symbols) must stay below this
InpMaxSpreadPts 50 Reject trade if spread is wider than this
InpMinFreeMarginPct 200% Margin level floor
InpMarginBufferPct 20% Safety buffer on top of required margin
InpAllowOverRiskAtMinLot false If true, allows risk > requested when min lot forces it
InpAutoReduceLots true If margin is insufficient, reduce lots instead of rejecting

Auto-reduce example: You want 2 lots, but free margin only supports 1.2 lots. If InpAutoReduceLots = true, LotSmith sends 1.2 lots and shows "Lots auto-reduced".


11. Quick Action Buttons

CloseAll / CloseBuy / CloseSell

Closes all LotSmith-magic positions on the current symbol, or only BUY / SELL.

  • Uses partial-close-safe logic (hedging: per-ticket; netting: opposite deal).

  • Shows a confirmation popup if InpConfirmActions = true.

BE All

Moves SL of all LotSmith-magic positions to breakeven (entry price). Offset is currently 0 points. Future versions will let you set an offset.

DelPend

Deletes all pending orders with LotSmith's magic on the current symbol.

Reverse

Reserved for future release. No action at the moment.

Basis / SL Mode / TP Mode

Cycle through the modes at runtime. The panel updates immediately.


12. Keyboard Shortcuts

Enable with:

mql5

InpKeyboard = true
Key Action
B Send BUY market order
S Send SELL market order
C Close all LotSmith positions (asks for confirmation)

⚠️ Warning: Only enable when you are confident. The keys fire immediately.


13. Suite Integration

If you own other MQLicense.com EAs, LotSmith can honor their trading blocks:

mql5

InpRespectSuite = true

When true, before sending a trade LotSmith checks:

  • MQLic_PropGuard_<login>_LOCK — if 1, trade is blocked ("PropGuard LOCK active")

  • MQLic_TradeGate_<login>_BLOCK — if 1, trade is blocked ("TradeGate BLOCK active")

The reason is shown in the notification. No data is written — LotSmith only reads.

Order of publishing (recommended):

  1. LotSmith (this EA) — works standalone

  2. TradeKeeper

  3. PropGuard

  4. RiskRadar

  5. TradeGate


14. Common Scenarios

Scenario 1 — "I want to risk exactly $50 on Gold"

  1. Set InpRiskBasis = RISK_MONEY

  2. Set InpRiskMoney = 50

  3. Set InpSLMode = SL_LINE

  4. Drag the SL line where you want

  5. Read "Lots" in the panel

  6. Click BUY or SELL

Scenario 2 — "I want 1% risk with ATR-based SL on H1"

  1. InpRiskBasis = RISK_PERCENT_BALANCE, InpRiskPercent = 1.0

  2. InpSLMode = SL_ATR, InpATRTimeframe = PERIOD_H1, InpATRMult = 1.5

  3. InpTPMode = TP_RR, InpRR = 2.0

  4. Click BUY or SELL

Scenario 3 — "I want a pending Buy Limit 20 points below price"

  1. InpUsePending = true

  2. Drag the gold entry line 20 points below Ask

  3. Click BUY → LotSmith sends Buy Limit automatically

Scenario 4 — "PropGuard locked me — LotSmith shouldn't trade"

  • Just leave InpRespectSuite = true

  • You'll see: "Blocked by suite: PropGuard LOCK active"


15. Troubleshooting

Problem Cause Fix
"Preview invalid: SL not defined" SL line was deleted Recreate the line by switching to another SL mode and back
"Insufficient margin" Not enough free margin Reduce risk % or use auto-reduce
"Spread too high" Market condition Wait or raise InpMaxSpreadPts
Panel not appearing InpShowPanel = false or chart not refreshed Set true and press F5
"Trading not allowed on symbol" AutoTrading off or symbol restricted Check AutoTrading, symbol trade mode
Lots = 0.00 SL distance too small, or risk money too low Increase risk or widen SL
Order sent with fewer lots than expected Auto-reduce, or step-clamp Check warning line and InpAutoReduceLots
Line drag not updating lots Panel blocked or timer frozen Wait a tick; check journal
MT5 crash Unrelated — MT5 quirk Restart terminal; state persists via GlobalVariables

16. Disclaimer

Trading involves substantial risk. This tool is provided free of charge, as-is, without any warranty. Test on a demo account first. MQLicense.com is not responsible for any losses.

Use at your own risk. LotSmith is a calculator and an order-sender — it does not guarantee profit.

Paylaş: ✈️ Telegram WhatsApp 𝕏 Yayınla

İncelemeler 0

Henüz inceleme yok.
Deneyiminizi paylaşan ilk kişi olun!

İnceleme Yaz

Sıkça Sorulan Sorular

Bağlı kuruluş programı nasıl çalışır?+
Benzersiz bağlantınızla arkadaşlarınızı yönlendirin ve her satıştan %30'a varan komisyon kazanın.
Bağlı kuruluş kazançlarımı nasıl çekerim?+
Bağlı Kuruluş Cüzdanınıza gidin ve para çekme talebinde bulunun. Ödemeler USDT ile yapılır.
White Label nedir?+
White Label, ürünleri kendi markanız altında %50 komisyonla satmanıza olanak tanır.
Destekle nasıl iletişime geçerim?+
Panelinizden bir destek talebi oluşturabilir veya iletişim formunu kullanabilirsiniz. Genellikle 24-48 saat içinde yanıt veriyoruz.
Destek talepleri için yanıt süresi nedir?+
Genellikle 24-48 saat içinde yanıt veriyoruz. Lisans sorunları önceliklidir.
Nasıl hesap oluştururum?+
"Kayıt Ol"a tıklayın ve formu doldurun. E-posta ve şifre ile kaydolabilir veya hızlı kayıt için e-posta OTP kullanabilirsiniz.
Şifremi nasıl sıfırlarım?+
Giriş sayfasında "Şifrenizi mi unuttunuz?"a tıklayın ve e-postanıza gönderilen talimatları izleyin.
Kişisel verilerim güvende mi?+
Evet, verilerinizi korumak için SSL/TLS şifreleme ve endüstri standardı güvenlik önlemleri kullanıyoruz.
Lisans doğrulaması nasıl çalışır?+
EA, EA'ya gömülü genel bir anahtar kullanarak imzalı bir lisans yükünü doğrular. İlk kurulumdan sonra internet bağlantısı gerekmez.
Hesap numaramı değiştirebilir miyim?+
Evet, lisans yönetimi sayfasından hesap değişikliği talep edebilirsiniz. Değişiklik destek ekibimiz tarafından incelenecektir.
Bir lisansı birden fazla hesapta kullanabilir miyim?+
Hayır, her lisans belirli bir işlem hesabı numarasına, broker'a ve platforma bağlıdır. Lisansların paylaşılması kesinlikle yasaktır.
Hesap numaram değişirse ne olur?+
Hesap değişikliği talebi gönderebilirsiniz ve incelemeden sonra lisansınızı yeni hesaba güncelleyeceğiz.
Lisans kalıcı mı?+
Planınıza bağlıdır. Bazı lisanslar ömür boyudur, bazıları ise belirli bir süre (30, 90, 180 veya 365 gün) geçerlidir.
Demo hesapta test edebilir miyim?+
Evet! Demo lisansı 30 gün boyunca ÜCRETSİZDİR. Satın almadan önce herhangi bir EA'yı demo hesapta test edebilirsiniz.
EA'yı MetaTrader'a nasıl kurarım?+
EA dosyasını indirin, MQL4/Experts veya MQL5/Experts klasörüne yerleştirin, MetaTrader'ı yeniden başlatın ve bir grafiğe ekleyin.
EA hem MT4 hem MT5'te çalışır mı?+
Her EA platforma özeldir. MT4, MT5 veya her ikisini destekleyip desteklemediğini görmek için ürün sayfasını kontrol edin.
EA'yı çalıştırmak için VPS'e ihtiyacım var mı?+
7/24 işlem için VPS önerilir ancak zorunlu değildir. EA, MetaTrader çalıştığı sürece yerel bilgisayarınızda çalışır.
EA'yı herhangi bir broker'da kullanabilir miyim?+
Evet, EA'larımız MetaTrader 4 veya 5'i destekleyen çoğu broker'da çalışır. Uyumlu seçenekler için broker'lar sayfamıza bakın.
Hangi ödeme yöntemleri kabul ediliyor?+
TRC20, ERC20 ve BSC ağlarında USDT kabul ediyoruz.
İade alabilir miyim?+
Ürünlerimizin dijital doğası nedeniyle lisans aktivasyonundan sonra iade yapılmaz.
Ödeme doğrulaması ne kadar sürer?+
Doğrulama genellikle işlem karması gönderildikten sonra birkaç dakika sürer. Bazı durumlarda, ağ yoğunluğuna bağlı olarak birkaç saate kadar sürebilir.
Yanlış tutar gönderirsem ne olur?+
Belirtilen tutarı aynen göndermelisiniz. Farklı bir tutar göndermek gecikmelere veya fon kaybına neden olabilir.
USDT ödemeleri için hangi ağı kullanmalıyım?+
En düşük ücretler için TRC20'yi öneriyoruz. Ödeme talimatlarınızda belirtilen ağı kullanmalısınız.

Comments

İlk yorum yapan siz olun!