[Русский] - [English] - [中文] - [Español] - [Português] - [日本語] - [Deutsch] - [한국어] - [Français] - [Italiano] - [Türkçe]
It is easy for a beginner in algorithmic trading to get lost: there are thousands of strategies, and the market moves faster than you can make a decision. Sound familiar? Most expert advisors are either too complicated to set up or rely on "guessing" candles with unpredictable risk. VR Black Box solves this problem differently: instead of predicting the future, it consistently follows price movement, opens positions according to strict rules, and manages every trade on its own — from entry to exit. In this article, we will break down how the advisor works, what settings make it flexible enough for any trading style, and why you can test it in the Strategy Tester before buying.
The robot was developed by a trader-programmer with more than 15 years of experience, and the strategy has additionally been verified by artificial intelligence. It works on any instruments and timeframes, in the Strategy Tester and on a live terminal, for MetaTrader 4 and MetaTrader 5. Below is an honest breakdown of how it works, its algorithm and its settings.

In short: what makes VR Black Box powerful
A classic trend robot only answers the question "buy or sell?". VR Black Box also answers the second, equally important one: how to manage a position after entry. The advisor itself calculates the lot size taking commission and swap into account, monitors the spread and the arrival of a new bar, keeps virtual "secret" Take Profit and Stop Loss levels, trails the stop behind the price, takes a pause after a loss, and closes all positions when a given result is reached. The entire cycle — from checking the conditions to calculating the outcome — runs automatically.
Automation is valuable not only for its speed but for the rock-solid reproducibility of rules: the robot does not give in to emotions, does not "sit out" a loss, and acts the same way on any day of the week. You set the logic once — the advisor executes it without deviation.
A detailed look at the unique features
The system can trade in five modes. Jointly Buying and Selling keeps two independent lines — a separate lot for buys and a separate lot for sells at the same time (this requires a hedging account). Alternately Buying and Selling determines the direction of a new trade by the result of the previous one: on profit — we continue, on loss — we flip. Accidental Purchase or Sale implements "heads or tails" mechanics with full control over the cycle and risk. The Only Buy and Only Sell modes restrict trading to a single direction — convenient when the market is clearly trending.
Manual mode is a rare capability among advisors. If the trader has opened a position manually and it went into a loss, it is enough to set MagicNumber to 0 — and the robot will start opening opposite positions according to its own logic, helping to compensate the loss and bring the situation back to breakeven. This turns the advisor from a mere "receiver" of a strategy into a full-fledged risk management assistant.
A special point of pride for the advisor is the virtual "secret" levels. In Virtual Levels (Secret) mode, the robot itself controls the working Take Profit and Stop Loss in the terminal's memory without revealing them to the broker, while safety real stops are placed on the server in case the connection drops. Prefer transparency — enable Real levels, and the levels are passed to the broker as classic ones. In both modes, the trailing stop pulls the stop loss behind the price, preserving the accumulated profit.

The buy lot and the sell lot are calculated separately and independently, taking commission and swap into account. Three calculation methods are supported: Fixed lot (fixed), Percentage lot (percentage-based) and The balance for the minimum lot (balance-based). Lot Multiplier sets the volume multiplier, and Type of lot increase defines the rule for applying it: martingale increases the lot after a loss, anti-martingale — after a profit. The instrument's minimum lot is taken into account automatically.
After a losing trade, the advisor takes a pause: by time, by distance, by both conditions (AND) or by whichever triggers first (OR). Balance management evaluates the total result of all positions (profit plus swap plus commission) and, once the given target is reached, closes all of them — then the robot either stops or starts a new cycle. Spread control suspends new entries when the spread widens, and new bar allows trading on the selected timeframe regardless of the chart the advisor is launched on.
How the algorithm works: from checking conditions to closing the cycle
The algorithm is built on continuous price following. At each new bar the robot runs through a chain of checks: is the spread acceptable, has a new bar arrived, has the delay after a loss expired, does the direction match the selected mode. If the conditions are not met — no entry is created. This protects against reckless trades opened just for the sake of opening something.
New bar —> spread check —> delay-after-loss check —> direction selection by mode —> lot calculation —> position opening —> management (Take Profit, Stop Loss, trailing stop) —> closing —> carrying the result into the next cycle.
When the conditions are met, the advisor calculates the lot and opens a position. During the management stage, Take Profit, Stop Loss, virtual levels (if enabled) and the trailing stop are active. After closing, the cycle closes: the result is factored into the next lot, a pause kicks in after a loss, and balance management triggers once the target balance is reached. This way, one cycle smoothly flows into the next.
Technically, the advisor is built on a single modular library: Bid and Ask prices are cached once per tick, Take Profit and Stop Loss levels are modified only when they actually change, and historical calculations run on a schedule. This reduces the load on the terminal and the server. At startup, the robot checks the account type and algorithmic trading permissions to report any issues right away.

