Markets and trading · Independent · 23 Oct 2026

EarnForex/PositionSizer

Calculate your position size based on the risk and account size and execute your trades with this free MetaTrader expert advisor.

← Markets and trading
Position Sizer: trade risk calculator. Calculates lot sizes and executes trades in MetaTrader.

In simple English

This tool helps currency traders figure out how much money to risk on a single trade. It runs inside MetaTrader, a popular program for trading foreign currencies. You set your risk limit as a percentage of your account balance. The tool calculates the exact number of lots to buy or sell. It also places the trade for you with your stop loss and take profit already attached.

What it is

Position Sizer is an expert advisor (an automated script that runs inside the MetaTrader trading platform) for MetaTrader 4 and MetaTrader 5. It computes lot sizes based on account equity, stop loss distance, and broker commission rules.

What it is good for

Traders who want to stop calculating lot sizes by hand and prevent losing too much money on a single bad trade.

Stars605
LicenceApache-2.0
Latest3.16d (2026-10-12)checked 23 Oct 2026
Last code change2026-10-12
Written inMQL5
Setup effort
2 / 5
Payoff
4 / 5
Good
  • Calculates exact lot sizes based on your personal risk tolerance.
  • Works on both MetaTrader 4 and MetaTrader 5 platforms.
  • Accounts for broker commissions, swaps, and margin requirements.
Watch for
  • Requires the proprietary MetaTrader platform to run.
  • Written in MQL5, so editing the source code requires specialized knowledge.
  • Mistakes in risk settings can still lead to financial loss.
Replaces

manual calculation of lot sizes on a calculator or spreadsheet

Works well with

MetaTrader

Similar repositories
Also reviewed on Repo Radar
  • jesse-ai/jesse8.7k stars

    A Python framework for writing crypto trading strategies, testing them against past prices, and running them live.

  • hummingbot/hummingbot20k stars

    A free framework for writing and running automated trading programs on cryptocurrency exchanges.

  • lballabio/QuantLib7.7k stars

    The long-established free library for pricing and risk-managing financial instruments.

How to get it

Download the compiled expert advisor file from the official website and place it in your MetaTrader MQL folder.

Independent: reviewed for Repo Radar outside the daily editions. Every independent repository

On Stack Radar: Trading & Investing › Trading Automation › Expert Advisor Builders.

Get the next edition in your inbox

A dozen repositories, opened and checked. The licence read, the last release dated, and the ones that did not make it named with the reason. It is the half most lists leave out.

No tracking pixels. One click to leave. The archive stays free either way.

We use your address to send the edition and nothing else. Confirm by email, leave in one click. How we handle it.