Algo Skills — Backtesting, Risk Management & FAQ | BOTSFIRM

Skills for running an algorithm properly

A backtesting primer, a position-sizing calculator you can actually use, and straight answers to the MQL5 and EA questions we get asked the most.

Backtesting Guide

How to read a backtest without fooling yourself

A proper backtesting workflow is what separates a strategy that's genuinely robust from one that's just been tuned to look good on old data.

Premium — coming soon

This guide is for Premium members

We're building a full, step-by-step walkthrough on reading strategy-tester reports, spotting curve-fitted equity curves, and stress-testing an EA before it ever touches a live account. It'll unlock here for Premium members once it's ready.

  • Reading modelling quality & spread accuracy
  • Spotting a curve-fitted equity curve
  • Out-of-sample & walk-forward testing
  • Stress-testing across different market regimes
  • Turning a backtest into a live-forward checklist
Premium access — coming soon

Already have a backtest you'd like a second pair of eyes on? Book a call and we'll walk through it together in the meantime.

Risk Management

Work out your position size before you place the trade

Risk management starts with one question: at this account size, this stop-loss distance, and this % risk, how many lots should you actually be trading? Use the calculator below, or scan the quick-reference chart underneath it.

What position sizing actually means

Risk management isn't really about avoiding losses — every strategy loses sometimes. It's about controlling how much any single loss costs you. That means working backwards: you decide the amount you're willing to risk first, and the lot size falls out of that math. Picking a lot size first and hoping it works out is the wrong direction.

The 1–2% rule

A common guideline is to risk no more than 1–2% of the account on any single trade. It sounds conservative, but the math is why it holds up: ten losing trades in a row at 2% risk costs roughly 18% of the account. The same ten losses at 5% risk costs closer to 40% — and a 40% hole needs a 67% gain just to get back to even.

Where "distance" comes from

The stop-loss distance shouldn't be picked to hit a target lot size — it should come from the chart itself: the nearest swing high or low, a recent range, or a volatility measure like ATR. Typical ranges vary a lot by style — scalping often sits around 5–15 pips, intraday swing trades around 20–50 pips, and position trades 50–150+ pips — but the chart should decide the number, and the calculator below just converts whatever distance you land on into the right lot size.

A cent account's balance is in cents — 10,000¢ behaves like a $100 account.
≈$10/pip/lot is standard for most USD-quoted major pairs — check your pair & broker for the exact figure.
RESULT
Amount at risk$100.00
Suggested lot size0.50 lots
In micro lots50.0 micro

This calculator assumes a fixed pip value for planning purposes — actual pip value depends on the pair, your account currency, and your broker's contract size. Treat it as a starting point, not exact broker math.

Quick reference, across account sizes

At 1% risk, 20 pip stop

FAQ

Forex robot & MQL5 questions, answered plainly

The questions we hear most often about Expert Advisors, MQL5, and how the pieces fit together.

What is MQL5, and why does it matter for a trading robot?
MQL5 (MetaQuotes Language 5) is the programming language used to build Expert Advisors, indicators, and scripts for the MetaTrader 5 platform. An EA is essentially a compiled MQL5 program that reads price data and manages orders automatically — MQL5 is simply the language it's written in.
Do I need to know how to code to use an EA?
No. Using a pre-built EA only requires attaching it to a chart and setting its input parameters — lot size or risk %, which pairs to trade, session filters, and so on. Coding knowledge only matters if you want to change the strategy's underlying logic yourself.
What's the difference between MQL4 and MQL5?
MQL4 runs on MetaTrader 4, MQL5 runs on MetaTrader 5. MQL5 is newer and more object-oriented, with a more complete backtesting engine (multi-currency, multi-timeframe testing) and native support for hedging accounts and market depth. The two aren't directly compatible — code has to be ported, not just copy-pasted.
Will an EA work on any broker?
Mostly yes — any MT4/MT5 EA can technically run on any broker offering that platform. But execution quality (spread, slippage, order-fill speed) varies a lot broker to broker, so the same EA can perform noticeably differently depending on where it's hosted.
Can I run the same EA license on multiple accounts?
That depends entirely on the vendor's licensing terms — some license per account, some per number of activations regardless of account, and some restrict multiple accounts sharing an IP to prevent bonus abuse. Always check the specific product's license terms before assuming.
What is backtesting, and why does the strategy tester's setup matter?
Backtesting runs a strategy against historical price data to see how it would have performed. The tester's settings — modelling quality, date range, whether real tick data is used — directly affect how trustworthy the result is; a backtest run on low-quality "open prices only" data can look far better than reality.
Why do backtest results often differ from live results?
A backtest can't perfectly replicate real spread, slippage, requotes, and latency, and it's easy — even unintentionally — to curve-fit settings to past data. A strategy tuned to look flawless on 2020–2023 data has no guarantee of holding up in unseen conditions.
What is slippage, and how does it affect an EA?
Slippage is the gap between the price a trade was requested at and the price it actually filled at, usually during fast or thin-liquidity moments. It quietly erodes returns on high-frequency strategies — scalpers especially — more than it affects slower, wider-timeframe systems.
Do I need a VPS to run an EA?
Not strictly, but an EA only trades while the platform is connected and running — if your own PC sleeps, restarts, or loses internet, the EA stops with it. A VPS (a small always-on remote server) keeps it running around the clock without depending on your own machine.
Can an EA be adjusted to fit my own risk settings?
Most EAs expose their key settings — lot size or risk %, stop-loss/take-profit distance, which sessions or pairs to trade — as adjustable inputs, without needing to touch any underlying code at all.
Is it against the rules to use an EA?
Automated trading itself is standard and broker-approved almost everywhere. What some brokers restrict is specific behaviours — tick-scalping, arbitrage between feeds, or bonus abuse. Check your specific broker's terms rather than assuming either way.
What does "hedging" mean for an EA, and why does it matter?
A hedging EA can hold a long and short position on the same pair at the same time. Some account types — and some regulators, notably US-regulated accounts under FIFO rules — don't allow this, so a hedging strategy needs a broker and account type that explicitly supports it.
How can I tell if an EA's claims are unrealistic?
Be cautious of "no losing trades," guaranteed monthly returns, or a backtest with no losing streak at all — real strategies lose sometimes. A trustworthy result usually shows drawdown, a realistic number of trades, and ideally out-of-sample or live-forward data, not just a smooth backtest curve.
What is a "walk-forward" or "out-of-sample" test?
It's testing a strategy on data it wasn't tuned on — for example, optimising on 2019–2022 data, then checking performance on 2023–2024 data it never "saw." It's one of the better checks against curve-fitting.
What's the difference between an EA and an indicator in MQL5?
An indicator only calculates and displays information on the chart — like a moving average — it can't place trades. An EA can read that same kind of data and act on it: it's the piece that actually sends and manages orders.
Educational content only — not financial advice. © 2026 BOTSFIRM.
Scroll to Top