The advisor works in the Strategy Tester and on a live terminal, on any instruments — Forex currency pairs, metals, cryptocurrencies, CFDs and indices — and on any timeframe. Simultaneous buying and selling requires a Hedging account, martingale works best with leverage from 1:100, and round-the-clock operation calls for a VPS server.
Trading robot settings: from spread to Telegram
All parameters are grouped into logical blocks. The parameter names are given strictly in English — exactly as they appear in the MetaTrader terminal — with explanations provided alongside. Settings marked with the symbol * are installation settings.
< = Trading Settings = > — control market entry and protection levels:
- Maximum Spread (0-Disabled) — the maximum acceptable spread at which the robot opens positions. The limit affects entries only: if the spread is wider than the set value, the robot will not open new positions but will continue managing the ones already opened. 0 — the check is disabled.
- Take Profit (0-Disabled) — the target profit of a position, set in points.
- Stop Loss (0-Disabled) — the acceptable loss of a position, set in points.
- Type of stop levels — the type of stop levels: Real levels (classic levels passed to the broker) or Virtual Levels (Secret) (virtual "secret" levels executed on the terminal; safety real stops are placed on the server at the same time).
- New bar (select the timeframe for the new bar) — trade on the arrival of a new bar of the selected timeframe, from 1 minute to 1 month.
- Type of trading strategy — the direction mode: Jointly Buying and Selling, Alternately Buying and Selling, Accidental Purchase or Sale, Only Buy, Only Sell.
< = Lot calculation settings = > — the trading volume calculation:
- The type of lot calculation — the calculation method: Fixed lot (fixed, e.g. 0.01), Percentage lot (a percentage of the balance), The balance for the minimum lot (balance-based: the deposit is divided by a given amount and multiplied by the minimum allowed lot).
- The initial lot — the value used to calculate the lot.
- Lot Multiplier (0 - Disabled) — the volume multiplier used to increase the trading volume after a loss or a profit.
- Type of lot increase — the increase rule: Martingale (the lot grows after a loss) or AntiMartingale (the lot grows after a profit).
< = Distance calculation settings = > — the pause after a loss:
- Type of delay after loss — the strategy for delaying the opening of the next position after a loss: Disabled, By time, By distance, Time AND distance (both conditions), Time OR distance (whichever triggers first).
- Time waiting (0 - Disabled) — the pause by time, in seconds.
- Distance waiting (0 - Disabled) — the pause by distance, in points.
< = Trailing Stop Settings = > — profit management:
- Trailing Stop Size (0 - Disabled) — the size of the trailing stop in points. The smaller the value, the faster the stop "catches up" with the current price and the tighter the protection of the accumulated profit.
< = Balance Settings = > — managing the overall result:
- Close all positions with profit (50 or -50) (0 - Disabled) — closes all positions when a given total profit (positive value) or loss (negative value) is reached.
- The Expert's actions after closing all positions — the action after closing: Closing all positions + stopping the robot (a full stop) or Closing all positions + the robot will continue trading (trading continues).
< = Notification settings = > — staying in touch with the trader:
- Manual mode, turning a losing trade into a profit — manual mode for turning a losing position into a profitable one (MagicNumber must be set to 0).
- Panel Size — the size of the information panel on the chart.
- Smartphone notifications — notifications to your smartphone (the terminal must be configured for Push).
- Notifications in the terminal — alert notifications in the terminal.
- Email Notifications — notifications to your email address.
- Notifications in the Telegram channel — notifications sent to a Telegram channel.
- The name of the telegram channel — the name of the Telegram channel.
- Telegram Bot Token — the secret token of the Telegram bot.

< = Other settings = > — additional parameters:
- Comments on positions — a comment added to the advisor's positions.
- MagicNumber — a unique number the robot uses to distinguish its own positions from those of other advisors.
- Slippage — the acceptable slippage on execution. For prices like 0.12345 set about 500, for prices like 0.1234 — about 50.
The key point about settings. All blocks work independently: you can leave the trading settings "as is", enable only the trailing stop, or build your own risk management system with balance management and a pause after a loss. Start with the ready-made preset files, then gradually change one parameter at a time, watching the behavior in the Strategy Tester.
About the author
The author is Vladimir Pastushak, a trader-programmer with more than 15 years of experience creating trading strategies for MetaTrader 4 and MetaTrader 5. He has developed an entire line of robots used by thousands of traders around the world and regularly refines the strategies based on their feedback.
The VR Black Box strategy has additionally been verified by artificial intelligence: this helped eliminate errors and make the robot's behavior predictable. Technical support and updates are free for buyers.

Risk warning
Honestly about the risks. Trading involves a high risk of losing capital, and no settings guarantee a profit. Results from Strategy Tester runs do not promise the same performance on a live account. Martingale can sharply increase the load on your deposit — start with the minimum lot. Virtual levels are executed by the terminal and depend on its operation: if the connection drops, closing may not trigger — that is exactly what the safety real stops are for. Evaluate not only the profit but also the drawdown and the margin requirements.
Before live trading, always test the advisor in the Strategy Tester and then on a demo account with the same conditions: symbol, spread, commission and account type. Start with the minimum volume and gradually increase it as your confidence in the strategy grows.
Conclusion
VR Black Box solves the beginner's main problem: the advisor acts according to the given rules without getting distracted or giving in to emotions. Five trading modes, virtual "secret" levels, a trailing stop, a pause after a loss, separate lot calculation and balance management — all of this can be checked in the Strategy Tester before buying.

Download VR Black Box, run it in the Strategy Tester on your instruments, test it on a demo account — and only then move on to live trading. You can ask the author questions in the comments to the article: support for buyers is free.

Keywords
VR Black Box, trading robot, MetaTrader expert advisor, trend trading, automated trading, expert advisor settings, martingale, trailing stop, virtual levels, capital management


