Setting up MT5
Before you try to use MQL PRO TRADER, your MetaTrader 5 must be set up correctly. Without these adjustments the MQL PRO TRADER system will not work — it will not be able to reach the internet, it will not send Telegram messages and it will not use the news and AI systems.
Step 1 — Enable Algo Trading
The Algotrading button sits on the MT5 toolbar, at the top. It must be green. If it is red, click it to enable it.
Step 2 — Allow the WebRequest URLs
The robot needs internet access for three essential functions: Telegram integration, AI analysis and the web dashboard (Performance Center). MT5 blocks that access by default — you have to allow the URLs below manually.
Path: Tools → Options → Expert Advisors → tick the option "Allow WebRequest for listed URL" and add the three URLs:
https://api.telegram.org https://generativelanguage.googleapis.com https://mqlprotrader.com.br
| URL | What it is for |
|---|---|
| https://api.telegram.org | Sending and receiving Telegram messages. Required for alerts on opened/closed trades, daily summaries and 24/7 AI support. |
| https://generativelanguage.googleapis.com | AI market analysis system via Google Gemini. Used by the artificial intelligence module to analyse market context and produce an AI-assisted reading. |
| https://mqlprotrader.com.br | Web dashboard (Performance Center). The robot sends every closed trade and the account summary to your online dashboard at mqlprotrader.com.br/central_performance, where you track performance, profiles and statistics. |
Step 3 — Enable automated trading at the broker
Some brokers require automated trading permission to be enabled in the account profile inside MT5 as well, not only on the AutoTrading button. Check under:
Tools → Options → Expert Advisors → confirm that "Allow automated trading" is ticked.
The banner at the top of the chart — what it is telling you
Right after you paste the URLs and click Verify Now, the robot's panels show up immediately and a banner appears at the top of the chart. It exists to answer one question only: can I trade yet? — and it has two states.
The robot has released the panels, but it is still testing the last URL, the Web Dashboard one. The panels appear early on purpose, so you do not think you dragged the robot onto the chart and it did not work — but that is not the authorisation to trade. The banner names the address being checked.
All three URLs were tested for real, one by one. Only now is everything released. The banner disappears on its own after a few seconds.
Installing MQL PRO TRADER
How to get MQL PRO TRADER
Download the robot already compiled, ready to use — there is nothing to compile. Choose the panel language:
You can also receive it by e-mail or by contacting support.
Save the file somewhere you can find easily, such as the desktop or the Downloads.
Installing MQL PRO TRADER in MT5
Double-click the .ex5 file you downloaded (e.g. MQL_PRO_TRADER [pt].ex5) — if MT5 is installed, the robot opens automatically under Navigator → Expert Advisors.
Refresh the Navigator and drag it onto the chart
Back in MetaTrader 5, open the Navigator (shortcut Ctrl + N or menu View → Navigator). Right-click Expert Advisors and choose Refresh — the robot will appear in the list.
Open the chart of the asset you want to trade (e.g. WINM25, WDOK25, XAUUSD). Then drag the robot from the Navigator onto the chart. A settings window will open.
Confirm the robot is active and working
After clicking OK, look at the top-right corner of the chart. You should see:
| What you see | What it means |
|---|---|
| 😊 Smiling face in the chart corner | ✅ Robot loaded and working correctly |
| 😟 Sad face in the chart corner | ⚠️ Robot loaded but with a problem — check the Journal |
| Button AutoTrading green on the top toolbar | ✅ Robot allowed to send orders |
| Button AutoTrading red | ❌ Click it to enable — without this the robot does not trade |
| On-screen alert "MT5 misconfigured" | ⚠️ One of the WebRequest URLs was not added — go back to the section Setting up MT5 |
Markets and Brokers (Forex / Crypto / Stocks / B3)
MQL PRO TRADER works on any MetaTrader 5 market — Forex, crypto, international shares (CFD) and the Brazilian market (B3: mini index, mini dollar and cash equities). But each market type has its own rules for margin, execution and position counting. This section explains those differences so nothing surprises you when it looks different from what you expected.
Overview by market
| Market | Examples | Margin | Positions | Watch out for |
|---|---|---|---|---|
| Forex | EURUSD, GBPUSD, XAUUSD | Leveraged — low margin relative to volume. Displayed normally. | Usually hedge (buy and sell at the same time on the same pair). | Volume in lots (0.01 = micro). Variable spread. |
| Cryptocurrencies | BTCUSD, ETHUSD | Leveraged (CFD). Displayed normally. | Hedge at most brokers. | Market 24/7 — sessions and the hours filter make less sense. High volatility: adjust SL/risk. |
| Shares (CFD) | AAPL, NVDA, GOOGL | Leveraged (CFD on a share). Displayed normally. | Hedge. | You trade the CFD, not the actual share. Trading hours follow the home exchange. |
| B3 — Futures | WIN (mini index), WDO (mini dollar) | Margin requirement set by B3. May show as "N/A" on a demo account (see below). | Almost always netting (one net position per contract). | Volume in contracts (1, 2, 3...). Filling RETURN. The contract has an expiry (WINM26, WDON26...). |
| B3 — Cash equities | PETR4, VALE3, ITUB4 | A cash purchase does not use a margin requirement — you pay the full amount. Margin ≈ 0 is normal. | Netting (one position per stock). | Filling RETURN required. Standard lot = 100 shares (round lot) or odd lot. |
B3 in detail (Brazilian market)
B3 uses exchange execution , unlike Forex/CFD brokers, which use a market maker. That changes three important things in how the robot behaves:
1. Margin requirement — and why it sometimes shows "N/A"
On futures contracts (WIN/WDO), B3 requires a margin requirement to hold the position. The robot shows that value in the "Total Margin" field ( INFO → SUMMARY sub-tab of the Manager), on the totals row of the POSITIONS tab and in "Margin.Used" (side ticket).
2. Cash equities do not consume margin
When you buy a cash equity on B3 (PETR4, VALE3...), you pay the full amount for the shares — there is no leverage and no margin requirement as in futures. So seeing the margin at zero with cash equities bought is the correct behaviour, not a fault.
3. Filling mode — avoid error 4756
B3 requires the filling mode RETURN for exchange orders (especially cash equities). If the order is sent with the wrong mode (IOC/FOK), the broker rejects it with error 4756 ("invalid request"). MQL PRO TRADER detects the filling mode supported by the symbol automatically, but if you see that error:
- Confirm the symbol has a compatible "Filling" setting (Return) in the contract specification in MT5.
- For cash equities, make sure the account has trading permission enabled (see Setting up MT5).
4. Netting vs Hedge — why sometimes there is only "one" position
There are two account modes in MT5:
| Mode | Where it is common | Behaviour |
|---|---|---|
| Hedge | Forex, Crypto, CFD | You can hold a buy and a sell at the same time on the same asset, each as a separate position. The POSITIONS tab shows each one. |
| Netting | B3 (futures and shares) | There is only one net position per asset. If you are long and sell the same quantity, the position goes flat (it does not create a separate short position). |
How the robot behaves in each mode — and what changes in your stop
The difference between the two modes is not just cosmetic: it changes what happens to your Stop Loss when you enter more than once on the same asset. The robot detects the mode on its own at start-up and writes it to the journal ( Experts):
[CONTA] Modo de margem: NETTING/EXCHANGE (ACCOUNT_MARGIN_MODE=2).
Uma posicao por simbolo: entradas novas FUNDEM e o SL/TP vale para o volume inteiro.| You enter 3 times on the same asset… | In HEDGE | In NETTING |
|---|---|---|
| How many positions stay open | 3, independent | 1, with an average price |
| Where the Stop Loss is measured from | from the price of each entry | from the average price of the position |
| If the stop is hit | closes only that position | closes the whole volume at once |
The three rules the robot applies on its own in netting
| Rule | What it prevents |
|---|---|
| 1. The stop is measured from the AVERAGE price | Without it, the stop would stay anchored to the last entry — and the real distance to your position would drift on its own, up or down, every time you entered again. Your "300 points" would stop describing your risk. |
| 2. The stop only TIGHTENS, never moves away | Without it, each new entry would undo what Breakeven and Trailing Stop had already gained, pushing the stop back out. A stop that walks backwards is not a stop. |
| 3. The stop is never ERASED | Without it, a new entry made with the SL systems switched off would remove the protection from the whole position — silently. |
🛡️ The OPEN risk limit (applies in both modes)
The Risk per trade parameter sizes each entry — and that only protects you if the entries are independent. When they stack up, total exposure grows and nobody adds it up. This limit does.
When the entry is refused, the robot now warns on screen — an alert in the safety panel saying how far past the cap it went and where the exposure comes from. Before, this existed only in the journal, and the order simply did not go through.
[RISCO] Entrada em WIN$ RECUSADA: o risco ABERTO somado ficaria em R$1007.14 e o teto
e R$987.67 (1.0% do patrimonio R$98767.20). Ja aberto: R$966.86 (medido R$0.00 +
estimado R$966.86 de 24 posicao(oes) SEM STOP). Esta ordem tambem entrou ESTIMADA
(veio sem stop). 👉 O que estoura a conta e a exposicao SEM STOP: ponha stop nessas
posicoes (ou feche-as). Mexer no teto so esconde o problema.Why they are not left out. Up to robot 5.0 (internal build 5.7.184) they added zero, on the reasoning that risk without a stop is unlimited and one should not invent a number. The problem measured in practice: adding zero is not neutral — it is stating that the risk is zero. With unprotected positions in the account, the cap was blind to most of the exposure and ended up refusing precisely the new order that carried a stop — blocking the disciplined behaviour and releasing the uncovered one.
What to do when it appears. If the refusal is caused by the part estimated, the robot says so in the message itself and recommends the right fix: put a stop on those positions (or close them). Loosening the cap hides the problem instead of solving it.
Quick summary
B3 futures (WIN/WDO): B3 margin (may be "N/A" on demo), netting account, volume in contracts, RETURN filling.
B3 cash equities: no margin (you pay the full amount), netting, RETURN filling.
"N/A" in the margin = the broker did not report the figure, it is not an error. Balance and free margin remain correct.
🤖 MQL ROBOT INITIAL SETTINGS
This is the robot's first settings group. It defines the robot's identity and some general behaviour for how it trades and shows information to you.
Think of this group as the robot's "registration form": who it is, what its name is, and a few basic preferences about how it should behave.
If you run more than one robot on the same computer or account, each needs a different ID so they do not get mixed up. For example: ROBO_01, ROBO_02, OURO_001.
⚠️ If you change the ID while the robot is running, the old buttons and panels stay "stuck" on the chart. To clear them, just remove the robot and drop it back on the chart.
❌ It does NOT change the visual panels on the chart — they use the fixed text "MQL PRO TRADER" regardless of what you put here.
✅ ON: enables the A1/A2/A3 multi-asset flow, including panels, filters and multi-asset manual commands.
✅ OFF: the EA is restricted to the current chart's asset (
_Symbol); the panel's A2/A3 toggles will have no operational effect.✅ OFF (default): The profit shown is "gross profit" — only the result of the price move, with no fees deducted (more optimistic).
✅ ON: The profit shown already deducts swap and commission, showing the real profit you will actually receive (more realistic).
Affects every profit figure shown on the panels and sent to Telegram.
✅ ON (Recommended): If MT5 is not set up correctly, an on-screen warning explains what needs adjusting. Recommended for beginners.
✅ OFF: The alert does not appear. For advanced users who already know how to set up the terminal and do not want to be interrupted.
⚙️ ENTRY CONTROLS (🤖 MQL ROBOT)
This group controls how and when the robot may open orders automatically. Here you set whether the robot is on or off, how many orders it may open, and which "safety locks" it must respect before entering a trade.
Think of this group as the robot's "entry rules" : it only opens an order if every rule you set here is satisfied at the same time.
✅ ON: Checks on every price tick — ideal for scalping (M1, M5).
✅ OFF: Only checks at the close of each candle — for longer-term strategies (H1, H4).
⚠️ If the expression already uses SetVolume[], this value is ignored for it.
🎯 It applies to the asset the line asks for: with @A2MARKET / @A3MARKET the order goes to A2 / A3 with this lot (up to 5.7.214, a line without SetVolume[] opened on the chart's asset).
🛑 Below the broker's minimum lot (WIN and WDO: 1 contract) the order is refused and the panel warns you — the robot never raises the lot on its own. Forex and crypto: 0.01; WIN/WDO: 1.
📌 The volume of manual trades (ticket and chart buttons) is configured separately under ⚙️ GENERAL SETUP FOR MANUAL TRADING.
✅ 0: No limit.
✅ 1, 2, 3... Limits to that number per direction.
⚠️ It is a cap, not a quantity to open: setting 5 does not make the robot open 5 orders, it only blocks the sixth. Pending orders have their own limit, in the parameter just below (✏️ Max PENDING ORDERS per direction (0=unlimited)).
[1]): on a BUY the robot measures from the ask up to the high of the previous candle; on a SELL, from the low of the previous candle down to the bid. While price has not yet passed that reference the distance is negative and the filter does not get in the way — it only acts after price has broken out. The maximum tolerated distance is set in the next parameter.⚠️ The "point" here is the same one used by
SetSL[] — the TRADER's point, not the broker's tick. It is the robot's single ruler, and it changes from one market to another: on gold and Bitcoin 1 point = US$ 1.00 (so the default of 10 means US$ 10); on WIN$ 1 point is 1 index point; on PETR4, 1 cent; on EURUSD, 1 pip. See the full table under What "1 point" means in each market.How to find your value: the robot measures the asset and warns you on the panel — "[asset] moves ~N pts/candle; the filter skips entries over X pts past the prior candle's high/low". Use between 20% and 50% of that N. Order of magnitude on M1: BTCUSD → 2 to 30 · XAUUSD → 2 to 20 · WIN$ → 100 to 250 · EURUSD → 2 to 4 · B3 shares → 3 to 10.
The default of 10 points works on forex and gold, but is far too tight on WIN$ (10 index points). Check it before switching the automation on — or turn the filter off, if your strategy is precisely to enter on the breakout.
💡 If you calibrated this field before robot 5.7.93, re-read the number: back then the filter measured in broker ticks, and the same 10 was worth US$ 0.10 on Bitcoin.
📌 To limit by an exact number, use Max orders per direction.
@CloseBest/@CloseWorst/@CancelPending, the Flatten opposite position, Breakeven, the Trailings, the candle stop, profit giveback, the Time stop and pending-order expiry all act on them. On, this automatic management only touches what the robot's entry rules opened. Left out: the positions and pending orders you open through the ticket, the buttons, shortcuts or mouse, the Desk or Telegram, shadow orders, the Invert button, copies (Copy) and those opened in MetaTrader, on your phone or by another robot. Use it when you load a strategy (from the Arsenal, for example) and want to trade by hand on the same asset without its end-of-day flattening or Breakeven touching your position.What does not change: your commands (ticket, panel, Desk, Telegram) still act on everything; the account protections (double drawdown, daily profit protection) keep their own reach; and the expression variables (
BUYCOUNT, BPROFIT…) still count every position on the asset — the parameter decides what the robot touches, not what it sees. Netting account (the rule at B3 brokers): MetaTrader adds everything into a single position per asset, so your part cannot be separated from the robot's — there the parameter only applies to pending orders, and the Journal says so.🎯 ENTRY SYSTEM — HOW THE ROBOT DECIDES
This section describes the decision flow the robot follows to open an automatic order. The parameters that control each stage are in the group ⚙️ ENTRY CONTROLS (🤖 MQL ROBOT) — here you learn the order in which they are applied.
Decision pipeline (real execution order)
| # | Stage | Blocks if... | Controlling parameter |
|---|---|---|---|
| 1 | Robot on? | Robot disabled by the panel or the input | ENABLE TRADING ROBOT + toggle ROBOT of the MQL Manager |
| 2 | Direction allowed | Current direction is BUY-ONLY and the expression is a sell (or vice versa) | Robot direction + buttons ▲BUY / ▲BOTH▼ / ▼SELL |
| 3 | Context filters | Outside the hours, day or session; spread above the limit; news window active | Hours, Sessions, Spread, News Detector |
| 4 | Daily locks | Lock from the daily loss/profit being hit, double drawdown triggered | Daily Lock, Drawdown, Profit Protection |
| 5 | BUY/SELL expression evaluated | The expression's condition returns false | BUY1–BUY10 / SELL1–SELL10 |
| 6 | Custom filters | Some active Buy/Sell filter returns false | Filtro_Buy_1..10 / Filtro_Sell_1..10 |
| 7 | Distance filter | Current price is farther than the Maximum distance from the reference level | Distance filter for automatic entries + Max distance (pts) |
| 8 | Per-candle limits | Already reached the Max entries per candle for the current direction | Limit entries per candle + Max entries + Reset on new candle |
| 9 | Position limits | Already has an order in the same direction (if Avoid same direction) or already reached Max orders per direction | Skip order if position exists in the direction + Max orders per direction |
| 10 | Volume and protections | — | Volume (from the input or SetVolume[]), SL/TP from the protections group |
| 11 | Flatten opposite position | If on, closes the opposite side before entering | Flatten the opposite position before entering |
🔄 SEVERAL ORDERS ON THE SAME SIGNAL
There is no parameter of the sort "open N orders". What makes the robot open several orders on the same signal are the 10 expression slots: ✏️ BUY expression [01] to [10] (and the sell ones), which in the file .set are called BUY1…BUY10 and SELL1…SELL10. Write the same condition in several slots and out comes one order per slot — and each slot can have its own volume and its own target.
1: from the second slot onwards the robot refuses the entry in the same candle, and the reason only shows in the log. For 3 orders together, set 3 — or switch the limit off.Different volume and target on each order
It is each slot's action that decides this, not a group of parameters. In the expression's own text:
| Slot | Example | Result |
|---|---|---|
BUY1 | HIGH[0]>HIGH[1] @MARKET -> SetVolume[0.01] SetTP[300] | 1st order: 0.01 lot, target 300 |
BUY2 | HIGH[0]>HIGH[1] @MARKET -> SetVolume[0.02] SetTP[600] | 2nd order: 0.02 lot, target 600 |
BUY3 | HIGH[0]>HIGH[1] @MARKET -> SetVolume[0.03] SetTP[900] | 3rd order: 0.03 lot, target 900 |
The ceilings live in two other parameters, and they are a limit, not a quantity to open: ✏️ Max open POSITIONS per direction (0=unlimited) and ✏️ Max PENDING ORDERS per direction (0=unlimited). Putting 5 there does not open 5 orders — it merely stops the sixth.
ENTRY CONDITIONS — BUY
BUY1…BUY10 and SELL1…SELL10: it is the same field, and that is what it is called inside the .set.The 8 expression groups — 80 fields in total
All of the robot's automation is written in these fields. There are 8 groups of 10, and each one's name says exactly what it does:
| In the Inputs | Qty | What it is for | In the file .set |
|---|---|---|---|
| ✏️ BUY expression [01]…[10] | 10 | The condition that opens a buy. | BUY1…BUY10 |
| ✏️ SELL expression [01]…[10] | 10 | The condition that opens a sell. | SELL1…SELL10 |
| ✏️ BUY exit expression [01]…[10] | 10 | Closes buys that are already open when the condition happens. | EXIT_BUY1…EXIT_BUY10 |
| ✏️ SELL exit expression [01]…[10] | 10 | Closes sells that are already open. | EXIT_SELL1…EXIT_SELL10 |
| ✏️ (TP/SL/BE/TS) BUY expression [01]…[10] | 10 | Moves the stop and the target of a buy that is already open, without closing it. | MODIFY_BUY1…MODIFY_BUY10 |
| ✏️ (TP/SL/BE/TS) SELL expression [01]…[10] | 10 | The same, for sells. | MODIFY_SELL1…MODIFY_SELL10 |
| ✏️ BUY Filter expression [1]…[10] | 10 | Permission, not entry: it only lets the buy through if the condition is true. | CustomFilter_Buy_1…_10 |
| ✏️ SELL Filter expression [1]…[10] | 10 | The same, for sells. | CustomFilter_Sell_1…_10 |
• A filter does not open an order — it only authorises or blocks whatever the BUY/SELL expression tries to open. Each filter has its own on/off switch (☑️ Enable Filter 1… in the BUY group and in the SELL group, with the same name in both).
• Exit ≠ Modification: the Exit one closes the position; the (TP/SL/BE/TS) one only moves the stop or the target and leaves the position alive.
F.C1…F.C5 and F.V1…F.V5). Filters 6 to 10 do exist and work, but they can only be switched on from the Inputs — there is no button for them in the Manager.🔢 Free numbers P1..P5 — the number the tester optimizes
Right below the expressions, the F7 window has the group 🔢 FREE NUMBERS P1..P5, with five numeric fields. Write P1 inside any expression instead of a number, as in DAYCHG<-P1. A number typed inside the expression text cannot be optimized by the MT5 Strategy Tester, which only optimizes numeric fields; P1 can. This is how you find which % drop works best on an asset: optimize P1 from 0.5 to 3 in steps of 0.25.
P1, on either side of the comparison and inside math. Fields P2 to P5 work the same way, each with its own name.P2.P3.P4.P5.This group is the heart of the automatic robot. Here you write the rules that tell the robot when to open buys. There are 10 independent slots — each slot is a separate rule, checked constantly.
Structure of an expression
[CONDIÇÕES] @TIPO_DE_ORDEM -> [AÇÕES_OPCIONAIS] Exemplo: HIGH[0]>HIGH[1] && DIR[0]==1 @MARKET -> SetVolume[0.01]
Read in plain language: "If the current candle's high is greater than the previous candle's high AND the candle is bullish, open a market buy with 0.01 lots."
Candle variables
| Variable | Meaning |
|---|---|
HIGH[0] | The current candle's high |
HIGH[1] | The previous candle's high |
LOW[0] | The current candle's low |
CLOSE[0] | The current candle's close |
OPEN[0] | The current candle's open |
DIR[0] | The candle's direction: 1 = up, -1 = down |
ASK | The current buy price |
BID | The current sell price |
Open position variables
| Variable | Meaning |
|---|---|
VOLBUY | The total volume of open buys |
VOLSELL | The total volume of open sells |
BPROFIT | The profit/loss of the open buys (in money) |
SPROFIT | The profit/loss of the open sells |
PROFITO | The profit/loss of EVERY open position |
DPROFIT | The day's total profit (closed + open) |
LASTBUY | The price of the last buy opened (on a netting account or on the exchange: the price of the last execution added to the position) |
LASTSELL | The price of the last sell opened (on a netting account or on the exchange: the price of the last execution added to the position) |
Detailed profit and volume variables
Versions split by side (buy/sell) and by result (profitable/losing), plus variants that add everything up. Useful for fine risk management. All of them are A1-only.
| Variable | Meaning |
|---|---|
BPROFITPOS / BPROFITNEG | The summed profit of the profitable buys only / the losing ones only |
SPROFITPOS / SPROFITNEG | The same for sells |
BPROFITO / SPROFITO | The total profit of EVERY open buy / EVERY open sell |
BPROFITALL / SPROFITALL | The total buy / sell profit (excluding swap and commission) |
CPROFITALL / VPROFITALL | The total buy / sell profit (including swap and commission) |
PROFITALL / CLOSEALL | The account's total profit (open buys + sells) |
VOLBUYPOS / VOLBUYNEG | The open volume of profitable / losing buys |
VOLSELLPOS / VOLSELLNEG | The open volume of profitable / losing sells |
FREE_MARGIN | The free margin available in the account |
Closed position variables
They read data from the last finished trade — useful for re-entry, recovery, or to avoid repeating straight after a loss. A1-only.
| Variable | Meaning |
|---|---|
ENTRYBUY / EXITBUY | The entry / exit price of the last closed BUY |
ENTRYSELL / EXITSELL | The entry / exit price of the last closed SELL |
SLBUY / TPBUY | The Stop Loss / Take Profit the last closed BUY had (0 if it had none) |
SLSELL / TPSELL | The same for the last closed SELL |
TEXITBUY / TEXITSELL | The duration in minutes of the last closed BUY / SELL |
LASTBUYTIME / LASTSELLTIME | Minutes since the last buy / sell CLOSED (the robot reads today's closes; 0 until it has seen one) |
RESULTB[30] / RESULTS[30] | The profit of buys / sells closed in the last N minutes (e.g. 30) |
Detailed daily and weekly statistics
Besides DPROFIT and DWINRATE (already listed), the EA splits the statistics by side. The D prefix = day, W = week. A1-only.
| Variable | Meaning |
|---|---|
DBUYTRADES / DSELLTRADES | The total buy / sell trades closed in the day |
DBUYWINCOUNT / DBUYLOSSCOUNT | Winning / losing buys in the day |
DSELLWINCOUNT / DSELLLOSSCOUNT | Winning / losing sells in the day |
DBUYWINRATE / DSELLWINRATE | The win rate (%) of buys / sells in the day |
The same ones exist for the week with the prefix W: WBUYTRADES, WBUYWINCOUNT, WBUYWINRATE, WSELLWINRATE, and so on. | |
Time variables
| Variable | Meaning |
|---|---|
TIME | The current time (e.g. TIME>9 = after 09:00) |
DAYOFWEEK | Day of the week: 1=Monday ... 5=Friday |
NEWSIN[15] | It returns 1 if there is high-impact news in the next 15 min |
Phase A/B variables — Timing, Session, Risk and News
Variables confirmed in the EA at buffers 430 to 448. The session ones use the same time reference as TIME. The risk/tracking ones below are A1-only, meaning they refer to the chart's main asset.
| Variable | What it returns | Typical use |
|---|---|---|
NOVOBAR | 1 on the first tick of a new bar; then it goes back to 0 | NOVOBAR==1 && CLOSE[1]>OPEN[1] |
⚠️ The golden rule of NOVOBAR: always use it with the CLOSED candle (index [1]).The NOVOBAR is 1 for a single instant — the bar's first tick. And at that instant the current candle ([0]) has only just opened: its high is still practically the opening price. That is why NOVOBAR==1 && HIGH[0]>HIGH[1] is a rule the robot accepts, evaluates and almost never fires: by the time price finally breaks the previous high (seconds later), NOVOBAR has already gone back to 0. There is no error and no warning — the strategy simply never enters.✅ Confirm at the close (one evaluation per candle): NOVOBAR==1 && HIGH[1]>HIGH[2] · NOVOBAR==1 && CLOSE[1]>OPEN[1]✅ A breakout inside the bar (it fires the moment it happens): HIGH[0]>HIGH[1] — without the NOVOBAR. Here the condition is re-evaluated on every tick and can fire more than once inside the same candle: use the parameter Maximum open POSITIONS per direction (0=unlimited) to cap it.The only exception where the combination with [0] does work is an opening gap, when the bar is born already above the previous high. | ||
BARSEG | Seconds since the current candle opened | BARSEG>30 |
SESS_ASIA, SESS_LONDRES, SESS_NY | 1 when the session is active | SESS_LONDRES==1 && SPREADX<1.3 |
SPREADMED | The EMA average of the spread in points, updated in real time | SPREAD<SPREADMED*1.5 |
SPREADX | The current spread divided by the average spread. 1.0 = normal; 2.0 = twice the normal | SPREADX<1.3 |
PFDIA | The Profit Factor of the trades closed in the day | PFDIA>1.5 && DTRADES>=3 |
NEWSIMP | The next news item's impact: 1 low, 2 medium, 3 high | NEWSIMP<3 |
NEWSCTY | 1 if the next news item affects the asset's currency/pair | NEWSIMP==3 && NEWSCTY==1 |
RISCO_AB | Total open risk in money if every A1 SL is hit. ⚠️ Counts only positions that have a stop — whoever has no stop adds zero here. That is why this number can be smaller than the "combined open risk" of the risk limit, which estimates positions without a stop (see The OPEN risk limit). They are two different questions: here it is "how much do I lose if my stops fire"; there it is "what is my real exposure". | RISCO_AB<100 |
ALVO_AB | The total potential target in money if every A1 TP is hit | BPROFIT>ALVO_AB*0.5 |
DIST_SL, DIST_TP | The distance in points to the SL/TP of the most recent A1 position | DIST_TP<30 |
RMULT | The current profit/loss divided by the position's initial risk | RMULT>=1 @BCLOSE -> ClosePercent[50] |
SEQWIN, SEQLOSS | The streak of wins or losses closed today | SEQLOSS<2 |
POSMIN, POSMAX | The worst and the best floating profit ever seen on the A1 position since the EA started tracking it | POSMAX>50 && BPROFIT<POSMAX-20 |
Phase D variables — Average Price, Margin, Counts and Signals
Account variables, open positions and signal memory. The average price and the counts refer to the robot's positions on the chart's asset (A1). Ideal for grid, recovery and exposure control.
| Variable | What it returns | Typical use |
|---|---|---|
AVGPRICE | The weighted average price of EVERY open position (buy+sell) on the asset | BID>AVGPRICE @BCLOSE |
BUYAVGPRICE / SELLAVGPRICE | Average price of the buys only / sells only opened BY THE ROBOT (the BPRICE counts all of the asset's) | BID<BUYAVGPRICE-100 @MARKET -> SetVolume[VOLBUY*2] |
TIMELEFT | Seconds left until the current candle closes | TIMELEFT<10 @BCLOSE |
MARGINLEVEL | The margin level in % (999999 when there are no positions) | MARGINLEVEL>200 && DIR[0]==1 @MARKET |
MARGINFREE | The free margin available (the same as FREE_MARGIN) | MARGINFREE>500 |
ALLPOSOPEN | The number of open positions (buy+sell) on the asset | ALLPOSOPEN<3 && DIR[0]==1 @MARKET |
BUYPOSOPEN / SELLPOSOPEN | The number of open buy / sell positions | BUYPOSOPEN<5 @MARKET -> SetVolume[0.01] |
GAINPROFIT / LOSSPROFIT | The sum of the gains only / the losses only of the trades closed in the day | LOSSPROFIT>-100 |
SIGLAST | The last entry signal fired: 0=buy, 1=sell, -1=none | SIGLAST==1 && DIR[0]==1 @MARKET |
SIGTOTAL | The total entry signals fired in the day (buy+sell) — a pending order counts when it is placed | SIGTOTAL<5 && DIR[0]==1 @MARKET |
SIGBUY / SIGSELL | The counter of buy / sell signals in the day | SIGBUY<3 @MARKET -> SetVolume[0.01] |
Companions: SIGPRICE (the last signal's price), SIGTIME/SIGTIMEBUY/SIGTIMESELL (the time of the last signals). | ||
Indicator variables (IND)
| Variable | Meaning |
|---|---|
IND1[buffer,candle] | Indicator 1's value — e.g. IND1[0,0] = buffer 0, current candle |
IND2[0,0] | Indicator 2's current value (buffer 0, current bar) |
There are 30 indicators (IND1 the IND30). The number in [ ] says how many candles back — 0 = current, 1 = previous. Where to declare each one is right below. | |
How to declare an indicator (IND1 to IND30)
On the Inputs, look for the title 🤖️ INDICATORS FOR EXPRESSIONS SETUP. Each of the 30 indicators always has the same three fields — only the number changes. Filling in IND1 works exactly like filling in IND30.
IND1[0,0] has no value and the expression that depends on it never enters.RSI, MACD, STOCH (or STOCHASTIC), ADX, ATR, BB (or BBANDS/BOLLINGER), EMA, SMA (or MA) and PRICE. Upper or lower case makes no difference.🔑 Any other name is treated as a custom indicator — the robot looks for the
.ex5 with that name in your indicators folder. Leaving it blank (or NONE) switches it off.window , asset , timeframe , indicator parameters…• window:
NEW opens the indicator in a separate window; 0 draws it on the main chart.• asset:
SYMBOL (or blank) uses the chart's asset; or write another one, e.g. EURUSD.• timeframe:
M1, M5, M15, M30, H1…• from the fourth field onwards come the indicator's own parameters, in the same order MT5 asks for them.
⚠️ Fewer than 3 fields and the indicator does not load — the robot logs
CSV invalido (min 3 campos) in the journal and the expression using that IND is left with no value.| I want… | NAME | PARAMETERS |
|---|---|---|
| A 14 RSI on M5 | RSI | NEW,SYMBOL,M5,14,0 |
| MACD 12/26/9 on M5 | MACD | NEW,SYMBOL,M5,12,26,9,0,0 |
| Stochastic 5/3/3 | STOCH | NEW,SYMBOL,M5,5,3,3,1 |
| A 21 exponential average on the chart | EMA | 0,SYMBOL,M5,21,1,0 |
| EURUSD's RSI on H1 (another asset) | RSI | NEW,EURUSD,H1,14,0 |
Multi-asset variables (A2 / A3)
If you have set up a secondary (A2) or tertiary (A3) asset in the Multi-Asset Group, you can use them in expressions as a confirmation filter or to open an order directly on that asset.
| Variable | Meaning |
|---|---|
A2HIGH[0] | A2's current candle high |
A2LOW[0] | A2's current candle low |
A2CLOSE[0] | A2's current close |
A2VOLBUY | The volume of open buys on A2 |
A2BPROFIT | The profit of the open buys on A2 |
A2DPROFIT | The day's total profit on A2 |
A2BUYCOUNT | The number of open buy positions on A2 |
A2LASTBUY | The price of the last buy opened on A2 |
A3 mirrors A2: every token above exists with the prefix A3 (A3HIGH[0], A3CLOSE[0], A3VOLBUY, A3BPROFIT, A3DPROFIT, A3BUYCOUNT, A3LASTBUY, ...). Both A2 and A3 also cover the complete history families of the day (A2DTRADES, A2DWINRATE, A2DLOSSES...), of the week (A2WPROFIT, A2WWINRATE...), current price (A2ASK, A2BID, A2SPREAD) and open positions (A2SELLCOUNT, A2POSTIME, A2PROFITALL, A2LASTSELL). An alternative syntax is accepted: the prefix S2_ / S3_ (e.g. S2_DPROFIT = A2DPROFIT). | |
Order types
| Type | What it does |
|---|---|
@MARKET | Opens immediately at the current price. The most used type. |
@LIMIT[N] | ⭐ A pending order N points in favour of the pullback: on a BUY = a limit N pts below the price; on a SELL = a limit N pts above. E.g. @LIMIT[50] |
@STOP[N] | ⭐ A pending order N points on the breakout: on a BUY = a stop N pts above the price; on a SELL = a stop N pts below. E.g. HIGH[0]>HIGH[1] @STOP[100] (breakout) |
@LIMIT[$X] / @STOP[$X] | ⭐ The same thing, but with the distance in price value instead of points — the robot converts it on its own. It pays off where 1 point not equals 1 price unit: @STOP[$0.0030] on EURUSD (pips), @STOP[$0.50] on PETR4 (cents). On gold, Bitcoin, WIN$ and WDO$ it is redundant (there 1 point already is 1 price unit, so @STOP[$20] = @STOP[20]). |
@A2MARKET | Opens the order directly on the secondary asset A2 |
@A3MARKET | Opens the order directly on the tertiary asset A3 |
@BCLOSE:N and the "which rule fired" notice find it. And the pending order counts as a signal (SIGTOTAL, SIGBUY, SIGSELL) the moment it is placed — filled or not.Optional Actions after the Arrow ->
| Action | Effect |
|---|---|
SetVolume[0.01] | Sets the order's exact volume |
SetVolume[VOLBUY*2] | Volume = twice what is already bought |
SetTP[50] | Sets the Take Profit at 50 points |
SetSL[30] | Sets the Stop Loss at 30 points |
SetRiscoPct[1] | Risks 1% of the balance on that trade. The robot works out the volume so that, if the stop is hit, the loss is 1% — using the SL distance and the asset's point value. It requires an SL (from the expression or from the inputs); without one the robot warns you and keeps the normal volume instead of guessing. It works on any market: 1% of R$ 100,000 with a 200 pt SL on the mini index = 25 contracts; with an R$ 1.00 SL on PETR4 = 1,000 shares |
SetVolume[COND ? A : B] | ⭐ Ternary: it uses volume A if the condition is true, otherwise B. E.g. SetVolume[BID>AVGPRICE ? 0.02 : 0.01]. It recognises prices (ASK/BID), Phase C and Phase D. |
SetVolume[]: + addition, - subtraction, * multiplication, / division and % ⭐ the remainder of a division (e.g. CLOSE[0]%10 = what is left over when the price is divided by 10). Parentheses group MATH only; they do NOT group conditions, and using them that way makes the robot reject the whole expression — see the "( )" row in the Library syntax table.Ready-made buy examples
// Buy when the high breaks the previous candle's: CLOSE[0]>HIGH[1] && DIR[0]==1 @MARKET -> SetVolume[0.01] // Martingale: double the lot if there is already a position: DIR[0]==1 && VOLBUY>=0.01 @MARKET -> SetVolume[VOLBUY*2] // With trading hours and no news: TIME>9 && TIME<17 && DIR[0]==1 && NEWSIN[15]==0 @MARKET -> SetVolume[0.01] // Bullish engulfing candle: DIR[0]==1 && CLOSE[0]>OPEN[1] && OPEN[0]<CLOSE[1] @MARKET // With an indicator — buy when RSI (IND1) is below 30: IND1[0,0]<30 @MARKET -> SetVolume[0.01] // Buy on A1 only if A2 is also rising (correlation filter): A2CLOSE[0]>A2CLOSE[1] && DIR[0]==1 && VOLBUY<0.01 @MARKET -> SetVolume[0.01] // Open an order directly on A2 when A1 has a signal: DIR[0]==1 && A2VOLBUY<0.01 @A2MARKET -> SetVolume[0.01]
ENTRY CONDITIONS — SELL
SELL1…SELL10 used in this manual is the same field — and it is its name inside the .set.It works exactly like the buy expressions, only mirrored to the sell side. The logic is identical: 10 independent slots for rules on when to open sells.
Differences from buys
| Buy | Sell (equivalent) |
|---|---|
VOLBUY | VOLSELL |
BPROFIT | SPROFIT |
LASTBUY | LASTSELL |
DIR[0]==1 (up) | DIR[0]==-1 (down) |
Ready-made sell examples
// Sell when the low breaks the previous candle's: CLOSE[0]<LOW[1] && DIR[0]==-1 @MARKET -> SetVolume[0.01] // Sell-side martingale: DIR[0]==-1 && VOLSELL>=0.01 @MARKET -> SetVolume[VOLSELL*2] // Bearish engulfing candle: DIR[0]==-1 && CLOSE[0]<OPEN[1] && OPEN[0]>CLOSE[1] @MARKET // Hedge: open a sell matching the buy volume: DIR[0]==-1 @MARKET -> SetVolume[VOLBUY]
EXIT CONDITIONS — BUY
It sets the rules for the robot to CLOSE open buys automatically. It works on the same logic as the entry expressions, but uses specific closing types.
Available close types
| Type | What it does |
|---|---|
@BCLOSE | Closes all the open buys |
@BCLOSE_POSITIVE | Closes only the buys in profit |
@BCLOSE_NEGATIVE | Closes only the buys in loss |
@A2BCLOSE | Closes every open buy on A2 |
@A2BCLOSE+ | Closes only the profitable buys on A2 |
@A2ALL | Closes EVERY position on A2 (buy + sell) |
Most used variables in exits
| Variable | Meaning |
|---|---|
BPROFIT | The total profit/loss of the buys (in $) |
PROFITO | The profit/loss of EVERY position together |
VOLBUY | The total volume of open buys |
BPRICE | The average entry price of the open buys |
A2BPROFIT | The profit of the open buys on A2 |
Ready-made examples
// Close every buy once they profit R$50: BPROFIT > 50 @BCLOSE // Close only the buys in profit (partial take): BPROFIT > 20 @BCLOSE_POSITIVE // Close buys when RSI (IND1) reaches overbought: IND1[0,0] > 70 @BCLOSE // Close buys outside trading hours: TIME >= 17 @BCLOSE // Close on profit OR loss (two slots): BPROFIT > 100 @BCLOSE BPROFIT < -50 @BCLOSE // Close A2 buys using A2's profit: A2BPROFIT > 50 @A2BCLOSE
@BCLOSE close all the buys, regardless of which field opened them. The field's number only says which expression will be evaluated.EXIT CONDITIONS — SELL
A mirror of the buy exits, but for closing sells.
| Type | What it does |
|---|---|
@SCLOSE | Closes all open sells |
@SCLOSE_POSITIVE | Closes only the sells with a profit |
@SCLOSE_NEGATIVE | Closes only the sells with a loss |
// Close every sell once they profit R$50: SPROFIT > 50 @SCLOSE // Close only the sells in profit: SPROFIT > 20 @SCLOSE_POSITIVE // Fechar por RSI em sobrevenda: IND1[0,0] < 30 @SCLOSE
ORDER MODIFICATION — MODIFY_BUY / MODIFY_SELL
It lets you adjust the Stop Loss, Take Profit or switch on Trailing Stop on orders that are already open, based on market conditions. It neither opens nor closes orders — it only modifies existing positions.
Modification tokens
| Token | What it does |
|---|---|
@MODIFY | Modifies only the positions opened by the entry with the SAME number: the BUY (TP/SL/BE/TS) expression [02] acts on the positions that BUY [02] opened |
@MODIFYALL | Modifies EVERY position on the line's side, whichever entry opened it: in a BUY expression, every buy; in a SELL one, every sell |
@A2MODIFY | Modifies open positions on A2 |
@A3MODIFY | Modifies open positions on A3 |
Actions available after ->
| Action | What it does |
|---|---|
SetSL[30] | A fixed Stop Loss 30 points from the entry price |
SetSL[BPRICE] | Moves the SL to the entry price (Break Even) |
SetSL[BPRICE+10] | Moves the SL 10 points beyond the entry price (locked-in profit) |
SetSL[BID-50] | Moves the SL to 50 points below the current price (manual trailing) |
SetSL[LOW[0]] | Moves the SL to the current candle's low |
SetTP[100] | Sets a fixed Take Profit at 100 points |
SetTP[BID+80] | Moves the TP to 80 points above the current price (dynamic TP) |
SetBE[0] | Break Even — the SL goes to the exact entry price |
SetBE[10] | Break Even with 10 points of slack (a minimum profit locked in) |
SetTS[50] | Trailing Stop — the SL follows price keeping 50 points of distance |
BPROFIT>50 @MODIFYALL -> SetBE[10] in [01]) and the trailing in the next one (BPROFIT>120 @MODIFYALL -> SetTS[60] in [02]). On the same position, once the HIGHER-numbered expression has acted, the lower-numbered one is blocked: the BE does not pull back the stop the trailing has already raised. With @MODIFY the two never touch the same position — each one only acts on those of the entry with the same number.@BCLOSE:1 / @SCLOSE:1 also act on them — the robot manages your manual position. Numbers 2 to 10 only touch the positions of their own entry. To keep the robot away from manual positions, leave [01] empty or commented out (#) and use numbers 2 to 10 — or turn on ☑️ Only manage positions the robot opened (not manual ones).You can combine actions in the same expression: SetSL[BPRICE+5], SetTP[BID+80]
Practical examples
// Simple Break Even — the SL moves to the entry price at R$50 profit: BPROFIT > 50 @MODIFY -> SetSL[BPRICE] // Break Even with locked profit — SL 10 points beyond the entry: BPROFIT > 50 @MODIFY -> SetSL[BPRICE+10] // Trailing Stop — the SL follows price on any profit: BPROFIT > 1 @MODIFYALL -> SetTS[50] // Manual trailing — SL 50 pts below the current price: BID > LASTBUY+100 @MODIFY -> SetSL[BID-50] // Stop on the candle (price action): DIR[0]==1 && BPROFIT > 30 @MODIFY -> SetSL[LOW[0]] // Global protection: if the day loses R$500, tighten the SL on all buys (repeat it in a SELL expression for the sells): DPROFIT < -500 @MODIFYALL -> SetSL[3] // Break Even on sells once they profit R$50: SPROFIT > 50 @MODIFY -> SetSL[SPRICE] // Break Even em A2: A2BPROFIT > 30 @A2MODIFY -> SetSL[BPRICE]
BUY AND SELL FILTERS
Filters are extra expression fields that you can switch on and off individually. The robot only takes an entry if every active filter for that direction is true at the same time.
There are 10 filters for buys and 10 filters for sells, all independent. By default only the first 5 on each side are visible on the panel — the others show up when you need them.
1️⃣ The BUY or SELL expression evaluates → true
2️⃣ Every active filter for that direction is checked → all true
3️⃣ The order is executed
⚠️ Buy filters do not interfere with sells and vice versa. An empty or disabled filter is simply ignored.
How to enable and set up a filter
In the EA's parameters you will find two fields for each filter — the same ones that appear in the parameter list:
- ☑️ Enable Filter 1 (…up to 5), in the 🤖 BUY FILTER SETUP (01 to 05) group — tick it to switch the filter on. Unticked filters are ignored entirely by the robot.
- ✏️ BUY Filter expression [N] — write the condition here using the same syntax as the BUY/SELL fields
HIGH[0]>HIGH[1] — only buy if the current high has taken out the previous oneA2HIGH[0]>A2HIGH[1] — confirm that the correlated asset (A2) is rising tooIND1[0,0]<30 — RSI below 30 as an oversold filter before buyingIND2[0,0]>IND3[0,0] — a crossover of two indicators as confirmationTIME>=9.0 && TIME<=17.0 — only trade within a specific time windowSPREAD<15 — block entries when the spread is high
Using a filter in any expression — FBUY[N] / FSELL[N]
You can reference a filter inside any expression field — EXIT and MODIFY included. To do that use the tokens FBUY[N] and FSELL[N], where N is the filter's number.
Example: if you wrote RSI[0,0]<30 in the ✏️ BUY Filter expression 1field, then writing FBUY[1] in any other field evaluates exactly that condition at that moment.
| Token | What it does |
|---|---|
FBUY[1] | It evaluates BUY Filter 1's condition — true if the expression is satisfied |
FSELL[3] | It evaluates SELL Filter 3's condition |
FBUY[1] > 0 | An equivalent form of FBUY[1] — same result |
BUY1 = FBUY[1] @MARKET — it enters when BUY Filter 1's condition is trueEXIT1 = FSELL[2] @BCLOSE — it closes buys when SELL Filter 2 firesBUY1 = RSI[1,0]<30 && FBUY[1] @MARKET — RSI oversold AND BUY Filter 1's conditionEXIT1 = SPROFIT[0]>50 || FSELL[1] @BCLOSE — target profit OR SELL Filter 1's conditionAll of the syntax available in expressions works inside the filter fields too.
Indicators available in expressions and filters (IND1 to IND30)
Set up external indicators for use in expressions through the variables IND1[buffer, candle] to IND30[buffer, candle]. The parameters follow the format: NEW, SÍMBOLO, TIMEFRAME, param1, param2, .... Buffers are read by number; if you do not know the right buffer, use the EA's buffer analyser.
| IND | Example setup | Result |
|---|---|---|
| IND1 | NEW,SYMBOL,M5,14,0 | A 14-period RSI on M5 of the current asset |
| IND2 | NEW,SYMBOL,M5,12,26,9,0,0 | MACD 12/26/9 — buffer 0 = the MACD line, buffer 1 = the signal |
| IND3 | NEW,SYMBOL,M5,5,3,3,1 | Stochastic — buffer 0 = %K, buffer 1 = %D |
| IND4 | NEW,SYMBOL,M5,9,1,0 | A 9-period EMA on M5 |
| IND5 | NEW,EURUSD,D1,200,1,0 | A 200 daily EMA on EURUSD (a fixed asset) |
| IND6–IND20 | Block INDICATORS FOR EXPRESSIONS SETUP (6 TO 30) | Extra indicators for bigger strategies, filters 6–10 and additional confirmations. |
| IND21–IND30 | Block CUSTOM INDICATORS (AI & EXPRESSIONS) | Custom slots used by the AI and also available in expressions, reading buffers 0..7 when enabled. |
Native indicators accepted: RSI, MACD, STOCH, EMA, SMA, ATR, ADX, BOLLINGER, CCI, WPR, DEMA, TEMA and others — the name has to match the file in MetaTrader.
💡 Strategy examples with filters
The fields come with example expressions already filled in — you can use them, change them or start from scratch. Below, reference uses by type of strategy:
| Goal | BUY Filter | SELL Filter |
|---|---|---|
| Candle confirmation A high/low beyond the previous one |
HIGH[0]>HIGH[1] |
LOW[0]<LOW[1] |
| Correlation with asset A2 The secondary asset in the same direction |
A2HIGH[0]>A2HIGH[1] |
A2LOW[0]<A2LOW[1] |
| Indicator crossover E.g. IND2=MACD, IND3=MACD signal |
IND2[0,0]>IND3[0,0] |
IND2[0,0]<IND3[0,0] |
| RSI — oversold / overbought E.g. IND1=RSI(14) on M5 |
IND1[0,0]<30 |
IND1[0,0]>70 |
| RSI — which side of the market (the 50 line) Only trade on the right side of RSI |
IND1[0,0]>50 |
IND1[0,0]<50 |
| Stochastic — the extreme zone E.g. IND3=Stoch %K on M5 |
IND3[0,0]<20 |
IND3[0,0]>80 |
| Trend by MA crossover E.g. IND4=EMA9, IND5=EMA21 |
IND4[0,0]>IND5[0,0] |
IND4[0,0]<IND5[0,0] |
| Continuation — IND rising/falling IND rising for 2 candles |
IND4[0,0]>IND4[0,1] && IND4[0,1]>IND4[0,2] |
IND4[0,0]<IND4[0,1] && IND4[0,1]<IND4[0,2] |
| Price in a support/resistance zone Price below/above an MA |
CLOSE[0]<IND5[0,0] |
CLOSE[0]>IND5[0,0] |
| Spread and time combined Only at the best moments of the day |
SPREAD<20 && TIME>=9.0 && TIME<=17.0 |
|
FBUY[N] / FSELL[N] are useful when you want to apply the same condition in more than one place — say, triggering on the BUY field and reusing it on the EXIT as well — without retyping the expression in each field.
MULTI-ASSET — A2 / A3
It lets the robot trade on up to 3 assets at the same time from a single chart. The main asset (A1) is always the chart the EA is running on; A2 and A3 are extra assets set through parameters.
🔍 Reading (correlation): using A2/A3 data in expressions as confirmation — checking whether another asset is rising before entering the main one.
⚡ Execution: opening orders directly on A2 or A3 using tokens such as
@A2MARKET, @A2BCLOSE and so on in expressions.
A2: / A3: and click OK. The robot validates the symbol, saves it and restarts on its own (~1-2s), already recognising the new asset both in automatic mode and in manual trades. A blank field + OK goes back to the value set in the parameters.A2 asset parameters
| Parameter | Description | Default |
|---|---|---|
| A2 symbol | The asset's name in MT5 (e.g. EURUSD, XAUUSD). Blank = the A2 system is off | (blank) |
| A2 timeframe (expressions) | The timeframe used for the A2HIGH/A2LOW/A2CLOSE/A2OPEN tokens in expressions | D1 |
| Use A2 data | It switches on the collection of A2's price data for use in expressions | Yes |
| Allow orders on A2 | It authorises the robot to execute orders directly on the A2 symbol | Yes |
| Max A2 volume (lots) | The maximum volume limit per trade on A2 | 10.0 |
| Max A2 margin (%) | The maximum % of free margin that A2 orders may use | 40% |
| Independent A2 risk | When switched on, A2's risk management is worked out separately from A1's | No |
A3 asset parameters
| Parameter | Description | Default |
|---|---|---|
| A3 symbol | The asset's name in MT5 (e.g. GBPUSD). Blank = the A3 system is off | (blank) |
| A3 timeframe (expressions) | The timeframe for the A3HIGH/A3LOW/A3CLOSE/A3OPEN tokens | D1 |
| Use A3 data | It switches on the collection of A3's price data | Yes |
| Allow orders on A3 | It authorises order execution on the A3 symbol | Yes |
| Max A3 volume (lots) | The maximum volume limit per trade on A3 | 10.0 |
| Max A3 margin (%) | The maximum % of free margin for A3 orders | 40% |
| Independent A3 risk | A3's risk management kept separate from A1's | No |
Candle tokens (A2 and A3)
Available in BUY/SELL/EXIT expressions for reading the secondary/tertiary asset's price:
| Token | Description |
|---|---|
A2HIGH[0] | A2's current high on the parameter ✏️ A2 timeframe in EXPRESSIONS (A2HIGH, A2LOW, A2CLOSE, A2OPEN) |
A2LOW[0] | A2's current low |
A2CLOSE[0] | A2's current close ([1] = the previous candle, [2] = 2 back) |
A2OPEN[0] | A2's current open |
A2TVOL[0] | Tick volume of the current A2 candle, on the same timeframe (since robot 5.7.215, also inside math) |
A2RVOL[0] | Real volume of the current A2 candle (only where the broker reports real volume, as on B3) |
A2VOLBUY | The total volume of open buys on A2 |
A2BPROFIT | The profit/loss of the open buys on A2 (in the account's currency) |
A2DPROFIT | The day's profit/loss on A2 |
A2BUYCOUNT | The number of open buys on A2 |
A2LASTBUY | The entry price of the last buy on A2 |
The same tokens are available for A3 with the prefix A3 (A3HIGH, A3LOW, A3CLOSE, A3OPEN, and so on).
If the A2 (or A3) asset is empty in the parameters, a line that uses one of its tokens is refused and the robot warns in the alerts panel which asset is missing. Before robot 5.7.214, the candle token read the chart itself instead of A2, without warning.
Execution tokens on A2 / A3
| Token | Action |
|---|---|
@A2MARKET | It opens a buy or a sell on A2 (according to the BUY/SELL expression) |
@A2BCLOSE | Closes every open buy on A2 |
@A2SCLOSE | It closes every open sell on A2 |
@A2ALL | It closes every position on A2 (buys + sells) |
@A2BCLOSE+ | It closes only the profitable buys on A2 |
@A2BCLOSE- | It closes only the losing buys on A2 |
@A2SCLOSE+ | It closes only the profitable sells on A2 |
@A2SCLOSE- | It closes only the losing sells on A2 |
@A2MODIFY | It modifies the SL/TP of open positions on A2 |
@A3MARKET | It opens a buy or a sell on A3 |
@A3BCLOSE | It closes buys on A3 |
@A3SCLOSE | It closes sells on A3 |
@A3ALL | It closes every position on A3 |
@A3MODIFY | It modifies the SL/TP of positions on A3 |
The safety limits of A2 and A3
Each extra asset has its own brakes, and they are independent of A1's. They all live in the Inputs, right below the asset's field.
A2HIGH, A2LOW, A2CLOSE, A2OPEN…). Switched off, those variables are left with no value — even if the asset is filled in. A3 has its counterpart: ☑️ Enable A3 variable calculation.⚙️ GENERAL SETUP — MANUAL TRADING
Parameters shared by all 4 manual trading modes: Ticket, Shortcuts, Mouse and Telegram. Set the default volume, pending-order behaviour and expiry here.
📱 4th REMOTE TRADING — TELEGRAM TICKET RETIRED
It required you to create your own bot in BotFather and paste a token and Chat ID into the robot's parameters. Those fields were removed from the EA (version 5.7.100), so there is no way to switch it on any more.
To trade from your phone today, use Trading through Telegram — through the Center on Telegram, the @MQLProTraderCentralBot, which you connect in 1 tap, with no bot to create and no token to paste. It does everything the ticket did — close, close part, clear pending orders, pause/resume, buy/sell, pending orders, protect with SL/TP — and more: switch the targets on/off and receive reports.
There is nothing left to configure here. The token and Chat ID fields left the robot, so this page no longer carries a step-by-step, a parameter list or a command table — they would all point at things that no longer exist. Whoever used the ticket now uses the Center on Telegram: with no bot to create, no token to paste and no Chat ID.
✅ ORDER TICKET — PANEL TRADING SYSTEM
MQL PRO TRADER has two visual panels built into the chart: the Side Ticket (buy, sell, close, volume buttons and the robot's status) and the MQL Manager (an operating panel with positions, summary, AI, settings and quick controls). The ticket is the main way to trade by hand through the visual interface.
🎨 PANEL BUTTONS
It controls which button groups appear on the side panel. You can hide buttons you do not use to keep the interface cleaner.
| Parameter | Description | Default |
|---|---|---|
| Show Market buttons | Immediate Buy/Sell at market | Yes |
| Show Bid/Ask buttons | Orders at the Bid or Ask price | Yes |
| Show Stop buttons (SL/TP) | Set SL and TP by hand from the panel | Yes |
| Show Close buttons | Buttons to close open positions | Yes |
| Show Cancel buttons | Buttons to cancel pending orders | Yes |
| Show Action buttons | Break Even, Reverse and other quick shortcuts | Yes |
| Show Breakeven button | Shows the dedicated Breakeven button on the side panel | Yes |
| Show Volume buttons | Quick lot adjustment straight from the panel | Yes |
| Panel toggle button | Button to show/hide the side panel | Yes |
| MQL Manager button | Button to open/close the MQL Manager | Yes |
🖥️ SIDE PANEL SETTINGS
It adjusts the size, position and font of the side panel fixed on the chart.
| Parameter | Description | Default |
|---|---|---|
| Show the side panel | It shows or hides the panel after startup | Yes |
| Panel width (pixels) | The panel's width in pixels | 220 |
| The panel's maximum height | The height used when automatic mode is off | 700 |
| Automatic height | It fits the ticket's height to the space available on the chart | Yes |
| Button font size | The font of the buy/sell/close buttons | 9 |
| Text font size | The font of the labels and information | 9 |
| Toggle button font | The font used on the button that shows/hides the ticket | Consolas Bold |
| FONT size of the 2 buttons at the ticket BASE | The text size of the two buttons in the ticket's footer — MINIMISE (it hides the ticket, and turns into SHOW TICKET) and MANAGER (6-18) | 8 |
| Width of the 2 buttons at the ticket BASE | The width of each toggle button — it fits itself to the panel | 110 |
| Height of the 2 buttons at the ticket BASE | The height of the toggle buttons — it scales with the panel | 25 |
| X position (right margin) | The distance from the right-hand corner. -1 = automatic | -1 |
| Y position (top margin) | The distance from the top of the chart | 30 |
| Ticket background color | The side panel's fill colour | C'40,40,40' (dark grey) |
| Ticket border color | The side panel's outline colour | clrGray |
The 3 pairs of entry buttons — which to use when
The ticket has three ways of entering a trade. The difference between them is not cosmetic: it is the classic better price vs guaranteed execution. It is worth understanding before you click.
| Buttons | What happens | When it makes sense |
|---|---|---|
| BUY / SELL | An order at market, executed there and then. Buying, you pay the ask; selling, you receive the bid — in other words, you pay the spread to get in right away. | When getting in now matters more than saving a few points. |
| BUY BID / SELL ASK | It is not instant. It places a limit order waiting at the bid (on a buy) or at the ask (on a sell) — it is the idea of “buying at the bid / selling at the ask”: instead of paying the spread, you wait for the market to come to you. The order sits there pending and may never fill if price does not come back. | When you have patience and want a better price. It is the stance of someone providing liquidity rather than consuming it. |
| B STOP / S STOP | An order pending Stop order for a breakout: the buy sits above the high of the previous candle and the sell below the low, respecting the configured distance. It only fires if price breaks out. | Trading a breakout — you only want in if the market confirms the direction. |
⌨️ 2nd KEYBOARD SHORTCUTS
MQL PRO TRADER offers a set of keyboard shortcuts for quick actions straight on the chart, without the mouse. Every shortcut works while the chart has focus.
Market orders
| Key | Action |
|---|---|
| Shift + C | Open a BUY order at market |
| Shift + V | Open a SELL order at market |
Pending orders
| Key | Action |
|---|---|
| C | Place a pending BUY order (LIMIT/STOP) |
| V | Place a pending SELL order (LIMIT/STOP) |
Closing orders
| Key | Action |
|---|---|
| Z + C | Close BUY orders only |
| Z + V | Close SELL orders only |
| Shift + Z | Close ALL positions |
Cancelling pendings
| Key | Action |
|---|---|
| X + C | Cancel pending BUY orders |
| X + V | Cancel pending SELL orders |
Protections and quick actions
| Key | Action |
|---|---|
| Shift + B | Trigger Breakeven on every position |
| Shift + I | Reverse positions (close buys and open sells, and vice versa) |
| Shift + T | Manual Auto TP on/off |
Robot controls
| Key | Action |
|---|---|
| R | Toggle the robot ON / OFF |
| Q | Toggle Mouse Trading mode ACTIVE / INACTIVE |
| S | Toggle Stop Loss control ON / OFF |
| B | Show / Hide the side panel |
| G | Show / Hide the MQL Manager |
| I | Show / Hide the floating AI panel on the chart (the same effect as the SHOW PANEL button on the AI tab, or the X Close (I) button in the panel's own corner) |
| Shift + A | Show the full shortcut list in MT5 |
Manual target selection
They toggle individually which assets receive the manual actions from the ticket, combos and MQL Manager buttons. Same behaviour as the MQL Manager's A1/A2/A3 buttons — each key toggles the matching asset.
| Key | Action |
|---|---|
| Alt + 1 | Toggle asset A1 (the main one, _Symbol) as a manual target |
| Alt + 2 | Toggle A2, set in the parameter ✏️ Secondary asset A2 (e.g. EURUSD, XAUUSD), as a manual target |
| Alt + 3 | Toggle A3, set in the parameter ✏️ Tertiary asset A3 (e.g. GBPUSD, BTCUSD), as a manual target |
🖱️ 3rd MOUSE CLICK TRADING
It lets you place orders by clicking straight on the price on the chart. The robot creates the order at the clicked price and applies the configured SL/TP automatically.
Where your order is stored — and why that matters
When you hang an order with the mouse, it can end up in two very different places. The difference only shows on the day your computer shuts down:
Why both exist
Not every broker accepts every pending order. Some do not allow certain types, others demand a minimum distance from the current price, and those rules change from broker to broker and even from asset to asset within the same broker. The shadow order exists so you can hang the order wherever you like even when the broker would refuse it.
How the robot chooses
You do not have to choose anything — the robot asks your broker, for each asset, at the moment it creates the order:
| Step | What the robot does |
|---|---|
| 1 | It checks whether the broker accepts that order type on that asset. |
| 2 | It checks whether the distance to price respects the minimum the broker demands. |
| 3 | It sends the real order. If the broker refuses, the robot creates the shadow order automatically — you neither lose the order nor have to redo anything. |
[ORDENS] saying what your broker accepts on that asset. If something does not go as you expect, that line is the first place to look — and it is what support will ask for.
COPY TRADE — WHAT YOU SET UP IN THE ROBOT
MQL PRO TRADER's Copy Trade happens through the Performance Center: you choose who to follow (or publish your own signals) on the dashboard's 🔁 Copy Trade tab, and that is where you will find the lot mode, the asset filters, the delay, the equity floor and the history of every copy. In the robot there are only two parameters left — and the most important of them is a safety lock.
Parameters in the robot
STOP LOSS SYSTEM (SL)
Sets the maximum loss per trade. When price reaches the SL, the position is closed automatically to protect your capital.
SetSL[…], the stop is theirs and the candle doesn't touch it. It comes on from the factory: it is the stop for anyone who hasn't set up any other.Advanced SL settings
| Block | Configurable parameters | EA default |
|---|---|---|
| Fixed SL | Enable fixed SL and the distance in points | Off · 300 points |
| Candle SL | Use the candle's extreme plus an extra offset | On · offset 0 |
| Stochastic SL | Enable Stoch SL, period, slowing, oversold/overbought level, lookback candles and offset | Off · 14 / 3 · 20 / 80 · 10 candles · 5 points |
| ATR SL/TP | Enable ATR, period, SL multiplier, TP multiplier (0 = no target), min/max SL and the mode Use PURE ATR | Off · 14 · SL 1.5x · TP 3.0x · min 50 · max 1000 · does not override |
| Percentage SL/TP | Enable percentage, SL %, TP % (0 = no target), minimum and maximum percentage SL | Off · SL 0.3% · TP 0.6% · min 0.05% · max 2.0% |
The ruler the robot uses when a position has no stop
When you open a trade without a Stop Loss, the robot still needs a reference distance — it is what places the targets of Multi-TP (the R2X button means "twice that distance") and what the Stop Loss line shows on the chart.
That distance is calculated by the ATR — the same volatility indicator you already use in expressions (ATR, ATRW, ATRREG) and that the robot offers as a stop criterion in the table above.
Why ATR and not a fixed number of points
Because "1 point" does not mean the same thing on every asset. The same value of Points from entry to SL produces completely different distances:
| Asset | What 1 point is worth | 300 points become |
|---|---|---|
| Gold (XAUUSD) | US$ 1.00 | US$ 300 of distance — far too wide |
| Bitcoin (BTCUSD) | US$ 1.00 | US$ 300 of distance — far too close |
| EURUSD | 0,0001 | 0.0300 of distance |
| Mini index (WIN$) | 1 index point | 300 index points |
| Cash equity (PETR4) | R$ 0.01 (one cent) | R$ 3.00 of distance |
| Index CFD (US30, NAS100) | 1 index point | 300 index points |
Verified in testing, three different markets with the same Points from entry to SL = 300: mini index 181,971 → stop 181,671 (300 points) · mini dollar 5,141.267 → 4,841.267 (300 points) · PETR4 39.50 → 36.50 (R$ 3.00). Three different results, all correct — that is the ruler adapting to the market.
[UNIDADES] BTCUSD | digits=2 calc_mode=… | ponto do TRADER (SetSL/SetTP)=1.00 | tick da corretora=0.01 | …
And when the two units differ — which is normal on gold, crypto and indices — it says so explicitly. It is worth reading that line before your first trade on a new asset: it is the quickest way to confirm your "300 points" mean what you think they mean.
Without that, a stop worked out by ATR or by percentage — which produces odd numbers — would go out at an invalid price, and the broker would reject the order or round it its own way, without telling anyone. The snap is always to the nearest step, so the largest difference is half a tick.
The ATR measures that asset's real agitation at that moment. That is why the ruler adjusts itself: a reference stop on Bitcoin is wide because Bitcoin moves a lot, and on EURUSD it is narrow because it moves little — with nothing for you to reconfigure when you change asset, broker or market.
That is why the journal shows the distance and what 1 point is worth: so you can check the arithmetic instead of just trusting it.
Regua virtual em 180 pts (ATR 14 x 1.5). If the ATR is unavailable (short history, newly listed asset), the robot falls back to the fixed value in points and writes (input fixo) — so you always know which of the two applied.
The floor: why the stop is never born glued to price
ATR solves the problem of "1 point is not worth the same on every asset", but it creates another one: on 1-minute charts ATR is tiny. On EURUSD M1 the ATR is usually close to 1 pip — and a 1 pip stop is not a strategy, it is a donation to the spread. It would be touched on the first tick after the open.
That is why the reference distance goes through a floor. The robot never draws the stop closer than the greater of these four numbers:
| Floor | How much it is | Why it exists |
|---|---|---|
| 3 spreads | three times the asset's current spread | a stop inside the spread itself is born already touched |
| The broker's minimum distance | the stops level the one it reports | below it the broker refuses the order |
| 0.03% of the price | proportional to the asset | it is what prevents the 1 pip stop on M1 — see the table below |
| Min SL in points | whatever you set | if you demand more than the market does, your demand wins |
| Asset | Price | 0.03% floor |
|---|---|---|
| EURUSD | 1,1550 | 3.5 points (≈ 3.5 pips) |
| Gold (XAUUSD) | 4.343 | 1.3 points (US$ 1.30) |
| Bitcoin (BTCUSD) | 74.650 | 22 points (US$ 22) |
| Mini index (WIN$) | 187.830 | 56 index points |
Up to version 5.7.220 the floor was 0.1% of the price. On EURUSD that was 11.6 pips — more than the normal 1.5 ATR stop on the 5 and 15 minute charts, where the ATR sits around 2.5 and 4.6 pips. The floor stopped being a protection and started deciding the stop. At 0.03% it does not touch the 1.5 ATR stop of any of the assets above on the 5 min, 15 min and 1 hour charts, and it still blocks the 1 pip stop of a quiet M1. The 3 spreads and the broker minimum distance still apply on top.
0, and that means "the robot decides from the market". With 0 the three automatic floors above apply. If you fill in a value, it becomes one more requirement: the robot takes the larger of your number and what the market asks for — never the smaller. In other words, filling it in can only push the stop away, never bring it closer to price.
That same floor applies to the Dynamic SL/TP by ATR of the robot's orders, not only to the reference line — both use the same ruler, so the robot cannot do automatically what the panel stops you doing by hand.
[ATR] line per asset when this happens. A target of 0 still means "no target".
Several SL systems on at once — which one wins
The robot has six ways to calculate a Stop Loss, and you may leave more than one on. They do not add up: the robot walks the list below from top to bottom and uses the first one available. The others are ignored for that order.
| # | System | Requires |
|---|---|---|
| 1 | SL from the expression (SetSL[…]) | an expression that sets the stop on that order |
| 2 | ATR SL/TP | to be on — nothing else |
| 3 | % SL/TP | to be on — nothing else |
| 4 | SL by Stoch | a manual order · the chart of the asset itself · and a recent Stochastic extreme |
| 5 | Fixed SL (NORMAL group, in points) | to be on with a value greater than zero |
| 6 | SL by Candle | to be on — nothing else |
SetSL[…] on the line, the candle leaves it alone.
Measured in the tester (100% automatic entries): SL by Candle 124/124 · ATR 307/307 · % 178/178 · fixed SL 272/272. No entry was left without a stop.
• off (default): the robot uses the greater of the ATR value and your fixed value — the more conservative of the two;
• on: uses the pure ATR, even if it gives a shorter distance than the fixed one.
ATR stop with no target: set the TP multiplier to
0 — in both modes, the order goes out with the stop only (since robot 5.7.218; the same goes for TP % = 0). Before, 0 put the target at the entry price itself (the position closed at breakeven the next second) or, with pure ATR off, used the fixed TP even with it switched off.
In the same mini index test this was visible: in conservative mode every order came out with 300 points (the fixed value, which was greater than the ATR at that moment); in pure mode the distances varied order by order — 50, 52, 53, 54, 55, 57, 60 points — following the market's real agitation, with the 50-point floor appearing on the calmest ones.
I enabled the SL (or TP) with the position already open. Does the robot apply it?
It depends on the system — and the difference is big enough to deserve a table:
| System | Does it apply to a position that is already open? |
|---|---|
| Breakeven | ✅ Yes. It watches open positions all the time; once enabled, it acts from the next check. |
| Trailing Stop (in both modes: fixed step and candle) | ✅ Yes. Same thing — it is a continuous watcher. Changing the mode with the position open also takes effect immediately. |
| Max profit giveback · Time stop exit | ✅ Yes. They are continuous watchers like the ones above. |
| Dynamic TP | ✅ Yes. It also watches open positions. |
| Fixed SL · fixed TP | ❌ No. They are applied at the moment the order is sent. Enabling them later only affects the next trades. |
| SL by Candle · SL by Stoch · ATR SL/TP · % SL/TP · Automatic TP · Conservative TP | ❌ No. Same rule: they apply when the order is sent. |
+ Add TP widget on the chart. Flicking the switch on the panel not does not go back over positions that already exist — and that is deliberate: changing the stop of a running trade on its own would alter the risk you already accepted, without you asking.
TAKE PROFIT SYSTEM (TP)
It sets each trade's profit target. The robot can use a fixed TP, an automatic TP based on the candle's size, or a Trailing TP that follows price.
And what if you have no Stop Loss mode enabled? Before, this feature simply did nothing — without an SL there was no distance to multiply, and it gave up silently. Now it uses the same ruler as the SL line that appears on the chart: the Stop Loss you configured and, failing that, the asset's volatility (ATR). That way the line and the target always speak of the same number.
Automatic TP settings
| Parameter | Description | Default |
|---|---|---|
| TP multiplier, Order 1 | 1X, 1.5X, 2X, 3X, 4X — a multiple of the candle's size | TP_2X |
| TP multiplier, Order 2 | Usually larger than Order 1 | TP_4X |
| Use the candle's size | The multiplier's base becomes the larger of the SL distance and the size of the last closed candle (high − low). It avoids a TP that is too short when the SL is tight on a wide bar. Unticked, only the SL distance counts | Yes |
| Min TP (points) | It never sets a TP smaller than this value | 100 points |
| Max TP (points) | It never sets a TP larger than this value | 4,000 points |
Detailed advanced TP settings
| Block | Configurable parameters | EA default |
|---|---|---|
| Auto TP | Order 1 mode, order 2 mode, custom ratios, use the candle's size, min TP and max TP | Off · Order 1 TP_2X · Order 2 TP_4X · ratios 2.0/4.0 · uses the candle · 100 to 4000 points |
| Trailing TP | Use the TP's original ratio, a custom ratio, only improve the TP, and a minimum distance | Off · uses the original ratio · ratio 2.0 · only improves · distance 0 |
| Conservative TP | The main MA, the MA method, use 3 MAs, the periods of MAs 2/3, comparison by MA and the TP's proportion | Off · MA 8 · method 0/SMA · 3 MAs no · 21/50 · comparison on · 0.5 |
BREAKEVEN SYSTEM
Breakeven means moving the Stop Loss automatically to the entry price once the position reaches a certain profit. That way the worst possible outcome becomes a draw (zero).
⚠️ Check what 200 means on YOUR asset before using the default. The ruler is the same as
SetSL[]'s: on gold and Bitcoin 1 point = US$ 1, so 200 here means US$ 200 of profit — on an M1 chart that almost never happens, and breakeven looks as if it "does not work" when in truth it was never triggered. For M1 scalping on gold/Bitcoin, values of 2 to 3 make sense. On the WIN$ 200 is 200 index points (reasonable), and on shares it is R$ 2.00.TRAILING STOP SYSTEM (TS)
The Trailing Stop moves the SL automatically as price advances in your favour, locking in profits progressively without you having to watch it manually.
It measures from the current price and always keeps the same distance, in points. If what you want is "not giving back more than a slice of the best moment", that is a different ruler — see Max profit giveback. Both can be switched on at the same time.
Traditional TS (by points)
| Parameter | Description | Default |
|---|---|---|
| Points to start Trailing | Minimum profit in points before the Trailing switches on | 300 pts |
| SL distance from price (step) | How many points the SL stays behind the current price | 100 pts |
SetSL[]'s: on gold and Bitcoin 1 point = US$ 1, so "300 to start" means waiting for US$ 300 of profit — on M1 the trailing simply never switches on. For scalping on those assets, think of 5 to 10 to start and 3 to 5 for the step. On the WIN$ the defaults make sense as they are. See What "1 point" means in each market.Dynamic TS (by candle extremes)
| Parameter | Description | Default |
|---|---|---|
| Apply offset at the extremes | Adds points of margin below/above the candle's extreme | No |
| Offset in points | The offset value | 0 pts |
EXIT_BUY / EXIT_SELL).MAX PROFIT GIVEBACK (per position)
The trade went up nicely, you set no target, and it came back to the entry price. The Breakeven saved you from a loss — but you handed back all the profit you already had. That is the hole this feature closes: it measures the highest point your position ever reached and does not let you hand back more than the slice you choose.
| Protection | Measures from |
|---|---|
| Percentage SL/TP | the entry price |
| Trailing Stop | the current price — it chases price, but does not remember what the peak was |
| Protect profits (positive drawdown) | the the whole account, adding up every position |
| Max profit giveback | the that position's peak |
How it works, with numbers
Suppose a buy that went 1,000 points above the entry and then started falling. With Give back at most 40%:
- The robot stores the peak: 1,000 points.
- 40% of 1,000 = 400 points — that is how much it will accept giving back.
- As soon as the position drops to 600 points of profit, it acts: it moves the stop to lock in those 600 (or closes the position, if you prefer).
Had it gone up only 200 points, the arithmetic would be the same over 200 — the feature follows the size of the move, not a fixed number you would have to recalibrate per asset.
The robot records every trigger in MetaTrader's journal (the Expertstab) with the peak, the percentage given back and the new stop — that is where you check whether the number you chose is doing what you want.
TIME STOP EXIT
Every other exit in the robot looks at price: stop, target, trailing, profit giveback. This one looks at the clock. It answers a question traders ask themselves and no indicator answers: "if this trade has not moved in two hours, was it really the trade I was expecting?"
Two costs appear on no chart at all: the capital tied up in a stalled position (which could be in the next signal) and event risk — a news release, the session's end, the turn of the day. Time is the only ruler that measures both.
VISUAL MULTI-TP WITH RISK:REWARD — ➕ ADD TP BUTTON
A system that lets you create multiple take profit targets straight on the chart, with an automatic partial close of each manually opened position. No prior setup is needed — the robot creates the buttons automatically beside each trade.
How it works
When a manual position is opened (through the Ticket or through Mouse Trading), the robot automatically creates three floating buttons near the entry line on the chart:
TP configuration menu
When you click [Add TP], a mini menu with 3 cycling buttons appears in the chart's top left corner:
| Button | Function | Options | Default |
|---|---|---|---|
| R:R multiplier (orange) | It sets the target as a multiple of the risk (the distance between entry and SL) | 0.5R → 1R → 1.5R → 2R → 3R → 5R | 2R |
| Percentage (blue) | The percentage of the volume that will be closed when price touches that target | 100% → 75% → 50% → 25% | 100% |
| ✓ OK (green) | It confirms and creates the TP level on the chart | — | — |
What happens after you confirm
The robot works out the TP price with the formula: entry ± (SL_distance × R) and draws a horizontal green line on the chart with a label showing the volume that will be closed. When price touches the line, the robot carries out the partial close automatically — the rest of the position stays open.
Each level created produces three visual elements on the chart: the target line, an edit button and a delete button. You can add up to 20 levels per position.
- 1st TP at 2R = 136,000 → closes 50% of the volume
- 2nd TP at 3R = 136,500 → closes 25% of the volume
- 3rd TP at 5R = 137,500 → closes the remaining 25%
Stop Loss (pontos) only as a calculation reference for the R:R. That reference is NOT a stop: it is there to place the targets, and it does not close the position if price moves against you. In other words: the R2X shown in the menu is being measured against a distance that protects nothing. To turn it into real protection, see Visual Stop Loss line just below.
Visual Stop Loss line (with risk/reward)
By default the robot does not draw the Stop Loss line on the chart. Switch on the parameters below and it appears alongside the position, can be dragged with the mouse and shows next to it, in money, how much you lose if price reaches it and how much you make if it reaches your first target — the information that answers "is this trade worth it?" at the very moment you choose where to put the stop. The label looks like this:
🛡️ CORRETORA fecha · risco −$2,00 → alvo +$4,64 (1:2.32)
Reading from left to right: the line's state , how much you lose if price touches it, how much you make if it reaches the target, and — in brackets — the ratio between the two. In this example you are risking US$ 2.00 to chase US$ 4.64, meaning the possible gain is 2.32 times the risk.
Where the line's distance comes from: if the position has a stop at the broker, it is this one, always. If it does not, the line uses the same Stop Loss you configured (fixed, candle, percentage, ATR — whichever one is on), that is, the same maths the real order would use. And if no SL mode is on, the line still appears: it is then measured by the asset's volatility (ATR) and serves only as a ruler to calculate the risk/reward of the targets — it is not protection, and the label says so in plain words.
✕.With this switched off, the line goes back to being only the ruler that calculates the targets, and nobody closes if price passes through it.
🌐 Dragging is a proposal · SAVE is what sends it to the BROKER
Dragging changes where it sits. SAVE changes who executes it. Without saving, the robot is the one that closes — and that requires MetaTrader open. Once saved, the broker is the one that closes, and then it holds with everything switched off.
Dragging the line moves only the robot's drawing — it lets you try out levels and watch the money risk change, without sending anything to the broker. For the protection to hold even with the computer switched off, click the button SAVE button next to the label: it is what writes the stop on your broker's server. Once saved, the line drawn by the robot leaves the chart and what stays is MetaTrader's native line (the label and the x remain there, on top of it). The difference shows up when the computer is switched off:
| Situation | Stop only on the chart | Stop registered at the broker |
|---|---|---|
| MetaTrader open | protects | protects |
| MetaTrader closed, PC asleep, internet down | does not protect | protects |
Until you save, the label says 🛑 ROBOT closes: the robot respects that line and closes the position on it — both the one you dragged and the one it drew by itself — but that protection only exists while MetaTrader is open.
[SL-VISUAL] Stop de #313500778 em EURUSD definido em 1.16905 (50 pts da entrada,
risco $5.00) — a CORRETORA fecha (vale com o MT5 desligado).📌 When the target is real, the two lines are the same thing. With a single target closing 100%, it becomes a real Take Profit at the broker — and then MetaTrader draws the
TP line. The robot hides its own line so the two do not overlap, and you can move the target by dragging either of the two: if you drag the native MetaTrader line, the robot adopts that price and recalculates risk/reward on its own. The server is in charge — it is the one that executes. In the journal: [TP-VISUAL] Alvo de #… movido NA CORRETORA: X -> Y. O robo adotou o alvo do servidor.
⚠️ And the partial targets? Those still depend on MetaTrader being open. The Stop Loss and a target that closes 100% can become real orders at the broker, because MetaTrader accepts one stop and one target per position. A fractional exit (close 50% here, 30% there), on the other hand, does not exist in MetaTrader's protocol — the one executing it is the robot. This is not a MQL PRO TRADER limitation: no robot can leave a partial exit parked on the server.
The line's label says which of the three states it is in — and the difference matters:
| What you see | What it means |
|---|---|
| Stop already in profit | When you drag the stop beyond the entry price (above it on a buy, below it on a sell), that stops being risk: the position can no longer take a loss. The label starts saying "locked +$X" instead of "risk −$X", turns green, and the risk/reward ratio disappears — with no loss to compare against, a 1:4 would mean nothing there. |
| 🛡️ BROKER closes | There is a Stop Loss registered on the broker's server. It works even with MetaTrader closed, the computer switched off or the internet down. It is the strongest protection there is. |
| 🛑 ROBOT closes | There is no stop on the server: the one who will close it is the robot, and only while it is running. If you close MetaTrader, take the robot off the chart or the computer shuts down, the position is left unprotected — and nothing warns you. Applies to the line you dragged AND to the one the robot drew by itself: both close the position. For the stop to hold with MetaTrader closed, click SAVE. |
| ⚠️ NOBODY closes | There is no protection at all — and now this only happens in three cases: you dismissed the line in the ✕; switched off the parameter "AND CLOSE the position when price reaches that line"; or the line was born behind the price when the robot adopted the position (see "When the robot is reloaded from scratch"). In those cases the line is only the ruler the robot uses to calculate the targets, and if price reaches it nothing happens — the position stays open and losing. |
[UNIDADES] line the robot prints when it is attached to the chart.
MODIFY. All of them can still tighten your stop, bringing it closer to price and protecting more. None of them can move it away nor erase it. If any tries, the robot refuses, keeps your stop and writes in the journal who tried:
[SL-DONO] #330498467 XAUUSD: RECUSADO. SL por candle tentou mover o stop
de 4235.79 para 4229.80 — isso AFROUXA o stop que VOCE gravou,
entao foi barrado e o seu stop continua valendo.+ Add TP, nor the risk/reward label. The reason is simple: all of that drawing is positioned by the current chart's price scale, and one asset's price means nothing on another's scale — a EURUSD line (1.16) drawn on a gold chart (4,660) would land just anywhere.
How to confirm it: the journal (the Expertstab) records the decision in plain text —
[MTP] Posicao #123 e de BTCUSD e o grafico e EURUSD -> painel visual de TP/SL NAO criado (e ancorado neste grafico). O SL/TP REAL da corretora nao e afetado.
x next to the label. The SL line appears on its own on every position with no stop — it is the targets' reference ruler. If it is getting in the way of your reading of the chart, the x grey one to the right of the label dismisses it from that position. Deleting the line through MetaTrader itself is no use: since it is drawn automatically, the robot recreates it straight away — the x is the way to say "I do not want this one".
What the
x does NOT do: it does not touch your Stop Loss at the broker. If there is a stop on the server, the protection stays there and MetaTrader's own line stays on the chart — only the robot's label disappears.
⚠️ If the stop was only the line (it was not saved at the broker) and you had already dragged it — that is, the level is your decision, but it has not gone to the server yet —, dismissing the line also disarms the automatic close and the robot warns you in the alerts. That is deliberate: a stop nobody can see on screen that closes the position anyway would be worse than no stop at all.
How to bring it back: use the handle
– on the entry line to minimise the position and then restore it. On restoring, the SL line comes back — as a reference; to make it really count, use SAVE again.
When the robot is reloaded from scratch — on restarting the terminal, removing the EA from the chart and dragging it back, or recompiling — it sweeps the open positions of this chart's asset and rebuilds the panel for each one you opened by hand. The journal records:
[MTP] 2 posicao(oes) ja aberta(s) readotada(s) apos recarregar o EA.
⚠️ What does not come back in that case: the TP targets you had already created. They existed only in the robot's memory, and there is no way to recover them after a reload — the robot says so on that same journal line. The little block and the SL line come back; the targets you redo through + Add TP. The Stop Loss and Take Profit that were already at the broker never depended on this and remain intact.
🛑 And what if price has already passed the stop? On a position with no Stop Loss at the broker, the robot calculates the line's stop from the entry price. If, when it adopts the position, price is already beyond that stop, the line is born as a reference only (⚠️ NOBODY closes): the robot does not close the position, and the alerts panel shows the critical alert "Robot stop already passed, NOT closed", saying how many points it has already gone past. Drag the line to where it makes sense — then it is in force again — and use SAVE, or close it yourself.
PROTECTIONS AND MOUSE ORDERS
There is no parameter that switches the protections on or off for mouse orders only. The Breakeven, the Trailing Stop and Max profit giveback act on any position inside the scope — it does not matter who opened it: the robot, the ticket, a mouse click, a keyboard shortcut, Telegram or the platform itself.
The scope decides
The ✏️ Where Breakeven, Trailing and giveback apply (A1 only) has three options:
| Option | What the protections take in |
|---|---|
| A1 only — just this chart's asset | Default. Any position on the chart's asset, whoever opened it. |
| On A1, A2 and A3 — everything this robot opened | The chart's asset plus whatever carries this robot's magic number. |
| Across the whole account — includes other robots' positions | Everything open in the account. |
CAPITAL SAFETY SYSTEM
A set of automatic systems that protect your account from excessive losses and lock in the gains you have made. Each subsystem can be switched on independently.
📊 DYNAMIC RISK PER TRADE
It sets the orders' volume as a percentage of the account's balance, instead of a fixed volume. The robot automatically works out each trade's lot so that it risks only the configured percentage.
📅 DAILY LOCK
It stops the robot trading for the day when the day's total loss OR profit goes past the configured limits. It resets automatically on the next trading day.
The robot now warns on screen before and after: on consuming 70% of the limit, an alert appears saying how much is left; on reaching the limit, a critical saying that automatic entries were switched off until the next day. Before, this only came out as a sound or a phone notification — and both are born switched off, so the robot stopped and nothing explained the silence.
⚠️ It does NOT close positions that are already open. What closes positions automatically is another protection: ☑️ Close all on target, from the Daily Profit Protection in $, and the Close positions on Drawdown.
CLOSE POSITIONS ON DRAWDOWN
It closes every open position when the drawdown (floating loss) goes past a limit. It protects against situations where several orders add up to a growing loss without any of them hitting its own SL.
| Parameter | Description | Default |
|---|---|---|
| Maximum NEGATIVE drawdown (%) | The % of total floating loss that closes everything | 5% |
| Maximum POSITIVE drawdown (%) | The % of floating profit that also closes everything (it locks the profit in) | 8% |
| Use Profit Protection | The positive protection only fires once the profit has been above a threshold and starts falling back | No |
DAILY PROFIT PROTECTION ($)
Unlike the Daily Lock (which uses a percentage of the balance), this system works with amounts in dollars/reais. It sets a daily profit target and a protection drawdown below that target.
| Parameter | Description | Default |
|---|---|---|
| Use net profit | It also counts open positions in the profit calculation | Yes |
| Daily profit target (R$/$) | The amount that, once reached, triggers the protection | $100 |
| Protection drawdown (R$/$) | If the profit falls back to this amount, it closes everything. E.g. target=$100, draw=$90 = it closes if the profit drops to $90 after having reached $100 | $90 |
| Close all on target | It closes positions when the daily target is reached | Yes |
| Stop the robot on target | It stops opening orders after the day's target is reached | Yes |
EVENTS AND BEHAVIOUR SYSTEM
🕒 TRADING HOURS
Sets the periods of the day in which the robot is allowed to open new trades. Outside the configured hours, the robot only monitors and protects the positions that are already open.
Morning and afternoon session
| Parameter | Description | Default |
|---|---|---|
| Morning start | Opening time of the morning period | 00:00 |
| Morning end | Closing time of the morning period | 12:00 |
| Afternoon start | Opening time of the afternoon period | 12:01 |
| Afternoon end | Closing time of the afternoon period | 23:59 |
Trading days
Tick the days of the week on which the robot may trade:
USE SPECIFIC HOURS switched on. They are part of the same hours block — with specific hours switched off (the factory default), the robot trades on any day the broker allows. This is deliberate: crypto trades 24/7 and Saturday/Sunday come unticked, so always applying the list would kill the weekend for anyone trading BTC. To restrict days, switch specific hours on — and set the morning/afternoon periods along with it.| Day | Parameter | Default |
|---|---|---|
| Sunday | Trade on Sunday | No |
| Monday | Trade on Monday | Yes |
| Tuesday | Trade on Tuesday | Yes |
| Wednesday | Trade on Wednesday | Yes |
| Thursday | Trade on Thursday | Yes |
| Friday | Trade on Friday | Yes |
| Saturday | Trade on Saturday | No |
🌍 MARKET SESSIONS
It filters trades by global session: Asian, London and New York. Each session has different volatility characteristics. It also lets you trade only during the overlap hours (London + NY).
| Session | Parameter (the name shown in the robot) | The window the robot uses | Default |
|---|---|---|---|
| 🌏 Asian | ☑️ 🌏 Asian session (Tokyo 00:00-09:00) | 00:00 - 09:00 | No |
| 🌍 London | ☑️ 🌍 London session (09:00-18:00) | 09:00 - 18:00 | No |
| 🌎 New York | ☑️ 🌎 NY session (14:00-23:00) | 14:00 - 23:00 | No |
| 🔥 Overlap only | ☑️ 🔥 London/NY overlap only (14:00-18:00) | 14:00 - 18:00 | No |
✏️ Clock for TIME/DAYOFWEEK (Server/Local) to Local moves these windows along with it — it is not just for the expressions.Só Overlap London/NY ignores the three boxes above. If it is on, only the 14:00-18:00 band is released — ticking Asia, London or NY alongside it makes no difference.📊 SPREAD PROTECTION
It stops the robot opening orders when the spread (the difference between buy and sell) is too wide. It avoids entering at moments of low liquidity with a high cost.
📰 NEWS DETECTOR (MULTI-REGION)
It identifies the important economic releases (GDP, rates, jobs and so on) — the moments when the market tends to move sharply and unpredictably — and hands that information to your expressions. The system uses the MT5's own calendar (MqlCalendar) — real events with country, importance and official time — and it also feeds the Gemini AI Analysis prompt, letting the AI factor macro timing into its recommendations.
NEWSIN[X], NEWSIMP and NEWSCTY. The one who decides to block is you, in the expression — e.g. NEWSIN[15]==0 && DIR[0]==1 @MARKET (it only enters if there is no news in the next 15 minutes). If none of your expressions uses those variables, switching the calendar on changes nothing in the robot's behaviour.MqlCalendar): country, impact, official time — and it feeds the NEWSIN[X] variable in your expressions (1 = there is news in the next X minutes · 0 = a clear window) and the AI Analysis prompt. The block is decided by YOU in the expression — e.g. NEWSIN[15]==0 && DIR[0]==1 @MARKET (it only enters with no news within 15 min). There is no automatic pause of the robot for news. It needs an active internet connection in MetaTrader.⚠️ Switching this field off does not switch news off. It chooses the source: on, the robot reads MT5's official calendar; off, it falls back to the built-in secondary calendar — and the variables go on being fed as normal. There is no combination of the two switches that zeroes
NEWSIN[X].alerts field of its answer.Impact levels CONSIDERED (they feed NEWSIN[X])
| Level | Examples | Default |
|---|---|---|
| 🔴 High impact | FOMC, NFP, COPOM, CPI — violent moves | Yes |
| 🟡 Medium impact | PMI, smaller jobs data, inventories | Yes |
| 🟢 Low impact | Central bank speeches, secondary data | Yes |
Country filters (all Yes by default)
| Country | Main events | Suited to |
|---|---|---|
| 🇺🇸 USA | NFP, FOMC, CPI, GDP | Every dollar-denominated asset |
| 🇧🇷 Brazil | COPOM, IPCA, SELIC | WIN, WDOL, IBOV |
| 🇪🇺 Europe | ECB, GDP, HICP | EURUSD, XAUUSD |
| 🇯🇵 Japan | BOJ, CPI, Tankan | USDJPY, JPY pairs |
| 🇬🇧 United Kingdom | BOE, CPI, GDP | GBPUSD, GBPJPY |
| 🇨🇳 China | PMI, GDP, PBoC | Commodities, AUDUSD |
| 🇦🇺 Australia | RBA, CPI, jobs | AUDUSD, AUDNZD |
NEWSIN[15] — it returns the number of news items expected in the next 15 minutes. Example: NEWSIN[15]==0 @MARKET = it only enters if there is no news within 15 min.🔊 ALERT SYSTEM
It notifies you in real time about the robot's important events. Available in two formats: sound (it plays on the computer) and push (a notification in the MetaTrader app on your phone).
Monitored events
| Event | When it fires | Default |
|---|---|---|
| New signal detected | A BUY/SELL expression evaluates as true — before the order is sent | No |
| Order closed | Any position is closed (by EXIT, SL, TP or by hand) | No |
| Take Profit reached | A position closed specifically by the TP | No |
| Stop Loss reached | A position closed specifically by the SL — useful for immediate loss alerts | No |
⚠️ SAFETY ALERTS PANEL
It is the dark panel that appears in the chart's top left corner when the robot spots something that could stop a trade — or already has. It exists so you are never left wondering why an order did not go through.
The panel buttons
With one deliberate exception: it does not reach CRITICAL alerts. Snoozing everything is tidying the screen; silencing a warning about position open without a Stop Loss with a tidy-up click is another. Critical ones can still be snoozed one by one, with intent.
Alerts the robot raises on its own
| Alert | When it appears | What to do |
|---|---|---|
| Unknown trigger | Your expression uses a @ that does not exist — almost always a typo (@MARKT, @LIMITE). |
Correct the trigger's name. The expression is ignored and no order is sent while it is wrong. |
| Automatic order not sent | The signal was approved but the order was blocked: volume below the minimum, not enough margin, trading session closed, a symbol with no quote, and so on. The reason is written in the alert. | Adjust whatever the alert points to (e.g. SetVolume[] below the asset's minimum). |
| Distance filter too short for [asset] | When you drag the robot onto a fast asset (WIN, indices, crypto), it warns that the distance limit is too small for its volatility. | Raise Max distance from reference price or switch the filter off — see below. |
| Buy/Sell blocked by the distance filter | One specific entry was blocked because price was too far from the reference. It shows the real distance and the limit. | If it keeps happening, the limit is too short for that asset. |
10 pontos, designed for forex pairs. On assets like WIN$ price moves dozens of points per candle, so that limit blocks almost every automatic entry. The robot now warns you when it spots this case — but the adjustment is yours: raise the value in CONFIG → ROBOT or switch the filter off.SetVolume[0.5] on WIN$, whose minimum is 1), the robot blocks the order and warns you — it never enters on its own with a size different from the one you asked for.When the robot holds an order instead of sending it
Before sending an order, a close or a stop/target change, the robot checks what the broker would refuse. If the broker would refuse it, the robot does not send it and writes one line in the Journal of MetaTrader (in the Experts tab) saying why — no log needs to be turned on. To keep the Journal readable, each reason appears at most once every 10 minutes (the stop one, once a minute per position).
| The line starts with | What it means | What to do |
|---|---|---|
[ORDER BLOCKED] |
An order was blocked before it left, with the same reason as the alerts panel: Insufficient margin on …, stop too close, volume below the minimum, distance filter… The robot also checks the margin on the chart symbol with SetVolume[]; on a netting account, an order that reduces the open position needs no margin. |
Adjust what the line says: a smaller volume, more balance, a wider stop. |
[SESSION] |
The broker's trading session for that symbol is closed right now (weekend, break, opening — gold, for example, quotes at 01:00 and only trades around 01:02). The robot sends no order, close or stop/target change, which the broker would refuse with Market closed. | Nothing: when the session opens, the robot sends again by itself. If it shows up at a time you think is open, check the sessions in the symbol's Specification in MT5. |
[SL/TP] |
A stop or target change requested by a robot feature (candle stop, trailing, break even…) would be on the wrong side of the price or closer than the broker's minimum — or the current stop is frozen near the price (freeze level). The stop/target at the broker stays in force; the rest of the request goes ahead. | Usually nothing — it is the robot avoiding a refusal. If it is constant, that feature's stop is too short for the symbol. |
📊 MQL MANAGER (OPERATIONS PANEL)
The MQL Manager is MQL PRO TRADER's horizontal operations panel at the foot of the chart. It does not replace the side ticket: the ticket is for fast manual execution; the MQL Manager is for monitoring, robot control, target selection, AI analysis and quick configuration without opening MetaTrader's parameters window.
It is organised in 3 physical rows: Row 1 — POSITIONS / INFO / AI / CONFIG tabs; Row 2 — quick buttons for status, direction and manual target; Row 3+ — content of the active tab. Press G or click the MANAGER button on the side panel to open/close it at any time.
💾 SAVE on the CONFIG tab, the panel becomes the one in charge — changing that setting in the Inputs stops having any effect. It is the explanation for "I changed it in F7 and nothing changed". It applies to about 120 settings, per account and per asset. How it works and how to undo it →Quick map of the MQL Manager
| Area | Elements | What it does |
|---|---|---|
| Row 1 | POSITIONS · INFO · AI · CONFIG | Chooses which content appears in the panel body. The INFO tab has [SUMMARY] and [CENTER] sub-tabs. CONFIG opens a quick-settings overlay. |
| Row 2 — Status | ROBOT · MOUSE | Turns the automatic robot and Mouse Trading mode on/off without opening the EA inputs. |
| Row 2 — Direction | ▲BUY · ▲BOTH▼ · ▼SELL | Sets the direction allowed for automatic expression entries. It does not affect manual closing. |
| Row 2 — Manual target | A1: símbolo · A2: símbolo · A3: símbolo | Selects which assets the ticket, shortcuts and mouse send manual orders to. Each button shows its own symbol (e.g. A1: WINM26). They are the manual target — separate from the robot's automatic trading (CONFIG → ROBOT). |
| Button colour | Green / blue / grey | Green = on/selected. Blue = available but not selected (manual target). Grey = off/no symbol. |
| Content | Positions, INFO (summary/Center), AI or CONFIG | Updates with the EA's runtime data; POSITIONS and INFO follow the account/assets, AI follows the AI cache and modes. |
The ✖ on the POSITIONS tab — close everything, only profit or only loss
On the POSITIONS each asset is one row, with its buys on one side and its sells on the other. There are three ✖ per row: one on the buys, one on the sells and one on the asset (which reaches both sides).
Clicking a ✖ does not close anything straight away — it opens a box in the middle of the panel, with a gold border, whose title states what is at stake (e.g. CLOSE XAUUSD BUYS — close what?) and the choice buttons:
| Option | What it closes |
|---|---|
| TUDO | Every position in that group, winning or losing. |
| SÓ LUCRO | Only the ones in profit — banks what you have already won and leaves the losers open. |
| SÓ PREJUÍZO | Only the ones in loss — cuts the losses and lets the winners run. |
SÓ LUCRO (3) +BRL 240.00 and decide by looking at the figure, not from memory. That is deliberate: "only the winners" without knowing how many or how much is a decision made blind.A button that would close zero positions does not appear — if there is no loser in that group, the SÓ PREJUÍZO simply does not exist on that click.
Want to close one specific position? Not here: each position has its own ✖ on the chart, next to the ➕ Add TP, anchored to its own line — there you see price, stop and target before deciding.
The menu closes on its own when you change tab, and the CANCEL button exits without doing anything. Every close is recorded in MetaTrader's Experts tab.
How to open and close it
| How | Description |
|---|---|
| Key G | Opens or closes the MQL Manager instantly while the chart has focus |
| Button MANAGER on the side panel | Same behaviour as the G key — a visible button on the chart's right-hand side panel |
| Button M-Close / Close on the panel | Button in the bottom-right corner of the MQL Manager — performs the same toggle as the G key and hides the operations panel |
| "Show panel at startup" parameter | When on, the panel opens automatically as soon as the EA loads on the chart |
Configuration parameters
| Parameter | Description | Default |
|---|---|---|
| Show panel at startup | If on, the panel opens as soon as the EA initialises | No |
| Background colour | The panel's background colour | C'40,40,40' (dark grey) |
| Border colour | The visible border colour of the MQL Manager | clrDimGray |
| Text colour | The colour of the text shown on the panel | White |
| Height (pixels) | Panel height in pixels. Valid range: 220–500. A 3-column layout + Col5 with 1 row per asset on the POSITIONS tab — the taller it is, the more position rows fit on screen (capped by Max visible assets) | 430 |
| Width (pixels) | Panel width. Use 0 to fit the chart width automatically (full screen) | 1000 |
| Font size | Text size on the panel. Valid range: 6–12. Recommended: Full HD → 10, 4K → 11–12, laptops → 8–9 | 10 |
| Max visible assets (Col5) | Maximum number of assets shown at once on the POSITIONS tab — tied to the panel height (each slot takes one row) | 8 |
Row 1 — Content tabs
| Button | Type | Content |
|---|---|---|
| POSITIONS | Tab | Individual positions per asset with P&L and close buttons |
| INFO | Tab (with sub-tabs) | Two sub-tabs: [SUMMARY] = account statistics (overall result, profit of the day, performance, all positions, hours and spread) · [CENTER] = access to the Performance Center (web dashboard). This tab used to be called SUMMARY, then CENTER. |
| AI | Tab | Gemini analysis hub: ANALYSE A1/A2/A3 buttons, AI modes, cache and floating panel |
| CONFIG | Modal overlay | Opens a quick-settings overlay panel with 8 internal tabs (see the section below) |
Row 2 — Quick button bar
These buttons change the EA's runtime state directly on the chart. Green = active/selected, grey = inactive/not selected. The old SL/TP/BE/TS/NEWS buttons are no longer on this bar: they moved to the sub-tabs of CONFIG.
Row 2 — Status toggles
Two toggles that switch features on and off straight from the panel, without opening the settings:
| Toggle | What it controls |
|---|---|
| ROBOT | Turns the automatic robot on/off (BUY/SELL expression entries) |
| MOUSE | Enables/disables click-to-trade with the mouse on the chart |
Row 2 — Automatic direction toggles
Three mutually exclusive buttons that set the direction allowed for the robot's automatic entries (they do not affect manual trading):
| Toggle | Effect on automatic entries |
|---|---|
| ▲BUY | The robot only opens buy positions — automatic sells are blocked |
| ▲BOTH▼ | The robot may open buys and sells (default behaviour) |
| ▼SELL | The robot only opens sell positions — automatic buys are blocked |
Row 2 — Manual target selector (A1 / A2 / A3)
After the direction toggles come the 3 A1 / A2 / A3 buttons that control which assets the manual actions are sent to — ticket, keyboard shortcuts and mouse. Each button shows its own symbol (e.g. A1: XAUUSD, A2: WINM26), so you can see at a glance which is the primary asset and which are the secondary ones. Each click turns the matching asset on or off individually.
• With a symbol:
A1: WINM26, A2: PETR4, A3: WDO$• Slot with no symbol configured:
A2: — (greyed out, not selectable)• When space runs short, the button shortens only as much as needed and keeps the symbol as long as it can: first it drops the colon, then it trims the symbol one letter at a time, down to 3 (e.g.:
A1 XAUUSD → A1 XAUU). Only on a very narrow panel does it become just A1 / A2 / A3 (without the symbol) so it does not spill over the side ticket.
| Button | Look | Default | Asset it controls |
|---|---|---|---|
| A1: símbolo | Green = selected | Blue = available | Grey = no symbol | Selected | The chart's main asset (_Symbol) |
| A2: símbolo | Green = selected | Blue = available | Grey = no symbol | Available | Second asset (A2) — set in the parameters or under CONFIG → ROBOT |
| A3: símbolo | Green = selected | Blue = available | Grey = no symbol | Available | Third asset (A3) — set in the parameters or under CONFIG → ROBOT |
⚙ CONFIG — Quick settings overlay
When you click CONFIG a modal overlay opens over the panel content. While the overlay is open, the POSITIONS/INFO/AI content is hidden and comes back when CONFIG is closed. CONFIG has 8 internal sub-tabs for quick adjustments to trading, risk, session, Telegram and diagnostics:
| Tab | What it holds |
|---|---|
| STATUS | A lean summary of the values and totals that are not repeated in the other sub-tabs |
| NORMAL | Editable SL, TP, Breakeven and Trailing Stop fields — change the numeric values directly |
| ADVANCED | 8 advanced protection toggles: Candle SL, Stoch SL, ATR, % SL, Auto TP, Trailing TP, Conservative TP, Dynamic TS |
| RISK | Capital protection: daily loss limit, maximum drawdown and limits in money (USD/R$) |
| SESSION | Trading hours, allowed weekdays, market sessions, spread filter and news protection |
| ROBOT | The robot's tactical control: auto-trading, scalping mode, per-candle entry limit, distance filter, volumes (robot/manual), A2/A3 symbols, the "ROBOT Trades on: A1/A2/A3" selector and custom buy/sell filters |
| TELEGRAM | Telegram notification and alert settings — token, chat ID and which events send a message |
| BUFFERS | Indicator analyser: name, subfolders and buffer/parameter discovery for use in expressions (the overlay's internal title is "INDIC — Buffer/Parameter Discovery") |
STATUS sub-tab — overall robot reading
| Block | What it shows | What it is for |
|---|---|---|
| Robot, entries and assets | Per-candle entry limit, distance filter, secondary assets A2/A3, order permission on A2/A3 and the active buy/sell filters | Quickly check whether the robot is being limited by a filter before you go hunting for an expression error. |
| Risk and account limits | Dynamic risk, daily profit/loss locks and profit protection in money | Confirm whether a capital protection could block new entries or close positions. |
| Hours, market and news | Allowed hours, weekdays, market sessions, spread, calendar/news, impact levels and monitored countries/currencies | Understand whether the robot is inside its trading window and whether news/spread are filtering the market. |
| Licence / AlgoTrading | The EA's licence status and MT5's trading permission | Diagnose basic blocks: invalid licence or AlgoTrading disabled in the terminal. |
NORMAL sub-tab — SL, TP, Breakeven and Trailing Stop
| Control | Type | Effect |
|---|---|---|
| SL: LIGADO/DESLIGADO | Toggle button | Turns the normal fixed Stop Loss on/off. |
| Points of the SL | Editable field | Sets the Stop Loss distance in points. |
| TP: LIGADO/DESLIGADO | Toggle button | Turns the normal fixed Take Profit on/off. |
| Points of the TP | Editable field | Sets the Take Profit distance in points. |
| BE: LIGADO/DESLIGADO | Toggle button | Turns the automatic Breakeven on/off. |
| PROFIT pts of the BE | Editable field | Minimum profit in points to trigger the Breakeven. |
| Offset of the BE | Editable field | Positive/negative slack applied to the entry price when the SL moves to break-even. |
| TS: LIGADO/DESLIGADO | Toggle button | Turns the normal Trailing Stop on/off. |
| PROFIT pts of the TS | Editable field | Minimum profit before the stop starts trailing. |
| Step of the TS | Editable field | The step used to reposition the stop while trailing. |
ADVANCED sub-tab — protections and smart targets
| Button | What it switches on/off | Note |
|---|---|---|
| SL pelo Candle | Stop Loss calculated from the candle structure | Used when you want a technical SL from the high/low or a reference candle. |
| SL pelo Stoch | Stop based on Stochastic logic | Depends on the protection system's detailed settings. |
| ATR SL/TP | SL/TP by volatility via ATR | Fits the protection to the asset's average move size. |
| % SL/TP | Percentage SL/TP | Useful for assets with a different price scale. |
| Automatic TP (xSL) | Take Profit as a multiple of the Stop Loss | Lets the target stay proportional to the configured risk. |
| Dynamic TP | Trailing/dynamic adjustment of the target | Aims to protect profit as price moves in your favour. |
| TP Conservador | Conservative target mode | Used for more defensive exits. |
| TS Dinâmico | Dynamic Trailing Stop | Adjusts the trailing according to the advanced logic configured. |
RISK sub-tab — capital protection
| Control | Type | Effect |
|---|---|---|
| Dynamic risk (% balance) + % | Toggle + field | Calculates the volume from the risk percentage of your balance. |
| Daily Loss Limit + % | Toggle + field | Locks the robot when the configured daily loss is reached. |
| Daily Profit Limit + % | Toggle + field | Locks the robot when the daily percentage target is reached. |
| Stop Robot When Limit Is Hit | Toggle | Stops new entries after the risk/profit/loss limit. |
| Close Positions on Drawdown | Toggle | Closes positions when the configured drawdown is reached. |
| Profit Protection | Toggle | Enables the general logic that protects accumulated profit. |
| Daily Profit Protection + Meta USD + Prot. up to $ | Toggle + fields | Once the money target is reached, it protects you if profit pulls back to the limit you set. |
| Close All on Target Hit | Toggle | Closes positions when the money target is reached. |
| Stop Robot After Target | Toggle | Blocks new entries after the target. |
SESSION sub-tab — hours, days, market, spread and news
| Group | Controls | Effect |
|---|---|---|
| Times | Specific Hours, morning start/end and afternoon start/end | Defines when the robot can trade, via fixed time windows. |
| Weekdays | Sun, Mon, Tue, Wed, Thu, Fri, Sat | Lets you block specific days. |
| Markets | Markets, Asia, London, NY, Overlap Only | Filters trading by market session and, if you wish, only the overlap. |
| Spread | Spread Filter + Max pts | Blocks entries when the spread is above the limit. |
| News | Econ. Calendar, impact levels Low/Medium/High | Enables the news filter and chooses which impact levels count for the analysis/block. |
| Countries/currencies | US, BR, EU, JP, GB, CN, AU | Sets which economies/currencies the news filter considers. |
ROBOT sub-tab — tactical control, volumes, multi-asset and filters
| Group | Controls | Effect |
|---|---|---|
| Trading | Trading Robot, Scalping Mode | Turns automation and scalping mode on/off. |
| Entries | Entry Limit per Candle + Max, Entry Distance Filter + Pts | Prevents too many entries in the same candle and entries far from the ideal point. |
| Behaviour | Avoid Same Direction, Flatten Opposite | Controls whether the robot avoids stacking in the same direction and whether it closes the opposite position before entering. |
| Volume and orders | Volume for Robot Mode, Volume for Manual Mode, Max Positions per direction, Max Pending Orders/dir | Adjusts lots, the cap on open positions per direction (0=unlimited) and how many pending orders @LIMIT/@STOP may pile up per direction (0=unlimited, 1=default) — all without reopening the EA inputs. |
| A2/A3 symbols | Fields A2: / A3: + OK | Type the secondary/tertiary asset's symbol and click OK — the robot validates it, saves and restarts (~1-2s) already recognising the new asset in both automatic and manual trading. |
| Automatic multi-asset | ROBOT Trades on: R-A1, R-A2, R-A3 | Trading permission automatic per asset (the R- prefix = robot). A1 is the chart; A2/A3 depend on a configured symbol. |
| Buy filters | F.C1 the F.C5 | Turns the custom buy filters on/off. |
| Sell filters | F.V1 the F.V5 | Turns the custom sell filters on/off. |
TELEGRAM sub-tab — notifications, reports and alerts
| Group | Controls | Effect |
|---|---|---|
| Diagnostics | Show Error Logs in the Journal | Shows Telegram communication errors in the MT5 Journal — useful for support. |
| Local/remote alerts | Sound, Push, New Signal, Order Closed, TP Hit, SL Hit | Sets which alerts the EA raises for trading events. |
| Configuration file | SEND .SET | Sends your current EA configuration to Telegram when the token and chat ID are set. |
BUFFERS sub-tab — indicator discovery
| Control | Type | Effect |
|---|---|---|
| Indicator Name | Text field | Type the indicator's name without .ex5 and without a full path. |
| Subfolders | Text field | Give extra subfolders when the indicator is in Market\.... Use the ; separator for several folders. |
| ANALYSE | Button | Runs the buffer/parameter discovery: the full report (buffers, syntax and ready-to-paste expressions) appears in the Journal. Ask the AI Coach for the indicator by name and the same report arrives straight in the panel chat. |
| Native indicators | Automatic detection | RSI, MACD, MA/EMA/SMA, STOCH, ATR, Bollinger and other native ones are recognised without needing a custom file. |
POSITIONS tab — individual positions per asset
Title shown: INDIVIDUAL POSITIONS (ACCOUNT). It shows up to N assets at once (configurable under "Max visible assets"). For each asset with an open position it shows:
| Field | What it displays |
|---|---|
| Symbol | The asset's name with a coloured marker (▌) on the left |
| Buys | Open buy volume + buy P&L in currency |
| Sells | Open sell volume + sell P&L in currency |
| Result | The asset's total result (buys + sells) in currency |
| X button (buys) | Closes only the asset's buy positions |
| X button (sells) | Closes only the asset's sell positions |
| X button (everything) | Closes every position of the asset (buys and sells) |
The tab's footer shows the totals for the whole account:
| Field | Content |
|---|---|
Compras: --- | The sum of all open BUY volume in the account |
Vendas: --- | The sum of all open SELL volume in the account |
Result Total: --- | The total money result of every open position |
Margem: --- | Total margin requirement in use on the account (every asset that consumes margin). It can appear in 3 states — see the note below. |
• A value (e.g.
Margem:$59.88) — margin in use, adding up every asset in the account.• "N/A" — there is a position, but the broker does not report the margin (e.g. B3 futures on a demo account). Not an error — see Markets and Brokers.
• "---" — there is no open position in the account (a genuine zero margin).
The reading is live (PositionsTotal) — with many positions on a fast feed, the margin stays stable (it does not flicker).
INFO tab — account summary + Performance Center
The INFO tab (which used to be called SUMMARY and then CENTER) has two sub-tabs: [SUMMARY] — the account statistics described below (internally it uses Col3_/Col4_) — and [CENTER]objects), which opens the Performance Center (web dashboard). The SUMMARY sub-tab is split into three blocks shown side by side:
Block 1 — OVERALL RESULT (ACCOUNT)
| Field | Content |
|---|---|
Buys: | Total P&L of open buys (symbol + value) |
Sells: | Total P&L of open sells (symbol + value) |
Total Result: | Consolidated P&L for the whole account |
Acct. Total Margin: | Total margin in use (or "EA Total Margin:" when restricted to the robot) |
Meta: | Progress towards the configured profit target, or OFF |
Lim: | Visual indicator of the loss limit with percentages, or OFF |
Risk: | Percentage and amount at risk in the open positions, or OFF |
It is completely normal on demo accounts at Brazilian brokers (B3) — it is not a robot problem. What happens is this: MT5 fetches the margin required per contract straight from the broker's server . On many B3 demo accounts, that server simply does not supply the information (technically: the field
SYMBOL_MARGIN_INITIAL stays at zero). Without that figure the terminal shows 0,00 — but orders are still sent and executed normally.On a liveaccount, the broker reserves and reports the correct margin: WIN/WDO mini contracts have a per-contract margin set by B3 (e.g. ~R$ 100 per WIN); shares have margin calculated on the position's financial value. The robot neither controls nor calculates margin — that is entirely the broker's and the MT5 server's responsibility.
Block 2 — PROFIT OF THE DAY + PERFORMANCE OF THE DAY
| Field | Content |
|---|---|
Buys: | Realised profit on buys for the day |
Sells: | Realised profit on sells for the day |
Profit of the Day: | Total realised money result for the day |
Trades: | Number of trades closed in the day (wins/losses) |
Win Rate: | The day's win rate as a percentage |
Best Win: | The day's biggest winning trade |
Worst Loss: | The day's biggest losing trade |
Streak: | Current streak of consecutive wins or losses |
Block 3 — ALL POSITIONS + HOURS
| Field | Content |
|---|---|
BUYS: | Number of open buy positions in the account |
SELLS: | Number of open sell positions in the account |
Compras Pendentes: | Number of pending buy orders |
Vendas Pendentes: | Number of pending sell orders |
Tempo da Vela: | Time left before the current candle closes |
Server Time: | The broker server's current time |
Local Time: | The computer's local time |
Spread: | The asset's current spread in pips |
Session: | The market session currently active |
📰 Notícia: | The next relevant economic news item (when the Calendar is set up) |
🤖 AI tab — Gemini analysis hub
The operations hub of the AI Market Analysis system. It gathers the per-asset analysis buttons, the persisted runtime modes, the A1/A2/A3 cache status and the trigger for the floating AI panel on the chart. You do not need to open the EA parameters to change AI behaviour — it is all done here.
Analysis and maintenance buttons
| Button | Action | Precise note |
|---|---|---|
| ANALISAR A1 | Queues a Gemini analysis for the current chart's main asset. | If the AI is off, the EA logs a warning telling you to enable the parameter ☑️ Enable AI Assistant (Gemini). |
| ANALISAR A2 | Queues an analysis for the second asset. | It only runs if ✏️ Secondary asset A2 (e.g. EURUSD, XAUUSD) is filled in. |
| ANALISAR A3 | Queues an analysis for the third asset. | It only runs if ✏️ Tertiary asset A3 (e.g. GBPUSD, BTCUSD) is filled in. |
| ANALISAR TODOS | Queues A1 and the configured secondary assets in sequence. | It was made for use with A2/A3. If only A1 exists, use ANALISAR A1. |
| SHOW PANEL / HIDE PANEL | Shows or hides the floating AI panel over the chart. | Same effect as the I. |
| CLEAR CACHE | Clears the AI's runtime cache and resets the displayed fields. | Use it when you want to force a fresh reading without inheriting the previous answer. |
| REFRESH PANEL | Re-renders the floating AI panel and the AI tab. | Useful after a resize, a visual change, or when you want to refresh the displayed reading. |
| TELEGRAM LAST | Resends the last AI analysis to Telegram. | It only works if there is a cached answer and Telegram is enabled. |
AI modes (persisted runtime toggles)
Each toggle below changes the next analysis's behaviour immediately. The state is kept across EA restarts — you do not need to reopen the parameters to change it.
| Toggle | What it enables | Parameter as seen in MT5 |
|---|---|---|
| DEEP | Uses the ✏️ PROFUNDO model instead of the fast model. | ☑️ Use DEEP model (slower/costlier) |
| WEB | Allows web search and reading of news/fundamentals during the analysis. | ☑️ 🌐 Use web search (news/fundamentals) |
| CHART | Attaches a multi-timeframe chart screenshot with the request. | ☑️ 📷 Send a chart screenshot (multi-TF) |
| REVIEW | Enables self-critique: the AI reviews its own answer before returning it (uses more tokens, improves quality). | ☑️ 🔎 Automatic AI review (may use more tokens) |
| ALERTS | Decides whether the analysis leaves MT5: with it on, the result goes to the web dashboard (🤖 AI Coach tab) and, if you have connected it, also to Center on Telegram — along with the errors, when the AI fails. With it off, the analysis stays on the chart only. | ☑️ 📢 Send AI analyses to the panel and the alerts |
| SIMULATE | Test mode: blocks automatic orders that depend on the AI (but the analysis still runs and the cache is filled normally). | ☑️ 🧪 Test mode: blocks automatic AI orders |
| PLAN B | Safety net: it uses the PROFUNDO model first and only falls back to FLASH if the deep one fails (timeout, 5xx, 503). You lose no depth and are never left without an analysis — best left on, mainly because the gemini-2.5-pro is frequently overloaded (503) on Google's side. | ☑️ 🔄 If DEEP model fails, automatically retry with FAST |
IA_VALIDA == 1). This panel is what your expressions using ANALISA_IA, A2ANALISA_IA and A3ANALISA_IA read in real time.| AI cache field | Meaning on the panel | Use in expressions |
|---|---|---|
| Decision | The main direction/action returned by the analysis, such as buy, sell, wait, manage or close. | Equivalent to the direction variables, such as ANALISA_IA, A2ANALISA_IA and A3ANALISA_IA. |
| Confidence | The clarity and strength of the signal (%) calculated by the AI. No is not the probability of the move — that is the Up%/Down% (IA_PROB_ALTA/IA_PROB_BAIXA). | Use filters such as IA_CONFIANCA>=70 to avoid weak entries. |
| Validity | Shows whether the analysis is still within the configured TTL. | Always combine it with IA_VALIDA==1 before using the AI in automatic entries/exits. |
| Age | Seconds since that asset's last analysis. | Helps avoid decisions on a stale analysis in fast markets. |
| Close BUY/SELL | The AI's signal to close open buys or sells. | Can be used in exits such as IA_FECHAR_BUY==1 @BCLOSE or IA_FECHAR_SELL==1 @SCLOSE. |
Send .SET button
Use it to share your strategy with colleagues, keep a snapshot of your configuration or send it to support for review. The file arrives named
SIMBOLO_MQLPRO_CONTA.set and can be forwarded to anyone on Telegram with one tap.🔁 THE SAME SETTING HAS TWO NAMES — Panel ↔ Inputs map
The robot is set up from two places:
- The Inputs — the long list that appears when you drag the robot onto the chart, or when you click the robot's icon in the chart's top right corner and choose Properties.
- The MQL Manager — the panel at the bottom of the chart, with the POSITIONS · INFO · AI · CONFIG tabs.
They are the same settings — but the panel uses short names, because space is tight there.
⌨️ Keyboard shortcuts — the golden rule
| Shortcut | What it does |
|---|---|
| A+C / A+V | Open Buy / Sell Stop (a pending order). A for Open. |
| Shift+C / Shift+V | Buy / Sell at Market (executes there and then) |
| Z+C / Z+V | Zero out every open buy / sell |
| X+C / X+V | Cancel the pending buys / sells |
| Shift+Z | Close all |
| A+1 / A+2 / A+3 | Switches each manual target A1 / A2 / A3 on/off |
| Shift+A | Opens the panel with the full list, on the chart itself |
⚠️ Which wins: the panel or the Inputs?
💾 SAVE on the CONFIG panel, the panel is in charge. From then on, changing the value in the Inputs no longer has any effect on those fields: the robot keeps using what was saved. This is the explanation for "I changed it in the Inputs and nothing changed".The reason is the reading order: on startup the robot reads the Inputs first and then immediately overwrites them with the configuration you saved from the panel — if there is one. About 120 settings are in that condition: the SL/TP/Break-even/Trailing ones, the risk and protection ones, the session/time/spread/news ones and the robot's own.
The saved configuration is per account and per asset. What you saved on account X trading WIN does not interfere with the same account trading XAUUSD, nor with account Y — each combination keeps its own.
In a backtest (Strategy Tester) it is different: the robot ignores the configuration saved from the panel and follows only the Inputs — that is, the .set you loaded for the test. And during the test, 💾 SAVE saves nothing. That way the result is that of the .set, and testing does not touch the configuration of the robot that is trading for real.
There are three modes, and you choose between them all the time
Many people think there is only "change it in F7" or "save it on the panel". There is a third one, and it is the most useful day to day:
| What you want | What to do | How long it lasts |
|---|---|---|
| Test right now — change the stop, the risk, the volume and see the effect | Change it on the panel and do NOT click 💾 SAVE | It also accepts immediately and it works exactly the same — it just does not survive the robot's next restart (list below) |
| Make it stick — leave it that way from now on for that chart | Change it on the panel and click 💾 SAVE | It holds until you save again. From then on F7 stops being in charge of those fields |
| Give control back to F7 | Delete the saved file (step by step below) and put the robot back | Whatever is in the Inputs takes over again |
What wipes out an unsaved change (anything that makes the robot restart):
- Changing the chart's timeframe — the most common one, and it catches almost everybody;
- Changing the chart's asset of the chart, applying a template;
- Opening the Inputs and clicking OK, or recompiling;
- Removing and re-adding the robot, closing and reopening MetaTrader;
- ⚠️ The robot restarting itself — it does that on its own when you set up A2/A3 from the panel, when you authorise the URLs and when it receives a command from the web dashboard.
| If you want to… | Do this |
|---|---|
| Change a setting after having saved | Change it from the panel and click 💾 SAVE again |
| Go back to being in charge from the Inputs | Delete the saved configuration file (path below) and put the robot back on the chart |
| Use different settings on each asset | It already works that way: set it up and save on each chart |
How to give control back to the Inputs
The saved configuration lives in a file named NEXUS_MenuCfg_<sua conta>_<ativo>.bin. Deleting that file and putting the robot back on the chart makes F7 take charge of that chart again. You lose nothing else — only that one set of saved settings.
The easiest way (the robot hands you the path): open the Experts (Journal) tab in MetaTrader right after putting the robot on the chart. When there is a saved configuration, it prints a line starting with [MenuConfig] containing the file's full path. Copy the path from there and paste it into File Explorer's address bar.
Through File Explorer, step by step:
- Press Win + R.
- Paste exactly this and click OK:
%APPDATA%\MetaQuotes\Terminal\Common\Files - Find the file
NEXUS_MenuCfg_<sua conta>_<ativo>.bin— for instance,NEXUS_MenuCfg_123456_WINV26.bin. - Delete only the file for the account+asset pair you want to release.
- Go back to MetaTrader and put the robot on the chart again (or switch the timeframe and come back).
CONFIG → ROBOT tab
| On the panel | On the Inputs tab |
|---|---|
Trading Robot | ☑️ ENABLE TRADING ROBOT |
Scalping Mode | ☑️ ⚡ ENABLE Scalping Mode (RECOMMENDED) |
Entry Limit per Candle + Max: | ☑️ Limit entries per candle + ✏️ Max entries per candle (per direction) |
Entry Distance Filter + Pts: | ☑️ Distance filter for auto entries + ✏️ Max distance from reference price (pts) |
Avoid Same Direction | ☑️ Skip order if position exists in the direction |
Flatten Opposite | ☑️ Close opposite position before entering |
Volume for Robot Mode: | ✏️ ROBOT VOLUME (BUY1-10/SELL1-10 without SetVolume[]) |
Volume for Manual Mode: | ✏️ Initial VOLUME (adjustable via TICKET) |
Max Positions per direction: | ✏️ Max open POSITIONS per direction (0=unlimited) |
Max Pending Orders/dir: | ✏️ Max PENDING ORDERS per direction (0=unlimited) |
F. Compra: F.C1 … F.C5 | ☑️ Enable Filter 1 … 5, in the 🤖 BUY FILTER SETUP (01 to 05) group |
F. Venda: F.V1 … F.V5 | ☑️ Enable Filter 1 … 5, in the SELL group |
CONFIG → NORMAL tab (SL / TP / BE / TS)
Points: and PROFIT pts: appear twice each. What tells them apart is the row they are on — the SL one, the TP one, the BE one or the TS one.| On the panel | On the Inputs tab |
|---|---|
SL: ON/OFF + Points: (SL row) | ☑️ ENABLE Stop Loss + ✏️ Points from entry to SL |
TP: ON/OFF + Points: (TP row) | ☑️ ENABLE Take Profit + ✏️ Points from entry to TP |
BE: ON/OFF + PROFIT pts: + Offset: | ☑️ ENABLE Breakeven + ✏️ PROFIT points to TRIGGER BE + the BE offset |
↳ drags by CANDLE / ↳ drags by FIXED STEP (it only shows with TS switched on) | ☑️ MODE: trail by CANDLE (off = fixed step above) |
TS: ON/OFF + PROFIT pts: + Step: | ☑️ ENABLE Trailing Stop + the points to start and the step distance |
CONFIG → ADVANCED tab
Here the panel only switches on and off — the numbers live in the Inputs, and the panel says so itself.
| On the panel | On the Inputs tab |
|---|---|
SL pelo Candle | ☑️ ENABLE SL at previous candle Low/High |
Stoch SL (chart only) | ☑️ ENABLE SL by Stochastic extreme |
ATR SL/TP | the DYNAMIC SL/TP BY ATR group |
% SL/TP | the PERCENTAGE SL/TP (% of price) group |
Automatic TP (xSL) | ☑️ ENABLE TP multiplied by SL |
Dynamic TP | ☑️ ENABLE DYNAMIC TP |
TP Conservador | ☑️ ENABLE CONSERVATIVE TP |
TS Dinâmico is no longer on this tab. It was never a separate system — it is the Trailing Stop's mode , and with Trailing switched off it did nothing, even though the button could read ON. It now appears on the NORMALtab, right below the TS row, and only while TS is switched on.
CONFIG → RISK tab
Risco dinâmico (% banca): 2.00 %; in the Inputs the same setting is ✏️ Risk per trade (0.02 = 2% of balance) — that is, 0.02. It is the same value written two ways.| On the panel | On the Inputs tab |
|---|---|
Dynamic risk (% balance) | ☑️ Enable dynamic risk per trade + ✏️ Risk per trade (0.02 = 2% of balance) |
Daily Loss Limit | ☑️ Lock by daily loss + ✏️ Max daily loss (%) |
Daily Profit Limit | ☑️ Lock by daily profit + ✏️ Max daily profit (%) |
Stop Robot When Limit Is Hit | ☑️ Stop trading after limit |
Close Positions on Drawdown | ☑️ Close positions on drawdown threshold |
Profit Protection | ☑️ Protect profits (positive drawdown) |
Daily Profit Protection | ☑️ Enable USD profit protection |
Target $: and Prot. up to $: | ✏️ Daily profit target in $ and ✏️ Protect if drops to $ (drawdown) |
Close All on Target Hit | ☑️ Close all on target |
Stop Robot After Target | ☑️ Stop trading after target hit |
CONFIG → SESSION tab
| On the panel | On the Inputs tab |
|---|---|
Specific Hours | ☑️ USE SPECIFIC HOURS |
Markets · Asia · London · NY · Overlap Only | ☑️ Filter by sessions and each session's toggles |
Spread Filter + Max pts: | ☑️ Filter high spread + the maximum spread |
Econ. Calendar + Baixa/Média/Alta | ☑️ ✅ ENABLE ECONOMIC CALENDAR + the impact filters |
CONFIG → AI tab (and the AI tab at the top)
| On the panel | On the Inputs tab |
|---|---|
Model: | ✏️ FAST model |
Deep model: / the DEEP | ☑️ Use DEEP model (slower/costlier) |
Quick plan B: | ☑️ 🔄 If DEEP model fails, automatically retry with FAST |
Chart: | ☑️ 📷 Send a chart screenshot (multi-TF) |
Alerts: / the ALERTS | ☑️ 📢 Send AI analyses to the panel and the alerts |
Auto A1/A2/A3: | each target's auto-analysis parameters |
Logs/CSV: | ☑️ 📝 Write a CSV of the analyses |
CONFIG → BUFFERS tab
It is the indicator discovery: you type an indicator's name .ex5 and the robot answers with the buffers and parameters it has. It does not replace the declaration — once you have found out, fill in ✏️ INDICATOR NAME and ✏ INDICATOR PARAMETERS in the Inputs, as shown in How to declare an indicator.
🧹 CLEANUP SETTINGS
The robot creates chart objects while it works (lines, labels, arrows from the panels and from the orders).
🐛 LOG / DEBUG
It controls the diagnostic records on the Experts tab in MT5. For most users no log needs to be switched on — use them only when investigating a problem.
| Parameter | What it records | Default | When to use it |
|---|---|---|---|
| Interval between logs (sec) | How often the periodic status logs come out | 60 sec | Drop it to 10 sec during active debugging |
| System logs | Startup, ticks, state changes | No | The robot does not start or seems stuck |
| Licence debug | Activation/licence verification | No | Only if support asks for it |
| ⭐ Errors in expressions | Syntax errors and invalid tokens in BUY/SELL/EXIT/Filters | No | Switch it on whenever you set up new expressions |
| Verbose debug (full) | Every expression evaluation and decision flow | No | An expression does not fire and you want to see it step by step |
| General errors | Failures opening handles, communication errors; and repeats the [ORDER BLOCKED] on every refusal (without it, at most once every 10 min per reason) | No | Unexpected behaviour with no clear message |
| Order execution | Price, volume and result of every order sent | No | An order did not go out or the price differs from what you expected |
| Profits/losses | The calculated open profit and day's profit values | No | The figures on the panel look wrong |
| Indicator debug | Loading and the values read from IND1–IND30 and the AI's indicators | No | An IND returning zero or wrong values in expressions |
| Telegram errors | Connection failures, an invalid token, the bot timing out | Yes | Keep it on until you confirm Telegram works |
| A2 update logs | Syncing and updating the secondary asset's data | No | Trouble reading A2 |
| A2 execution logs | Execution of orders aimed at the secondary asset | Yes | Specific trouble with orders on A2 |
| A2 validation logs | A2's detailed internal validations | No | Heavy debug, use it only if you must |
[EXPR ERROR] COMPRA [01]: token desconhecido '@MERCADOO').[ERRO], [AVISO] and [DICA] always come out, with every log switched off — that is deliberate, so the robot never fails in silence. What these parameters control is the routinelog, not the problem one.The parameters, one by one
They all live in the ✅ SYSTEM LOGs, DEBUGs AND ANOMALIESgroup, in the Inputs.
The rest follow the same logic and live in the same group: ☑️ 🖥️ System logs (OnInit, OnTick, state changes) · ☑️ General errors (handles, etc.) · ☑️ 💵 Profits/losses · ☑️ Indicator debug (config, params, errors) · ☑️ 🔐 Debug: show licence verification logs · ☑️ Secondary asset update logs · ☑️ Validation logs (heavy debug) · ☑️ 🐛 Show detailed error logs in the Journal. On the AI side: ☑️ 📋 AI logs on the Experts tab, ☑️ 📝 Write a CSV of the analyses, ☑️ 🔢 Log tokens used per call (cost estimate) and ☑️ 💾 Save shots to Files\AI_Screenshots\ (visual debug).
🤖 AI MARKET ANALYSIS
Market analysis system powered by Google Gemini. The AI can be triggered from the MQL Manager's main AI tab, from the AI ANALYSE button on Telegram, or by timed auto-analysis for A1/A2/A3. The current mode is SIGNAL-ONLY: the AI delivers direction, confidence, probabilities and a qualitative market reading, without suggesting an entry price, SL, TP or R:R.
https://generativelanguage.googleapis.com in MT5's WebRequest.What the report brings for each pair: the correlation of the long window (the normal regime), that of the short window (the regime right now), the beta (how far one asset moves per unit of the other — this is what sizes a hedge), how many candles were actually paired, and a warning when the correlation is changing regime.
🎯 And the warning that is worth money: if you are long two assets with a +0.9 correlation, that is not diversification — it is the same bet twice over. The report says so. Opposite directions with a positive correlation become a self-cancelling hedge (risk and result tend to zero, but the costs remain).
How it is measured (and why that way): over returns, not over price — two assets in an uptrend would give a ~0.99 correlation with no real relationship at all; and with the candles aligned by timestamp, not by index — assets from different markets (WIN$ and EURUSD, for instance) have different sessions, and matching candle by candle would compare different days. Only a candle that exists in both counts.
Cost in the prompt: about 500 characters for 3 assets — the report sends only the conclusions, never the price series.
✏️ Candles in the LONG window (default 100) = the relationship's "normal" regime. ✏️ Candles in the SHORT window (default 20) = how it is right now. The gap between the two is what reveals the correlation breaking down — the moment the assets start to decouple.
✏️ Minimum PAIRED candles (default 25) — below that the robot says "small sample" instead of showing a number. With few candles, a correlation of 0.4 is noise, not information; better to say it does not know.
☑️ Use logarithmic returns (default Yes) — this is the correct way. Only turn it off if you want to compare with another tool that uses simple returns.
✏️ |correlation| that triggers the doubled risk warning (default 0.70) — from this value up the robot warns about concentrated exposure or hedging. Raise it to 0.85 if you only want the extreme cases.
🔁 You can change the model freely: these fields accept any Gemini model ID — just type it (e.g.
gemini-3.5-flash, gemini-3.1-pro-preview, gemini-2.5-pro). The EA adjusts the "reasoning" style on its own according to the model generation (2.5 and 3.x) and keeps the web search. Tip: the gemini-3.5-flash is usually faster and more stable than the 2.5-pro (which is frequently overloaded with 503).🔑 A pullback is not a conflict. If H4 is trending up and H1 is merely pulling back or consolidating, that does not cancel the signal — it is precisely the entry in favour of the higher trend. The AI only returns WAIT for divergence when the primary trends point in opposite directions.
💡 Recommended combinations: H1 + H4 or M15 + H1. With three enabled (e.g. M15 + H1 + H4) there is a tie-breaker when two disagree — with only two, both have to agree.
💡 If the AI sits on WAIT nearly always, lowering this value (say to 55% or 60%) makes it take a side more often. Raising it makes the AI more selective: fewer signals, higher bar.
🚩 Mind what this field does NOT do: it changes what the AI recommends — does not block any trade. To block an entry on signal quality, that is your entry condition's job, e.g. ANALISA_IA == 1 && IA_CONFIANCA >= 70 && IA_VALIDA == 1.
⚠️ It applies to Up/Down (probability), which is different from the Confidence shown in the analysis: confidence measures how clear the signal is, not the chance of rising or falling.
- FREE key = a project without billing. It only works with Flash/Flash-Lite (
gemini-3.5-flash,gemini-2.5-flashmodels, with lower limits; the data may be used by Google to improve the models. - PAID key = a project with billing. It unlocks every model, including Pro (
gemini-3.1-pro-preview, with higher limits and no use of your data for training.
gemini-2.5-flash or gemini-3.5-flash and keep DEEP mode off (Pro does not run on a free key).ANALISA_IA, IA_CONFIANCA, IA_PROB_ALTA/IA_PROB_BAIXA — which come from the analysis's numbers, not from that text.AI operational settings
| Name as seen in the parameters | Default | Use in the EA |
|---|---|---|
| ☑️ Enable AI Assistant (Gemini) | No | Turns the whole Gemini assistant on/off. |
| ✏️ 🔑 Your Gemini API key (https://aistudio.google.com/apikey) | empty | The client's individual Google AI Studio key. |
| ✏️ FAST model / ✏️ DEEP model | gemini-3.5-flash / gemini-3.1-pro-preview | Fast (free) and deep. They accept any Gemini ID — every Pro model (including the deep one) is paid (it requires billing); without billing, use only FAST and leave DEEP mode off (the default). |
| ☑️ Use DEEP model (slower/costlier) | No | Uses the deep model by default when enabled. |
| ☑️ 🌐 Use web search (news/fundamentals) | Yes | Allows web search/fundamentals when WEB mode is on. |
| ☑️ 📷 Send a chart screenshot (multi-TF) | Yes | Sends a chart screenshot when CHART mode is on. |
| ✏️ 🔁 Retries on HTTP 429/5xx / ☑️ 🔄 If DEEP model fails, automatically retry with FAST / ✏️ ⏱️ Max time for the AI to reply (sec) | 1 / Yes / 120s | HTTP retries (1 = one quick extra attempt; each 503 consumes quota, so hammering is unwise), Plan B on the fast model and the maximum reply time (120s gives DEEP mode room to finish). |
| ☑️ 🧪 Test mode: blocks automatic AI orders | No | Allows analysis but blocks automatic AI-based entries. |
| ☑️ 🛑 AI analysis expired: block (true) or renew (false) | Yes | If the AI cache expires, AI expressions block instead of renewing on the spot. |
| ☑️ 🔎 Automatic AI review (may use more tokens) | Yes | Enables automatic review of the answer, using more tokens. |
| ✏️ ⏰ Auto-analyse A1/A2/A3 every N sec (0=buttons only) | 0 / 0 / 0 | Schedules auto-analysis per asset; 0 leaves only manual/button triggering. |
| ✏️ ⏱️ AI analysis validity for expressions (sec) / ✏️ ⏱️ Minimum time between AI requests (sec) | 300s / 30s | The cache's validity for expressions and the minimum time between calls. |
| ☑️ 📝 Write a CSV of the analyses / ☑️ 🔢 Log tokens used per call (cost estimate) / ☑️ 📋 AI logs on the Experts tab (respects the Interval between Logs and Debugs) | Yes / Yes / Yes | Records analyses, token use and AI logs in the terminal/Telegram. |
| ☑️ 📢 Send AI analyses to the panel and the alerts / ☑️ 💾 Save shots to Files\AI_Screenshots\ (visual debug) | Yes / No | Sends the analysis (and the AI's errors) to the web dashboard and the alerts; and, if you wish, saves screenshots to Files\AI_Screenshots\. |
Advanced AI calibration (LACs)
These parameters calibrate the context sent to Gemini. They neither open nor close orders on their own; what executes is always your BUY/SELL/EXIT expression using the AI variables.
| Layer | Parameters as seen in MT5 | EA default |
|---|---|---|
| ATR regime | ☑️ AI receives market VOLATILITY reading ✏️ 📈 Sensitivity to detect a VOLATILE market (default 1.3) ✏️ 📉 Sensitivity to detect a CALM market (default 0.7) ✏️ 📊 History candles for the volatility average | On · volatile ≥ 1.3x · calm ≤ 0.7x · 20-candle average |
| Bollinger Squeeze | ☑️ AI detects COMPRESSION before explosive moves ✏️ 🤐 Detect COMPRESSION before a strong move (default 0.6) ✏️ 💥 Detect EXPANSION in a wide move (default 1.4) ✏️ 📊 History candles for the Bollinger average | On · squeeze ≤ 0.6x · expansion ≥ 1.4x · 50-candle average |
| AI-driven closing | ☑️ AI uses strict criteria to suggest closing positions ✏️ 🚪 Min confidence (%) for the AI to suggest closing | On · 60% minimum probability to suggest closing a position |
| AI signal cut-off | ✏️ 🎯 Min probability (%) for the AI to call BUY or SELL | 65% · below that the AI answers WAIT. Lowering it makes the AI take a side more often; it does not block trades |
| Cross context | ☑️ AI cross-checks A1/A2/A3 analyses (correlation) ☑️ AI considers your TOTAL open risk ☑️ AI fetches the right news for each asset type | On · cross-checks A1/A2/A3, open risk and asset class |
| Recent OHLC | ✏️ (reserved for future improvements - no effect right now) | 5 candles · reserved for future improvements, no operational effect right now |
Data sent for the Gemini analysis
| Block | Parameters as the client sees them | What it adds to the context |
|---|---|---|
| Native indicators | AI ONLY: Enable RSI, AI ONLY: Enable MACD, AI ONLY: Enable Stochastic, AI ONLY: Enable ADX, AI ONLY: Enable ATR, Enable Bollinger, AI ONLY: CCI, AI ONLY: Williams %R, AI ONLY: Momentum and AI ONLY: Parabolic SAR | 🚩 Note the "AI ONLY:" in the label — it changed what these fields promise. These tick boxes (and the ⏰ SÓ IA: Timeframe …fields) decide what goes into the reading sent to the AI and do not affect your expressions — with one exception, and it matters (just below). If your condition mentions RSI, the RSI is computed anyway, and the timeframe comes from the expression itself, not from this field.⚠️ The exception: in this same list, Enable Bollinger also drives your expression — and the same goes for Enable VWAP, Enable Ichimoku, Enable POC and Enable automatic Fibonacci. With the tick box off, that family's tokens ( BBUPPER, VWAP, TENKAN, POC, FIBO500…) have no value to compare — and the robot rejects the condition, warning in the SAFETY ALERTS panel and on Telegram which value was missing. A rejected condition simply does not fire: it counts as neither zero nor true. The full list is in section 16. If your expression mentions one of these, leave the tick box on — otherwise that line will never trade, and the alert is the only way you find out.🔑 What does affect both worlds (AI and expression) is the period and the applied price: Período RSI, Período rápido/lento/Sinal of the MACD, %K/%D/Slowing, Period and Desvio padrão for the Bollinger. Change the period there and your condition changes too.Classic technical readings per configured timeframe; CCI/WPR/Momentum/SAR come in as optional extras. The CCI has its own period and timeframe; Williams %R (14), Momentum (14) and Parabolic SAR (0.02/0.2) use the classic parameters and the timeframes ticked under ⏰ TIMEFRAMES (AI only). The period used always appears in the reading sent to the AI. |
| Moving averages | Applied price (EMA), EMA 8, EMA 21, EMA 50, EMA 200, their timeframes and periods | Trend alignment and confluence between timeframes. |
| Price action | Candle patterns, Support/Resistance, Volume analysis and Trend analysis | Candle patterns, support/resistance, relative volume, divergence and trend. |
| Advanced readings | Light VWAP, Ichimoku, light POC and automatic Fibonacci, with their timeframes/periods (see the sub-table below) | Light VWAP, Ichimoku, binned POC and automatic Fibonacci enrich the AI and, when the matching parameters are on, also feed the advanced variables used in expressions. |
| Custom AI indicators | Enable IND21 to IND30, Indicator Name and Indicator Parameters | A dedicated block for indicators the AI should read as extra context. Unlike IND1-IND20 (used in BUY/SELL/EXIT/Filter expressions), IND21-IND30 are read automatically across every buffer from 0 to 7 and injected into the Gemini prompt with the name, parameters and readings of each buffer. It only works with the slot enabled and a valid indicator handle. |
| Multi-TF | M1, M5, M15, M30, H1, H4, D1, W1 and MN1 | Sets which timeframes go into the prompt when the indicator uses PERIOD_CURRENT. |
| Analysis history | The last 5 AI analyses of the same asset (decision, confidence, time) | The EA keeps a circular history of the 5 most recent analyses per asset and re-injects it into the prompt so the AI stays coherent between consecutive analyses (it avoids "flip-flop" with no clear reason). |
| Open positions | Volume, P&L, SL/TP and magic of the open positions on the analysed asset | The AI receives the portfolio's real state so it does not recommend an entry that conflicts with an already open position, and so it can tell "manage" (same direction) from "close/reversal" (opposite direction). |
| Real economic calendar | Events via MT5's native MqlCalendar (the next few hours) | Real events filtered by country, importance and time window (not a fixed fallback). The AI uses them to spot macro timing — it may suggest WAIT when a critical event is imminent, or note it in alerts. |
| Analytical framework | The AI's persona with 7 explicit rules | The AI works under a fixed framework: top-down multi-timeframe trend, confluence across ≥ 2 TFs, S/R with strength ≥ 2 as the anchor, indicators as a filter (not a standalone trigger), fundamental context, an implicit minimum R:R ≥ 1.5, never against the primary trend without a complete reversal. It increases consistency between runs. |
| LAC calibration | ATR regime, Bollinger squeeze/expansion, multi-asset context, portfolio risk, asset class and the strict closing rule | It improves the reading of volatility, compression, A1/A2/A3 correlation and position closing. The result is available in the AI expression variables. |
| Automatic review | Toggle REVIEW on the AI tab / the parameter ☑️ 🔎 Automatic AI review (may use more tokens) | When on, the AI reviews its own answer before returning it — it checks for a contrary signal, timeframe alignment, SL/TP coherence against ATR, the calendar, flip-flop and confidence calibration. It uses more tokens but raises quality. |
Advanced readings — detailed parameters
Each advanced reading has its own timeframe and parameters. The defaults are balanced for most assets — only change them if you know what you are changing.
| Reading | Parameters as seen in MT5 | Default |
|---|---|---|
| Light VWAP | ☑️ Enable VWAP (volume weighted average price) ☑️ ⏰ Chart used to compute the VWAP ✏️ 📊 Candles used in the calculation (default 50) | Yes · PERIOD_CURRENT · 50 bars |
| Ichimoku | ☑️ Enable Ichimoku — Japanese trend cloud ☑️ ⏰ Chart used to compute the Ichimoku ✏️ 📏 Fast conversion line (default 9) ✏️ 📏 Slow base line (default 26) ✏️ 📏 Width of the future cloud (default 52) | Yes · PERIOD_CURRENT · 9 / 26 / 52 |
| Light POC | ☑️ Enable POC — the price with the largest traded volume ☑️ ⏰ Chart used to compute the POC ✏️ 📊 Candles analysed for the POC (default 120) ✏️ 📐 Price bins for the volume (default 24 — leave it) | Yes · H1 · 120 candles · 24 bins |
| Automatic Fibonacci | ☑️ Enable automatic Fibonacci (finds top and bottom) ☑️ ⏰ Chart used to locate the Fibo swing ✏️ 📊 History candles to find the swing (default 120) ✏️ 📐 Margin candles to confirm the top/bottom (default 3) | Yes · H4 · 120 candles · 3 (swing window) |
VWAP, POC, TENKAN, KUMOTOP, FIBO618 and Bollinger, as long as the matching parameter is on.ANALISA_IA == 1 && IA_CONFIANCA >= 70 && IA_VALIDA == 1 @MARKET. The old minimum-confidence parameter was removed; operational control lives in the expressions.AI expression variables
| Asset | Main variables | Recommended use |
|---|---|---|
| A1 | ANALISA_IA/IA_DECISAO, IA_CONFIANCA, IA_VALIDA, IA_IDADE_SEG, IA_PROB_ALTA, IA_PROB_BAIXA, IA_FECHAR_BUY, IA_FECHAR_SELL, IA_REVERSAO, IA_FORCA_TENDENCIA | Enter, filter or exit on the chart's asset. |
| A2 | A2ANALISA_IA, A2IA_CONFIANCA, A2IA_VALIDA, A2IA_PROB_ALTA, A2IA_PROB_BAIXA, A2IA_FECHAR_BUY, A2IA_FECHAR_SELL | Filter, trade or exit on the second configured asset. |
| A3 | A3ANALISA_IA, A3IA_CONFIANCA, A3IA_VALIDA, A3IA_PROB_ALTA, A3IA_PROB_BAIXA, A3IA_FECHAR_BUY, A3IA_FECHAR_SELL | Filter, trade or exit on the third configured asset. |
IA_RR, IA_SL_PTS, IA_TP1_PTS, IA_TP2_PTS and the suggested new SL/TP remain available in expressions for compatibility, but in SIGNAL-ONLY mode they return zero or should not be used for operational decisions.AI expression examples
Use the analysis as a trigger or a filter, always together with IA_VALIDA == 1. The analysis must exist in the cache: run it from the AI tab's buttons, from Telegram or via A1/A2/A3 auto-analysis.
COMPRA [01]: ANALISA_IA==1 && IA_VALIDA==1 && IA_CONFIANCA>=70 && IA_PROB_ALTA>=60 @MARKET -> SetVolume[0.01] VENDA [01]: ANALISA_IA==-1 && IA_VALIDA==1 && IA_CONFIANCA>=70 && IA_PROB_BAIXA>=60 @MARKET -> SetVolume[0.01] SAÍDA COMPRA [01]: IA_VALIDA==1 && IA_FECHAR_BUY==1 @BCLOSE SAÍDA COMPRA [02]: IA_VALIDA==1 && IA_REVERSAO==1 && ANALISA_IA==-1 @BCLOSE SAÍDA VENDA [01]: IA_VALIDA==1 && IA_FECHAR_SELL==1 @SCLOSE SAÍDA VENDA [02]: IA_VALIDA==1 && IA_REVERSAO==1 && ANALISA_IA==1 @SCLOSE COMPRA [02]: A2ANALISA_IA==1 && A2IA_VALIDA==1 && A2IA_CONFIANCA>=70 @A2MARKET -> SetVolume[0.01] VENDA [02]: A3ANALISA_IA==-1 && A3IA_VALIDA==1 && A3IA_CONFIANCA>=70 @A3MARKET -> SetVolume[0.01] SAÍDA COMPRA [03]: A2IA_VALIDA==1 && A2IA_FECHAR_BUY==1 @A2BCLOSE SAÍDA VENDA [03]: A3IA_VALIDA==1 && A3IA_FECHAR_SELL==1 @A3SCLOSE
🖥️ Floating AI panel on the chart (key I)
Besides being sent to Telegram, each AI analysis's result can be shown directly over the chart, in a floating panel. Use the I key to toggle it, or the SHOW PANEL button inside the AI buttons of the MQL Manager.
gemini-2.5-promodel — it happens even on paid accounts and is not an EA fault. When it does, the panel shows the warning with instructions. What to do: (1) wait 2–3 min and run the analysis again; or (2) enable PLAN B on the AI tab — with it on the EA uses DEEP first and only falls back to FLASH if the deep one fails, so you lose no depth and are never left without an analysis. Avoid resending back to back: every attempt consumes your API quota even when it fails. The warning itself identifies which DEEP model is configured and, if it belongs to the 2.5 generation (the one most prone to 503), it automatically suggests changing the input to Gemini_ModelDeep to gemini-3.1-pro-preview — a newer generation with fewer reports of overload (it requires active billing on the Google account).Example result on Telegram
ANÁLISE XAUUSD [Gemini] COMPRA | Confiança: 78% Alta: 72% | Baixa: 28% Força tendência: 65/100 | Reversão: NÃO Sessão: Nova York LEITURA TÉCNICA: Tendência principal alinhada em H1/H4, com suporte próximo e volume acima da média. AÇÃO DO PREÇO: Últimos candles mostram continuação compradora, mas ainda exigem confirmação de rompimento. CENÁRIO MACRO/POLÍTICO: Sem notícia crítica imediata no calendário; manter atenção a eventos USD. ZONAS DE INTERESSE: Suporte: 2380/2372 | Resistência: 2405/2418 JUSTIFICATIVA: 1. Confluência de tendência nos timeframes maiores. 2. Preço acima das médias principais. 3. Risco de falso rompimento se perder o suporte curto. ALERTAS: - Não use a IA sozinha; combine com IA_VALIDA e sua regra de entrada.
- Confidence: 78% (
IA_CONFIANCA) = the clarity and strength of the signal — how "clean" the setup is (confluence between timeframes, no conflicts, macro aligned). No the probability of price rising/falling, nor "78% certainty of being right". - Up: 72% | Down: 28% (
IA_PROB_ALTA/IA_PROB_BAIXA, they add to 100%) = the probability/chance of the direction. This is where you read "what are the odds it goes up or down".
IA_CONFIANCA>=70 && IA_PROB_ALTA>=60.Performance Center (Dashboard)
A Performance Center is your personal web dashboard: it receives on its own every trade the robot (or you) closes in MetaTrader and turns it into easy-to-read charts and figures. You type nothing — you just follow along and learn from your own results. It works on desktop and mobile. Every Dashboard feature has its own detailed section below (grouped in the side menu under “Performance Center”).
Sharing and revoking access
You can share your dashboard (e.g. with a mentor) by sending the link the robot generates. Careful: the link is the key — whoever has it sees your data without a password, in read-only mode.
The tabs, one by one (what they are + how to use them)
| Tab | What it shows and how to use it |
|---|---|
| Overview | The summary of everything: how much you won/lost, the MQL PRO Index (a 0-to-100 score for the system's health), automatic notices (Insights), the equity curve (with an optional comparison against CDI/Ibovespa) and the main figures (KPIs) with arrows ▲/▼ comparing them to the previous period. Use it for the daily X-ray: always start here. |
| 📅 Calendar | A map of the month with green days (profit) and red ones (loss); today is highlighted . Click any day to see that day's trades. Great for spotting patterns (e.g. bad Mondays, good Fridays). |
| 📊 Analytics | Where you win (or lose) most: by weekday, time, asset, by setup/strategy (Playbook) and even by the emotion you noted. It includes what you "left on the table" (MFE) and risk control (MAE). Use it to cut what hurts you and repeat what works. |
| 🎯 Profiles | It separates on its own your trades into Scalp, Day, Swing and Position (by how long they stayed open) and shows which style you are best at — and which one is hurting you. It includes a risk/target plan per profile calculated on your real balance. Use it to discover your most profitable "type" of trade. |
| 🏆 Strategies | The arsenal of ready-made MQL PRO TRADER setups (cards with rules and examples). Use it to study and pick strategies to apply in the robot. Some content is exclusive to the paid plans. |
| ⚖️ Risk | A calculator for how much to risk per trade, the Kelly criterion (calculated from your history) and your loss limits (the discipline that protects the account). Use it before trading to size your lot/risk. |
| 🧺 Portfolio | Build and follow your portfolio: concentration by asset/class, the weight of each position and the risk of the whole. Use it so you do not get too concentrated in a single asset. |
| 🗓️ Monthly | Result month by month and a tax estimate (B3). Use it to follow your long-term progress and plan ahead. |
| 📋 Trades | Your trade journal . Click any row to see the details (entry, exit, how far it went for and against you) and to note the strategy and the emotion. Filter by Wins/Losses and search by asset. This is where the "Start over from scratch". |
| 💹 Trading Desk | Command the robot from the cloud: buy/sell, pending orders, close (all/partial/by criterion), adjust SL/TP, choose the assets (Targets) and receive your robot's AI analyses in the bell and on Telegram. Protected by a password; every order asks for confirmation. (Details in the Trading Desk.) |
| 🤖 AI Coach | An artificial intelligence chat that sees only YOUR dashboard data and teaches/analyses: performance, setups, portfolio, news and questions about the EA. Use it to ask "how am I doing?", "what should I improve?" or "what does drawdown mean?". (Details in the AI Coach.) |
| 📓 Notebook | Your study notebook and journal, saved in the cloud (it syncs phone and PC). Write theses, plans and reviews, paste chart screenshots, use ready-made templates and organise with #tags. The The AI Coach can read your notes. (Details in the Notebook.) |
| 🤝 Affiliates | Promote MQL PRO TRADER and earn a recurring commission (via PIX). This button opens your Affiliate Portal — its own page with your link/code, the full funnel (clicks → contacts → downloads → paid), ranking, materials and profile. You can be an affiliate even without using the robot, by signing up at mqlprotrader.com.br/afiliados. (Details in the Affiliate Programme.) |
| 🔁 Copy Trade | A signal: supply your own signals (with a CPY- code and PIX tip going straight to you) or copy a provider from the directory (with lot mode and risk locks). It has chat and ⭐ ratings. (Details in the Copy Trade.) |
| 🏦 Home Broker | Follow all of your investments in one place — including outside MetaTrader (shares, crypto, dollars): register the asset, the quantity and the average price and see the live profit/loss, chart and analysis in your currency — including 🏦 TOTAL Equity (MT5 account + manual portfolio added together). Got many assets? Import the whole portfolio via 📥 CSV (a template is provided). (Details in the Home Broker.) |
| 🔔 Notifications | Receive alerts on Telegram (open/close, target/limit, robot offline…). Set the bot up once and choose what you want to receive. (Details in the Notifications.) |
| ⭐ Rate | Give your star rating and a comment about MQL PRO TRADER. (Details in the Rate.) |
| 🎫 My Plan | See your plan and its expiry. On the 2 or 3 accountplans, the account that paid becomes the seat owner and can attach the other MT5 accounts by number — the attached account inherits the licence and unlocks itself within minutes. You can release one and attach another. This is also where you download the robot (.ex5) to install on the other accounts. |
| 🆘 Support | Talk to the team without leaving the dashboard: open a ticket by subject (installation, licence, billing, bug…), attach screenshots and files and follow the reply right there (with an unread badge). The team can also start a conversation with you. |
| 🧠 Checklist | A daily list to keep you disciplined, from pre-market to the close. Use it every day before trading. |
| 📖 How to use | This guide, inside the dashboard itself (abridged). The full version is this page. |
Understanding the numbers (in plain language)
| Term | What it means |
|---|---|
| Net Result | How much you won or lost in total, costs included. |
| Win Rate | Out of every 100 trades, how many were profitable. |
| Profit Factor | How much you win for every R$1 you lose. Above 1 = profitable. |
| Expectancy (R) | How much you win on average per trade, compared to the risk you took. Positive is good. |
| Drawdown | The largest fall in capital from a peak. The smaller, the better. |
| MAE / MFE | How far the trade went against you (MAE) and in your favour (MFE) before closing. It shows whether you exited too early or held well. |
| MQL PRO Index | A score from 0 to 100 that combines profitability, consistency and discipline into a single number. |
Dashboard features
- Language: switch between PT / EN / ES in the top-right corner.
- Theme: light or dark (🌙 / ☀️ button).
- Period: filter by Today, 7 days, month, and so on.
- Currency: values appear in your account's currency automatically.
- Hide/show the bar: the blue button in the top-right corner hides the top bar and gives the whole screen to the content — click it again to bring it back.
- 🔗 Which account you are on: the connected account is always at the top of the screen — broker · number · DEMO/LIVE · name. On mobile, where it does not all fit, you get the short version with what matters: the account number and DEMO/LIVE. Check that badge before sending any order — it is what separates trading the simulator from trading your own money.
- 🔀 Switching account: have more than one MT5 account? The 🔀 button on the bar keeps a address book of logins in this browser (with nicknames) and switches account instantly, without MetaTrader being open — you can ➕ add one by pasting another account's link. With two or more accounts saved, the selector itself spells out the current account.
- 👁 Privacy mode: recording a video or sending a screenshot? The 👁 button blurs the balance, equity, margin and account number — the charts stay visible.
- On mobile: the controls (period, currency, language, theme, font…) are gathered in the ⚙ Options, next to the ☰menu; the brand is centred at the top.
Starting over from scratch
Changed the way you trade and want to reset the statistics? On the Tradestab, use the "Start over from scratch"button. The metrics start counting from that moment on — nothing is deleted and you can undo it whenever you like.
Performance Center parameters (in the robot)
In MetaTrader, when you configure the robot, there is a group of parameters called “──────── PERFORMANCE CENTER ────────”. They already come with the ideal factory setting — you do not need to change anything for the dashboard to work. They are here only for those who want to understand or fine-tune a detail.
| Parameter | What it does | Default |
|---|---|---|
| ☁️ Send to the Performance Center (cloud) | Turns on the upload of your trades to the web dashboard. Only turn it off if you want to use the robot without the online dashboard. | On |
| 🎛️ Accept commands from the Dashboard | Lets the Trading Desk command the robot from the cloud. If you turn it off, the Desk stops working. | On |
| ☑️ Write a local journal (CSV backup) | Saves a backup copy of the trades to a file .csv on your computer (as well as the cloud). | On |
| 📄 CSV file name | The name of that backup file. Change it only if you want to. | MQLProTrader_CentralPerformance.csv |
| 📂 Save in MT5's COMMON folder | Keeps the CSV in the folder shared between MT5 terminals, instead of the current terminal's folder. | Off |
| ⏱️ Account snapshot interval (sec) | How often the robot sends an account summary to the dashboard. | 90 |
| 📜 Days of history on initial load | How many days of past trades the robot sends when it first connects (it sets the range of the dashboard's date picker). 0 = sends no history. | 365 |
| 🛡️ Safety net — frequency (sec) | How often the robot checks whether a trade failed to upload and resends it. | 60 |
| 🛡️ Safety net — days reviewed | How many days back that check reviews. | 3 |
| 🤝 A friend's referral code | If a friend referred you, paste their code here (e.g. MQL-XYZ123) — only the first time. You can also paste it later on the CENTER sub-tab of the robot's panel. See Affiliate Programme. | empty |
📚 Every Dashboard feature, in detail
Below, every Performance Center tab/feature has its full explanation. It is all part of this same section — just scroll (or use the side-menu shortcuts).
Your numbers: Overview, Analytics, Trades, Monthly and Calendar
These five tabs show the same truth from five angles. They all drink from the same source — the closed trades the robot sent — and they all respect the Period chosen on the top bar. If a figure looks wrong on a tab, check the Period before anything else: it is cause number 1.
📊 Overview — the diagnosis in 10 seconds
It is the opening screen. At the top sits the live account (balance, equity, floating profit, margin) and the positions open right now. Below, the coloured diagnostic band sums it all up in one sentence: 🟢 a system with a positive edge, 🟡 positive but below target, 🔴 negative expectancy.
| Number | What it means in practice |
|---|---|
| Net result | The sum of profit and loss with costs included (swap and commission). It is what reached your pocket. |
| Win rate | % of winning trades. On its own it says nothing — a 90% win rate with an overall loss is common when the losses are big. |
| Profit factor (PF) | How much you made divided by how much you lost. Below 1 = you are losing. Above 1.5 is already a healthy system. |
| Payoff | Average win ÷ average loss. It tells you whether your wins pay for your mistakes. |
| Expectancy (R) | How much you expect to make per trade, measured in multiples of the risk. It is the most honest metric here. |
| Drawdown | The largest fall from a peak. It is the size of the pain your strategy has already put you through. |
| MQL PRO Index | A score from 0 to 100 combining win rate, PF, expectancy, recovery and consistency (SQN). It is there to compare you against you over time. |
📊 Analytics — the charts
The equity curve, the distribution of results, performance by asset, by weekday and by hour. It is where you find the patterns the table hides: “I systematically lose money in the first hour” or “my entire result comes from a single asset”.
📋 Trades — trade by trade, and you can write on them
The full list for the period. Click any row and it opens the trade's detail — with the visual “map” in money (entry, stop, target, MAE/MFE) and the fields you fills in: setup, emotion, did you follow the rules? and a note.
/setup command of the AI Coach. Without it, the dashboard knows how much you made, but not with what.🗓️ Monthly — the year in one table
One month per row: number of trades, win rate, result, best and worst trade. It is there to reveal seasonality and progress — and it carries an estimate of income tax at 20% of the month's profit (the day trading rate in Brazil).
📅 Calendar — the month in colours
Each day painted green or red by its result. It is there to find what the average hides: a single catastrophic day in the middle of a “good” month, or that Friday when you always hand back the week's profit.
Discipline: Profiles, Risk and Checklist
Three tabs that do not look at the past — they help you not repeat the mistake the past revealed.
🎯 Profiles — which style REALLY makes you money
The dashboard sorts each trade into scalp, day trading, swing or position (by how long the trade stayed open) and builds a table per style: number of trades, win rate, expectancy, profit factor and result.
- It points out your dominant profile — the one you trade most.
- And the best and the worst by expectancy, counting only profiles with at least 3 trades — too small a sample would turn into bad advice.
It is the tab that answers the trader's most expensive question: “should I stop scalping?”.
⚖️ Risk — the calculator before the order
You enter your capital, risk per trade (%), stop in points and point value; it returns the lot that respects that risk. It is the arithmetic the amateur trader does “in their head” and gets wrong.
Beside it, the Kelly worked out from your own figures (the period's real win rate and payoff): the dashboard shows full Kelly and the half Kelly.
🧠 Checklist — the daily ritual
A discipline checklist in three moments, which resets itself every day:
- ☀️ Pre-market — slept well, read the economic calendar, marked the levels, decided which setups to trade, set the day's maximum loss and checked whether you are emotionally neutral.
- 📈 During the session — the setup was in the plan, you worked out the size before entering, stop set before before sending, you did not add to a position to “get it back” (revenge trade), you respected the maximum loss.
- 🌙 After the session — you reviewed the trades, filled in setup/emotion/note, wrote down what you did well, which rule you broke, and whether the result came from the system or from luck.
It is kept in your browser, day by day. It does not go up to the cloud: it is a ritual of yours, not a report.
Strategies — Arsenal and Hall of Fame
The 🏆 Strategies is a library of strategies ready for the robot's engine: each card carries the idea, when it works, its weak point and the expressions already written in the format MQL PRO TRADER understands.
- 📋 Copy on each card gives you the expression ready to paste into the robot's parameter. The button copies from the internal data, not from the text on screen — so what you paste is always exact, even if the browser has translated the page.
- Hall of Fame brings together approaches from well-known traders, adapted to the expression engine.
- You can filter by category and ask the 🤖 AI Coach to explain or adapt any of them to your asset.
Portfolio — a snapshot of what is open
The 🧺 Portfolio shows your trading account's current exposure: what is open right now, on which assets, which way, and what that really amounts to in money (the exposure, not just the number of lots).
📈 The asset chart — and why it does NOT work like MetaTrader's
This is the point that confuses people coming from a trading platform the most, so it is worth reading slowly.
- Candle — 15m, 1h, 4h, D, S, M: what each candle represents (15 minutes, 1 hour, 4 hours, 1 day, 1 week, 1 month).
- Period — 1D, 5D, 1M, 3M, 6M, 1Y, 5Y: how far back the chart goes.
The two combine. D + 3M = daily candles for the last 3 months (≈65 candles). M + 5Y = monthly candles for the last 5 years (60 candles). That is why the bar has two labels: Candle and Period. And just below the buttons the dashboard writes the combination in plain language — "Each candle = 1 month · showing the last year" — so you are never in doubt about what you are looking at.
Why some Period buttons are greyed out
For two reasons, depending on which side of the table you are on. On big candles, the combination would produce far too few candles to be a chart (a monthly + 1 month = a single candle). On small candles it is the opposite: the free source does not keep old intraday history — 15 minutes only exists for the last ~60 days, 1 hour for the last ~2 years. Asking outside those ranges would return an emptychart, and empty without explanation looks like a fault. That is why the dashboard greys the button out and adjusts the period on its own when you change the candle type:
| Candle | Available periods | Why the rest is greyed out |
|---|---|---|
| 15m 15 minutes | 1D · 5D · 1M | the source only keeps ~60 days of 15-minute data |
| 1h 1 hour | 5D · 1M · 3M · 6M | the source only keeps ~2 years of 1-hour data |
| 4h 4 hours | 5D · 1M · 3M · 6M | the same range as the 1-hour candle (see below) |
| D daily | 1M · 3M · 6M · 1Y · 5Y | — |
| S weekly | 3M · 6M · 1Y · 5Y | 1M would give ≈4 candles |
| M monthly | 6M · 1Y · 5Y | 1M would give 1 candle · 3M would give 3 |
The other tools on the bar
- MA — switches on the 20 and 50 period moving averages (trend).
- log — a logarithmic scale, useful on an asset whose value has multiplied: it favours the percentage change over the difference in cash.
- 🖼️ — downloads the chart as an image.
The dashboard remembers your choices (candle, period, MA and log) for next time. And the quote comes from a free source, so it may be delayed — do not use it to decide an entry to the second.
Your account: My Plan, Affiliates and Support
🎫 My Plan
It shows your plan, the expiry date and the buttons to subscribe or renew. It is also where you download the robot (the .ex5) in its most recent version — whenever an update comes out, it appears here.
🤝 Affiliates
You get a code of your own (in the format MQL-XXXXXX) and a link to share. Anyone who subscribes through your referral generates recurring commission, paid by PIX. The tab tracks clicks, referrals and how much you have to receive.
🆘 Support
Talk to the team inside the dashboard itself: open a ticket by subject and follow the answer right there — with a history, without depending on e-mail. You can also attach a file .set when the question is about configuration.
- 📖 Full manual — the shortcut at the top takes you straight to this documentation. Your answer is usually already here.
- 📊 Send a performance report — it sends the team an automatic summary of your result (the last 30 days or last month), with you typing nothing. You can also save that report to your 📓 Notebook and follow your own progress.
- The direct channels (WhatsApp, Telegram, e-mail) are still right beside it.
Dashboard glossary — every number explained
This section explains every term that appears in the Performance Center in the language of someone who is not from the market. Each term follows the same format: what it is in 1 sentence → why it matters → what is good or bad → an example with numbers. There is nothing to memorise: whenever you are unsure, come back here or ask the AI Coach inside the dashboard.
📈 Result and profitability
Net Result — In 1 sentence: how much you made or lost in total, with costs (brokerage, fees) already deducted. · Why it matters: it is the figure that does (or does not) reach your pocket. · Good/bad: positive is good; negative means the whole set is at a loss. · Example: 40 trades adding up to +$1,200 with costs included → Net Result = $1,200.
Win Rate (Win Rate) — In 1 sentence: out of every 100 trades, how many made a profit. · Why it matters: it shows how often you "get it right". · Good/bad: there is no magic number — a low rate can be excellent if the wins are big (see Payoff). · Example: 55 wins in 100 trades → Win Rate = 55%.
Profit Factor (profit factor) — In 1 sentence: how much you make for every $1 you lose. · Why it matters: it sums up in one number whether the system "pays its way". · Good/bad: above 1 is profitable; above 1,5 is good; below 1 it is losing. · Example: made $3,000 and lost $2,000 in total → Profit Factor = 1.5.
Payoff (win/loss ratio) — In 1 sentence: the size of your average win compared with your average loss. · Why it matters: it tells you whether your wins make up for your mistakes. · Good/bad: above 1 = you make more when you are right than you lose when you are wrong. · Example: an average win of $200 and an average loss of $100 → Payoff = 2.0.
Expectancy (R) — In 1 sentence: how much you make on average per trade, measured in R (risk). · Why it matters: it is the system's "edge" — the profit expected per trade over the long run. · Good/bad: positive is good; negative means that, repeated often enough, you tend to lose. · Example: An Expectancy of +0.3R with $100 of risk → you make, on average, $30 per trade.
🛡️ Risk and drawdown
Drawdown (drawdown / Max DD) — In 1 sentence: the largest fall in your capital from a peak. · Why it matters: it measures the maximum "pain" you went through and the risk of blowing the account. · Good/bad: how much smaller, the better (below ~10% is usually healthy). · Example: capital rose to $10,000 and fell to $8,500 → a drawdown of $1,500 (15%).
Recovery (recovery factor) — In 1 sentence: how much profit you made for each unit of your largest fall. · Why it matters: it shows whether the return makes up for the jolt of the drawdown. · Good/bad: above 1 is good; the higher it is, the more "efficient" the gain against the risk. · Example: a $3,000 profit and a $1,500 largest fall → Recovery = 2.0.
Kelly (the Kelly criterion) — In 1 sentence: a formula that suggests what fraction of your capital to risk in order to grow fast without going bust, worked out from your own history. · Why it matters: it helps you risk neither too little nor too much. · Good/bad: in practice most people use half or a quarter of Kelly (safer). · Example: a Kelly of 8% suggests risking up to 8% — the conservative reading would be 2% to 4%.
Streak (streak) — In 1 sentence: the longest run of wins or losses in a row. · Why it matters: it prepares you psychologically — losses in a row are normal. · Good/bad: it is neither good nor bad on its own; it is there so you neither panic nor get carried away. · Example: "longest losing streak: 6" means there have already been 6 losing trades in a row.
🎯 Quality and execution
SQN (System Quality Number, from Van Tharp) — In 1 sentence: a grade for your system's quality , combining expectancy with consistency (how much the results vary). · Why it matters: a system can be profitable yet unstable; SQN captures that. · Good/bad: below 1 = weak; 1.6–2 = good; above 2 = very good; above 3 = excellent. · Example: an SQN of 2.3 indicates a consistent system with a good edge.
MAE (maximum adverse excursion) — In 1 sentence: how far the trade moved against you you before it closed. · Why it matters: it reveals whether your stop is well placed and how much "squeeze" each trade puts you through. · Good/bad: a small MAE on winning trades = good entries; a large MAE right before it turns = poorly controlled risk. · Example: the trade went as far as -$80 and closed at +$150 → MAE = $80.
MFE (maximum favourable excursion / "left on the table") — In 1 sentence: how far the trade moved in your favour before you got out. · Why it matters: it shows whether you are getting out too early and leaving profit on the table. · Good/bad: if the MFE is usually much bigger than the result, you may be able to hold on longer. · Example: the trade went as far as +$300 but you got out at +$120 → MFE = $300 (you left $180 on the table).
🧭 Profiles (trading styles)
The dashboard sorts on its own each trade into a style, by the time it stayed open:
| Profile | Time open (approx.) | In 1 sentence |
|---|---|---|
| Scalp | seconds to a few minutes | very fast trades, small profits and lots of them. |
| Day Trade | minutes to hours (closed the same day) | opened and closed in the same session, never held overnight. |
| Swing | days to weeks | the position is held for some days chasing bigger moves. |
| Position | weeks to months | long trades, focused on broad trends. |
What it is for: finding out which style actually makes you money — and which one is getting in your way — so you can focus on what works.
📊 Comparisons and equity
Benchmark (CDI / Ibovespa) — In 1 sentence: a "ruler" for comparing your result against fixed income (CDI) and against the stock market (Ibovespa). · Why it matters: making money is good, but making more than leaving it in the bank is the goal. · Good/bad: your curve above the CDI/Ibovespa = you are beating the benchmark. · Example: you made +12% and the CDI over the period was +5% → you beat the CDI.
Equity / Deposits and Withdrawals — In 1 sentence: how your money evolved, separating what is trading profit from what is a deposit/withdrawal you made. · Why it matters: it stops you mistaking "I deposited more" for "I traded better". · Good/bad: what counts for performance is the growth without the deposits. · Example: the account rose by $5,000, but $3,000 of that was a deposit → the trading profit was $2,000.
Estimated tax (B3) — In 1 sentence: an estimate of the tax on your results on the Brazilian exchange. · Why it matters: it helps you plan ahead and not be caught by surprise. · Good/bad: it is only a guide — the official calculation has to be done with your accountant. · Example: day trading on B3 is usually taxed at 20% of the month's net profit.
⭐ Score and dashboard notices
MQL PRO Index — In 1 sentence: a score from 0 to 100 that brings profitability + consistency + discipline together in a single number. · Why it matters: it gives a quick "thermometer" of your system's health without having to look at 10 metrics. · Good/bad: the higher the healthier; low values call for a review of stops, setups and discipline. · Example: An Index of 78/100 = a healthy system, with points to refine.
Insights — In 1 sentence: automatic messages the dashboard generates by reading your history. · Why it matters: they point out patterns you might not spot on your own. · Example: "Your Fridays show a recurring loss — consider reducing your exposure on that day."
KPIs and the ▲/▼ arrows — In 1 sentence: a KPI is a "key figure"; the arrows compare the current period with the previous period of the same length. · Good/bad: a green ▲ = it improved; a red ▼ = it got worse. · Example: a Result with ▲ $300 = you made $300 more than in the previous period.
Starting over from scratch (zero mark) — In 1 sentence: a button that makes the metrics start counting from now on, without deleting anything. · Why it matters: useful when you change strategy and want to measure only the "new you". · Good/bad: it is purely visual and reversible — you can undo it whenever you like. · Example: switched from scalp to swing? Set the zero mark and follow the new phase with a clean slate.
AI Coach (Dashboard assistant)
The AI Coach is a artificial intelligence chat inside the Performance Center (the 🤖 AI Coachtab). It is an expert in financial markets and in the EA itself that sees only your own data from this dashboard and speaks your language (PT/EN/ES), in plain terms — made for people who are not fluent in market jargon.
testar_expressao command validates how your rule is written and shows the current value of every variable it uses — you see straight away whether it makes sense, without risking an order. And if you prefer, ask the Coach itself to create, review or fix the expression with you: it knows the robot's whole manual. In practice, the system teaches you how to use it.What it does
- Analyses your performance — strengths, what to improve, where you lose money (time of day, weekday, emotion).
- Explains any number on the dashboard in plain language ("what is drawdown?", "is my SQN good?").
- Comments on your setups and your portfolio — concentration, risk, what to watch.
- Brings news and market context (web search) and relates it to your open portfolio.
- Answers questions about the EA (inputs, panel, installation, features) using this manual; if it cannot find the answer here, it says so and sends you to support.
- 🧩 It builds a
.setfor you — describe your strategy in conversation (asset, entry, exit, SL/TP, risk) and the Coach runs a guided interview and produces the ready-made configuration file. You can validate each rule on your own robot (the real engine, without risking an order) and download the.set. It only uses the manual's syntax and the Arsenal's strategies — it does not invent features. - It answers in the dashboard's language by default — and in another language if you ask ("answer in English").
What it does NOT do
- It does not give buy or sell orders. It is educational, never investment advice.
- It does not answer off-topic questions (markets/trading/EA) — it declines politely and steers you back.
- It does not make up your figures — it uses the real data from your dashboard.
How to use it
- Open the 🤖 AI Coachtab. The first time, set up your Gemini key (free at aistudio.google.com/apikey) and create an unlock password.
- Type your question or use one of the shortcuts (Analyse performance, My best/worst setup, Today's news, Question about MQL…). The answer appears as the AI writes it.
- Use the 📋 copy button to keep an answer. If you see "server busy" (error 503), it is temporary — just resend or switch model (see below).
🔐 Protecting your key — what to do on your side
The encryption above protects the key stored on this device. The rest depends on precautions in your Google account — and they are simple:
| Precaution | Why |
|---|---|
| Do not add a card if you only want the Coach | The Google's free tier is enough. Without a card, Google simply stops when the free quota runs out — which is the safe behaviour. With a card, usage above the limit becomes a bill for you. |
| If you do add a card, set a spending cap | On a Google Cloud → Billing → Budgets & alerts, create a budget with an alert (e.g. R$ 20). It is your safety net against a nasty bill. |
| Never send your key to anyone | Not in a screenshot, a spreadsheet, a WhatsApp group or a website. Our support will never ask for your key — if someone asks while pretending to be us, it is a scam. |
| Beware of browser extensions | A malicious extension sees what the page sees, including after you unlock it. Use the dashboard in a clean browser, with no unknown extensions — no password replaces that. |
| Suspicious? Revoke the key | At aistudio.google.com/apikey you can delete the key and create another at any time. The old one dies instantly and nothing can use it any more. |
| A the unlock password cannot be recovered | It never leaves your device (we have no way of knowing what it is). If you forget it, just register the key again with a new password. |
💬 Quick Coach commands
Besides chatting, the Coach understands quick commands — speak in plain language (e.g. "show me SuperTrend's buffers", "estimate my tax", "how is the robot's config?") or use the slash (/comando) and the chips below the chat. When the command talks to the robot in MT5, the answer comes with real data and the AI also interprets and analyses it for you.
| Command | What it does | Source |
|---|---|---|
| buffers do [indicador] | Discovers the buffers and parameters of a custom indicator in your MT5 | 🤖 robot |
| /leitura [ativo] | Technical reading live from the robot + professional analysis from the AI (trend, zones, bias, what to do) | 🤖 robot + AI |
| /variaveis | Live values of the expression variables (BID, VWAP, ATR…) | 🤖 robot |
| /testar [expressão] | Validates an expression in the robot's engine and shows the current values | 🤖 robot |
| 🧩 Montar um .set | A guided interview that builds a complete .set file of your strategy — with Validate on my robot (the real engine) and Download .set | 🤖 robot + AI |
| /margem | Used/free margin and level + margin per lot, live | 🤖 robot |
| /radar | Scans your assets (A1/A2/A3 + open positions): price, day % and spread | 🤖 robot |
| /config | Reads the robot's settings (on/off, direction, SL/TP/BE/TS, multi-asset…) | 🤖 robot |
| /custos | Adds up commission + swap on your trades for the period | 📊 your trades |
| /darf | Tax estimate (day trade 20% · swing 15%) per month — educational, confirm it with an accountant | 📊 your trades |
| /risco | How much to risk per trade (0.5% / 1% / 2% of equity) + the sizing formula | 📊 account |
| /setup · /perfil | A ranking of your setups and performance by style (scalp/day/swing/position) | 📊 your trades |
| /alerta [ativo] [preço] | Creates a price alert — it tells you on Telegram when it is hit (/alertas lists them) | ☁️ server |
| /macro · /calendario · /correlacao · /replay · /diario | Macro overview, economic calendar, portfolio correlation, trade review and journal | 🌐 AI + web |
Trading Desk (Dashboard)
A Trading Desk field ( 💹 Trading Desk of the Center) lets you command your robot remotely from the browser — over the same channel as the Center (it does not slow the EA down). It is protected by a password that is yours alone (encrypted on the device, like the AI Coach's) and every order asks for confirmation. For the robot to accept commands from the dashboard, keep 🎛️ Accept commands from the Dashboard on in the robot's parameters.
The 4 parts
- ⚡ Ticket — buy/sell at market, a pending order (buy/sell stop/limit) or on the candle (high/low). It has volume chips and fields for SL/TP, plus Close the symbol's buys/sells.
- 🎯 A1/A2/A3 targets — choose which assets to trade. Type the symbol into A2/A3 and activate it in one click (the robot loads it there and then, with no restart). It applies to the Trading Desk and for auto-trading. The Buy/Sell on targets trade all active symbols at once, with the same lot on each one and the SL/TP in points of each symbol (the same ruler as
SetSL[]in expressions). - 📋 Positions — close everything, partially (the ✂️ 25% · 50% · 75% buttons on each position, or a volume you type in) or by criterion (winners only, losers only, by volume or by %). Adjust the SL/TP or move to break even per position. It also lists the pending orders (cancel one or all of them).
- 🤖 AI analyses — your robot analyses and the alert reaches you (below).
🤖 More than one chart with the robot on the same account
Each chart with the robot is a separate robot: it has its own ROBOT button (running or paused) and its own Targets A1/A2/A3. The Desk shows the account's robots and the state of each one at the top. With more than one, ⏸ Pause and ▶ Resume ask which robot — or all at once —, and the 🎯 Targets tab has a selector to choose which robot the targets you are viewing and changing belong to. 🔌 Connection tests each robot separately.
📟 Robot replies
Every reply of the robot to the buttons (Connection, Status, orders, targets…) stays in the 📟 Robot replies, below the Desk, until you clear it: what was asked, at what time, how long it took, which robot answered and the reply in plain language. When the broker rejects, the box says why — margin, market closed, stop too close to the price.
✂️ Taking partial profit — close 25% · 50% · 75% of the position
On each open position there are ✂️ 25%, ✂️ 50% and ✂️ 75%buttons: one click closes that slice of the volume and leaves the rest running, with the same SL and TP. It is the way to take profit at the first target without giving up the bigger move. Anyone wanting a specific amount still has the Closebutton, which asks for the volume.
It works on hedge and on netting accounts — the mode of B3 brokers. If the slice would leave a remainder smaller than the minimum lot of the symbol, the order is not sent and the reply explains why.
• 🛡 Protect moves the stop to lock in part of the profit — the position stays whole.
• ✂️ 25/50/75% closes part of the volume — the money from that slice is banked now.
The same buttons exist on the phone: see Trading through Telegram.
🛡 Protect: the right price on any symbol
When you use 🛡 Protect (break even or lock part of the profit), each option already shows the price on the symbol's price step — WIN moves in steps of 5 points, WDO in steps of 0.5 — and only appears if it respects the minimum distance the broker requires from the current price. It is the same rounding the robot does before sending: the price you confirm is the price that goes. And if the market moved since the screen last refreshed, the robot checks again and warns you instead of sending a stop the broker would reject.
🤖 AI analyses that arrive on their own
There used to be a Pilot here that opened orders on its own. It was removed: to work it required the browser tab to be open, and in the end it fired real orders based on a model's judgement — high risk for little use. What took its place is more useful day to day and works with the browser closed:
- Your robot analyses on its own, at whatever time you set. In the robot's parameters there are the fields ⏰ Auto-analyse A1 / A2 / A3 every N sec (0 = buttons only). Put a value in and the robot runs that asset's deep analysis by itself, with your Gemini key.
- The analysis becomes an ALERT. It shows up in the dashboard's 🔔 bell and on Telegram — you do not need to open the dashboard to get it. Just keep the 🤖 AI analyses (from your robot) box ticked on the 🔔 Notifications tab.
- And it is kept so you can talk about it. The same analysis goes into the chat on the 🤖 AI Coach tab, so you can ask “what did you make of that?” and discuss it with the AI afterwards.
- Your MT5 has to be open with the robot on the chart. The one doing the analysis is the robot, with data from Your own MetaTrader (indicators, structure, multi-timeframe and, if you allow it, a screenshot of the chart). MT5 closed = no new analysis. Anyone running MT5 on a VPS has this 24 hours a day.
- Mind the cadence and your quota. The field is in seconds. The AI's web search has a free monthly limit, and one analysis every 5 minutes on 3 assets blows through your quota. Recommended: 30 minutes or more (1800 sec), or a few times a day.
- There is an alert ceiling: at most 1 alert per asset every 15 minutes, so Telegram does not turn into spam even if you set a short cadence.
- There are two different Gemini keys: the robot's (which does the analysis) and the browser's (the Coach's chat). Separate places and separate quotas.
- With everything switched off, what still arrives are the alerts that do not depend on AI: protections, trades, system, robot offline and the summary at the market's close — the server sends those by reading your history, even with MT5 closed.
🔒 The Desk password
The Trading Desk is protected by a password that is yours alone, separate from everything else. It is validated on the server (not in the browser), and unlocking it produces a temporary pass of about 2 hours — after that the dashboard asks again. Getting the password wrong several times in a row blocks further attempts for a few minutes.
The reason for the design: whoever opens the dashboard on your phone sees your figures, but cannot send an order without that password. The read-only tabs (Summary, Coach, Analyses) stay open — the lock applies only to what touches money.
How a command leaves here and reaches the robot
- You click on the dashboard → the command joins a queue on the server.
- The robot pulls the queue along with the upload it already makes to the Center — without opening a new connection and without slowing MetaTrader down.
- The robot executes it and sends the result back, which appears on the dashboard.
That is why the command takes a few seconds to act — and why it only works with MetaTrader open and the robot on the chart. If the robot is closed, the command waits in the queue; if it grows too stale, it is discarded rather than executed late (an order from 10 minutes ago is no longer any use).
Notebook (Studies & Journal)
The Notebook field ( 📓 Notebook) is your space for notes, studies, theses and a journal inside the Performance Center. Unlike the per-trade note, here you write freely — and everything is saved in the cloud, synced between phone and PC.
What you can do
- Write in markdown — headings, bold, lists; with a preview (the 👁️ View button).
- Paste a screenshot of the chart — copy the image and paste it with Ctrl+V inside the note (it is compressed and stored with it). You can also attach one with the 🖼️ button.
- Ready-made templates (the + Template button): Market thesis, Pre-trade plan, Post-trade review, Strategy backtest, Day journal.
- Organise with #tags (e.g.
#XAUUSD,#breakout) and search across every note. - Make it stick (⭐) the important notes at the top and export as Markdown or PDF.
- It saves itself as you write (autosave to the cloud).
- Keep your Performance Report — on the 🆘 Supporttab, the 📓 Save to the Notebook button records the summary of your result (the last 30 days or last month) as a note, so you can compare your progress month by month.
Affiliate Programme (Refer & Earn)
Every MQL PRO TRADER user can refer friends and earn commission — a % of the amount the referred person pays. It all happens on the 🤝 Affiliates tab of the dashboard.
1. Join the programme (quick sign-up)
The 🤝 Affiliates of the dashboard opens your Affiliate Portal — a page of your own, already connected to your account. The first time, fill in a short registration: name, WhatsApp and PIX key (required) and e-mail (optional) — PIX is how our team pays you.
2. Get and share your link/code
The dashboard shows your code (something like MQL-XYZ123) and the your link (mqlprotrader.com.br/?ref=SEU-CODIGO), with buttons to copy and to share on WhatsApp/Telegram.
3. Your friend uses your code in the robot
Your friend installs the robot and, on the EA's panel (bottom panel → the INFO tab → the CENTER), sub-tab), pastes your code in the “Got a referral code? Paste it and click OK” and clicks OK. That is it — they become your referral, even if they spend weeks testing on a demo account.
4. Track it and get paid
On the dashboard you can see how many referrals you have, how many are on demo, how many are already paid, how much you have to receive (current cycle) and how much you have already received (total) — plus a table of how much you earn per plan. You earn commission on the 1st activation AND on every renewal by the referral (renewals usually carry a smaller percentage than the 1st). Payments are made once a month via PIX by our team: when the month closes, your “to receive” resets and starts building up again the following month.
5. The levels — the Mentor Programme
Your rate goes up with your active portfolio — how many of your referrals keep using the robot with their licence up to date — not with how many you sold. There are 3 levels:
| Level | To get there | 1st activation | Each renewal |
|---|---|---|---|
| 🥉 Afiliado (Affiliate) | where everyone starts | 15% | 10% |
| 🥈 Mentor Prata (Silver Mentor) | 15 active referrals and retention of 70% or more | 20% | 15% |
| 🥇 Mentor Ouro (Gold Mentor) | 40 active referrals and retention of 80% or more | 25% | 20% |
- Active referral: has a paid plan, is not blocked and their robot showed up in the last 14 days.
- Retention: of your referrals with their licence up to date, the percentage that is active. Anyone who cancelled does not count against you.
- Each level asks for both numbers: a number of active referrals and a minimum retention.
- It counts at the moment of each commission: the % of each payment is the one of your level at that moment. If referrals stop using it, the level — and the rate — can drop; when they come back, it goes up again.
- Some plans have their own rate, always visible on your dashboard (the table of how much you earn per plan).
- Do you use the robot? You can receive the commission as credit on your subscription, worth 30% more than the PIX payment.
- Each level has its own privileges. Your Affiliate Portal shows your level, the active portfolio, the retention, how far you are from the next level and what you gain by moving up.
Example of one referral on the Monthly plan (R$ 149.99), at level 🥉: R$ 22.50 on activation and R$ 15.00 on each renewal. The amounts depend on how many people activate a plan through your referral — there is no promise of earnings.
Copy Trade — Signal Platform (Dashboard)
The 🔁 Copy Trade is a signal platform inside the Center: one and the same person can be a Provider (publishing their own signals for others to copy), a Copier (following one or more providers) or both at the same time. Everything is configured on the dashboard; the robot (EA) only executes.
- MQL PRO TRADER's Copy Trade is free. Whoever publishes signals charges nothing to the copier and receives no commission, subscription or share of profit. The PIX tip is 100% voluntary, made afterwards and at the sole decision of whoever is copying — it is not a price, it is not a subscription and it creates no obligation whatsoever for either side.
- The provider is not your adviser, manager or portfolio administrator. They trade their own account; you chose to mirror it. They cannot be held liable for losses, orders that were not copied, delays, execution failures at your broker, price difference (slippage), or for any result in your account.
- You are the one who decides. Volume, assets, risk locks, when to pause and when to stop are your own settings, on your own dashboard. Nobody trades in your account unless you have switched on the safety lock in your own MetaTrader.
- The platform does not intermediate, does not hold custody and does not guarantee anything: it merely carries the signal. Past results, yours or the provider's, do not guarantee future results.
By following a provider you declare that you have understood and accepted these conditions. If you do not agree, follow nobody — and use the robot with your own strategies only.
1. Be a PROVIDER (supply your signals)
- Click 📡 Publish my signals. You get a unique CPY-XXXXXX code to share.
- Display name (optional): how you appear in the directory (e.g. “John's Desk”).
- Appear in the public directory: switches your shop window on/off so anyone can find you.
- Approve copiers automatically: if it is on, whoever pastes your code starts copying straight away; if it is off, each request waits for your approval.
- My copiers: the list of those following you — you can approve, decline, revoke and chat (💬).
2. PIX tip (optional) — goes DIRECTLY to the provider
The provider can publish a PIX key for tips and a message (e.g. “help me keep the signals coming”). Anyone who likes the signals clicks ☕ Say thanks with PIX, copies the key and sends a PIX of gratitude straight to the provider.
A tip is not payment for the signal. It is voluntary, made afterwards and by whoever wants to: it buys no priority, grants no right to support, creates no relationship and transfers no liability whatsoever to the provider over your result. Someone who never tips receives exactly the same signals.
3. Be a COPIER (copy a provider)
- Paste the provider's CPY- code and click Follow — or pick someone from the Directory.
- Provider directory: each card shows REAL statistics verified by the server (return, win rate, drawdown/risk, number of followers, scalp/day/swing/position profile, markets) plus the star average. The ranking puts the best return on top.
- How your lot is worked out (you choose per provider):
- Proportional (equity): your lot follows the provider's, adjusted to your account's size — fair across accounts of different sizes.
- Risk per trade %: the most professional one — each trade risks a % of your capital, worked out from the signal's stop.
- Multiplier ×: the provider's lot times a factor (e.g. 0.5× or 2×).
- Fixed lot: you always trade a fixed volume, ignoring the provider's.
- Simulator: before you activate it, the dashboard shows “a 1.0 lot trade from the provider ≈ X lot(s) for you”.
- You can pause, resume or stop copying whenever you like.
3.1. Choosing WHICH assets to copy
In the field “Copy only these assets (blank = all)” you type the codes separated by commas:
EURUSD, WIN, XAUUSD
- You do not need to get your broker's suffix right.
EURUSDcatchesEURUSD.pro,EURUSDm,EURUSD.a;WINcatchesWIN$NandWINZ25. The comparison is made on the start of the code. - Upper/lower case does not matter —
eurusdworks just the same. - You can separate them with a comma, semicolon or space.
- A blank field = copy EVERY asset the provider trades.
- ⚠️ Beware of the opposite: writing
WINnot catchesWDO. Each family has to be on the list.
3.2. Choosing WHICH events to copy
At “Which events to copy” you switch each type on/off separately: Openings, Closings, Partials and SL/TP. A real-life example: switch Openings off and leave the rest on — you enter on your own and use the provider only to exit.
3.3. Risk locks (all optional)
| Field | What it does |
|---|---|
| Max lot | A volume ceiling per copy, come what may. |
| Stop if it drops (%) | The capital brake. It measures the drop from your highest balance since you started copying. When it is breached, copying PAUSES and you are told (bell + Telegram) — no position is closed. Come back with ▶️ Resume (the peak is recalculated from there). |
| Stop if balance < | The same brake, but by a fixed amount: it pauses if the balance falls below the number you typed. |
| Max trades | How many copies may be open at the same time. 0 = no limit. |
| Max deviation (pts) | If price has already run further than this since the signal, the copy is refused (it stops you entering “late”). 0 = no limit. |
| Delay (s) | It waits N seconds before copying an opening. The a closing is never delayed — delaying the exit would mean holding on to your loss. |
| Only copy signals WITH a stop | It ignores entries the provider sent with no stop loss. |
| Copy trades already open | When switched on, it replicates what the provider already has open at that instant. Switched off, you only get the next signals. |
| Invert (reverse copy) | A buy becomes a sell and vice versa. |
3.4. 📜 Copy history — the first place to look
The 📜 Copy history (inside the link) shows every signal and what happened to it, with the reason in plain language. It is where you find out why something did not copy without having to open MetaTrader's journal:
| What you see | Means |
|---|---|
| ✅ copied | The order went into your account. |
| ⚠️ lot below the minimum | The calculation came out below the asset's minimum lot. Raise the risk %, use Multiplier or Fixed lot. |
| ⚠️ “Allow CLOUD COPY” switched off in the robot | The parameter still has to be switched on in the robot, on the Inputs. |
| ⚠️ the asset does not exist at your broker | The provider traded something your broker does not have (not even under an alias). Add it in the Market Watch. |
| ⚠️ trade limit reached | It hit your “Max trades”. |
| ⚠️ price ran too far | It hit your “Max deviation”. |
| ⌛ the robot was offline | The signal grew stale waiting for your MT5 to open and was discarded (it does not enter late). |
| ⏱️ waiting out the delay | It is queued because of your “Delay (s)”. |
3.5. Separating what is COPY from what is YOURS
Once you copy somebody, the Center's figures start mixing two things: your performance and the provider's performance. The 📊 Summary tab shows the 🔁 Source of the result band to unmix them:
- [All] · [Mine only] · [Copy only] — the filter applies to the whole dashboard: summary, KPIs, charts, calendar, MQL PRO Index and the performance report.
- A side-by-side comparison — profit, number of trades, win rate and Profit Factor for each source. It is the answer to “is copying helping me or hurting me?”.
- A 🔁 badge on every open position and every closed trade that came from a copy, with the provider's name.
- On a Telegram (
/hoje,/semana,/relatorio) one extra line comes out: 🔁 From copy: … · 👤 Yours: ….
- Balance, equity and margin CANNOT be split. They belong to the whole account — there is no such thing as “the copy's balance”. Only the result of the trades can be separated.
- A mixed position (a netting account, like B3's): if you already had a position on the asset and the copy added to it, that position belongs to both. It appears with the 🔁 mixed XX% badge and the result is apportioned by volume — the copied slice goes to the copy, the rest to you. On a hedge account (forex) this does not happen: each copy is a separate position.
The band only appears if the account has some copy result — someone who copies nobody sees none of this. And it opens on [All], so no figure you already knew changes value on its own.
4. Chat and rate
Provider and copier talk through the chat of the link (💬). Whoever copies can leave a star rating (⭐) and a comment — only someone who genuinely has a link with the provider can rate them (a verified rating, no fraud). The star average appears on the directory card and helps the next people choose.
Home Broker — Universal Portfolio (Dashboard)
The 🏦 Home Broker brings ALL of your investments together in one place — including the ones that live outside MetaTrader: shares at your broker, crypto, dollars. It is a tracker manual (you register what you own) that fetches the quotes on its own and shows your live profit/loss.
Step by step
- Tap ➕ Add.
- Type the asset's ticker . Examples:
PETR4(a B3 share),BTC(bitcoin),AAPL(a US share),USD(the dollar). - Enter the quantity and the average price you paid.
- If you want to track dividends received (below), also fill in the purchase date — it is optional, but without it the dashboard cannot tell "what this asset has ever paid" from "what you actually received".
- If you like, pick the broker — the list holds the most used ones for each market (Brazil/B3, International and Crypto) plus the "Other…"option, which frees the field so you can type any name. It is optional, and it shows on the asset's row once registered.
- That is it: the dashboard fetches the quote and shows the live profit/loss (it refreshes on its own).
Got something wrong? Just edit it
Every asset has the ✏️button. It opens the same form as the one at the top already filled in, with a highlighted border and the notice "Editing …" — fix whatever you need (average price, quantity, date, broker) and click 💾 Save, or Cancel to back out.
Bought the same asset more than once?
Register one lot per purchase — each with its own quantity, price and date (useful for dividends: each lot counts the payouts from YOUR purchase date, not an average of everything). The list groups the lots of the same ticker into a single row, adding the quantity and calculating the weighted average price — just as the individual chart already showed. Tap the row (it reads "N lots ▸") to open it and view, edit or delete each purchase separately.
View chart and analysis
- 📈 (per asset): opens the candlestick chart. Choose the candle type — M5 · M15 · H1 · H4 · D (daily) · W (weekly) · M (monthly) — and the period (from 1 day to 5 years). Periods that do not exist for that candle type are disabled: the free data source does not keep, for instance, 5-minute candles for a whole year. The plain-language line below the title always states what you chose ("each candle = 1 hour · showing the last month").
- Your position's lines on the chart — buttons on the top bar, and the dashboard remembers your choice:
- AP — shows/hides the line of your average price (green if you are in profit, red if at a loss). It comes on.
- Entries — shows/hides a dashed line for each purchase you registered for that asset. It only appears if there are 2 or more lots — with only one, the entry would be the same line as the average price. It comes off.
- MA — 20 and 50 moving averages · log — a logarithmic scale (useful on an asset whose price has multiplied).
- 📊 Analysis: it adds everything up in your currency (converting whatever is in dollars), shows the portfolio's split by class (shares, crypto, and so on), a base-100 comparison of your portfolio against the CDI (fixed income) and the Ibovespa (the exchange), the 🏦 TOTAL Equity card (it adds your MetaTrader account to your manual portfolio in a single figure) and the 💰 Dividends and payouts block (see below). If you have assets registered here, that TOTAL Equity also arrives on its own in the daily/weekly Telegram summary — you do not need to open the dashboard to follow it.
🔔 Price alert per asset
Every portfolio row has a 🔔 button — tap it and say by how many % the asset may rise or fall from the average price you paid (e.g. -10 alerts you if it falls 10%; 15 alerts you if it rises 15%). When price hits the target, you get the alert on Telegram (the same bot as the 🔔 Notificationstab). It is the same alert mechanism as the Coach's chat (/alerta [ativo] [preço]) — the difference is that here you speak in % about what is already yours, instead of typing an absolute price. When a ticker has more than one lot, the button lives only on the consolidated row — open the lots to create an alert for a specific one.
🤖 The AI analyses the asset (and the whole portfolio)
With an asset's chart open, the 🤖 AI tells the Coach to make a full reading of it. The answer appears on the 🤖 AI Coach tab (the dashboard switches tabs on its own). The analysis brings together three layers:
- The chart, calculated here: trend, highs and lows, supports and resistances, RSI, 20/50/200 averages, volatility and the changes over 5/21/63/252 candles. Those figures come from the real candles on your screen — they are neither the AI's guesswork nor a lookup on someone else's website.
- Price action — candle patterns and chart figures: the dashboard identifies on its own a doji, hammer, shooting star, engulfing and inside bar in the recent candles, plus the larger figures: double top, double bottom, head and shoulders (and the inverted one), triangles/wedge and the the structure of highs and lows (ascending, descending or sideways). The AI receives that list ready-made and comments on what each figure suggests — if there is no pattern, it says so rather than inventing one.
- Fundamentals and context, fetched from the web: earnings, multiples, dividends, sector, and whatever is moving the asset right now (rates, FX, commodities, news).
- YOUR position: quantity, average price, result and how much that asset weighs in your portfolio. That is what makes the difference — the AI does not analyse "PETR4 in general", it analyses your PETR4.
🎯 The verdict at the end — the part that matters
The analysis does not end on the fence. The last block is the analyst's verdict, and it is required to choose:
- Stance — exactly one: buy now, buy only if (with the trigger price), wait, reduce, sell or hold. No "it depends".
- Conviction (high, medium or low) and why, in one sentence.
- An entry price that makes sense, two targets and the invalidation price — the level that, once lost, shows the reading was wrong.
- Risk vs reward roughly (e.g. risking 3% to chase 9% = 1:3).
- ⏳ The expectation's horizon — how long the idea needs to play out, with a minimum and a maximum, and what to do if the horizon runs out with price going nowhere.
Inside 📊 Analysistab, the 🤖 AI analyses does the same for the whole portfolio: concentration, allocation by class, what is driving the result and the risks of the whole — and it closes with a per-asset verdict table (each one's stance, a short reason and a horizon), plus the single most important change to make to the portfolio today.
📡 The live price from your MetaTrader — closing the 15-minute gap
The free quote arrives delayed (~15 min on exchanges). Instead of buying real-time data — which would be expensive and is licensed per user — the dashboard uses what you already have and already paid for: the your own broker's feed, inside MetaTrader.
When you click 🤖 AI analyses on an asset's chart, before asking the AI the dashboard sends a quick request to your robot: "read this asset now". If MT5 is open and your broker trades that asset, the answer comes back with no delay at all and goes into the analysis marked as more recent than the chart — it is the one that wins if they disagree. That way the AI can say what happened afterwards since the last candle drawn.
^BVSP), because its name changes from broker to broker. And the name is mapped automatically: PETR4.SA → PETR4, BTC-USD → BTCUSD, EUR/USD → EURUSD.🌐 And the AI fetches the price from the web too
It is the third front against the same gap — and it works with no MetaTrader at all. Before analysing, the AI is instructed to look up the asset's current quote and compare it with ours. But with safeguards, because a quote in a search result is treacherous: it usually comes from a snippet held in cache, sometimes from the previous day's close, and almost always without saying what time that price refers to.
- It is required to state the price + source + time of every quote it cites.
- If the source carries no timestamp, it must write that it could not confirm it — passing off a timeless price as "current" is forbidden.
- It receives our quote with its timestamp for comparison: a large divergence is usually a sign of stale data at its source, not of a move in the market.
- When the measurement shows our quote is already real-time (a US share, crypto), the instruction changes: instead of "correct the delay", it gets "confirm whether there was news" — swapping good data for a search snippet would make things worse.
💰 Dividends and payouts
Inside 📊 Analysis, the 💰 Dividends and payouts block shows each asset's payment history. With the purchase date filled in, the dashboard adds up the payouts made since then for the quantity of that lot — if you have 2 purchases of the same asset on different dates, each one counts correctly from ITS own date. It is an approximation (not an official statement: it does not track partial sales or quantity changes within the same lot). Without the date, the lot appears in the block showing the asset's history, useful for knowing whether it pays out and how often — but it is not "what you received". No asset paying a dividend at the source? The block does not appear — it is not an error, it is the portfolio having no asset with a payout history (crypto and most international ETFs, for instance).
Importing the portfolio by CSV (for those with many assets)
- Click 📄 Download the CSV template, fill it in with Excel/Sheets (columns: ticker, quantity, average price, currency, broker) and save it.
- Click 📥 CSV and pick the file. The dashboard understands a comma or a dot in numbers, a
;or,, and separator, and it detects each asset's class on its own (BR/US share, REIT, crypto, currency). - Check the preview and confirm — the assets go into the portfolio all at once.
Telegram notifications (Dashboard)
🩺 "My strategy does not trade" — the robot now tells you why
If you write an expression the robot does not understand (a wrong variable or indicator name, an incomplete format), it used to simply never fire, silently. Now the robot tells you straight away — in the chart's Alerts panel and in the Alerts Center — saying which slot (e.g. BUY3) and and what it did not recognise. Quick guide:
| The warning says… | Means | How to fix it |
|---|---|---|
| "I did not understand …" | The robot did not recognise the whole expression (probably a name/syntax error). | Check the spelling in the Variable Reference; or paste it into AI Coach and ask it to fix it. |
| "Incomplete format" | The action is missing (e.g. @MARKET) or an operand. | Complete it: RSI[0]<30 @MARKET. |
| "Indicator … does not exist" | The indicator's name is not one of the supported ones. | See the indicator list in the manual; custom names must be attached to the chart. |
testar_expressao command validates the wording and shows the current value of every variable it uses — you see straight away whether it makes sense, without risking an order.⬇️ Downloading the robot and updates
The published version of the robot is on the 🎫 My Plantab, in the "Download the robot" card — the same file works for demo and live accounts. When a new version comes out you get a 🆕 notice on the bell: just open My Plan and download it. Then copy the .ex5 to your MT5's MQL5\Experts folder and drag it onto the chart.
Telegram alerts (on your phone, even with the PC off)
The 🔔 Notifications also makes the robot alert you on Telegram when something important happens — including when the robot goes offline (stops responding), which is a warning the EA itself could not send if it froze.
From then on, every notice from the 🔔 bell also reaches your Telegram: trade opening and closing (with the direction and the reason — TP, SL, manual, robot), break-even applied, a protection triggered, an AI analysis made by your robot, a protection that blocked one of your locks, and robot offline.
If you have used MQL PRO TRADER since the early versions: there used to be a ticket that required creating your own bot in BotFather and pasting the token. It has been retired — everything it did is in the Center on Telegram, with no configuration at all.
🎛️ Trading from Telegram (close, pause, buy and sell)
The same bot that sends you the alerts also accepts orders — with no bot to create and no token to paste. They are the same Trading Desk buttons from the dashboard, on your phone: close everything, close one asset, cancel pendings, pause/resume the robot and buy/sell on the asset and volume you have configured.
It comes off deliberately: giving order power to a Telegram chat is a real increase in risk, because the device stays permanently logged in. To enable it:
- Connect Telegram with the Connect Telegram button (above).
- Set the Desk password button on the 🎛️ Desk. Without a password, Telegram not trade the account.
- On the 🔔 Notifications, the 🎛️ Trade from Telegramcard, tick “Allow this Telegram to send orders from this account”.
- Fill in the Default asset, Volume and, if you wish, SL and TP in points — that is what the buy/sell buttons will use.
On Telegram, send /mesa SUA_SENHA (the same Desk password). The bot deletes the message containing the password and opens the desk. Use /operar to reopen the buttons and /travar to lock it immediately.
How the menu works
There are three ways to reach the same action — use whichever is quickest at the time:
| Where | What it is for |
|---|---|
| Fixed keyboard (below the text field) | The hot actions always to hand: Close all, Cancel pendings, Positions, Pause, Resume, Buy, Sell, Commands, Hide and Lock. It appears when you unlock and goes away when you lock. Taking up too much room? Tap ⌨️ Hide — the buttons disappear and the desk stays unlocked; /operar brings them back. What locks it is 🔒 Lock. |
| ☰ Menu (Telegram's own button, next to where you type) | The full command list, drawn by Telegram itself — it never goes stale. Anyone who has not not opted in sees only the read-only ones. |
| Buttons in the message | Whatever suits the moment: close one asset, close only the buys or only the sells, and close one specific position. |
Two details that save you taps: right after you open a position, the bot offers “✖️ Close this one” for that position — with no list to search. And the 🟩 buys only / 🟥 sells only buttons only appear when the asset has both sides open; with only one side, they would be the same as “Close the asset”.
At 📊 Positions (with the desk unlocked) each position becomes a row with asset, volume and result, and a pair of buttons ⚙️ beside it: the ✖️ closes just that one, and the ⚙️ opens the position's card — where the three protections live.
Protecting an open position — 🛡 Protect · 🔻 Stop loss · 🎯 Take profit
On the position's card (the ⚙️ log under 📊 Positions) the three sit side by side, with no configuration needed:
| Button | What it does |
|---|---|
| 🛡 Protect | Opens three routes for the stop, and you choose before confirming — see below. If the position is in the red, it does not even open: there is no profit to protect, and a stop at the entry would sit on the wrong side of price (the broker would reject it). |
| 🔻 Stop loss 🎯 Take profit | Opens three percentages of the entry price, and each button shows the distance in points alongside — 0.25% (≈161). One tap chooses. If you filled in the default SL/TP in points on the 🔔 Notifications tab, it appears as a fourth button, at the top. |
| Market | The three buttons |
|---|---|
| Crypto · indices and futures (WIN, WDO, US30…) | 0,1% · 0,25% · 0,5% |
| Metals and energy (XAUUSD, oil) · currencies | 0,25% · 0,5% · 1% |
| Shares | 0,5% · 1% · 2% |
Want a value that is not on the buttons? Tap 🔻 or 🎯 on the position and then type it — without repeating the position number, because you already said which one it is:
| You type | What happens |
|---|---|
/tp 0.3% | A target 0.3% from the entry, on the position you just opened in the card. It also works 0,3% with a comma. |
/tp 0.3 | The same: with a decimal, it is a percentage — a point is never fractional. |
/sl 300 | 300 points of distance (a whole number is always points). |
/sl 299258347 0.3% | With the position number in front — use it when it has been more than 10 minutes since you opened the card, or when you want to act on another position. The number appears on the card. |
The bot never guesses which position: if you have not picked one recently, it asks for the number instead of guessing among your open positions. And the percentage is converted into price at the moment of sending, so it works on any version of the robot — the points are the ones that need 5.7.98.
🛡 Protect — break-even or lock in part of the profit
When the trade has already moved in your favour, stopping at the entry price may not be enough: if price comes back, you give up all the profit you already had. That is why 🛡 Protect does not act straight away — it shows the options, with each one's price already calculated, and only acts after you confirm:
| Option | Where the stop will land |
|---|---|
| 🛡 Break-even | On a entry price. The trade can no longer turn into a loss — this is the classic breakeven. |
| 🔒 Lock 25% · 50% · 75% of the profit the safest one | At the point of the distance already travelled between the entry and the current price. Locking 50% puts the stop halfway: if it is hit, you keep ≈half of what you had gained. The button shows the value — 🔒 50% (+BRL 200,00). |
| 📐 +0,25% · +0,5%… | Above the entry (below, on a sell), as a percentage of price — the same per-market scale as the 🔻/🎯 buttons. |
The ≈ shows up only in the money: the close happens on the other side of the spread, and commission and swap do not follow the proportion. The price of the stop is exact.
The system refuses two things, both to protect money: an option that would sit beyond the current price (the broker would reject it, and at the limit it would close the position at market) and any option that would worsen the stop you already have — a stop that walks backwards is protection thrown away. Unworkable options simply do not appear; if none is left, the bot explains that your current stop already protects more.
By typing, on the position you already opened in the card:
| You type | What happens |
|---|---|
/be | Opens the options above — the route that requires memorising nothing. |
/be 50% | Locks half the profit. Here the % is of the profit. |
/be +0.3% | Stop 0.3% of price above the entry. The + is what changes the meaning of the %. |
/be 0 | Break-even. |
/be 299258347 50% | At another position (or after 10 min), with the number shown on the card. |
/mesa — and that is deliberate: a password on a button would be a password one tap away. Apart from it, everything has a button. Want a different asset or volume? Tap ⚙️ Other on the confirmation screen: a row per asset appears and, below it, the multiples of your default volume (½, 1×, 2×, 3×) — one tap picks both. And if you have more than one account unlocked, the bot shows one button per account instead of asking for the number. Typed commands still work for those who prefer them.✂️ Closing part of the position — 25% · 50% · 75%
It is not only “close everything”. On each position's card (💼 Positions, or /positions) there is a row of partial closebuttons: you bank a slice of the lot and let the rest run.
• 🔒 Lock moves the stop — the position stays whole, just protected.
• ✂️ Close 25/50/75% moves the volume — a slice of the position disappears and its money is banked now.
The button already shows the exact lot that will be closed, not just the percentage — because the fraction almost never lands on a round number:
| You see | What happens |
|---|---|
| ✂️ 25% (0.01) | Closes 0,01 of the position's lot. The rest stays open, with the same SL and TP. |
| ✂️ 50% (0.02) | Closes half. The classic way to take profit at the first target and let the rest chase the second one. |
| ✂️ 75% (0.03) | Closes three quarters and leaves a small runner going. |
After closing part of it, the card redraws with the volume that is left — and you can slice again, if there is still enough lot. The same buttons exist on the dashboard, on each position of the Trading Desk.
• The lot is adjusted to the asset's of the asset. Half of 0,03 would be 0.015, which the broker would refuse — so the button shows the nearest valid value.
• A slice smaller than the minimum lot does not become a button. On a 0.01 position (the minimum), no partial appears at all — there is no way to split it.
• If two fractions land on the same lot, only one appears (25% and 50% of a small lot can give the same value).
• A fraction that would round to the whole position is discarded: it would be a “close everything” disguised as a partial.
When the default will not do — /comprar and /vender
The buttons exist for the common case (1 tap). When you want a different volume or a different asset, type it — and the account's default SL/TP still applies:
| You type | What happens |
|---|---|
/comprar | The account's default asset and volume. |
/comprar 2 | 2 lots on the default asset (a bare number is always volume — an asset has letters). |
/comprar WDOQ26 1 | The asset and volume you specified. |
/comprar 5162432 WDOQ26 1 | With the account number in front — required if you have more than one account unlocked. The bot does not guess which one to send it to. |
It also accepts /vender . The confirmation is the same as the buttons', and the asset is checked against the robot's — if the name does not exist at your broker, it refuses and the reason comes back in the chat.
🎯 Your three targets on your phone — /alvos
The robot trades up to three assets at once (A1, A2 and A3). The /alvos command brings those three to Telegram: it shows which asset is in each slot and whether it is on or off — and lets you change that from your phone, without opening MetaTrader.
| You see | What it means |
|---|---|
| 🟢 A1 · WINQ26 | Target on — the robot may trade that asset. Tap to turn it off. |
| ⚪ A2 · WDOQ26 | Target off — configured, but idle. Tap to turn it on. |
| Buy on all · Sell on all | Sends the order on every target that is 🟢 on, all at once. A ⚪ target that is off is ignored. |
It is the quick way to take an asset off the air when it is doing badly, or to bring it back later — without touching your expressions and without needing the PC.
SetSL[] in the expressions, and they respect the minimum distance your broker requires. 0 = no stop. The buy/sell buttons appear from robot 5.7.96onwards; close, cancel and pause work on any version.Rate MQL PRO TRADER (Dashboard)
The ⭐ Rate is where you say what you thought of MQL PRO TRADER: you give a star rating (from 1 to 5) and write a comment. Your opinion helps other traders discover the tool and guides us on what to improve.
How to rate
- Pick the stars (as many as you think fair).
- Write a comment (optional).
- Click Send. You can edit it later, whenever you like.
📚 EXPRESSION LIBRARY
Ready-made examples to copy and adapt. Every expression follows the structure: CONDIÇÃO @TIPO → AÇÃO
SetSL[X] and SetTP[X] take numeric distances in points, such as SetSL[500]. Dynamic levels such as SetSL[LOW[1]] or SetTP[BID+80] are accepted only in @MODIFYexpressions. For external indicators, the real order is IND1[buffer,candle].Quick syntax — click to see every token
@A2MARKET, @A2BCLOSE and @A2SCLOSE
A3*The same tokens above with the A3 prefix, for the tertiary asset
— Phase A/B
NOVOBAR1 only on the new bar's first tick; ideal for trading once per candle. Pair it with the CLOSED candle [1] (e.g. NOVOBAR==1 && HIGH[1]>HIGH[2]) — combined with [0] the rule almost never fires, because at that instant the current candle has only just opened
SPREADXThe current spread divided by the average spread; use SPREADX<1.3 to avoid an abnormal spread
PFDIAThe Profit Factor of the trades closed in the day
RMULTThe current profit in multiples of the initial risk; for example: RMULT>=1
POSMIN / POSMAXThe worst and best floating profit ever seen on the tracked A1 position
SetRiscoPct[X]Calculates the volume from a risk of X% of the balance; use it with SetSL[X]
@CancelPendingCancels ALL of A1's pending orders in exit slots — including the ones you placed by hand or another robot placed
@CloseBest / @CloseWorstCloses A1's most profitable or most losing position in exit slots — it picks among ALL of A1's positions, including those opened by hand or by another robot
— PHASE C — Internal indicatorsIt requires enabling the matching parameters in the EA, such as ☑️ Enable VWAP (volume weighted average price), ☑️ Enable POC — the price with the largest traded volume and the other advanced blocks. Numeric price variables calculated internally.
VWAP / VWAPD / VWAPW / VWAPMSession, daily, weekly and monthly VWAP — the volume weighted average price; CLOSE[0]>VWAP
POCPoint of Control — the day's highest-volume level; a dynamic support/resistance
VAHIGH / VALOWUpper/lower limits of the Value Area (70% of traded volume) — requires ☑️ ⬜ Enable Value Area — uses VAHIGH and VALOW in conditions
ORBHIGH / ORBLOWThe Opening Range Breakout high/low — the range of the session's first minutes — requires ☑️ ⬜ Enable Opening Range — uses ORBHIGH and ORBLOW in conditions
TENKAN / KIJUNIchimoku: the conversion line (9 per.) and the base line (26 per.) — TENKAN>KIJUN = uptrend
KUMOTOP / KUMOBOTThe top and bottom of the Ichimoku cloud — dynamic support/resistance; price above = bulls in control
SENKOUA / SENKOUBThe lines that form the cloud: SENKOUA=(TENKAN+KIJUN)/2 (the fast span); SENKOUB=the long-period average (52 per., the slow span). SENKOUA>SENKOUB=a green cloud (bullish); <=a red cloud (bearish). Aliases: SPANA / SPANB.
FIBO382 / FIBO500 / FIBO618Fibonacci retracement levels calculated on the recent pivots; use them as dynamic support/resistance
BBUPPER / BBMIDDLE / BBLOWERBollinger: the upper band, the middle and the lower band — CLOSE[0]<BBLOWER = oversold
BBSQZBollinger Squeeze: 1=squeeze (low vol → wait for the breakout), 0=normal, -1=expansion
ATRREGThe ATR volatility regime: 0=normal, 1=volatile (expanded), 2=calm (compressed) — filter your entries by the market environment
DOJI / PINBAR / ENGULFIntrabar patterns (the forming candle): DOJI=minimal body; PINBAR=long wick (±1); ENGULF=engulfing (±1)
DOJI1 / PINBAR1 / ENGULF1Patterns confirmed (the closed candle [1]): use them with NOVOBAR==1 — entry at the start of the next bar
— Daily and Previous-Day OHLC (independent of the chart's TF)Variables that return the Open/High/Low/Close of the whole day, even if the chart is on M1, M5 or H1. They accept [N] to reach past days (e.g. DHIGH[2] = the high from 2 days ago).
DOPEN / DHIGH / DLOW / DCLOSEThe open, high, low and (partial) close of the current day. Aliases: OPENDAY, DAYHIGH, DAYLOW, CLOSEDAY. Example: BID>DHIGH = it broke the day's high.
YOPEN / YHIGH / YLOW / YCLOSEOHLC of the previous day (fixed for the whole day). Aliases: PDH (Previous Day High), PDL (Previous Day Low), PREVOPEN, PREVCLOSE. Example: BID<YLOW = it lost yesterday's low.
— Weekly OHLC (independent of the chart's TF)Variables for the current week. They accept [N] for past weeks (WCLOSE[1] = last week's close).
WOPEN / WHIGH / WLOW / WCLOSEThe open, high, low and (partial) close of the current week. Example: BID>WHIGH[1] = it broke last week's high.
— Percentage change and Gap (calculated on a daily basis)They measure the day's move in percent or in units of volatility (ATR). Essential for filters like "I only trade if the asset is already up more than 1%".
DAYCHGChange % for the current day: (BID - DOPEN) / DOPEN × 100. Aliases: DCHG, DCHANGE. Example: DAYCHG>1.5 = the asset is up more than 1.5% on the day.
YCHGChange % for the previous day. Aliases: YCHANGE, PREVCHG. Use it to spot continuation or reversal between sessions.
GAPABSThe gap in absolute points between yesterday's close and today's open (positive = gap up). Alias: GAP.
GAPPCTThe gap in percent of the previous close. Example: GAPPCT>1 = a gap up of more than 1%.
GAPATRThe gap measured in multiples of the daily ATR(14) using an SMA — the same as MT5's native iATR (signed: positive = gap up, negative = gap down). Example: GAPATR>1.5 || GAPATR<-1.5 = a gap larger than 1.5× ATR in either direction.
GAPATRWThe gap in multiples of the Wilder ATR (SMMA, 14 D1 periods) — it uses the progressive exponential smoothing of Wilder's original method, which reacts more slowly to volatility spikes and gives slightly different values from GAPATR on volatile assets (BTC, indices). Use it to compare which gap filter suits your asset better.
ATRW[N]The Wilder ATR (SMMA) on the timeframe and period configured in the EA (default: the chart's timeframe, 14 periods — the same as the ATR SL/TP). It complements ATRREG which uses an SMA internally. Example: ATRW[0]>ATRW[1] = Wilder volatility expanding.
DAYRNG / DAYRNGPCTThe day's range in points tab and in % of the open. Aliases: DRANGE, DRANGEPCT. Example: DAYRNGPCT>3 = a very volatile day.
— Classic Pivot Points (Floor Pivots)Support and resistance levels calculated from the previous day's OHLC. Standard formulas: PP=(H+L+C)/3, R1=2PP-L, S1=2PP-H, and so on. They accept [N] for pivots from past days.
PIVOTThe central Pivot Point. Alias: PP. Used as the day's psychological reference — price above = bullish bias.
R1 / R2 / R3Projected resistances. R1 = the first; R3 = extremely stretched (classic overbought).
S1 / S2 / S3Projected supports. S1 = the first; S3 = capitulation (extreme oversold).
— Cross-asset Round Numbers (ROUND/DISTROUND/NEARROUND)They capture psychological levels (round figures). [N] is the step in the symbol's POINTS — choose it according to the asset (e.g. WIN [100], EURUSD [100]=10 pips, XAU [100]=$1, BTC [10000]). The parameter [N] is required.
ROUND[N]Returns the rounded price of the BID to the nearest multiple of N points. Example on WIN: BID>ROUND[100] = it is above the nearest multiple of 100 pts.
DISTROUND[N]The distance (in points, always positive) to the nearest round multiple. Alias: DROUND[N]. Example: DISTROUND[500]<50 = price within 50 pts of a half-hundred.
NEARROUND[N]A flag 1/0: 1 if the BID is within N/4 points of a round multiple. Alias: NROUND[N]. Use it as a filter: NEARROUND[100]==1 = price glued to a hundred.
— ROC, Fibo windows and VWAP bands (Wave F)Advanced indicators: the rate of change accumulated over N days, the high/low of N candles and the VWAP's statistical bands.
ROC[N]The percentage Rate of Change on a daily basis over N days: (close - close[N])/close[N] × 100. Alias: PROC[N]. Example: ROC[5]>3 = a cumulative rise of more than 3% over the last 5 days.
FIBHIGH[N] / FIBLOW[N]The high and low of the last N closed candles on the chart's timeframe. Aliases: WINHIGH[N], WINLOW[N]. Useful for a rolling-window breakout: BID>=FIBHIGH[50].
VWAPUP1 / VWAPDN1 / VWAPUP2 / VWAPDN2Rolling VWAP bands: ±1σ and ±2σ (volume weighted standard deviation). Use them as a statistical band: BID>VWAPUP2 = statistically overbought. Requires ☑️ Enable VWAP.
— N-day % change, average range and exhaustionFor strategies like "fell X% from the N-day high", "how much this asset moves per day" and "the day has already moved too much". All on a daily basis, with the chart on any timeframe.
DHIGHN[N] / DLOWN[N]High and low of the last N closed days (today is not included). The [N] is required. Example: BID<DHIGHN[20]*0.9 = 10% below the 20-day high.
ADR[N] / ADRPCT[N]Average daily range of the last N closed days, in price (ADR) and in % of each day's open (ADRPCT): how much the asset usually moves per day. Without [N], 14 days.
ADRUSED[N]How much of the N-day average range has been covered today, in %. ADRUSED[14]>=100 = the day has already used up a whole normal day, a classic exhaustion sign.
CHGPCT[N]% change from close to close, the one your broker shows: the current price against yesterday's close (CHGPCT[1] = yesterday's). The DAYCHG measures from today's open. On B3 futures the broker measures against the settlement price, which may differ from the close.
DPOS[N]Where the price sits within the day's range, in %: 0 = at the low, 100 = at the high. Example: DPOS<10 = right at the day's low.
ZCHG[N]Today's change (CHGPCT) measured in standard deviations of the daily changes over the last N days. ZCHG[20]<-2 = an abnormal drop for this asset. Without [N], 20 days.
DOWNDAYS / UPDAYSHow many closed days in a row down or up (close below or above the previous one), counting back from yesterday. Example: DOWNDAYS>=3.
P1 / P2 / P3 / P4 / P5Free numbers from the F7 window, in the group 🔢 FREE NUMBERS P1..P5. Write P1 inside the expression instead of the number and the Strategy Tester can optimize that value. Example: DAYCHG<-P1.
🟢 GROUP 1 — BUY ENTRIES
✏ BUY expression [01–10]Price Action
HIGH[0]>HIGH[1] @MARKET
CLOSE[0]>OPEN[0] @MARKET
DIR[0]==1 && DIR[1]==1 @MARKET
DIR[N]==1 = a green candle, DIR[N]==-1 = a red candle. Two greens = confirmed momentum.DIR[1]==-1 && DIR[0]==1 @MARKET
HIGH[0]>HIGH[1] && HIGH[1]>HIGH[2] @MARKET
BODY[1]>BODY[2]*2 && CLOSE[1]>OPEN[1] @MARKET -> SetVolume[0.01]
BODY[N] = |CLOSE[N]−OPEN[N]|. The previous candle's body is 2× larger than that of 2 candles ago AND is bullish — a sign of buying strength doubling.HIGH[0]>HIGH[1] && RANGE[1]>RANGE[2]*1.5 @MARKET -> SetVolume[0.01]
RANGE[N] = HIGH[N]−LOW[N]. It breaks the previous high and the previous candle is 50% more volatile — it confirms the breakout with conviction.CLOSE[1]>OPEN[1] && BODY[1]>RANGE[1]*0.5 && HIGH[0]>HIGH[1] @MARKET -> SetVolume[0.01]
DIR[0]==1 @LOW[1] -> SetVolume[0.01]
LOW[1]). The order waits for price to pull back to that support to execute. SetVolume is mandatory on pending orders.Pending orders (a specific price)
@MARKET with a price token creates a a pending order at the level you want. The EA places the order and waits for price to arrive. SetVolume is required in every case.HIGH[0]>HIGH[1] @HIGH[0] -> SetVolume[0.01]
HIGH[0]>HIGH[1] @CLOSE[1] -> SetVolume[0.01]
DIR[0]==1 @LOW[2] -> SetVolume[0.01]
COMPRA [01]: DIR[0]==1 @LOW[1] -> SetVolume[0.01] COMPRA [02]: DIR[0]==1 @LOW[2] -> SetVolume[0.02]
DIR[0]==1 && TIME>=9.0 && TIME<=12.0 @LOW[1] -> SetVolume[0.01]
Hours, Day and Spread
HIGH[0]>HIGH[1] && TIME>=8.0 && TIME<=12.0 @MARKET
TIME is decimal: 8.0=08:00, 8.5=08:30, 14.75=14:45. It only trades inside the chosen window.HIGH[0]>HIGH[1] && DAY>=1 && DAY<=5 && SPREAD<20 @MARKET
DAY: 0=Sun, 1=Mon…5=Fri, 6=Sat. SPREAD in points. It avoids weekends and low-liquidity hours.# Entry: trades Mon-Thu only HIGH[0]>HIGH[1] && DAY>=1 && DAY<=4 @MARKET
COMPRA [01]: HIGH[0]>HIGH[1] && TIME>=9.0 && TIME<=12.0 @MARKET COMPRA [02]: HIGH[0]>HIGH[2] && TIME>=14.0 && TIME<=17.0 @MARKET
With News (NEWSIN)
HIGH[0]>HIGH[1] && NEWSIN[30]==0 @MARKET
NEWSIN[30]==0 = no news in the next 30 minutes. It protects you from volatility spikes caused by economic events.HIGH[0]>HIGH[1] && TIME>=9.0 && TIME<=17.0 && NEWSIN[60]==0 && SPREAD<25 @MARKET
With Indicators (IND1–IND30)
IND1[buffer, candle] — e.g. IND1[0,0] = the main buffer on the current candle.IND1[0,0]<30 @MARKET
IND1 = RSI | NEW,SYMBOL,M5,14,0IND1[0,0]<20 && HIGH[0]>HIGH[1] @MARKET
IND1 = STOCH | NEW,SYMBOL,M5,14,3,3,1IND4[0,0]>IND5[0,0] && IND4[0,1]<=IND5[0,1] @MARKET
IND2[0,0]>0 && IND2[0,0]>IND2[0,1] @MARKET
IND2 = MACD | NEW,SYMBOL,M5,12,26,9,0,0 (buffer 0 = the histogram)IND1[0,0]<40 && IND2[0,0]>IND2[0,1] && HIGH[0]>HIGH[1] @MARKET
IND1[0,0]<30 || IND3[0,0]<20 @MARKET
|| (OR): it enters if ANY of the indicators fires — more entries, less restrictive.With the Secondary Asset A2 / A3
HIGH[0]>HIGH[1] && A2HIGH[0]>A2HIGH[1] @MARKET
HIGH[0]>HIGH[1] @A2MARKET
COMPRA [01]: HIGH[0]>HIGH[1] @MARKET COMPRA [02]: HIGH[0]>HIGH[1] @A2MARKET
HIGH[0]>HIGH[1] && A2CLOSE[0]>A2CLOSE[1] @MARKET
A2CLOSE[N] on the parameter ✏️ A2 timeframe in EXPRESSIONS (A2HIGH, A2LOW, A2CLOSE, A2OPEN) (default: D1). Ideal for daily confluence.🔴 GROUP 2 — SELL ENTRIES
✏ SELL expression [01–10]Price Action
LOW[0]<LOW[1] @MARKET
DIR[0]==-1 && DIR[1]==-1 @MARKET
LOW[0]<LOW[1] && LOW[1]<LOW[2] @MARKET
BODY[1]>BODY[2]*2 && CLOSE[1]<OPEN[1] @MARKET -> SetVolume[0.01]
LOW[0]<LOW[1] && RANGE[1]>RANGE[2]*1.5 @MARKET -> SetVolume[0.01]
DIR[1]==1 && DIR[0]==-1 @MARKET
DIR[N]==-1 = a red candle.CLOSE[0]<OPEN[0] @MARKET
DIR[0]==-1 @HIGH[1] -> SetVolume[0.01]
SetVolume is mandatory on pending orders.Pending orders (a specific price)
@MARKET with a price token creates a a pending order. The EA places the order and waits for the market to reach the level. SetVolume is required.LOW[0]<LOW[1] @LOW[0] -> SetVolume[0.01]
LOW[0]<LOW[1] @CLOSE[1] -> SetVolume[0.01]
DIR[0]==-1 @HIGH[2] -> SetVolume[0.01]
VENDA [01]: DIR[0]==-1 @HIGH[1] -> SetVolume[0.01] VENDA [02]: DIR[0]==-1 @HIGH[2] -> SetVolume[0.02]
DIR[0]==-1 && TIME>=14.0 && TIME<=17.0 @HIGH[1] -> SetVolume[0.01]
Hours, Day and Spread
LOW[0]<LOW[1] && TIME>=14.0 && TIME<=17.0 @MARKET
LOW[0]<LOW[1] && LOW[1]<LOW[2] && TIME>=9.0 && TIME<=17.0 @MARKET
LOW[0]<LOW[1] && DAY>=1 && DAY<=5 && SPREAD<20 @MARKET
DAY: 0=Sun, 1=Mon…5=Fri. It restricts sells to weekdays with an acceptable spread. It avoids weekends and low liquidity.VENDA [01]: LOW[0]<LOW[1] && TIME>=9.0 && TIME<=12.0 @MARKET VENDA [02]: LOW[0]<LOW[2] && TIME>=14.0 && TIME<=17.0 @MARKET
With News (NEWSIN)
LOW[0]<LOW[1] && NEWSIN[30]==0 @MARKET
NEWSIN[30]==0 = no news in the next 30 minutes. It protects sells from upward spikes caused by economic events.LOW[0]<LOW[1] && TIME>=9.0 && TIME<=17.0 && NEWSIN[60]==0 && SPREAD<25 @MARKET
With Indicators (IND1–IND30)
IND1[buffer, candle].IND1[0,0]>70 @MARKET
IND1 = RSI | NEW,SYMBOL,M5,14,0IND4[0,0]<IND5[0,0] && IND4[0,1]>=IND5[0,1] @MARKET
IND1[0,0]>80 && LOW[0]<LOW[1] @MARKET
IND1 = STOCH | NEW,SYMBOL,M5,14,3,3,1IND2[0,0]<0 && IND2[0,0]<IND2[0,1] @MARKET
IND2 = MACD | NEW,SYMBOL,M5,12,26,9,0,0 (buffer 0 = the histogram)IND1[0,0]>60 && IND2[0,0]<IND2[0,1] && LOW[0]<LOW[1] @MARKET
IND1[0,0]>70 || IND3[0,0]>80 @MARKET
|| (OR): it sells if ANY indicator flags overbought — more entries, less restrictive.With the Secondary Asset A2 / A3
LOW[0]<LOW[1] && A2LOW[0]<A2LOW[1] @MARKET
LOW[0]<LOW[1] @A2MARKET
VENDA [01]: LOW[0]<LOW[1] @MARKET VENDA [02]: LOW[0]<LOW[1] @A2MARKET
LOW[0]<LOW[1] && A2CLOSE[0]<A2CLOSE[1] @MARKET
A2CLOSE[N] on the parameter ✏️ A2 timeframe in EXPRESSIONS (A2HIGH, A2LOW, A2CLOSE, A2OPEN). Daily directional confluence between two correlated assets.🟠 GROUP 3 — BUY EXITS
✏ BUY exit expression [01–10]CloseIndex[N] to point at a specific one.By Profit and Loss
BPROFIT>200 @BCLOSE
BPROFIT = the total profit of every open buy. It closes them all when the group reaches R$200.BPROFIT>100 @BCLOSE+
@BCLOSE+ closes only the buy positions that are in the black. The losing ones stay open.BPROFIT < -30 @BCLOSE
DPROFIT>500 @BCLOSE
DPROFIT = the day's accumulated profit (closed positions). It stops trading as soon as the target is reached.By Technical Signal
DIR[0]==-1 && DIR[1]==-1 @BCLOSE
IND1[0,0]>75 @BCLOSE
NEWSIN[5]==1 @BCLOSE
NEWSIN[5]==1 = there is news in less than 5 minutes. It protects open positions from news spikes.BPROFIT>150 || DIR[0]==-1 && DIR[1]==-1 @BCLOSE
|| (OR): it closes if profit hit the target OR if two reds confirm a reversal. Whichever comes first.Partial Close (ClosePercent)
BPROFIT>100 @BCLOSE -> ClosePercent[50]
SAÍDA COMPRA [01]: IND1[0,0]>70 @BCLOSE -> ClosePercent[25] SAÍDA COMPRA [02]: IND1[0,0]>75 @BCLOSE -> ClosePercent[33] SAÍDA COMPRA [03]: IND1[0,0]>80 @BCLOSE -> ClosePercent[50] SAÍDA COMPRA [04]: IND1[0,0]>85 @BCLOSE
DAY==5 && TIME>=16.0 @BCLOSE
A2BPROFIT>80 @A2BCLOSE
TIME>=17.0 @BCLOSE:2
🟠 GROUP 4 — SELL EXITS
✏ SELL exit expression [01–10]CloseIndex[N] to point at a specific position.By Profit and Loss
SPROFIT>200 @SCLOSE
SPROFIT = the total profit of every open sell. It closes them all when the group reaches R$200.SPROFIT>100 @SCLOSE+
@SCLOSE+ closes only the sell positions in the black. The losing ones stay open.SPROFIT < -30 @SCLOSE
DPROFIT>500 @SCLOSE
DPROFIT = the day's accumulated profit (closed positions). It stops the sells as soon as the daily target is hit.By Technical Signal
DIR[0]==1 && DIR[1]==1 @SCLOSE
IND1[0,0]<25 @SCLOSE
NEWSIN[5]==1 @SCLOSE
NEWSIN[5]==1 = there is news in less than 5 minutes. It protects open sells from upward spikes caused by economic events.SPROFIT>150 || TIME>=17.5 @SCLOSE
SPROFIT>150 || DIR[0]==1 && DIR[1]==1 @SCLOSE
Partial Close (ClosePercent)
SPROFIT>100 @SCLOSE -> ClosePercent[50]
SAÍDA VENDA [01]: IND1[0,0]<30 @SCLOSE -> ClosePercent[25] SAÍDA VENDA [02]: IND1[0,0]<25 @SCLOSE -> ClosePercent[33] SAÍDA VENDA [03]: IND1[0,0]<20 @SCLOSE -> ClosePercent[50] SAÍDA VENDA [04]: IND1[0,0]<15 @SCLOSE
DAY==5 && TIME>=16.0 @SCLOSE
SAÍDA VENDA [01]: SPROFIT > 5 @SCLOSE SAÍDA VENDA [02]: SPROFITPOS > 50 @SCLOSE+ SAÍDA VENDA [03]: SPROFIT < -15 @SCLOSE SAÍDA VENDA [04]: SPROFITALL < -100 @ALL
SAÍDA VENDA [01]: VOLSELL > VOLBUY @SCLOSE-
@SCLOSE- closes only the losing sells.A2SPROFIT>80 @A2SCLOSE
A3.🟣 GROUP 5 — MODIFYING SL, TP, BE and TS (MODIFY)
✏ (TP/SL/BE/TS) BUY/SELL expression [01–10]✏ Expressão de (TP/SL/BE/TS) COMPRA [01..10] and ✏ Expressão de (TP/SL/BE/TS) VENDA [01..10]Available actions:
SetSL[X] = sets the Stop Loss |
SetBE[X] = Breakeven (entry ± X points) |
SetTS[X] = Trailing Stop X points from price |
SetTP[X] = redefines the Take Profit@MODIFY = only on the positions of the entry with the same number, on A1 (the chart's asset) |
@MODIFYALL = on every position of that side (buys or sells) |
@A2MODIFY = applies only to A2's positions |
@A3MODIFY = applies only to A3's positions
BPROFIT>50 @MODIFY -> SetBE
BPROFIT>80 @MODIFY -> SetBE[10]
BPROFIT>100 @MODIFY -> SetTS[50]
BPROFIT>30 @MODIFY -> SetSL[LOW[1]]
BPROFIT>1 @MODIFYALL -> SetTS[50]
@MODIFYALL applies to EVERY open buy at once. It enables trailing on all of them as soon as any profit appears.BPROFIT>50 @MODIFY -> SetBE[10], SetTP[BID+200]
PROTEÇÃO COMPRA [01]: BPROFIT>50 @MODIFY -> SetSL[BPRICE] PROTEÇÃO COMPRA [02]: BPROFIT>100 @MODIFY -> SetSL[BPRICE+20] PROTEÇÃO COMPRA [03]: BPROFIT>200 @MODIFY -> SetSL[BPRICE+50]
BPRICE = the entry price of each buy.NEWSIN[10]==1 && BPROFIT>0 @MODIFY -> SetSL[BPRICE+5]
Sell protection — ✏ (TP/SL/BE/TS) SELL expression
SPROFIT (the sells' current profit), SPRICE (the sells' average entry price) and SLASTSELL (the price of the last sell opened). Those fields are under "SELL PROTECTION SETUP (TP/SL/BE/TS)" in MT5.SPROFIT>50 @MODIFY -> SetBE
SPROFIT>80 @MODIFY -> SetTS[50]
SPROFIT>30 @MODIFY -> SetSL[HIGH[1]]
PROTEÇÃO VENDA [01]: SPROFIT>50 @MODIFY -> SetSL[SPRICE] PROTEÇÃO VENDA [02]: SPROFIT>100 @MODIFY -> SetSL[SPRICE-20] PROTEÇÃO VENDA [03]: SPROFIT>200 @MODIFY -> SetSL[SPRICE-50]
SPRICE = the sells' average entry price. SL-20 locks in 20pts of profit; SL-50 locks in 50pts.SPROFIT>60 @MODIFY -> SetBE[10], SetTP[ASK-300]
Multi-symbol — @A2MODIFY and @A3MODIFY
@A2MODIFY and @A3MODIFY work exactly like @MODIFY, but they act on the secondary (A2) or tertiary (A3) asset's positions. They can go in any (TP/SL/BE/TS) BUY expression or SELL field — the action applies to the target asset's positions, not the current chart's.A2BPROFIT>50 @A2MODIFY -> SetBE
A2BPROFIT>100 @A2MODIFY -> SetTS[60]
A2BPROFIT specifically tracks the profit of the buys open on A2.A3BPROFIT>40 @A3MODIFY -> SetBE[5]
PROTEÇÃO COMPRA [01]: BPROFIT>50 @MODIFY -> SetBE PROTEÇÃO COMPRA [02]: A2BPROFIT>50 @A2MODIFY -> SetBE PROTEÇÃO COMPRA [03]: A3BPROFIT>40 @A3MODIFY -> SetBE[5]
@MODIFY, A2 via @A2MODIFY, A3 via @A3MODIFY. Each fires when its own profit hits the target.A2SPROFIT>80 @A2MODIFY -> SetTS[50]
A2SPROFIT to track the profit of A2's sells and @A2MODIFY so the action applies to those positions.🔵 GROUP 6 — DYNAMIC VOLUME (SetVolume)
used together with @MARKETBVOLO < 0.5) and a global stop (BPROFIT < -1000 @BCLOSE) to protect the account.HIGH[0]>HIGH[1] @MARKET -> SetVolume[0.02]
COMPRA [01]: LOW[0]<LOW[1] @MARKET -> SetVolume[0.01] COMPRA [02]: LOW[0]<LOW[2] @MARKET -> SetVolume[BVOLO*2] COMPRA [03]: LOW[0]<LOW[3] @MARKET -> SetVolume[BVOLO*2] COMPRA [04]: LOW[0]<LOW[4] @MARKET -> SetVolume[BVOLO*2]
BVOLO = the total volume of open buys. Sequence: 0.01 → 0.02 → 0.04 → 0.08. Each new BUY doubles the total.COMPRA [01]: LOW[0]<LOW[1] @MARKET -> SetVolume[0.02] COMPRA [02]: LOW[0]<LOW[2] @MARKET -> SetVolume[BVOLO*1.5] COMPRA [03]: LOW[0]<LOW[3] @MARKET -> SetVolume[BVOLO*1.5]
COMPRA [01]: LOW[0]<LOW[1] @MARKET -> SetVolume[0.01] COMPRA [02]: LOW[0]<LOW[2] && BVOLO<0.5 @MARKET -> SetVolume[BVOLO*2] COMPRA [03]: LOW[0]<LOW[3] && BVOLO<1.0 @MARKET -> SetVolume[BVOLO*2]
# If there are more buys than sells, sell the difference VENDA [01]: VOLBUY>VOLSELL && DIR[0]==-1 @MARKET -> SetVolume[VOLBUY-VOLSELL]
COMPRA [01]: LOW[0]<LOW[1] @MARKET -> SetVolume[0.01] COMPRA [02]: LOW[0]<LOW[2] @MARKET -> SetVolume[BVOLO*2] COMPRA [03]: LOW[0]<LOW[3] @MARKET -> SetVolume[BVOLO*2] SAÍDA COMPRA [01]: BPROFIT>30 @BCLOSE -> ClosePercent[40] SAÍDA COMPRA [02]: BPROFIT>80 @BCLOSE -> ClosePercent[60] SAÍDA COMPRA [03]: BPROFIT>150 @BCLOSE
📊 GROUP 7 — HISTORICAL VARIABLES (D*, W*, L*)
daily and weekly performance analysis# Em EXIT_BUY e EXIT_SELL DPROFIT>500 @ALL
DPROFIT = the day's accumulated profit (closed positions). It closes everything when the target is hit.HIGH[0]>HIGH[1] && DLOSSES<3 @MARKET
DLOSSES = the number of losing trades in the day. It stops entering automatically after 3 consecutive losses.COMPRA [01]: LOW[0]<LOW[1] && DPROFIT<50 @MARKET -> SetVolume[0.01] COMPRA [02]: LOW[0]<LOW[1] && DPROFIT>=50 @MARKET -> SetVolume[0.02]
HIGH[0]>HIGH[1] && WPROFIT>0 @MARKET
WPROFIT = the week's accumulated profit. It opens no new positions while the week is still in the red.COMPRA [01]: HIGH[0]>HIGH[1] && LPROFIT>=0 @MARKET -> SetVolume[0.01] COMPRA [02]: HIGH[0]>HIGH[1] && LPROFIT<0 @MARKET -> SetVolume[0.02]
LPROFIT = the result of the last closed position. If it was a WIN, it keeps 0.01. If it was a LOSS, it doubles to recover.HIGH[0]>HIGH[1] && DTRADES<15 @MARKET
DTRADES = the total trades closed in the day. It prevents overtrading by capping the number of trades.⭐ GROUP 8 — COMPLETE STRATEGIES
in the Web Dashboard (licensed).set files live in the Web Dashboard, exclusive to those with an active licence (a live account). See plans →🔀 GROUP 9 — MULTI-SYMBOL (A2 / A3)
secondary and tertiary assets — v5.8+A2HIGH, A2CLOSE and so on) is set in ✏️ A2 timeframe in EXPRESSIONS (A2HIGH, A2LOW, A2CLOSE, A2OPEN) / ✏️ A3 timeframe in EXPRESSIONS (A3HIGH, A3LOW, A3CLOSE, A3OPEN) (default: D1). Current-price and performance tokens (e.g. A2DPROFIT) are independent of the TF. The EA also exposes aliases S2_* / S3_* for the historical families, current price and positions; for candle series, use the documented tokens A2HIGH[N], A2CLOSE[N], A3HIGH[N] and A3CLOSE[N].A2/A3 confirmations supported in expressions
A2TVOL[N] and A2RVOL[N] (and A3TVOL[N] / A3RVOL[N]) read the candle volume of the secondary/tertiary asset, on the same timeframe as its candles, also inside math, since robot 5.7.215. The candle direction (DIR[N]) is still only for the main asset.HIGH[0]>HIGH[1] && A2CLOSE[0]>A2CLOSE[1] @MARKET
HIGH[0]>HIGH[1] && A2DPROFIT>0 && A2DLOSSES<3 @MARKET
LOW[0]<LOW[1] && A2CLOSE[0]<A2CLOSE[1] && A2SPREAD<30 @MARKET
A2BPROFIT>80 && A2BUYCOUNT>0 @A2BCLOSE
TVOL[0]>TVOL[1] && HIGH[0]>HIGH[1] && A2CLOSE[0]>A2CLOSE[1] && A3CLOSE[0]>A3CLOSE[1] @MARKET
TVOL filters activity on A1 only; A2 and A3 confirm through their candles' closes.A3SPROFIT>80 && A3SELLCOUNT>0 @A3SCLOSE
Performance and management via A2
HIGH[0]>HIGH[1] && A2DPROFIT>0 @MARKET
A2DPROFIT = A2's accumulated profit for the day. Useful when A2 is a reference index (e.g. WIN) and A1 is a correlated asset.HIGH[0]>HIGH[1] && A2BUYCOUNT<3 @MARKET
A2BUYCOUNT = the number of open buys on A2. It caps total exposure when A1 and A2 share margin.VENDA [03]: VOLBUY>0 @A2MARKET -> SetVolume[VOLBUY]
VOLBUY). An automatic directional hedge.HIGH[0]>HIGH[1] && A2WPROFIT>-100 @MARKET
A2WPROFIT = A2's accumulated weekly profit. It filters A1 entries based on the correlated asset's weekly performance.SAÍDA COMPRA [02]: A2BPROFIT>80 @A2BCLOSE SAÍDA COMPRA [03]: A2BPROFIT>20 @A2BCLOSE+ SAÍDA VENDA [02]: A2SPROFIT>80 @A2SCLOSE SAÍDA COMPRA [04]: TIME>=17.0 @A2ALL
@A2BCLOSE closes every A2 buy · @A2BCLOSE+ closes only the profitable ones · @A2ALL closes everything on A2. The same tokens exist for A3.COMPRA [05]: HIGH[0]>HIGH[1] && A2POSTIME>30 @MARKET
A2POSTIME = the age in minutes of A2's most recent position. It only enters A1 if A2 has had a position open for at least 30 min.HIGH[0]>HIGH[1] && A2BODY[1]>A2BODY[2]*2 @MARKET -> SetVolume[0.01]
A2BODY[N] = the absolute body of A2's candle N, on the parameter ✏️ A2 timeframe in EXPRESSIONS (A2HIGH, A2LOW, A2CLOSE, A2OPEN). It breaks A1's high and A2's previous candle body doubled — it confirms strength in the reference asset (e.g. WIN with DOL backing it).CLOSE[1]>OPEN[1] && A3RANGE[0]>A3RANGE[1]*1.5 @MARKET -> SetVolume[0.01]
A3RANGE[N] = the range (high−low) of A3's candle N. It enters A1 only when A3 starts moving 50% more than the previous candle — useful for using a VIX/volatility index as a trigger.Complete multi-asset strategies
# A1=WIN, A2=DOL, Timeframe do A2 nas EXPRESSOES = M5
# Buy the index when the dollar pulls back
COMPRA [01]: HIGH[0]>HIGH[1]
&& A2CLOSE[0]<A2CLOSE[1] @MARKET
# Sell the index when the dollar rises
VENDA [01]: LOW[0]<LOW[1]
&& A2CLOSE[0]>A2CLOSE[1] @MARKET
SAÍDA COMPRA [01]: BPROFIT>200 @BCLOSE
SAÍDA VENDA [01]: SPROFIT>200 @SCLOSE
SAÍDA COMPRA [02]: A2CLOSE[0]>A2CLOSE[1] @BCLOSE
SAÍDA VENDA [02]: A2CLOSE[0]<A2CLOSE[1] @SCLOSE# A1=XAUUSD, A2=EURUSD, A3=BTCUSD COMPRA [01]: HIGH[0]>HIGH[1] && A2DPROFIT>0 @MARKET COMPRA [02]: A2CLOSE[0]>A2CLOSE[1] && A3BUYCOUNT<2 @A2MARKET -> SetVolume[0.01] COMPRA [03]: DIR[0]==1 && A3CLOSE[0]>A3CLOSE[1] @A3MARKET -> SetVolume[0.001] SAÍDA COMPRA [01]: BPROFIT>150 @BCLOSE SAÍDA COMPRA [02]: A2BPROFIT>80 @A2BCLOSE SAÍDA COMPRA [03]: A3BPROFIT>200 @A3BCLOSE SAÍDA COMPRA [04]: DPROFIT>800 @ALL
🧠 TIMING, RISK AND CAT 10
Buffers 430–448 · A1 confirmed in the EAMQL PRO TRADER [pt].mq5 and can be used in expressions. The risk/tracking variables are A1-only; @CancelPending, @CloseBest and @CloseWorst are special exit commands for the main asset.
⚠️ All three act on ANY order or position of A1, not just the robot's. The ones you opened by hand (in MT5, on your phone, through the ticket) and those of another robot on the same asset count too. This is on purpose: you can open a manual order and let the robot close it — or cancel the pending order — when an event happens (a news item, a time of day, a high spread). If you trade by hand on the same chart and don't want that, don't use these three commands there — or turn on ☑️ Only manage positions the robot opened (not manual ones).
| Group | Variables | Quick use |
|---|---|---|
| Timing | NOVOBAR, BARSEG | Trade once per candle or wait for the bar to mature. |
| Sessions | SESS_ASIA, SESS_LONDRES, SESS_NY | Filter by session without writing times by hand. |
| Spread | SPREADMED, SPREADX | Avoid trading when the spread is above normal for that asset. |
| News | NEWSIMP, NEWSCTY | Tell a generic high-impact news item from one that affects the current pair. |
| A1 risk | RISCO_AB, ALVO_AB, DIST_SL, DIST_TP, RMULT | Manage the position by risk, target and R multiples. |
| Streak/MAE/MFE | SEQWIN, SEQLOSS, POSMIN, POSMAX | Filter win/loss streaks and protect against giving profit back. |
| Execution | SetRiscoPct[X], @CancelPending, @CloseBest, @CloseWorst | Lot by risk % and special exit commands. |
NOVOBAR==1 && CLOSE[1]>OPEN[1] @MARKET -> SetVolume[0.01]
SESS_LONDRES==1 && SPREADX<1.3 && CLOSE[0]>HIGH[1] @MARKET
RMULT>=1 @BCLOSE -> ClosePercent[50] RMULT>=2 @BCLOSE
NEWSIMP==3 && NEWSCTY==1 @CancelPending
NOVOBAR==1 @MARKET -> SetSL[500] SetRiscoPct[1]
PFDIA>2 && BUYCOUNT>=2 @CloseBest SEQLOSS>=2 && BUYCOUNT>=2 @CloseWorst
📊 INTERNAL INDICATORS IN EXPRESSIONS
VWAP · POC · Ichimoku · Fibo · Bollinger · ORB · Value Area · Candle PatternsCLOSE[0]>VWAP, TENKAN>KIJUN, ENGULF1==1. Requirement: enable the matching parameter in the EA: ☑️ Enable VWAP (volume weighted average price), ☑️ Enable POC — the price with the largest traded volume, ☑️ Enable Ichimoku — Japanese trend cloud, ☑️ Enable automatic Fibonacci (finds top and bottom), ☑️ Enable Bollinger, ☑️ AI receives market VOLATILITY reading, ☑️ AI detects COMPRESSION before explosive moves, ☑️ ⬜ Enable Opening Range — uses ORBHIGH and ORBLOW in conditions, ☑️ ⬜ Enable Value Area — uses VAHIGH and VALOW in conditions or ☑️ ⬜ EXPRESSIONS ONLY: numeric vars DOJI, PINBAR, ENGULF.VWAP and Volume Profile
# Buy only above VWAP — the institutional side COMPRA [01]: HIGH[0]>HIGH[1] && CLOSE[0]>VWAP @MARKET # Sell only below VWAP VENDA [01]: LOW[0]<LOW[1] && CLOSE[0]<VWAP @MARKET
NOVOBAR==1 && LOW[1]<=POC && CLOSE[1]>POC @MARKET
NOVOBAR==1 && LOW[1]<=VALOW && CLOSE[1]>VALOW && BID>VWAP @MARKET
Opening Range Breakout (ORB)
# Bullish breakout — price clears the ORB high COMPRA [01]: ASK>ORBHIGH && CLOSE[0]>ORBHIGH @MARKET # Bearish breakout — price breaks the ORB low VENDA [01]: BID<ORBLOW && CLOSE[0]<ORBLOW @MARKET
NOVOBAR==1 && LOW[1]<=ORBHIGH && CLOSE[1]>ORBHIGH @MARKET
Ichimoku and Fibonacci
# Uptrend: Tenkan above Kijun + price above the cloud COMPRA [01]: TENKAN>KIJUN && CLOSE[0]>KUMOTOP && HIGH[0]>HIGH[1] @MARKET # Downtrend: Tenkan below Kijun + price below the cloud VENDA [01]: TENKAN<KIJUN && CLOSE[0]<KUMOBOT && LOW[0]<LOW[1] @MARKET
TENKAN=the conversion line (9 per.); KIJUN=the base line (26 per.); KUMOTOP/KUMOBOT=the cloud's limits. Triple confirmation: the crossover + the cloud position + a candle breakout. It requires enabling ☑️ Enable Ichimoku — Japanese trend cloud.# Green cloud (bullish) + price above + Tenkan > Kijun COMPRA [01]: SENKOUA>SENKOUB && CLOSE[0]>KUMOTOP && TENKAN>KIJUN @MARKET # Red cloud (bearish) + price below + Tenkan < Kijun VENDA [01]: SENKOUA<SENKOUB && CLOSE[0]<KUMOBOT && TENKAN<KIJUN @MARKET
SENKOUA > SENKOUB = a green cloud (bullish kumo, Span A above Span B); SENKOUA < SENKOUB = a red cloud (bearish). The classic triple confirmation: the cloud's colour + price position + the Tenkan/Kijun crossover. It requires enabling ☑️ Enable Ichimoku.NOVOBAR==1 && LOW[1]<=FIBO618 && CLOSE[1]>FIBO618 && DIR[1]==1 @MARKET
FIBO382 and FIBO500. It requires enabling ☑️ Enable automatic Fibonacci (finds top and bottom).Bollinger Bands and the volatility regime
# Touch of the lower band + green candle = bullish reversal COMPRA [01]: LOW[1]<=BBLOWER && DIR[0]==1 @MARKET # Touch of the upper band + red candle = bearish reversal VENDA [01]: HIGH[1]>=BBUPPER && DIR[0]==-1 @MARKET # Exit: price returns to the average (BBMIDDLE) SAÍDA COMPRA [01]: CLOSE[0]>=BBMIDDLE @BCLOSE SAÍDA VENDA [01]: CLOSE[0]<=BBMIDDLE @SCLOSE
BBMIDDLE). Exiting at the mean maximises the move. It requires enabling ☑️ Enable Bollinger.# Waits for the squeeze to release + volatility expanded COMPRA [01]: BBSQZ==-1 && ATRREG==1 && HIGH[0]>HIGH[1] && CLOSE[0]>BBMIDDLE @MARKET
BBSQZ==1=squeeze (accumulation), BBSQZ==-1=expansion. ATRREG==1=expanded volatility, ATRREG==0=normal and ATRREG==2=calm/compressed. It requires enabling ☑️ AI detects COMPRESSION before explosive moves, ☑️ AI receives market VOLATILITY reading and ☑️ Enable Bollinger.Candle patterns — intrabar and confirmed
DOJI, PINBAR, ENGULF read the candle still forming — faster, but the pattern can unwind before it closes. DOJI1, PINBAR1, ENGULF1 read the candle closed [1] — always use it with NOVOBAR==1. It requires enabling ☑️ ⬜ EXPRESSIONS ONLY: numeric vars DOJI, PINBAR, ENGULF.# Intrabar (faster, with no guarantee it closes there) COMPRA [01]: PINBAR==1 && CLOSE[0]>VWAP @MARKET # Confirmed — entry on the next candle (safer) COMPRA [02]: NOVOBAR==1 && PINBAR1==1 @MARKET VENDA [01]: NOVOBAR==1 && PINBAR1==-1 @MARKET
PINBAR1==1=a bullish pin bar (a long lower wick = a support rejection); PINBAR1==-1=a bearish pin bar (a resistance rejection). A strong reversal signal — widely taught by price action traders.# Bullish engulfing — the closed candle engulfed the previous one COMPRA [01]: NOVOBAR==1 && ENGULF1==1 @MARKET # Bearish engulfing — confirmed at the close VENDA [01]: NOVOBAR==1 && ENGULF1==-1 @MARKET # Exit when an engulfing appears in the opposite direction SAÍDA COMPRA [01]: ENGULF1==-1 @BCLOSE SAÍDA VENDA [01]: ENGULF1==1 @SCLOSE
ENGULF1==1=a confirmed bullish one; ENGULF1==-1=a confirmed bearish one. It matches the preset 18-engolfo-confirmado.set.# Confirmed doji + price above VWAP + higher high COMPRA [01]: DOJI1==1 && BID>VWAP && HIGH[0]>HIGH[1] @MARKET
📈 MULTI-TIMEFRAME PRICE ACTION — DAILY, WEEKLY, GAPS, PIVOTS AND PSYCHOLOGICAL LEVELS
DOPEN · DHIGH · WCLOSE · DAYCHG · GAPPCT · PIVOT · ROUND · ROC · FIBHIGH · VWAPUP[N] parameter where it makes sense: for OHLC it is a shift into past days/weeks; for ROUND/DISTROUND/NEARROUND it is the step in the symbol's points; for ROC/FIBHIGH it is the window size.Breaking the day's high and low (DHIGH / DLOW)
COMPRA [01]: ASK>DHIGH && CLOSE[0]>DHIGH @MARKET
DHIGH is always the whole day's high.VENDA [01]: BID<DLOW && CLOSE[0]<DLOW @MARKET
DAYCHG<-0.5 to confirm weakness.COMPRA [01]: NOVOBAR==1 && CLOSE[1]>YHIGH && CLOSE[0]>YHIGH @MARKET
YHIGH = PDH) with two closes above it. A strong setup on shares and indices.VENDA [01]: NOVOBAR==1 && CLOSE[1]<YLOW && CLOSE[0]<YLOW @MARKET
YLOW (PDL) open a short. Use a TP at S1 or S2.COMPRA [01]: NOVOBAR==1 && LOW[1]<=DOPEN && CLOSE[1]>DOPEN && DAYCHG>0 @MARKET
DAYCHG>0), a pullback to the open (DOPEN) plus a rejection = a good entry with the daily trend.SAÍDA COMPRA [01]: ASK>=DHIGH[1] @BCLOSE -> ClosePercent[50]
DHIGH[1]) — a natural resistance level. DHIGH[N] = the high from N days ago.Weekly levels (WOPEN / WHIGH / WLOW / WCLOSE)
COMPRA [01]: NOVOBAR==1 && CLOSE[1]>WHIGH[1] && CLOSE[0]>WHIGH[1] @MARKET
WHIGH[1]) is a highly significant weekly level — used by swing and position traders.VENDA [01]: NOVOBAR==1 && CLOSE[1]<WLOW[1] && CLOSE[0]<WLOW[1] @MARKET
WLOW[1]) signals the weekly bias turning bearish.COMPRA [01]: ASK>WHIGH && BID>VWAP @MARKET
WHIGH) with an intraday trend filter (VWAP). It requires ☑️ Enable VWAP.SAÍDA COMPRA [01]: ASK>=WCLOSE[1] @BCLOSE
The day's percentage change (DAYCHG / YCHG)
COMPRA [01]: DAYCHG>1 && HIGH[0]>HIGH[1] @MARKET
VENDA [01]: DAYCHG<-1 && LOW[0]<LOW[1] @MARKET
CLOSE[0]<VWAP to reinforce it.COMPRA [01]: DAYCHG>0.3 && HIGH[0]>HIGH[1] @MARKET
DAYCHG>0.3 || DAYCHG<-0.3. Useful for WIN, EURUSD and so on.COMPRA [01]: YCHG>2 && DAYCHG>0 && CLOSE[0]>DOPEN @MARKET
YCHG) and today is still positive — a momentum setup between sessions.SAÍDA COMPRA [01]: DAYCHG>=2 @BCLOSE
COMPRA [01]: DAYCHG<-2 && DAYRNGPCT>3 && CLOSE[1]>OPEN[1] && NOVOBAR==1 @MARKET
X% drop from the N-day high, average range and exhaustion (DHIGHN / ADRPCT / ADRUSED / ZCHG)
/variaveis shows live the average range in % (ADRPCT[14]), how much the day has already moved (ADRUSED[14]), the day's change (CHGPCT), where the price sits within the day (DPOS) and the drop in deviations (ZCHG[20]). Use these numbers to pick the X% for the recipes below, or leave X in P1 and optimize it in the tester.COMPRA [01]: NOVOBAR==1 && BID<DHIGHN[20]*0.9 && CLOSE[1]>OPEN[1] @MARKET
DHIGHN[20]), with the previous candle green. For a 5% correction, change 0.9 to 0.95.COMPRA [01]: DAYCHG<-P1 && NOVOBAR==1 && CLOSE[1]>OPEN[1] @MARKET
P1 comes from the F7 window (e.g. 1.5 = a 1.5% drop since the open). In the Strategy Tester, optimize P1 from 0.5 to 3 in steps of 0.25 and see which drop worked best on this asset.COMPRA [01]: (BID-YHIGH)/YHIGH*100<-2 && NOVOBAR==1 @MARKET
BID<YHIGH*0.98.VENDA [01]: ADRUSED[14]>=100 && DPOS>=90 && NOVOBAR==1 && CLOSE[1]<OPEN[1] @MARKET
ADRUSED[14]>=100), the price is in the top 10% of the day's range (DPOS>=90) and the previous candle closed red: the first selling reaction after a stretched day.COMPRA [01]: ZCHG[20]<-2 && NOVOBAR==1 && CLOSE[1]>OPEN[1] @MARKET
COMPRA [01]: DOWNDAYS>=3 && CHGPCT>0 @MARKET
COMPRA [01]: ADRPCT[14]>1.5 && HIGH[0]>HIGH[1] @MARKET
SAÍDA COMPRA [01]: ADRUSED[14]>=120 @BCLOSE -> ClosePercent[50]
COMPRA [01]: NOVOBAR==1 && CLOSE[1]>DHIGHN[20] @MARKET
Gap & Go / Gap Fill (GAPABS / GAPPCT / GAPATR / GAPATRW)
COMPRA [01]: GAPPCT>0.5 && ASK>DHIGH @MARKET
VENDA [01]: GAPPCT<-0.5 && BID<DLOW @MARKET
COMPRA [01]: GAPPCT<-0.3 && CLOSE[1]>OPEN[1] && NOVOBAR==1 @MARKET SAÍDA COMPRA [01]: ASK>=YCLOSE @BCLOSE
YCLOSE (yesterday's close). A setup widely used on the mini index.VENDA [01]: GAPPCT>0.3 && CLOSE[1]<OPEN[1] && NOVOBAR==1 @MARKET SAÍDA VENDA [01]: BID<=YCLOSE @SCLOSE
YCLOSE = catching the gap fill.COMPRA [01]: GAPATR>1.5 && HIGH[0]>HIGH[1] @MARKET
GAPATR measures the gap in multiples of ATR(SMA,14 D1) — identical to MT5's native iATR . It filters automatically for the asset's volatility. GAPATR>1.5 = a gap that matters on any symbol.COMPRA [01]: GAPATRW>1.5 && HIGH[0]>HIGH[1] @MARKET
GAPATRW uses the Wilder ATR (SMMA, 14 D1 periods) — a slower smoothing than the SMA, behaving exactly like the ATR Wilder described in New Concepts in Technical Trading Systems. In very volatile markets (BTC, stressed indices), GAPATRW tends to come out slightly lower than GAPATR.COMPRA [01]: GAPPCT<0.1 && GAPPCT>-0.1 && ASK>DHIGH @MARKET
Classic Pivot Points (PIVOT / R1-R3 / S1-S3)
COMPRA [01]: BID>PIVOT && HIGH[0]>HIGH[1] @MARKET
PP) — the day's bullish bias confirmed.VENDA [01]: BID<PIVOT && LOW[0]<LOW[1] @MARKET
COMPRA [01]: NOVOBAR==1 && LOW[1]<=S1 && CLOSE[1]>S1 @MARKET
PIVOT or R1.VENDA [01]: NOVOBAR==1 && HIGH[1]>=R1 && CLOSE[1]<R1 @MARKET
R2 or R3.SAÍDA COMPRA [01]: ASK>=R1 @BCLOSE -> ClosePercent[33] SAÍDA COMPRA [02]: ASK>=R2 @BCLOSE -> ClosePercent[50] SAÍDA COMPRA [03]: ASK>=R3 @BCLOSE
COMPRA [01]: BID<=S3 && DAYCHG<-2 && CLOSE[1]>OPEN[1] && NOVOBAR==1 @MARKET
Cross-asset Round Numbers (ROUND / DISTROUND / NEARROUND)
N: N is always in the symbol's points. See the table below for per-asset presets. To find your asset's point: in MT5, open "Symbols" → "Specification" → look at "Tick size" and "Digits".SetSL[]. This family is the only one in the robot that works on the symbol's raw decimal place (the point in MT5), and that is deliberate: a round number is a figure on the chart — $2.000, $2.010 —, so the step has to follow the price's decimals, not the trader's distance ruler.In practice, on gold:
ROUND[100] = US$ 1 (here each unit is worth $0.01), while SetSL[100] = US$ 100 (there each point is worth $1). The same number, two features, a hundredfold difference — and both are correct. If the arithmetic does not add up in your head, this is almost always why.It applies to
ROUND, DISTROUND and NEARROUND. Everything else in the robot — SL, TP, breakeven, trailing, pendings, time stop — uses the trader's ruler described in What "1 point" means in each market.| Asset | Small step | Medium step | Large step (a figure) | Note |
|---|---|---|---|---|
| WIN (B3 mini index) | ROUND[100] (100 pts) | ROUND[500] (500 pts) | ROUND[1000] (a thousand — a figure) | Tick = 5 pts |
| WDO (B3 mini dollar) | ROUND[500] (R$ 0.50) | ROUND[5000] (R$ 5) | ROUND[10000] (R$ 10) | Tick = 0.5 = 500 points (the mini dollar has 3 decimal places) |
| EURUSD / GBPUSD | ROUND[100] (10 pips) | ROUND[500] (50 pips) | ROUND[1000] (100 pips = a figure) | 5 digits: 1 pip = 10 pts |
| USDJPY | ROUND[100] (0,10 ¥) | ROUND[500] (0,50 ¥) | ROUND[1000] (1 ¥ = a figure) | 3 digits |
| XAUUSD (gold) | ROUND[100] ($1) | ROUND[500] ($5) | ROUND[1000] ($10) | 2 digits ⇒ each unit = $0.01 (≠ the SetSL[], see the warning above) |
| BTCUSD (Bitcoin) | ROUND[10000] ($100) | ROUND[50000] ($500) | ROUND[100000] ($1000) | 2 digits: adjust it if your broker uses a different tick |
| PETR4 / VALE3 (shares) | ROUND[10] (R$ 0.10) | ROUND[50] (R$ 0.50) | ROUND[100] (R$ 1) | Tick = 0.01 |
# WIN — broke a round number (multiple of 1000 pts) COMPRA [01]: NOVOBAR==1 && CLOSE[1]>ROUND[1000] && CLOSE[0]>ROUND[1000] @MARKET
COMPRA [01]: HIGH[0]>HIGH[1] && DISTROUND[100]>25 @MARKET
VENDA [01]: NEARROUND[1000]==1 && DIR[1]==-1 @MARKET
SAÍDA COMPRA [01]: ASK>=ROUND[500]+500 @BCLOSE -> ClosePercent[50]
# EURUSD — entry/exit on round numbers (100 pips) VENDA [01]: NEARROUND[1000]==1 && DIR[1]==-1 && CLOSE[0]<VWAP @MARKET
ROUND[1000] = a figure (1.0900, 1.1000...). It combines the figure's rejection with the intraday VWAP.# XAU — entry when it breaks $10 COMPRA [01]: NOVOBAR==1 && CLOSE[1]>ROUND[1000] && CLOSE[0]>ROUND[1000] @MARKET
ROUND each unit = $0.01, so ROUND[1000] = multiples of $10 ($2000, $2010, $2020...). Levels highly respected on XAU. (Do not confuse it with SetSL[1000], which on gold would be US$ 1,000 — see the warning at the top of this group.)Accumulated momentum (ROC[N])
COMPRA [01]: ROC[5]>3 && HIGH[0]>HIGH[1] @MARKET
VENDA [01]: ROC[10]<-5 && LOW[0]<LOW[1] @MARKET
COMPRA [01]: ROC[5]>0 && DAYCHG>0 && CLOSE[0]>DOPEN @MARKET
ROC[5]>0), the day (DAYCHG>0) and the current bar. A very low drawdown setup.VENDA [01]: ROC[20]>15 && CLOSE[1]<OPEN[1] && NOVOBAR==1 @MARKET
Rolling windows (FIBHIGH / FIBLOW)
COMPRA [01]: ASK>=FIBHIGH[50] @MARKET
VENDA [01]: BID<=FIBLOW[20] @MARKET
SAÍDA COMPRA [01]: BID<=FIBLOW[10] @BCLOSE
COMPRA [01]: (FIBHIGH[20]-FIBLOW[20])<DAYRNG*0.3 && HIGH[0]>FIBHIGH[20] @MARKET
VWAP statistical bands (VWAPUP1 / VWAPDN1 / VWAPUP2 / VWAPDN2)
COMPRA [01]: LOW[1]<=VWAPDN1 && CLOSE[1]>VWAPDN1 && NOVOBAR==1 @MARKET
VENDA [01]: HIGH[1]>=VWAPUP2 && CLOSE[1]<VWAPUP2 && NOVOBAR==1 @MARKET
SAÍDA COMPRA [01]: ASK>=VWAP @BCLOSE SAÍDA VENDA [01]: BID<=VWAP @SCLOSE
COMPRA [01]: CLOSE[1]>VWAPUP1 && CLOSE[0]>VWAPUP1 && DAYCHG>0.5 @MARKET
COMPRA [01]: BID>VWAPDN1 && BID<VWAPUP1 && HIGH[0]>HIGH[1] && CLOSE[0]>VWAP @MARKET
Anchored VWAP — Daily / Weekly / Monthly (VWAPD / VWAPW / VWAPM)
Unlike the VWAP (rolling, which uses a number of candles), the VWAPD/VWAPW/VWAPM are anchored: they reset on their own at the start of the day, the week and the month — an institutional reference. They do not depend on a period (the inputs AI_VWAP_Period/AI_VWAP_Timeframe only affect the rolling VWAP). The AI also receives the anchored VWAP (price ABOVE/BELOW/TOUCHING) when ☑️ Send ANCHORED VWAP is on.
COMPRA [01]: CLOSE[0]>VWAPD @MARKET
VENDA [01]: CLOSE[0]<VWAPD @MARKET
COMPRA [01]: LOW[0]<=VWAPD && HIGH[0]>=VWAPD @MARKET
COMPRA [01]: CLOSE[0]>VWAPD && VWAPD>VWAPW @MARKET
⏳ PENDING ORDERS IN EXPRESSIONS — @LIMIT and @STOP
Breakout · Pullback · Straddle · Grid · $ notation (money)@ and the the direction (buy/sell) comes from the field (BUY or SELL). On a BUY: @LIMIT sits below price (a pullback) and @STOP sits above (a breakout). On a SELL it is the mirror: @LIMIT above, @STOP below.The unit of
[N]: log under points — the same ruler as SetSL[N], the trader's point. On XAUUSD 1 point = US$ 1.00, so @STOP[20] = US$ 20 of distance. You can also write it directly as a price value with $: on gold @STOP[$20] and @STOP[20] are the same thing (there 1 point is already worth 1 dollar); on assets where 1 point ≠ 1 unit of price — WIN$, EURUSD, shares — the two numbers differ, and $ is the one that speaks in price.💡 If you built expressions before robot 5.7.95/5.7.109, re-read the numbers. In those versions the pendings measured in broker ticks and the same
@STOP[2000] was worth US$ 20 on gold — today it is worth US$ 2,000. The ruler is now a single one across the whole robot.📌 The examples in this group are calibrated for XAUUSD (1 point = US$ 1). On another asset, re-read the number using its own ruler before pasting.
# XAUUSD: buy 5 pts (= US$ 5) ABOVE, when the high breaks COMPRA [01]: HIGH[0]>HIGH[1] @STOP[5] -> SetVolume[0.01] # Sell 5 pts (= US$ 5) BELOW, when the low breaks VENDA [01]: LOW[0]<LOW[1] @STOP[5] -> SetVolume[0.01]
@STOP on a BUY it sits above the current price (it confirms strength before entering); on a SELL it sits below. Useful to avoid entering on a false move — the market has to "prove" the direction first. The number [5] is the distance in points: on gold that is US$ 5, on WIN$ it would be 5 index points. Adjust it to your asset's volatility — too large a distance never fires.# XAUUSD: buy LIMIT 3 pts (= US$ 3) BELOW (waits for the pullback to enter cheaper) COMPRA [01]: CLOSE[0]>CLOSE[1] @LIMIT[3] -> SetVolume[0.01] # Sell LIMIT 3 pts ABOVE (waits for the bounce to sell higher) VENDA [01]: CLOSE[0]<CLOSE[1] @LIMIT[3] -> SetVolume[0.01]
@LIMIT on a BUY it sits below price (it buys the discount); on a SELL it sits above (it sells the bounce). Ideal for markets that respect supports/resistances and pull back. If price never retraces to the level, the order simply does not execute.# XAUUSD: buy STOP 8 pts (= US$ 8) ABOVE and sell STOP 8 pts BELOW COMPRA [01]: NOVOBAR==1 @STOP[8] -> SetVolume[0.01] VENDA [01]: NOVOBAR==1 @STOP[8] -> SetVolume[0.01] # Cancela as pendentes restantes ao fim do dia SAÍDA COMPRA [01]: TIME>17 @CANCELPENDING
@STOP, the buy sits above and the sell below — any breakout fires one side. Use ✏️ Max PENDING ORDERS per direction (in the robot's parameters) to control how many pile up. ⚠️ Always put the cancellation (@CANCELPENDING) in an EXIT field, never in a BUY/SELL field.# XAUUSD: buy LIMIT 12 pts (= US$ 12) BELOW + sell LIMIT 12 pts ABOVE COMPRA [01]: NOVOBAR==1 @LIMIT[12] -> SetVolume[0.01] VENDA [01]: NOVOBAR==1 @LIMIT[12] -> SetVolume[0.01]
@LIMIT, the buy sits below and the sell above. It bets price will stretch to an extreme and reverse — it enters against the exaggeration. It works well in sideways/range markets. Combine it with an hours filter to trade only in the least liquid window.# EURUSD: 30 pips above, written straight as a price COMPRA [01]: HIGH[0]>HIGH[1] @STOP[$0.0030] -> SetVolume[0.01] # PETR4: 50 cents above, written straight in reais COMPRA [02]: HIGH[0]>HIGH[1] @STOP[$0.50] -> SetVolume[100]
$ prefix tells the robot the number is in the asset's price units, and it converts to points on its own. Where it really helps is where 1 point is not worth 1 unit of price — forex (1 point = 1 pip) and shares (1 point = 1 cent): @STOP[$0.50] on PETR4 is more direct than @STOP[50]. On gold, Bitcoin, WIN$ and WDO$ it is redundant — there 1 point is already 1 unit of price, so @STOP[$20] and @STOP[20] land in exactly the same place (verified in the Strategy Tester).# Stacks 1 buy-stop per candle, up to several pending at once # (requires "Maximum PENDING ORDERS per direction" = 0 and Max entries per candle = 1) COMPRA [01]: CLOSE[0]>CLOSE[1] @STOP[1000] -> SetVolume[0.01]
0 (unlimited) or a number (e.g. 5 = up to 5 pendings in the same direction). The per-candle limit (Máx Entradas no Candle) still applies and prevents uncontrolled stacking within the same candle. That is the dedicated control under CONFIG → ROBOT → "Max Pending Orders/dir".# @CANCELPENDING ALWAYS goes in SAÍDA (EXIT), never in buy/sell SAÍDA COMPRA [01]: SPREAD>500 @CANCELPENDING SAÍDA COMPRA [02]: TIME>17 @CANCELPENDING
@CANCELPENDING is a an exit command. If you put it in a BUY/SELL (entry) field, the robot blocks it and warns in the log (it opens no position). The right place is BUY EXIT or SELL EXIT. It cancels every pending order on the asset — useful for clearing the grid when the spread spikes, at the close, or after a news item. Every one of them: including the ones you placed by hand or another robot placed.📊 PHASE D — AVERAGE PRICE, MARGIN, EXPOSURE AND SIGNAL MEMORY
AVGPRICE · MARGINLEVEL · TIMELEFT · SIG* · position counts · ternary · modulo# Closes EVERY buy when price returns to their average price SAÍDA COMPRA [01]: BID>=BUYAVGPRICE @BCLOSE # Same idea for sells (buy back at the average) SAÍDA VENDA [01]: ASK<=SELLAVGPRICE @SCLOSE
BUYAVGPRICE is the weighted average price of every open buy (it weights each one's volume). When you have several entries at different prices, it is impossible to know the "group's break-even" without this variable. Here the robot closes everything as soon as price returns to the average — the break-even exit, a classic in grid/recovery. Use AVGPRICE for the average of buys and and sells together.# Adds by doubling the lot whenever price drops 500 pts # below the average price of the buys already open COMPRA [01]: VOLBUY<0.01 @MARKET -> SetVolume[0.01] COMPRA [02]: BID<BUYAVGPRICE-500 @MARKET -> SetVolume[VOLBUY*2]
BUYAVGPRICE-500 = 500 points below the current average; each addition recalculates the average and pushes the next trigger. SetVolume[VOLBUY*2] doubles the total lot already bought (martingale). ⚠️ Always combine it with a daily loss limit and a volume ceiling — martingale without a lock wipes out an account. The robot warns you in the Safety Panel if it detects doubling without protection.# Opens a buy only if the margin level is above 300% COMPRA [01]: MARGINLEVEL>300 && HIGH[0]>HIGH[1] @MARKET -> SetVolume[0.01] # Closes everything if margin gets dangerously low SAÍDA COMPRA [01]: MARGINLEVEL<150 @BCLOSE SAÍDA VENDA [01]: MARGINLEVEL<150 @SCLOSE
MARGINLEVEL is the the margin level in % (Equity ÷ Used margin × 100). Above 300% = a comfortable account; below 150% = margin-call risk. Here the robot only enters with room to spare and flattens everything if things get tight — essential protection on high-margin assets such as gold. When there are no open positions, MARGINLEVEL returns a very large value (no margin in use).# Pyramids up to 3 positions, and only with enough free margin COMPRA [01]: ALLPOSOPEN<3 && MARGINFREE>500 && CLOSE[0]>CLOSE[1] @MARKET -> SetVolume[0.01]
ALLPOSOPEN counts the total open positions (use BUYPOSOPEN/SELLPOSOPEN to count one side only). MARGINFREE is the free margin in money. Together they cap how many pyramided entries the robot makes and guarantee there is still cash for the next one — it avoids the "not enough money" error and over-exposure. A simple, robust limit for any multi-entry strategy.# If the buy is in profit, secures the exit before the candle closes SAÍDA COMPRA [01]: TIMELEFT<5 && BPROFIT>0 @BCLOSE # Scalp: enters only early in the candle (more than 50s left) COMPRA [01]: TIMELEFT>50 && HIGH[0]>HIGH[1] @MARKET -> SetVolume[0.01]
TIMELEFT = the seconds left until the current candle closes. It enables strategies sensitive to candle time: banking profit just before the close (avoiding holding into the next candle), or entering only at the start of the bar when there is still time for the move to develop. On M1, TIMELEFT runs from 60 to 0; on M5, from 300 to 0.# Buys only if more than 300s passed since the last buy signal COMPRA [01]: TIMELEFT>=0 && SIGTIMEBUY==0 && HIGH[0]>HIGH[1] @MARKET -> SetVolume[0.01] # Reverses only if the last signal was a sell (avoids a false bounce) COMPRA [02]: SIGLAST==1 && CLOSE[0]>CLOSE[1] @MARKET -> SetVolume[0.01]
SIG* are the robot's signal memory . SIGLAST = the direction of the last signal fired (0=buy, 1=sell, -1=none); SIGTIMEBUY/SIGTIMESELL = the time of the last signal on each side; SIGPRICE = the price of the last signal. They exist so you do not repeat the same entry back to back, so you can require alternating directions, or so you only re-enter once price has moved away from the last signal. They reset every day.# At most 5 entries per day (overtrading discipline) COMPRA [01]: SIGTOTAL<5 && HIGH[0]>HIGH[1] @MARKET -> SetVolume[0.01] VENDA [01]: SIGTOTAL<5 && LOW[0]<LOW[1] @MARKET -> SetVolume[0.01]
SIGTOTAL counts how many entry signals the robot fired in the day (buys + sells). SIGBUY and SIGSELL count each side separately. An excellent anti-overtrading lock: it caps the number of daily trades regardless of what the conditions say. Automated discipline — one of the most common causes of loss is trading too much on a bad day.? :# Risks more (0.02) with loose margin, less (0.01) if tight COMPRA [01]: HIGH[0]>HIGH[1] @MARKET -> SetVolume[MARGINLEVEL>500 ? 0.02 : 0.01] # Doubles the lot only when price is already below the average (recovery) COMPRA [02]: CLOSE[0]>CLOSE[1] @MARKET -> SetVolume[BID<AVGPRICE ? 0.02 : 0.01]
CONDIÇÃO ? A : B operator picks the value A if the condition is true, otherwise B. Here it sets the volume adaptively inside SetVolume[]. The evaluator understands prices (ASK/BID), Phase C and Phase D variables, and numbers. It pairs perfectly with AVGPRICE and MARGINLEVEL to size risk according to context.%# Buys only when the closed price is a multiple of 10 (round numbers) COMPRA [01]: CLOSE[0]%10==0 && HIGH[0]>HIGH[1] @MARKET -> SetVolume[0.01]
% returns the remainder of a division — CLOSE[0]%10==0 is true when price is an exact multiple of 10. Useful for cyclical logic and round levels (where liquidity tends to sit). It has the same precedence as multiplication/division and works with price action and values. For more robust cross-asset round numbers, see also ROUND/NEARROUND in Phase C.# Closes everything and does not re-enter after -$100 of losses on the day SAÍDA COMPRA [01]: LOSSPROFIT<=-100 @BCLOSE SAÍDA VENDA [01]: LOSSPROFIT<=-100 @SCLOSE # Blocks new buys after already making $200 on the day COMPRA [01]: GAINPROFIT<200 && HIGH[0]>HIGH[1] @MARKET -> SetVolume[0.01]
GAINPROFIT adds up only the winning trades of the day; LOSSPROFIT adds up only the losers (a negative value). Separating gains from losses allows finer locks than net profit does: stopping after a certain amount of losses has piled up (even if the net is still positive), or easing off once a decent target has already been captured. It complements the percentage Daily Lock in the settings.📊 MARKET STRUCTURE & FLOW — Dow + Wyckoff (Phase F)
Impulse vs Correction · Legs · Volume · Effort/Result · Smart Money# BUY when the up impulse is larger and carries more volume than the previous pullback COMPRA [01]: LEGDIR==1 && LEGRATIO>1.2 && LEGVOLRATIO>1 @MARKET -> SetVolume[0.01]
LEGRATIO = the current leg ÷ the previous leg. Above 1 = the impulse is larger than the correction — the market still has directional strength. LEGVOLRATIO>1 confirms volume followed the move: there is no hidden exhaustion. It is Dow's 5th Principle measured numerically: impulses larger than corrections in a healthy trend. LEGDIR==1 filters so you only enter on the up leg.# A small down leg (pullback) in ATR = the market is not willing to correct # Enters only at the start of the next up leg (LEGDIR has just flipped) COMPRA [01]: LEGDIR==1 && PLEGATR<0.6 && PLEGVOLSetVolume[0.01]
PLEGATR = the previous correction's range in multiples of ATR. Below 0.6 = a shallow correction (less than 60% of the ATR) — smart money did not let price fall. PLEGVOL<LEGVOL confirms the correction had less volume than the impulse before it. Together they signal a weak pullback: an uptrend with little selling pressure — a classic in Wyckoff continuation setups.# The current pullback is larger than the previous impulse — buying strength is fading VENDA [01]: LEGDIR==-1 && LEGRATIO>1.3 && LEGVOLRATIO>1.2 @MARKET -> SetVolume[0.01] # Exit if the impulse renews SAÍDA VENDA [01]: LEGRATIO<0.8 @SCLOSE
LEGDIR==-1 = a down leg in progress; LEGRATIO>1.3 = that down leg is 30% larger than the previous up impulse. When the correction exceeds the impulse in range and volume, the uptrend's structure has broken — distribution is under way. Do not wait for the break of the low: the structural deterioration is already visible in the legs.# Leaves the buy if the current up leg is smaller than the previous one (contraction) SAÍDA COMPRA [01]: LEGDIR==1 && LEGRATIO<0.7 @BCLOSE # Saída parcial mais cedo (perna ainda pequena em ATR) SAÍDA COMPRA [02]: LEGATR<0.5 && BPROFIT>30 @BCLOSE -> ClosePercent[50]
LEGRATIO<0.7) — an early sign of exhaustion, before price reverses. The second exit banks 50% of the profit when the current leg is very small in volatility (LEGATR<0.5) — not enough momentum to continue. It pairs well with an SL at SWLOW (available in Wave F2).# Buys only if the current up leg has more volume than the previous down leg # And if the move is fast — tune the threshold per asset and TF # XAUUSD M1: LEGSPEED tipico 1-3 | XAUUSD M5: tipico 5-20 | BTC M5: tipico 50-200 COMPRA [01]: LEGDIR==1 && LEGVOL>PLEGVOL*1.3 && LEGSPEED>10 @MARKET -> SetVolume[0.01]
LEGVOL>PLEGVOL*1.3 = the current impulse has 30% more volume than the previous correction — aggressive buyers in control. LEGSPEED = price displacement per candle (in the asset's own price unit): on XAUUSD M5 a typical value is 5–20 (=$5–$20/candle), on BTC M5 it is 50–200, on EURUSD M5 it is 0.0002–0.001. Calibrate the threshold with a few Shift+F to see the real values on your asset/TF. Adjust it to the TF configured in Phase F.# After a down leg SMALLER than the previous impulse (a healthy pullback), # enters when the new up leg begins COMPRA [01]: LEGDIR==1 && PLEGATR<0.8 && LEGRATIO>0.9 && LEGATR>0.3 @MARKET -> SetVolume[MARGINLEVEL>300 ? 0.02 : 0.01]
PLEGATR<0.8) followed by a new impulse that has already gained traction (LEGATR>0.3 and LEGRATIO>0.9 = almost as large as the correction). It uses ternary to double the lot when margin is comfortable (MARGINLEVEL>300) — Phase D + Phase F integration. Combine it with BID>VWAP (Phase C) to filter the intraday bias.# Buys only when market structure confirms an uptrend # And price has just broken the last swing high (bullish BOS) COMPRA [01]: STRUCT==1 && BOS==1 && LEGDIR==1 @MARKET -> SetVolume[0.01] # Exit when structure turns bearish SAÍDA COMPRA [01]: STRUCT==-1 @BCLOSE
STRUCT==1 = the market making HH + HL (a confirmed Dow uptrend); BOS==1 = the current close above the last confirmed swing high. Combined, they make sure you enter on a genuinely strong move, not on the noise of a consolidation. It works best on H1+ (set FaseF_Timeframe=PERIOD_H1). It exits when the structure flips.# Wyckoff pattern: price broke below SWLOW (bearish BOS) # but macro structure is still bullish (STRUCT==1) — it is a spring # When price recovers (LEGDIR flips to +1), it enters COMPRA [01]: BOS==-1 && STRUCT==1 && LEGDIR==1 && LEGATR>0.5 @MARKET -> SetVolume[0.01]
BOS==-1 records that bearish break. But the macro context is still an uptrend (STRUCT==1). When price recovers and the current leg turns bullish (LEGDIR==1), that is the SOS (Sign of Strength). The break was false; the stops were hunted; the buyers came back.# Absorption candle near support (SWLOW): smart money buying # High volume + small body + close to the swing low COMPRA [01]: ABSORP==1 && ASK < SWLOW*1.002 && STRUCT==1 @MARKET -> SetVolume[0.01]
ABSORP==1 = volume ≥ 1.8× the average and the candle's body ≤ 35% of the range (price tried to fall but was absorbed). ASK < SWLOW*1.002 = we are touching or slightly above the swing support. STRUCT==1 = a bullish macro structure. Together: absorption at support inside an uptrend = quiet institutional accumulation. Adjust FaseF_AbsorpVolX and FaseF_AbsorpBodyPct to calibrate the sensitivity.# Selling climax: extreme volume + close at the low + bearish structure # Depois de um climax, o mercado costuma reverter (selling exhaustion) COMPRA [01]: CLIMAX==-1 && LEGDIR==-1 && EFFRES<0.5 @MARKET -> SetVolume[0.01] # Confirms: enters only if EFFRES is low (price does not move despite the volume) # EFFRES<0.5 = a very inefficient leg = volume absorbed with no result
CLIMAX==-1 = volume ≥ 2.5× the average with the close at the bottom of the range (maximum selling pressure). EFFRES<0.5 = the down leg is being inefficient — a lot of volume for little displacement (selling absorption). The two combined are a classic Wyckoff Selling Climax signal: the market has "run out of sellers". Use STRUCT and confirmation from LEGDIR on the next bar to filter false signals.# Trades only when the leg's volume is above average (VOLX > 1.3) # And the move is efficient (EFFRES > 1): price travelled more than the volume justifies COMPRA [01]: LEGDIR==1 && VOLX>1.3 && EFFRES>1.0 && STRUCT==1 @MARKET -> SetVolume[0.01] VENDA [01]: LEGDIR==-1 && VOLX>1.3 && EFFRES>1.0 && STRUCT==-1 @MARKET -> SetVolume[0.01]
VOLX>1.3 = a leg with 30% more volume than the historical average (above-normal participation). EFFRES>1.0 = the result (displacement/ATR) exceeds the effort (normalised volume) — an efficient move, a strong trend. When both are high, you are trading real momentum, not low-volume noise. Combine it with STRUCT to guarantee macro alignment.# After a breakout (long impulse), places a BUY LIMIT to catch the retest # The shallow pullback confirms the breakout was real COMPRA [01]: LEGDIR==-1 && PLEGATR>1.5 && PLEGATR<4 && LEGVOLRATIO<0.8 @LIMIT[$15] -> SetVolume[0.01]
PLEGATR>1.5) was strong enough to be a breakout; now we are in the correction (LEGDIR==-1) on low volume (LEGVOLRATIO<0.8) — this is the retest. The LIMIT order sits $15 below price, waiting for it to pull back there. PLEGATR<4 filters out excessively fast (parabolic) breakouts that tend to retrace too far. On XAUUSD @LIMIT[$15] = a $15 pullback.🏆 CLASSIC SETUPS — READY-MADE STRATEGIES IN EXPRESSIONS
Setup 9.1 · MME Cross · Inside Bar · 3 Soldiers · Storme's 1-2-3Setup 9.1 — a candle closing on the 9-period average (MME9)
IND1[0,0]=the EMA9's value on the current candle; IND1[0,1]=the previous candle.# IND1 = EMA(9), buffer=0 # Buy: the previous candle closed above EMA9 (cross from below) COMPRA [01]: NOVOBAR==1 && CLOSE[1]>IND1[0,1] && CLOSE[2]<IND1[0,2] @MARKET # Sell: the previous candle closed below EMA9 VENDA [01]: NOVOBAR==1 && CLOSE[1]<IND1[0,1] && CLOSE[2]>IND1[0,2] @MARKET
# IND1 = EMA(9), buffer=0 # Buy: the current candle closing above EMA9 COMPRA [01]: CLOSE[0]>IND1[0,0] && CLOSE[1]<IND1[0,1] @MARKET # Sell: the current candle closing below EMA9 VENDA [01]: CLOSE[0]<IND1[0,0] && CLOSE[1]>IND1[0,1] @MARKET
SPREADX<1.5 and high-volume hours.Moving average crossover — MME9 × MME21
# IND1 = EMA(9) buffer=0 | IND2 = EMA(21) buffer=0 # Golden cross: EMA9 crossed ABOVE EMA21 COMPRA [01]: NOVOBAR==1 && IND1[0,1]>IND2[0,1] && IND1[0,2]<=IND2[0,2] @MARKET # Death cross: EMA9 crossed BELOW EMA21 VENDA [01]: NOVOBAR==1 && IND1[0,1]<IND2[0,1] && IND1[0,2]>=IND2[0,2] @MARKET # Exit: the reverse cross SAÍDA COMPRA [01]: IND1[0,0]<IND2[0,0] @BCLOSE SAÍDA VENDA [01]: IND1[0,0]>IND2[0,0] @SCLOSE
Inside Bar — breaking a contraction
# Detects an Inside Bar (candle [1] inside the range of [2]) # Buys when the current candle breaks the IB high COMPRA [01]: HIGH[1]<HIGH[2] && LOW[1]>LOW[2] && HIGH[0]>HIGH[1] @MARKET # Sells when the current candle breaks the IB low VENDA [01]: HIGH[1]<HIGH[2] && LOW[1]>LOW[2] && LOW[0]<LOW[1] @MARKET
# Detects the IB and places a BuyStop at the high — automatic entry on the breakout COMPRA [01]: NOVOBAR==1 && HIGH[1]<HIGH[2] && LOW[1]>LOW[2] @HIGH[1] -> SetVolume[0.01]
SetVolume is mandatory on pending orders.Three Soldiers / Three Crows and Storme's 1-2-3
# Three consecutive up candles with higher highs COMPRA [01]: NOVOBAR==1 && DIR[1]==1 && DIR[2]==1 && DIR[3]==1 && HIGH[1]>HIGH[2] && HIGH[2]>HIGH[3] @MARKET # Three consecutive down candles with lower lows VENDA [01]: NOVOBAR==1 && DIR[1]==-1 && DIR[2]==-1 && DIR[3]==-1 && LOW[1]<LOW[2] && LOW[2]<LOW[3] @MARKET
# 1-2-3 BUY: two lows where the second is higher (P3 > P1) # Trigger: a break of the point 2 high (P2) COMPRA [01]: LOW[1]>LOW[3] && DIR[3]==-1 && DIR[1]==-1 && HIGH[0]>HIGH[2] @MARKET # 1-2-3 SELL: two highs where the second is lower (P3 < P1) VENDA [01]: HIGH[1]<HIGH[3] && DIR[3]==1 && DIR[1]==1 && LOW[0]<LOW[2] @MARKET
🎯 GROUP 10 — BUY AND SELL FILTERS (FBUY / FSELL)
✏ Any expression fieldFBUY[N] and FSELL[N] let you use the condition of a BUY/SELL Filter N inside any expression using &&. It returns true if the filter passes, false if it blocks.Why use it: When the filter is ticked in the panel (☑️), it blocks all the entries on that side at once. With
FBUY[N] you apply the condition only to the expression you want — each BUY can have its own independent filter.
A different filter per entry
# BUY Filter 1: TIME>=9.0 && TIME<=12.0 COMPRA [01]: HIGH[0]>HIGH[1] && FBUY[1] @MARKET COMPRA [02]: HIGH[0]>HIGH[2] @MARKET
# SELL Filter 1: SPREAD<20 && NEWSIN[30]==0 VENDA [01]: LOW[0]<LOW[1] && FSELL[1] @MARKET VENDA [02]: DIR[0]==-1 && DIR[1]==-1 @MARKET
# BUY Filter 1: TIME>=9.0 && TIME<=12.0 # BUY Filter 2: TIME>=14.0 && TIME<=17.0 && SPREAD<15 COMPRA [01]: IND1[0,0]<30 && FBUY[1] @MARKET COMPRA [02]: IND1[0,0]<25 && FBUY[2] @MARKET
# BUY Filter 1: DAY>=1 && DAY<=4 && SPREAD<20 # SELL Filter 1: DAY>=1 && DAY<=5 && SPREAD<25 COMPRA [01]: HIGH[0]>HIGH[1] && FBUY[1] @MARKET VENDA [01]: LOW[0]<LOW[1] && FSELL[1] @MARKET
Comparing: the panel filter vs FBUY[N] in the expression
# BUY Filter 1 ENABLED on the panel (☑️): # TIME>=9.0 && TIME<=12.0 # → BUY1, BUY2, BUY3... ALL blocked outside 9am–12pm
# BUY Filter 1: TIME>=9.0 && TIME<=12.0 # BUY Filter 2: TIME>=14.0 && TIME<=18.0 COMPRA [01]: HIGH[0]>HIGH[1] && FBUY[1] @MARKET COMPRA [02]: HIGH[0]>HIGH[2] && FBUY[2] @MARKET COMPRA [03]: DIR[0]==1 @MARKET ← sem filtro de horário
FBUY[N]/FSELL[N] in an expression — the token evaluates the filter field's condition directly. You only need to write the condition in the matching ✏️ BUY/SELL Filter expression [N] field.🤖 GROUP 11 — AI EXPRESSIONS
entry and exit after a Gemini analysisIA_VALIDA==1 to avoid an expired or already consumed cache.A1 entries using the AI's decision
ANALISA_IA==1 && IA_VALIDA==1 && IA_CONFIANCA>=70 && IA_PROB_ALTA>=60 @MARKET -> SetVolume[0.01]
ANALISA_IA==-1 && IA_VALIDA==1 && IA_CONFIANCA>=70 && IA_PROB_BAIXA>=60 @MARKET -> SetVolume[0.01]
HIGH[0]>HIGH[1] && ANALISA_IA==1 && IA_VALIDA==1 && IA_CONFIANCA>=75 && IA_FORCA_TENDENCIA>=60 @MARKET
A1 exits on the AI's suggestion
SAÍDA COMPRA [01]: IA_VALIDA==1 && IA_FECHAR_BUY==1 @BCLOSE SAÍDA COMPRA [02]: IA_VALIDA==1 && IA_REVERSAO==1 && ANALISA_IA==-1 @BCLOSE
SAÍDA VENDA [01]: IA_VALIDA==1 && IA_FECHAR_SELL==1 @SCLOSE SAÍDA VENDA [02]: IA_VALIDA==1 && IA_REVERSAO==1 && ANALISA_IA==1 @SCLOSE
Multi-asset A2/A3 with the AI
COMPRA [01]: A2ANALISA_IA==1 && A2IA_VALIDA==1 && A2IA_CONFIANCA>=70 @A2MARKET -> SetVolume[0.01] VENDA [01]: A3ANALISA_IA==-1 && A3IA_VALIDA==1 && A3IA_CONFIANCA>=70 @A3MARKET -> SetVolume[0.01]
@A2MARKET; A3 uses @A3MARKET. It requires A2/A3 configured and allowed.SAÍDA COMPRA [01]: A2IA_VALIDA==1 && A2IA_FECHAR_BUY==1 @A2BCLOSE SAÍDA VENDA [01]: A3IA_VALIDA==1 && A3IA_FECHAR_SELL==1 @A3SCLOSE
A2IA_* with @BCLOSE if what you mean is to close A2.📖 QUICK REFERENCE — MAIN VARIABLES
| Variable | What it is | Example of use |
|---|---|---|
HIGH[N], LOW[N] | The high and low of candle N (0=current, 1=previous) | HIGH[0]>HIGH[1] |
CLOSE[N], OPEN[N] | The close and open of candle N | CLOSE[0]>OPEN[0] (a green candle) |
DIR[N] | The candle's direction: 1=green, -1=red | DIR[0]==1 |
ASK, BID | The current buy and sell price | ASK>LASTBUY+100 |
SPREAD | The difference between ASK and BID in points | SPREAD<20 |
TIME | Decimal time (8.5 = 08:30, 14.75 = 14:45) | TIME>=9.0 && TIME<=17.0 |
DAY | Day of the week: 0=Sun, 1=Mon… 5=Fri, 6=Sat | DAY>=1 && DAY<=5 |
NEWSIN[X] | 1 if there is news in the next X minutes, 0 if not | NEWSIN[30]==0 |
ANALISA_IA | The AI's decision on A1: 1=buy, -1=sell, 0=wait, -99=invalid | ANALISA_IA==1 && IA_VALIDA==1 |
IA_CONFIANCA | The signal's clarity/strength (%) — ≠ the probability of the move (that is IA_PROB_ALTA/IA_PROB_BAIXA) | IA_CONFIANCA>=70 |
IA_FECHAR_BUY, IA_FECHAR_SELL | The AI's suggestion to close open buys or sells | IA_FECHAR_BUY==1 @BCLOSE |
A2ANALISA_IA, A3ANALISA_IA | The AI's decision on the secondary and tertiary assets | A2ANALISA_IA==1 @A2MARKET |
BPROFIT | The current total profit of every open buy (R$) | BPROFIT>100 |
SPROFIT | The current total profit of every open sell (R$) | SPROFIT>100 |
VOLBUY (or BVOLO) | The total volume of open buys, in lots | BVOLO<0.5 |
VOLSELL (or SVOLO) | The total volume of open sells, in lots | VOLSELL>VOLBUY |
BUYCOUNT | The number of open buy positions | BUYCOUNT<3 |
SELLCOUNT | The number of open sell positions | SELLCOUNT==0 |
LASTBUY | The opening price of the last buy | ASK>LASTBUY+50 |
BPRICE | The average entry price of every buy (in the MODIFY: the price of each buy) | SetSL[BPRICE] |
DPROFIT | The day's profit (closed positions, accumulated) | DPROFIT>500 |
DLOSSES | The number of losing trades today | DLOSSES<3 |
DTRADES | The total trades closed today | DTRADES<20 |
LPROFIT | The profit/loss of the last closed trade | LPROFIT>=0 (the last one was a WIN) |
WPROFIT | The week's accumulated profit | WPROFIT>0 |
TVOL[N] | Ticks of candle N (0=current, 1=previous). Always available on any asset/broker — use it as an activity and pressure indicator. It supports arithmetic: TVOL[0]>TVOL[1]*1.3 = volume 30% above the previous one | TVOL[0]>TVOL[1] |
RVOL[N] | The real volume (contracts) of candle N. It depends on the broker: available at B3 brokers with a full feed (XP, Clear, BTG, Rico and so on); it returns 0 on OTC Forex. Check before using it: add RVOL[0]>0 as a helper condition — if it never fires, the feed is not available. Prefer TVOL if in doubt | RVOL[0]>RVOL[1] |
BODY[N] | The absolute body of candle N: |CLOSE[N] − OPEN[N]|. It measures directional strength (a big body = strong pressure). It supports arithmetic: BODY[1]>BODY[2]*2 = the previous candle's body is 2× that of 2 candles ago | BODY[1]>BODY[2]*1.5 |
RANGE[N] | The total range of candle N: HIGH[N] − LOW[N]. It measures volatility (wicks included). Use it to spot expansive candles. It supports arithmetic: RANGE[1]>RANGE[2]*1.5 = the previous candle is 50% more volatile than the one before it | RANGE[0]>RANGE[1]*1.3 |
A2DVOLUME, A3DVOLUME | The day's accumulated closed volume on assets A2/A3; it is not per-candle volume | A2DVOLUME>0 |
IND1[B,N] | Indicator 1's value on buffer B, candle N | IND1[0,0]<30 |
A2HIGH[N], A2LOW[N] | Asset A2's high/low on candle N | A2CLOSE[0]>A2CLOSE[1] |
A2OPEN[N], A2CLOSE[N] | Asset A2's open/close on candle N — the TF is set in ✏️ A2 timeframe in EXPRESSIONS (A2HIGH, A2LOW, A2CLOSE, A2OPEN) (default D1) | A2CLOSE[0]>A2OPEN[0] |
A2BODY[N], A3BODY[N] | The absolute body of candle N on asset A2/A3, using ✏️ A2 timeframe in EXPRESSIONS (A2HIGH, A2LOW, A2CLOSE, A2OPEN) and ✏️ A3 timeframe in EXPRESSIONS (A3HIGH, A3LOW, A3CLOSE, A3OPEN). The same logic as BODY[N], but on the secondary/tertiary asset. It supports arithmetic | A2BODY[1]>A2BODY[2]*2 |
A2RANGE[N], A3RANGE[N] | The total range of candle N on asset A2/A3. The same logic as RANGE[N]. Useful for confirming volatility on a reference asset (e.g. VIX, a sector index) | A2RANGE[0]>A2RANGE[1]*1.5 |
A2ASK, A2BID | Asset A2's current Ask/Bid prices | A2ASK>A2CLOSE[1] |
A2SPREAD | Asset A2's current spread in points | A2SPREAD<30 |
A2BPROFIT | The profit of the buys open on A2 | A2BPROFIT>50 @A2BCLOSE |
A2SPROFIT | The profit of the sells open on A2 | A2SPROFIT>50 @A2SCLOSE |
A2PROFITALL | The total open profit on A2 (buys + sells) | A2PROFITALL>100 |
A2VOLBUY, A2VOLSELL | The total volume of buys / sells open on A2 (lots) | A2VOLBUY>0 |
A2BUYCOUNT, A2SELLCOUNT | The number of buy / sell positions open on A2 | A2BUYCOUNT<3 |
A2LASTBUY, A2LASTSELL | The opening price of the last buy / sell on A2 | A2ASK>A2LASTBUY+50 |
A2POSTIME | The age in minutes of the most recent position opened on A2 | A2POSTIME>60 |
A2DPROFIT, A2DLOSS | The day's accumulated profit and loss on A2 | A2DPROFIT>0 |
A2DTRADES, A2DWINS, A2DLOSSES | Total, winning and losing trades on the day on A2 | A2DLOSSES<3 |
A2DWINRATE | The day's win rate on A2 (%) | A2DWINRATE>50 |
A2WPROFIT, A2WLOSS | The week's accumulated profit and loss on A2 | A2WPROFIT>-100 |
A2LPROFIT | The profit/loss of the last trade closed on A2 | A2LPROFIT>=0 |
A3* | The multi-asset families documented above are also exposed for the tertiary asset set in ✏️ Tertiary asset A3 (e.g. GBPUSD, BTCUSD). E.g.: A3DPROFIT, A3BUYCOUNT, A3VOLBUY | A3BUYCOUNT<2 |
CloseIndex[N] | It closes only the position at index N in the terminal's CURRENT list (the Trade tab). ⚠️ The index is NOT fixed by age: when any position closes, the list reindexes — today's "index 1" may be a different position on the next tick. Use it with 1-2 positions, or prefer ClosePercent/profit filters. | BPROFIT>50 @BCLOSE -> CloseIndex[0] |
POSTIME | How long the position has been open, in minutes | POSTIME>60 @BCLOSE |
FBUY[N] | Evaluates the condition of BUY Filter N (1–10) inside any expression. True when the filter passes. | HIGH[0]>HIGH[1] && FBUY[1] @MARKET |
FSELL[N] | Evaluates the condition of SELL Filter N (1–10) inside any expression. True when the filter passes. | LOW[0]<LOW[1] && FSELL[2] @MARKET |
⭐ HALL OF FAME — SETUPS FROM GREAT TRADERS
Classic strategies adapted to the EA's expressionsSetSL[500] represents a distance in points; candle or indicator levels in the SL can only be used in @MODIFY. With NOVOBAR==1, prefer [1] for conditions that require an already closed candle. Expressions marked with 📊 require the matching advanced EA parameters to be enabled, such as VWAP, ORB, Bollinger, ATR or candle patterns.✅ Copyable the expression captures almost all of the setup — you can copy it and trade.
⚠️ Adapted the EA runs an objective version, but the original method has parts (fundamentals, visual reading, context) that depend on you or on the AI.
📚 Management it is a risk/exit concept, not an entry trigger — use it alongside any setup.
NOVOBAR==1 && HIGH[1]>HIGH[2] && HIGH[2]>HIGH[3] && DIR[1]==1 @HIGH[1] -> SetVolume[0.01] SetSL[500]
NOVOBAR==1 && DIR[2]==-1 && DIR[1]==1 && DAY==2 @MARKET -> SetSL[500]
NOVOBAR==1 && BID>IND1[0,1] && SPREADX<1.5 @MARKET -> SetSL[500]
.set files live in the Web Dashboard, exclusive to those with an active licence (a live account). See plans →🔧 TECHNICAL GUIDE TO EXPRESSIONS
Anatomy of an expression
Every expression follows the structure:
CONDIÇÃO @AÇÃO -> COMANDO
| Part | What it defines | Example |
|---|---|---|
CONDIÇÃO | When the rule may fire — tokens compared with ==, >, &&, || | HIGH[0]>HIGH[1] && DIR[1]==1 |
@AÇÃO | The order type: @MARKET, @LIMIT, @STOP, @BCLOSE, @MODIFY, and so on. | @MARKET |
-> COMANDO | Optional actions after the order: volume, SL, TP, filters | SetVolume[0.01], SetSL[50] |
-> COMANDO part is always optional. A minimal valid expression is CONDIÇÃO @AÇÃO.Candle [0] forming vs [1] closed — how NOVOBAR behaves
The EA runs expressions on every tick. NOVOBAR==1 is true only on the first tick of each new bar.
| Token | What it returns on the bar's first tick | Recommendation |
|---|---|---|
CLOSE[0] | The opening price (≈ BID at the moment of the tick) | Use BID to compare against dynamic levels (VWAP, BB, IND) |
DIR[0] | Typically 0 — close[0]≈open[0], with no defined direction | Use DIR[1] to confirm the direction of the previous closed candle |
HIGH[0] / LOW[0] | The same as open[0] — the candle's high/low are not formed yet | Use it as a gap reference only when compared against HIGH[1] and so on. |
HIGH[1], DIR[1], and so on. | The previous candle, fully closed — stable values | Preferred for filters and confirmations with NOVOBAR==1 |
NOVOBAR==1 && DIR[1]==1 && BID>VWAP @MARKET -> SetVolume[0.01]Instead of:
NOVOBAR==1 && DIR[0]==1 && CLOSE[0]>VWAP (DIR[0] almost never fires, and CLOSE[0] is redundant with BID)Math in expressions — any variable, with parentheses
Since robot 5.7.213, both sides of a comparison accept math with any variable in this manual: price, position, account, indicator, the daily and weekly variables and the free numbers. You can use parentheses and the normal order of operations: multiplication and division before addition and subtraction. A single evaluator does all the math, always with the exact value, never rounding along the way.
| You want | Write this |
|---|---|
| Down 2% from yesterday's close | (BID-YCLOSE)/YCLOSE*100<-2 or BID<YCLOSE*0.98 |
| 3% below the day's high | BID<DHIGH*(1-3/100) |
| Price in the bottom third of the day's range | BID<DLOW+(DHIGH-DLOW)/3 |
| Price 1% above the IND5 moving average | CLOSE[0]>IND5[0,0]*1.01 |
| IND1 RSI more than 10 points above its value 5 candles ago | IND1[0,0]-IND1[0,5]>10 |
| Buy profit above 1% of equity | BPROFIT>EQUITY*0.01 |
| Volume 30% above the previous candle | TVOL[0]>TVOL[1]*1.3 |
| Body takes up more than half of the candle | BODY[1]>RANGE[1]*0.5 |
| Math on the A2 asset | A2CLOSE[0]-A2OPEN[0]>0 or A2DAYCHG>1 |
| The threshold comes from the F7 window, to optimize it | DAYCHG<-P1 |
% or $ at the end of a number is ignored: DAYCHG>1.5% is the same as DAYCHG>1.5.CLOSE[0] + 2 > 0 and IND1[0, 0] are fine. But two terms separated only by a space, with no operator between them, are not a calculation: CLOSE[0]>185 000 is refused and the alerts panel shows the fragment ('185 000'). Write the number together: 185000. Before robot 5.7.219, the robot joined the numbers (2 2 became 22) or read only the first one (185 000 became 185), without warning.TVOL (tick volume) is always available on any asset and any broker — it is the count of price changes within the candle.RVOL (real volume in contracts) depends on the broker transmitting the full feed: B3 brokers usually do; OTC Forex brokers usually do not (it returns 0).Rule of thumb: use
TVOL by default. Only use RVOL if you confirm that RVOL[1]>0 is returning real values on your asset.BODY[N] = |CLOSE[N] − OPEN[N]| — measures the body (directional conviction). A big body = strong pressure from one side.RANGE[N] = HIGH[N] − LOW[N] — measures the total range (volatility, wicks included). A big range can be stop-hunting with a small body.Combine the two to filter out dojis:
BODY[1] > RANGE[1] * 0.5 = the body takes up at least 50% of the range (a "clean" candle, with no dominant wicks).Operators % (modulo) and ? : (ternary) ⭐
Besides + − × ÷, the evaluator accepts two new operators:
| Operator | What it does | Example |
|---|---|---|
% (modulo) | The remainder of a division. Same precedence as ×/÷. Useful for round levels and cyclical logic. | CLOSE[0]%10==0 = a price that is a multiple of 10 |
COND ? A : B (ternary) | It picks the value A if the condition is true, otherwise B. Use it inside SetVolume[] for an adaptive volume. | SetVolume[BID>AVGPRICE ? 0.02 : 0.01] |
BVOLO/DWINRATE inside the ? :. Since the : is also a time separator, the ternary is only activated when there is a ? in the expression (it does not clash with 9:30).Pending orders in expressions — @LIMIT / @STOP ⭐
Instead of entering at market, the expression can leave a pendingorder. The type comes from the @; the direction comes from the field (BUY or SELL).
| Command | On a BUY | On a SELL |
|---|---|---|
@LIMIT[N] | Limit N pts below the price (a pullback) | Limit N pts above (a bounce) |
@STOP[N] | Stop N pts above the price (a breakout) | Stop N pts below |
@A2LIMIT[N] / @A2STOP[N]@A3LIMIT[N] / @A3STOP[N] | The same logic, but the order is placed on the A2 / A3 asset (secondary/tertiary) | |
Unit of [N] | Meaning | Example (XAUUSD) |
|---|---|---|
Points (without $) | The same ruler as SetSL[N] — the trader's point. On XAUUSD 1 point = US$ 1.00 | @STOP[20] = $20 above |
Monetary ($) | A distance in price value, converted into points on the right symbol (A1/A2/A3). Useful where 1 point ≠ 1 price unit (WIN$, forex, shares) | @STOP[$20] = $20 above |
1=default, 0=unlimited), also editable in CONFIG → ROBOT. To cancel pending orders use @CANCELPENDING always in EXIT (EXIT), never in an entry field — exit commands in a BUY/SELL field are blocked and reported in the journal.Phase F — Market Structure (LEG*, STRUCT, BOS, EFFRES... variables) 🔒
Variables that measure trend legs, structure and flow — the quantitative core of Dow and Wyckoff. They work in any BUY/SELL/EXIT expression, independently of the AI. The Gemini AI uses those same figures to classify the Wyckoff phase in plain language (accumulation A-E, spring, SOS, and so on) — but that is optional and separate.
| Prerequisite | What it sets |
|---|---|
FaseF_UseMarketStructure = true | Switches the engine on. With false (the default) every variable returns 0 at no cost. |
FaseF_Timeframe | The structure's TF (it may differ from the execution TF — H1 or H4 is recommended for the structure). |
FaseF_SwingWindow = 3 | Candles on each side to confirm a pivot. Smaller = more sensitive (more legs, shorter); larger = more robust (fewer legs, longer). |
FaseF_VolMode = 0 (AUTO) | Real volume when the broker transmits it (B3, futures), tick volume as the fallback (Forex CFD). Leave it at 0 to work on any asset. |
LEGDIR, LEGLEN, and so on) runs from the last confirmed pivot to the current candle — it changes on every tick as price moves. That is expected (the same as any live structure analysis). Use LEGATR and LEGRATIO for robust conditions that do not depend on the leg's exact value.Put ✏️ ⏰ Chart to read the structure log under
H1 to read the structure from H1 and execute on M5/M1. The expression STRUCT==1 && LEGRATIO>1 will evaluate H1's structure but the order goes in on the chart's TF. It is the classic Wyckoff "top-down": confirm the phase on the higher TF, execute on the lower one.SetSL / SetTP — points on entries, absolute price on @MODIFY
| Context | Unit of SetSL / SetTP | Example |
|---|---|---|
An entry expression (BUY1, SELL1, and so on) | Points — the distance from the entry price | SetSL[50] = SL 50 points below the entry |
A modification expression (@MODIFY) | An absolute price — a fixed level on the chart or a dynamic expression | SetSL[LOW[1]] = SL at the previous candle's low |
SetSL[$100] / SetTP[$200]:
instead of points, you set how much you want to risk or make in the account's currency. The robot converts it into points at the moment it sends the order, using the asset and the volume of that entry.
Real examples (mini index: R$ 0.20 per point · mini dollar: R$ 10.00 per point):
SetVolume[1] -> SetSL[$10]in the WIN = SL at 50 pointsSetVolume[2] -> SetSL[$20]in the WIN = SL at 50 points (2 contracts cost twice as much per point)SetVolume[1] -> SetSL[$50]in the WDO = SL at 5 points
- Futures (WIN, WDO, indices, e-minis): 1 point = 1 full contract point.
SetSL[200]on the mini index = 200 index points (WIN moves in steps of 5, so that is 40 ticks). - Forex (5 or 3 decimals): 1 point = 1 pip.
SetSL[50]on EURUSD = 50 pips. - Gold / Bitcoin: 1 point = 1 dollar.
SetSL[300]on XAUUSD = US$ 300 of distance. - Shares: 1 point = 1 cent.
SetSL[100]on PETR4 = R$ 1.00.
SetSL, SetTP, SetBE, SetTS, for the risk-by-% calculation, for the pending orders @LIMIT[N]/@STOP[N], for the fields of Breakeven, Trailing, profit giveback and time stop, to the entry distance filter and for the SL/TP in points of the Trading Desk and the Telegram bot. It is one single ruler, across the whole robot.
Two exceptions, both deliberate:
ROUND[N]/DISTROUND[N]/NEARROUND[N]use the symbol's raw decimal place , because a round number is a price figure on the chart. On gold,ROUND[100]= US$ 1 andSetSL[100]= US$ 100.- The prefix
$(@STOP[$20],SetSL[$100]) is not a point at all: in@LIMIT/@STOPit speaks in price units and inSetSL/SetTPit speaks in your account's money.
[UNIDADES] with the asset, what 1 trader's point is worth, the broker's tick and the minimum distance required. It is the proof of the ruler in your own environment — ask for it before arguing about any distance figure.
ClosePercent[N] closes N% of that side's total, not of each position.
If you have 3 long positions and use ClosePercent[50], the robot closes half of the
summed volume of the three — spreading it across them — and not half of each one. With a single position both readings come to the same thing.
The volume closed is always rounded down to the asset's step: 50% of 3 contracts = 1.5 → it closes 1. If the fraction falls below the tradable minimum (e.g. 50% of 1 contract), the robot does not execute and warns in the panel SAFETY ALERTS (Partial exit not possible) — it never closes more than you asked for.
Each partial exit line acts once per position. The robot checks the condition every second. Up to version 5.7.220, while it stayed true, the same line closed N% again of what was left and emptied the position bit by bit. Now a line with
ClosePercent[50] takes the partial once from that position and does not act on it again. For a second partial, use another line, as in the 3-target exit. The conditions of the lines can stack up (RSI above 70, 75, 80): the line that has already acted passes the turn to the next one that is true. If the position grows (a new entry added to it, on a netting account), the line applies again.
SetSL[LOW[1]] in an entry expression does not work as expected — LOW[1] would be read as a plain number through StringToDouble, ending up as 0. Use SetSL[LOW[1]] only in @MODIFY.📖 COMPLETE VARIABLE REFERENCE
This is the complete list of every variable (token) the robot recognises in BUY, SELL, EXIT, MODIFICATION and FILTERSexpressions. Combine them freely to build your rules.
•
[N] = how many candles back ([0] = the current forming candle, [1] = the last closed one).• Names in brackets are aliases — they work exactly like the main one.
• A2 / A3 = the secondary / tertiary assets configured in the parameters.
• 🔒 = it requires a parameter to be enabled in the EA (named on the same line).
• Operators:
== != > < >= <= · connectors && (E) and || (OR).1. Candle of the main asset
| Variable | Meaning |
|---|---|
HIGH[N] / LOW[N] | The high / low of candle N |
CLOSE[N] / OPEN[N] | The close / open of candle N |
TVOL[N] | Tick volume (the number of price changes) of candle N — always available |
RVOL[N] | The real volume in contracts of candle N (0 if the broker does not send it, e.g. OTC Forex) |
BODY[N] | The body's size: |fechamento − abertura| of candle N |
RANGE[N] | The total range: high − low of candle N |
DIR[N] | The direction of candle N: 1 up, -1 down, 0 doji |
2. Market price, spread and account
| Variable | Meaning |
|---|---|
ASK / BID | The current buy / sell price |
SPREAD | The current spread in points |
EQUITY | Equity (balance + floating profit) |
BALANCE | The account balance (closed positions only) |
MARGIN / FREE_MARGIN | Used margin / available free margin |
DRAWDOWN | The current drawdown (balance − equity) |
MARGINLEVEL ⭐ | The margin level in % (Equity ÷ Used margin × 100). Above 300% = comfortable; below 150% = risky. It returns 999999 when there are no positions. E.g. MARGINLEVEL>200 |
MARGINFREE ⭐ | Free margin in money (equivalent to FREE_MARGIN) |
3. Time
| Variable | Meaning |
|---|---|
TIME | The current time in decimal (e.g. 9.5 = 09:30). It accepts the format 9:30 |
DAYOFWEEK (DAY, WEEKDAY) | Day of the week: 0=Sunday, 1=Monday ... 6=Saturday |
TIMELEFT ⭐ | The seconds left until the current candle closes (on M1 it runs from 60 to 0). E.g. TIMELEFT<10 @BCLOSE = exit just before the close |
4. Open positions — totals for the main asset (A1)
| Variable | Meaning |
|---|---|
VOLBUY (BVOLO) / VOLSELL (SVOLO) | The total volume of open buys / sells |
VOL (VOLUME) | The total open volume (buys + sells) |
VOLBUYPOS / VOLBUYNEG | The volume of profitable / losing buys |
VOLSELLPOS / VOLSELLNEG | The volume of profitable / losing sells |
BPROFIT (CPROFIT) / SPROFIT (VPROFIT) | The profit/loss of the open buys / sells (R$) |
BPROFITO / SPROFITO | The total profit of EVERY open buy / sell |
BPROFITALL / SPROFITALL | The total buy / sell profit (excluding swap and commission) |
CPROFITALL / VPROFITALL | The total buy / sell profit (including swap and commission) |
PROFITALL / CLOSEALL | The account's total profit (open buys + sells) |
BPROFITPOS / BPROFITNEG | The summed profit of the profitable / losing buys only |
SPROFITPOS / SPROFITNEG | The same for sells |
BPROFITPCT (BPROFIT%) / SPROFITPCT | The buy / sell profit as a % of the balance |
BUYCOUNT / SELLCOUNT | The number of open buy / sell positions |
POSTIME | The age (min) of the oldest open position |
LASTBUY / LASTSELL | The price of the last buy / sell opened — the most recently opened one (aliases: BLPRICE/SLPRICE). On a netting account or on the exchange: the price of the last execution added to the position. BPRICE/SPRICE are no longer aliases: they are the AVERAGE price (since 5.7.222) |
AVGPRICE (ALLAVGPRICE) ⭐ | The volume-weighted average price of EVERY open position (buys+sells). Essential for grids and for the group's break-even exit. E.g. BID>AVGPRICE @BCLOSE |
BUYAVGPRICE (BAVGPRICE) / SELLAVGPRICE (SAVGPRICE) ⭐ | Average price of the buys only / sells only opened BY THE ROBOT — the orders carrying its magic number (those from the rules and from its panel). The BPRICE/SPRICE, like VOLBUY and the BPROFIT, count ALL the positions of the asset, including those opened outside the robot (MT5 window, phone, another robot). With a manual order open, the two averages give different numbers. |
ALLPOSOPEN / BUYPOSOPEN / SELLPOSOPEN ⭐ | The number of open positions: total / buys only / sells only (equivalent to BUYCOUNT/SELLCOUNT) |
5. Open positions — individual (pick by index [N])
[0] = the first position opened, [1] = the second, and so on.
| Variable | Meaning |
|---|---|
BPRICE[N] (POSBUY[N]) / SPRICE[N] (POSSELL[N]) | The entry price of buy / sell N |
BSL[N] (BUYSL, BUYSTOPLOSS) / SSL[N] (SELLSL, SELLSTOPLOSS) | The Stop Loss of buy / sell N |
BTP[N] (BUYTP, BUYTAKEPROFIT) / STP[N] (SELLTP, SELLTAKEPROFIT) | The Take Profit of buy / sell N |
BPROFIT[N] / SPROFIT[N] | The profit/loss of that specific buy / sell N |
6. Closed positions (last finished trade)
| Variable | Meaning |
|---|---|
ENTRYBUY / EXITBUY | The entry / exit price of the last closed BUY |
ENTRYSELL / EXITSELL | The entry / exit price of the last closed SELL |
SLBUY / TPBUY | The SL / TP the last closed BUY had (0 if it had none) |
SLSELL / TPSELL | The same for the last closed SELL |
TEXITBUY / TEXITSELL | The duration (min) of the last closed BUY / SELL |
LASTBUYTIME / LASTSELLTIME | Minutes since the last buy / sell CLOSED (the robot reads today's closes; 0 until it has seen one) |
LASTTRADETIME | Minutes since the last trade (either side) |
LASTTRADE / LASTPROFIT | The last trade's result: 1=a win, -1=a loss / the profit in R$ |
LPROFIT / LTRADE | The last position's profit / 1=WIN, -1=LOSS |
LBUYPROFIT (RESULTBUY) / LSELLPROFIT (RESULTSELL) | The profit of the last closed BUY / SELL |
LVOLUME / LBUYVOLUME (EXITVOLBUY) / LSELLVOLUME (EXITVOLSELL) | The volume of the last position / the last buy / the last sell |
RESULTB[N] / RESULTS[N] | The profit of buys / sells closed in the last N minutes |
7. Result of the DAY (main asset)
| Variable | Meaning |
|---|---|
DPROFIT (DAILYPROFIT) / DLOSS (DAILYLOSS) | The day's total profit / loss |
DBUYPROFIT / DSELLPROFIT | The day's buy / sell profit |
DVOLUME / DBUYVOLUME / DSELLVOLUME | The day's total / buy / sell volume |
DTRADES / DWINS / DLOSSES | The day's total trades / wins / losses |
DWINRATE | The day's win rate (%) |
DBUYTRADES / DBUYWINCOUNT / DBUYLOSSCOUNT / DBUYWINRATE | The day's BUY trades / wins / losses / win rate |
DSELLTRADES / DSELLWINCOUNT / DSELLLOSSCOUNT / DSELLWINRATE | The same for the day's SELLS |
GAINPROFIT ⭐ / LOSSPROFIT ⭐ | The sum of the day's WINNING trades only / LOSING trades only (kept apart). It allows fine-grained locks: LOSSPROFIT<=-100 @BCLOSE |
7.1 Signal memory (SIG_*) ⭐
Recorded the moment the robot opens an entry. They reset every day. Useful to avoid repeating a signal, to require alternating directions or to cap the number of trades.
| Variable | Meaning |
|---|---|
SIGLAST | The last signal's direction: 0=buy, 1=sell, -1=none |
SIGTOTAL / SIGBUY / SIGSELL | The number of signals in the day: total / buys only / sells only. E.g. SIGTOTAL<5 = at most 5 entries a day |
SIGPRICE | The price when the last signal fired |
SIGTIME / SIGTIMEBUY / SIGTIMESELL | The time (epoch) of the last signal / the last buy one / the last sell one |
8. Result of the WEEK (main asset)
The same variables as the day's, swapping the D prefix for W.
| Variable | Meaning |
|---|---|
WPROFIT / WLOSS | The week's total profit / loss |
WBUYPROFIT / WSELLPROFIT | The week's buy / sell profit |
WVOLUME / WBUYVOLUME / WSELLVOLUME | The week's total / buy / sell volume |
WTRADES / WWINS / WLOSSES / WWINRATE | The week's trades / wins / losses / win rate |
WBUYTRADES / WBUYWINCOUNT / WBUYLOSSCOUNT / WBUYWINRATE | The week's BUY statistics |
WSELLTRADES / WSELLWINCOUNT / WSELLLOSSCOUNT / WSELLWINRATE | The week's SELL statistics |
9. Phase A — Timing, Session, Spread and News
| Variable | Meaning |
|---|---|
NOVOBAR | 1 only on the first tick of each new bar |
BARSEG | Seconds since the current candle opened |
SESS_ASIA / SESS_LONDRES / SESS_NY | 1 when the matching session is active |
SPREADMED | The spread's average (EMA) in points |
SPREADX | The current spread ÷ the average (1.0=normal, 2.0=double) |
PFDIA | The Profit Factor of the trades closed in the day |
NEWSIMP | The next news item's impact: 1=low, 2=medium, 3=high |
NEWSCTY | 1 if the next news item affects the asset's currency/pair |
NEWSIN[X] | 1 if there is high-impact news in the next X minutes |
10. Phase B — Risk and tracking (A1)
| Variable | Meaning |
|---|---|
RISCO_AB / ALVO_AB | The total risk / target in R$ if every SL / TP were hit |
DIST_SL / DIST_TP | The distance in points to the most recent position's SL / TP |
RMULT | The current profit ÷ the initial risk (R multiples) |
SEQWIN / SEQLOSS | The streak of wins / losses closed today |
POSMIN / POSMAX | The worst / best floating profit ever seen on the A1 position |
11. Multi-asset (A2 / A3)
They require configuring ✏️ Secondary asset A2 and/or ✏️ Tertiary asset A3. The candle series use the ✏️ A2/A3 timeframe in EXPRESSIONS. Alternative syntax: the prefix S2_ / S3_.
| Variable (A2 prefix; swap it for A3) | Meaning |
|---|---|
A2HIGH[N] / A2LOW[N] / A2CLOSE[N] / A2OPEN[N] | Candle N of asset A2 (HIGH/LOW accept N=0,1,2; CLOSE/OPEN N=0,1) |
A2BODY[N] / A2RANGE[N] | The body / range of A2's candle N |
A2ASK / A2BID / A2SPREAD | A2's current buy / sell price / spread |
A2BPROFIT / A2SPROFIT / A2PROFITALL | The profit of buys / sells / total open on A2 |
A2VOLBUY / A2VOLSELL / A2BUYCOUNT / A2SELLCOUNT | Volume and count of positions open on A2 |
A2LASTBUY / A2LASTSELL / A2POSTIME | The price of the last buy / sell / the position's age on A2 |
A2AVGPRICE ⭐ / A2BUYAVGPRICE / A2SELLAVGPRICE | The weighted average price of the positions open on A2: all / buys only / sells only (A2's version of AVGPRICE). It enables a grid on the secondary asset |
A2DPROFIT, A2DWINRATE, A2DTRADES... | The history of the day on A2 (the same D* family as A1's, with the prefix) |
A2WPROFIT, A2WWINRATE... | The history of the week on A2 (the W* family with the prefix) |
A2LPROFIT / A2LTRADE | The result of the last position closed on A2 |
General rule: almost every A1 position/history variable exists for A2 and A3 by adding the prefix A2 or A3. ✅ A2TVOL[N] / A2RVOL[N] (and the A3 equivalents) exist since robot 5.7.215: candle volume of A2/A3. ❌ Does not exist: A2DIR (nor A3DIR) — DIR is only for the main asset. | |
12. Gemini AI
| Variable | Meaning |
|---|---|
ANALISA_IA (IA_DECISAO) | The AI's decision: 1=buy, -1=sell, 0=wait, -99=invalid cache |
IA_CONFIANCA | The signal's clarity/strength (%) — ≠ probability (see IA_PROB_ALTA/IA_PROB_BAIXA) |
IA_PROB_ALTA (IA_PROBUP) / IA_PROB_BAIXA (IA_PROBDOWN) | The probability of up / down (%) |
IA_VALIDA | 1 if the cached analysis is still valid (always use it alongside) |
IA_FECHAR_BUY / IA_FECHAR_SELL | 1 when the AI suggests closing buys / sells |
IA_REVERSAO / IA_FORCA_TENDENCIA | The reversal signal / trend strength according to the AI |
IA_IDADE_SEG | The cached analysis's age (seconds) |
IA_RR, IA_SL_PTS, IA_TP1_PTS, IA_TP2_PTS, IA_NOVO_SL_BUY/SELL, IA_NOVO_TP_BUY/SELL | Suggested R:R, SL and TP values. ⚠️ In SIGNAL-ONLY mode they return zero — do not use them for operational decisions |
For A2/A3 use the prefix: A2ANALISA_IA, A2IA_CONFIANCA, A2IA_VALIDA, A3ANALISA_IA... It requires ☑️ Enable AI Assistant (Gemini). | |
13. Configurable indicators (IND)
| Variable | Meaning |
|---|---|
IND1[buffer,candle] ... IND30[buffer,candle] | The value of an attached indicator. buffer = the indicator's line, candle = how many candles back. E.g. IND1[0,0] = buffer 0 on the current candle. Declare each one in the 🤖️ INDICATORS FOR EXPRESSIONS SETUP (how to declare it) |
14. Phase C — Internal indicators (Waves 1-4) 🔒
Each family requires the matching parameter to be enabled (see the full table in section 16 below).
| Variable (aliases) | Meaning |
|---|---|
VWAP, VWAPD, VWAPW, VWAPM | Rolling VWAP / anchored to the day / week / month 🔒 VWAP |
VWAPUP1 / VWAPDN1 / VWAPUP2 / VWAPDN2 | The VWAP's ±1σ / ±2σ bands 🔒 VWAP |
POC | The price with the largest traded volume 🔒 POC |
TENKAN, KIJUN, SENKOUA (SPANA), SENKOUB (SPANB), KUMOTOP (CLOUDTOP), KUMOBOT (CLOUDBOT) | The Ichimoku's lines 🔒 Ichimoku |
FIBO382, FIBO500, FIBO618 | Automatic Fibonacci levels 🔒 Fibonacci |
BBUPPER, BBMIDDLE (BBMID), BBLOWER | Bollinger Bands 🔒 Bollinger |
ATRREG | The volatility regime: 0=Normal, 1=Volatile, 2=Calm 🔒 ATR |
BBSQZ | Squeeze: +1=compressed, 0=normal, -1=expansion 🔒 BB Squeeze |
ORBHIGH (ORBH) / ORBLOW (ORBL) | The opening range's high / low 🔒 Opening Range |
VAHIGH (VAH) / VALOW (VAL) | The Value Area's top / bottom 🔒 Value Area |
DOJI, PINBAR, ENGULF (and DOJI1, PINBAR1, ENGULF1) | Candle patterns: 0/1 or -1/0/+1 depending on the pattern 🔒 Candle Patterns |
15. Phase C — Multi-timeframe Price Action (Waves A-F)
Always available (no parameter to enable). In the [N] of the OHLC ones, N = days/weeks back.
| Variable (aliases) | Meaning |
|---|---|
DOPEN / DHIGH / DLOW / DCLOSE | The current day's open / high / low / close |
YHIGH (PDH) / YLOW (PDL) / YOPEN / YCLOSE | The previous day's OHLC (PDH/PDL = yesterday's high/low) |
WOPEN / WHIGH / WLOW / WCLOSE | The current week's OHLC |
DAYCHG (DCHG) / YCHG | The % change of the day / of the previous day (signed) |
GAPABS (GAP) / GAPPCT / GAPATR | The opening gap in points / % / multiples of ATR SMA-14 D1 (signed; the ATR matches MT5's native iATR) |
GAPATRW / ATRW[N] | The gap in multiples of the Wilder ATR SMMA-14 D1 / the Wilder ATR on the timeframe+period configured in the EA — Wilder's original method (it reacts more slowly to spikes) |
DAYRNG (DRANGE) / DAYRNGPCT | The day's range in points / in % |
PIVOT (PP) / R1 / R2 / R3 / S1 / S2 / S3 | Classic pivots calculated from yesterday's OHLC |
ROUND[N] / DISTROUND[N] / NEARROUND[N] | A round number (N = the step in points) / the distance to it / 1 if price is glued to it |
ROC[N] (PROC) | The % change against N periods ago (momentum) |
FIBHIGH[N] (WINHIGH) / FIBLOW[N] (WINLOW) | The high / low of the window of the last N candles |
DHIGHN[N] / DLOWN[N] | High / low of the last N closed days (today not included) |
ADR[N] / ADRPCT[N] | Average daily range over N days, in price / in % (no [N] = 14 days) |
ADRUSED[N] | How much of the average range has been covered today, in % (100 = a whole normal day) |
CHGPCT[N] | % change close to close (today: current price against yesterday's close) |
DPOS[N] | Price position within the day's range, in % (0 = low, 100 = high) |
ZCHG[N] | Today's change in standard deviations of the N-day changes (no [N] = 20 days) |
DOWNDAYS / UPDAYS | Closed days in a row down / up, counting back from yesterday |
P1 … P5 | Free numbers from the F7 window, optimizable in the Strategy Tester |
16. EA parameters required by each advanced variable
The Phase C variables (sections 14 and 15) only return a value if the matching parameter is on. The rest (sections 1-13) are always available. ⚠️ With the parameter unticked, the line that uses the variable is refused: it does not trade, and the robot warns in the alerts panel that the value could not be calculated. This applies to direct comparisons and also inside math. Check this table before unticking any of these parameters.
| Variables | The parameter that must be enabled in the EA |
|---|---|
VWAP, VWAPD, VWAPW, VWAPM, VWAPUP1, VWAPDN1, VWAPUP2, VWAPDN2 | ☑️ Enable VWAP (volume weighted average price) — the ±1σ/±2σ bands use the same parameter |
TENKAN, KIJUN, SENKOUA (SPANA), SENKOUB (SPANB), KUMOTOP, KUMOBOT | ☑️ Enable Ichimoku — Japanese trend cloud |
POC | ☑️ Enable POC — the price with the largest traded volume |
FIBO382, FIBO500, FIBO618 | ☑️ Enable automatic Fibonacci (finds top and bottom) |
BBMIDDLE, BBUPPER, BBLOWER | ☑️ Enable Bollinger |
ATRREG (0=Normal, 1=Volatile, 2=Calm) | ☑️ AI receives market VOLATILITY reading |
BBSQZ (+1=Squeeze, 0=Normal, −1=Expansion) | ☑️ AI detects COMPRESSION before explosive moves |
ORBHIGH, ORBLOW | ☑️ ⬜ Enable Opening Range — uses ORBHIGH and ORBLOW in conditions |
VAHIGH, VALOW | ☑️ ⬜ Enable Value Area — uses VAHIGH and VALOW in conditions |
DOJI, PINBAR, ENGULF, DOJI1, PINBAR1, ENGULF1 | ☑️ ⬜ EXPRESSIONS ONLY: numeric vars DOJI, PINBAR, ENGULF |
Waves A-F: day/week/previous-day OHLC, change/gap, pivots, round numbers, ROC, Fibo windows, GAPATRW, ATRW (section 15) | None — always available (nothing to enable) |
16.5. Phase F — Market Structure & Flow (Dow + Wyckoff) 🔒
It requires enabling ☑️ AI + EXPRESSIONS: Structure & Flow to be ticked. Every variable uses the TF configured in ✏️ Chart to read the structure (FaseF_Timeframe). They are read-only variables — they depend on no order book and no DLL. AUTO volume: it uses real volume when the broker sends it (B3), otherwise tick volume. It works in BUY/SELL/EXIT/FILTER expressions and feeds the Gemini AI's Wyckoff analysis (phases A-E, spring, SOS, and so on).
F1 — The leg engine (impulse vs correction)
A "pivot" is a high or low confirmed by FaseF_SwingWindow candles on each side. The LEG leg runs from the last confirmed pivot to the current (forming) candle; the previous leg PLEG is the move that finished before it. ⚠️ The forming leg is provisional — the pivot is only confirmed after N candles have closed to its right (the same behaviour as any live structure reading).
| Variable | Meaning | Typical use |
|---|---|---|
LEGDIR | +1 = the current leg is up · -1 = down | LEGDIR==1 && STRUCT==1 |
LEGLEN | The current leg's range in points | LEGLEN>200 |
LEGATR | The current leg's range in multiples of ATR. LEGATR>1 = a leg larger than average volatility | LEGATR>1.5 && LEGDIR==1 |
LEGBARS | The current leg's duration in candles | LEGBARS<5 (a fast leg) |
LEGVOL | The current leg's accumulated volume (tick or real) | LEGVOL>PLEGVOL |
LEGSPEED | The leg's speed: LEGLEN ÷ LEGBARS (points per candle) | LEGSPEED>50 |
PLEGLEN | The range of the previous leg in points | LEGLEN>PLEGLEN |
PLEGATR | The previous leg in multiples of ATR | PLEGATR<0.6 (a shallow correction) |
PLEGVOL | The previous leg's volume | LEGVOLRATIO>1 |
LEGRATIO | LEGLEN ÷ PLEGLEN. Above 1 = the current leg is larger than the previous one (expansion); below 1 = contraction | LEGRATIO>1.2 (a healthy impulse) |
LEGVOLRATIO | LEGVOL ÷ PLEGVOL. Above 1 = the current leg carries more volume | LEGVOLRATIO>1 && LEGDIR==1 |
LEGRATIO>1 && LEGVOLRATIO>1 when LEGDIR==1. When the correction starts to match the impulse in range/volume, the trend is weakening.F2 — Formal Dow structure (confirmed pivots)
It uses only confirmed pivots (never the forming close). SWHIGH and SWLOW are always the most recent high/low that passed the window filter. It needs at least 2 confirmed legs to return non-zero values.
| Variable | Meaning | Typical use |
|---|---|---|
STRUCT | +1 = an uptrend (HH+HL) · -1 = a downtrend (LH+LL) · 0 = sideways/transition. It compares the last 2 confirmed highs and lows. | STRUCT==1 && LEGDIR==1 |
SWHIGH | The price of the last confirmed swing high | BID < SWHIGH-50 |
SWLOW | The price of the last confirmed swing low | ASK > SWLOW+50 |
SWHIGH1 | The price of the second-to-last confirmed swing high (to compare HH vs LH) | SWHIGH > SWHIGH1 (HH) |
SWLOW1 | The price of the second-to-last confirmed swing low (to compare HL vs LL) | SWLOW > SWLOW1 (HL) |
BOS | Break of Structure: +1 = the current close above SWHIGH (a bullish BOS) · -1 = below SWLOW (a bearish BOS) · 0 = no break | BOS==1 && STRUCT==-1 (spring/SOS) |
BOS on M1 is very noisy; use it as a secondary filter, or on larger TFs.F3 — The Wyckoff core: analytical volume (effort × result)
It measures the relationship between effort (volume) and result (price displacement). A divergence between the two is Wyckoff's most powerful signal: a lot of volume with price going nowhere = absorption; a lot of price on little volume = a fragile move.
| Variable | Meaning | Typical use |
|---|---|---|
VOLAVG | The average volume per candle over the last FaseF_VolAvgPeriod (default 20) candles. The reference used to normalise the other volume indicators. | LEGVOL > VOLAVG*20 |
VOLX | The current leg's volume (vol/candle) divided by VOLAVG. 1.0 = volume at the average; 2.0 = double the average; 0.5 = half (a dry-up). | VOLX > 1.5 && LEGDIR==1 |
EFFRES | Result ÷ Effort: (LEGLEN/ATR) ÷ VOLX. High = an efficient leg (a lot of price for relatively little volume) = a strong trend. Low = an inefficient leg (little price for a lot of volume) = possible absorption or exhaustion. | EFFRES > 1.5 (a healthy impulse) |
ABSORP | 1 if the last candle has volume ≥ FaseF_AbsorpVolX× the average and a body ≤ FaseF_AbsorpBodyPct (default 35%) of the range. It indicates smart money absorbed the pressure without letting price move. | ABSORP==1 && ASK>SWLOW |
CLIMAX | Volume climax: +1 = a buying climax (volume ≥ FaseF_ClimaxVolX× the average plus a close at the top of the range) · -1 = a selling climax (a close at the bottom) · 0 = normal. An exhaustion signal at extremes. | CLIMAX==-1 && STRUCT==-1 (bottom) |
17. Glossary — the concepts behind the variables
| Term | What it means in practice |
|---|---|
| VWAP | The day's volume weighted average price. It serves as a "fair value" reference: above = a bullish trend, below = a bearish one. |
| POC (Point of Control) | The price level where the largest volume traded. It acts as a magnetic support/resistance. |
| ORB (Opening Range Breakout) | The high and low formed in the session's first minutes. Breaking above ORBHIGH = a sign of strength; below ORBLOW = weakness. |
| ATR (Average True Range) | The period's average volatility. ATRREG==1 means a more agitated market; ATRREG==2 means a calm one. The EA offers two methods: SMA (a simple average of the True Ranges — the same as MT5's native iATR , used in GAPATR and ATRREG) and Wilder SMMA (a progressive exponential average — the original method Wilder described in 1978, used in GAPATRW and ATRW). On stable assets the values are close; on very volatile ones the SMMA reacts more slowly. |
| Bollinger Bands | Bands around the mean. BBUPPER/BBLOWER are the extremes; BBMIDDLE is the mean. BBSQZ==1 = compressed bands (an imminent expansion). |
| Fibonacci | Percentage levels (38.2%, 50%, 61.8%) calculated on recent swings. FIBO618 = the 61.8% level, a classic support/resistance. |
| Ichimoku | A set of lines that summarise trend, momentum and support/resistance. Price above KUMOTOP means an uptrend; below KUMOBOT means a downtrend. |
| Classic Pivots (PIVOT/PP, R1–R3, S1–S3) | Supports and resistances calculated from the previous day's OHLC. PIVOT is the central point; R1/R2/R3 are resistances; S1/S2/S3 are supports. Widely used in WIN/WDO day trading. |
| Previous day's high/low (PDH/PDL) | YHIGH (alias PDH) and YLOW (alias PDL) = yesterday's high and low. DOPEN/DHIGH/DLOW/DCLOSE = the current day's OHLC; WOPEN/WHIGH/WLOW/WCLOSE = the week's OHLC. Breaking these references is a classic trigger. |
| Opening gap (GAPABS/GAPPCT/GAPATR/GAPATRW) | The difference between today's open and yesterday's close — in points (GAPABS), in % (GAPPCT), in multiples of ATR SMA-14 (GAPATR) or in multiples of the Wilder ATR SMMA-14 (GAPATRW). It is signed: positive = a gap up, negative = a gap down. Use GAPATR for behaviour identical to native MT5; use GAPATRW for Wilder's original method. |
| Round numbers (ROUND/DISTROUND/NEARROUND) | "Psychological" levels (e.g. 130000 on WIN). In ROUND[N], the N is the the step in points (not candles back). DISTROUND = the distance to the nearest round level; NEARROUND = 1 when price is glued to it. |
| ROC (Rate of Change) | The percentage change in price against N periods ago — it measures momentum. A positive value means upward acceleration; a negative one, downward. |
| VWAP bands (VWAPUP1/DN1/UP2/DN2) | ±1σ and ±2σ deviations around the VWAP. Price touching VWAPUP2 = very stretched to the upside (possible profit-taking/reversal); VWAPDN2 = stretched to the downside. It requires ☑️ Enable VWAP. |
| Leg (LEGLEN, LEGRATIO) | The price move between two consecutive pivots (high→low or low→high). The current leg (LEG*) runs from the last confirmed pivot to now; the previous one (PLEG*) is the move that finished before it. Comparing the two reveals whether the market's strength is expanding or contracting. |
| Impulse vs Correction (Dow's 5th Principle) | In a healthy trend the move in the main direction (the impulse) should be larger and carry more volume than the move against it (the correction). When the correction starts to match the impulse in range or volume, the trend is weakening — a possible reversal. Measured by LEGRATIO and LEGVOLRATIO. |
| Effort vs Result (Wyckoff) | Effort = volume; Result = price displacement. High volume plus price going nowhere = absorption (smart money soaking up the sellers' supply, or vice versa). High volume plus price exploding = confirmation of strength. Measured by the variable EFFRES: high = an efficient trend; low = possible absorption or exhaustion. |
| Absorption (ABSORP) | A candle with above-average volume and a small body relative to its range: price tried to move but was "absorbed" by the other side. At support = smart money buying; at resistance = smart money selling. A sign of quiet accumulation/distribution. The variable ABSORP==1. |
| Volume climax (CLIMAX) | Extremely high volume at a leg's extreme — an exhaustion signal. Buyers/sellers "gave it everything" at once; who is left to buy/sell next? It often marks tops and bottoms. CLIMAX==1 = a buying climax (a possible top); CLIMAX==-1 = a selling climax (a possible bottom). |
| Break of Structure (BOS) | When price breaks the last confirmed swing high (BOS==1, bullish) or swing low (BOS==-1, bearish). In Wyckoff the BOS after a spring (a false break of support plus recovery) is the SOS (Sign of Strength) — use BOS==1 && STRUCT==-1 to detect that pattern. |
📦 READY-MADE STRATEGIES — DOWNLOAD AND USE
Complete robot configurations, ready to use. Each .set Strategy is a file that loads every parameter at once — with no need to set them field by field.
- Download the file
.setand save it in any folder on your computer. - In MT5, right-click on the chart where MQL PRO TRADER is running and choose Expert Advisors → Properties — or press F7.
- In the window that opens, click the Inputs.
- In the window's bottom left corner, click the [Load].
- Browse to the folder where you saved the file, select it and click Open.
- The parameters will be filled in automatically. Check that they match what you want.
- Click [OK]. That is it — the robot is already trading with the new strategy.
⚠️ Always test the strategy on a Demo account before using it on a live one. Adapt the volume (SetVolume), targets and limits to the size of your account.
downloads/sets-manifest.json is reachable.Failed to fetch
Support and Contact
Need help with the setup or run into a problem? Use the channels below to get in touch with support.
.set for the team to look at. On the 🆘 Support of the Center, when you open a ticket you can attach your robot's configuration file .set (and screenshots). Our team opens that same file, reviews your expressions and protections and suggests improvements — with no need for you to retype anything.👉 @mqlprotraderchatbot
👉 @RonaldoCasttor
👉 +55 94 98138-6880
👉 mqlprotrader.com.br/grupo
👉 mqlprotrader@gmail.com
👉 www.mqlprotrader.com.br