Watch how to download trading robots for free
Find us on Twitter!
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
Views:
15
Published:
MQL5 Freelance Need a robot or indicator based on this code? Order it on Freelance Go to Freelance
This is a brief educational example of an opening-candle strategy. Each day, the EA waits for the M5 candle that marks the start of the New York session (9.30 am New York time, 4.30 pm on most broker servers that close at New York time). If the candle body is larger than the sum of its wicks and its tick volume is above 1.5 times the average of the previous 20 bars, the EA opens a single trade in the direction of the candle with a fixed stop loss and take profit. The position is closed by the selected hour at the latest.

What it does
- One trade per day; at most one open position.
- Fixed stop loss and take profit in price units (default 30 / 120, designed for index prices around 20,000; for other symbols, the distances are scaled according to price).
- Lot size is calculated based on the risk capital and the stop distance (or a fixed lot) and is reduced if the free margin is insufficient.
- Forced closure at the selected time.
- No martingale, grid, averaging or hedging.

Inputs
- InpRiskMoney, InpUseFixedLot, InpFixedLot: position size.
- InpSlPoints, InpTpPoints: stop loss and take profit.
- InpCandleHour, InpCandleMinute: broker-server time of the 9.30 New York candle. Check this with your broker: it is the M5 candle with the volume spike at the New York open.
- InpUseVolFilter, InpVolMaLen, InpVolMult: tick-volume filter.
- InpCloseHour: forced close time.

Honest results
MetaTrader 5 Strategy Tester, USTEC M5, every tick, 2025, default settings, deposit 10,000, risk 100 per trade: 91 trades, net profit +2,559, profit factor 1.41, 29.7% winning trades, maximum balance drawdown 7.3%, longest losing streak 10 trades. My own test using M1 data from 2023–2026 also yielded a profit factor of around 1.4, although the figure for 2023 was close to zero. Spreads, slippage and variations in broker data will affect these figures. This is an educational example, not a trading recommendation, and no profit is guaranteed.

A more comprehensive version, featuring break-even and profit lock functions, monthly loss and profit limits, and optional trend and volatility filters, is available on the MQL5 Market.

Strategy Tester report: USTEC M5, 2025, default settings Balance and equity curve in the Strategy Tester, 2025

Translated from Russian by MetaQuotes Ltd.
Original code: https://www.mql5.com/ru/code/78392

History Export from the Strategy Tester (Bars and Ticks) History Export from the Strategy Tester (Bars and Ticks)

Exports bars of any timeframe and, optionally, every tick from the Strategy Tester to CSV, without the chart's 100,000-bar limit. Reports gaps inside trading sessions. Places no orders.

MTF Order Block Zones Indicator MTF Order Block Zones Indicator

MTF order blocks from the chart timeframe or a higher one, shaded on the chart and followed bar by bar: fresh until price comes back, tested after that with every return counted, broken once a close goes through. Sizes are measured in average ranges, so the defaults fit any symbol, and a new zone absorbs the ones it overlaps, so zones never stack.

Round Numbers – automatic psychological thresholds Round Numbers – automatic psychological thresholds

Horizontal lines at round figures around the displayed price, with a spacing that adjusts according to the zoom level.

MACD Signals MACD Signals

Indicator edition for new platform.