Watch how to download trading robots for free
Find us on Telegram!
Join our fan page
Interesting script?
So post a link to it -
let others appraise it
You liked the script? Try it in the MetaTrader 5 terminal
Experts

One-Click Trade Manager — risk-based lot size with entry, stop and target in one click - expert for MetaTrader 5

Amul Ravikumar
Amul Ravikumar
  • Founder · MT5 / Full-stack Developer at  Brain Grain
  • India
  • 501
MT5 / MQL5 developer. I build indicators, Expert Advisors and utility panels from a written spec — every rule an input, 0 errors / 0 warnings, verified in the Strategy Tester before handover.
Views:
65
Published:
MQL5 Freelance Need a robot or indicator based on this code? Order it on Freelance Go to Freelance


Most manual trading mistakes are arithmetic, not analysis. You size the lot in your head, the stop ends up wider than you meant, and a 1% trade quietly becomes a 4% one.


This panel does that arithmetic and nothing else. Every order comes from a button you press — it never opens a trade on its own.

What the panel shows

- your risk percent and what it is worth in account currency right now
- the stop distance, fixed in points or sized from ATR
- the lot that makes those two agree
- the current spread, open volume and floating P/L

The buttons

- BUY / SELL — opens at market with the stop and the target already attached. The target is a multiple of the stop (2R by default, or off).

The details that usually get skipped

- The lot is rounded down to the volume step, never up — rounding up is how a risk limit becomes a suggestion.
- It is clamped by the broker's volume limit and by free margin, so an order is not sent that the server will refuse.
- Stops respect SYMBOL_TRADE_STOPS_LEVEL and the freeze level, widened by the current spread.
- On a netting account an opposite order would reduce the position instead of opening one, leaving the stop unattached — the panel says so instead of sending it.
- Every rule is an input, including the magic number and the maximum spread.

Self-test included. Set InpSelfTest to true and run it in the Strategy Tester: it exercises the calculator and the entry path and prints a PASS/FAIL line for each check. The published build passes 7 of 7 on EURUSD M5, including the one that matters — the risk actually taken equals the risk asked for. Tested on MetaTrader 5, hedging and netting.

RegimeRouter — trend/range classifier with a per-regime win rate ledger RegimeRouter — trend/range classifier with a per-regime win rate ledger

Classifies the market with ADX, the Hurst exponent and lag-1 autocorrelation, routes each bar to a breakout module or a mean-reversion module, and keeps a separate win rate ledger for each regime with a Wilson 95% lower bound, so you can see which half of it is actually working.

CSetupLedger: a per-setup win rate ledger for Expert Advisors CSetupLedger: a per-setup win rate ledger for Expert Advisors

Scores every setup type in your EA on its own record instead of lumping them into one equity curve. Rebuilds itself from the account's deal history on init so a restart cannot wipe the record. Prints a Wilson score lower bound next to the raw win rate so a three trade hot streak stops looking like an edge.

Accelerator Oscillator (AC) Accelerator Oscillator (AC)

The Acceleration/Deceleration Indicator (AC) measures acceleration and deceleration of the current driving force.

MACD Signals MACD Signals

Indicator edition for new platform.