Paste your MQ4 or MQ5 code. Ask the AI to explain, fix, optimize, add trailing stops, or convert MQ4 → MQ5. Export compile-safe files ready for MetaEditor — no more guessing, no more hallucinated functions.
No credit card · Email + password · Your code stays private
#include <Trade/Trade.mqh>
CTrade trade;
input double InpRiskPercent = 1.0; // Risk per trade (%)
input int InpRSI_Period = 14;
void OnTick() {
double rsi = iRSI(_Symbol, PERIOD_CURRENT, InpRSI_Period, PRICE_CLOSE, 0);
double ema50 = iMA(_Symbol, _Period, 50, 0, MODE_EMA, PRICE_CLOSE);
double ema200 = iMA(_Symbol, _Period, 200, 0, MODE_EMA, PRICE_CLOSE);
if (rsi < 30 && ema50 > ema200 && PositionsTotal() == 0) {
double lot = CalcLotByRisk(InpRiskPercent, 200);
trade.Buy(lot, _Symbol, 0, 0, 0, "rsi+ema crossover");
}
}Add ATR-based trailing stop and risk-percent sizing.
Updated OnTick() with CalcLotByRisk and a 2× ATR trailing stop. Diff ready to apply.
Generic code assistants hallucinate MQL functions. Dungeon Bot Builder is tuned for MetaTrader: it knows CTrade, ENUM_TIMEFRAMES, magic numbers, freeze levels, and synthetic-index quirks.
VSCode-grade editor with syntax highlighting and an AI side chat that sees your file.
Template-grounded responses use CTrade, NormalizeDouble, magic numbers and freeze levels correctly.
One-click migration that rewrites OrderSend logic into the modern Trade library.
Knows V75/V100/Boom/Crash quirks: tick-driven, no swap, spike handling.
Drop in risk-percent sizing, ATR trailing stops and break-even with one prompt.
Download your file ready to drop into MetaEditor on Windows for compilation.
Open the editor, create a project or paste an existing MQ4/MQ5 file.
Ask: explain, fix, optimize, add trailing stop, convert to MQL5.
Download the .mq5, drop it in MetaEditor, attach to a chart.