Trading settings
Configure PineHook sizing, daily and overall risk limits, recovery, symbol and news filters, active hours, and platform-specific connection settings.
Last updated: 2026-10-19
PineHook gives MetaTrader 5 and cTrader the same trading controls wherever the platforms support the same behavior. This page also marks the inputs that exist only in the MT5 EA.
Where settings come from
cTrader always reads trading settings from the dashboard. MT5 can read them from the dashboard or its EA Inputs, according to Settings Source. License Key, Secret Key, Settings Source, and Connection Profile remain in the EA Inputs.
MT5 license and authentication#
These inputs apply only to MetaTrader 5. cTrader uses the account authorization described in Connect cTrader.
Your unique license key from the PineHook dashboard. Required to connect.
Optional extra authentication. If you generated a Secret Key for your license, enter it here. The EA cannot connect without it when one is set. Leave blank if not using one.
Choose where the EA reads its configuration. MetaTrader uses the values in EA Inputs. Dashboard uses the settings saved on the PineHook website and receives changes while connected. Only someone with access to the terminal can switch this source.
Keep your license key secure
Your license key authenticates your EA connection. Do not share it or include it in public Pine Script code.
Connection#
This section applies only to the MT5 EA.
Choose how quickly the EA should treat a connection as lost and reconnect.
- LOCAL (default) is best for a home computer, laptop, or Wi-Fi connection. It is more tolerant of brief network blips and of the machine sleeping and waking, so the EA doesn't disconnect unnecessarily on a typical personal setup.
- VPS is best for an always-on server (such as a VPS) on a stable, wired connection. It notices a dropped connection and brings the EA back online faster, which suits a setup meant to run 24/7.
If you're unsure, leave this on LOCAL. Only switch to VPS when you run MetaTrader 5 on a dedicated, always-on server.
Trading settings#
These parameters control trade execution.
Choose PineHook for native commands or PineConnector for compatibility alerts.
On MT5 with Settings Source = Dashboard, open Global trading settings → Trading → Signal syntax, or customize the license's settings. The license inherits global values unless you override them. The EA applies saved changes while connected and reports the active mode back to PineHook, which uses that report to parse alerts. A saved change takes effect after the EA applies it. If the EA is offline or the push fails, reconnect to receive the saved settings.
With Settings Source = MetaTrader, the EA's Signal Syntax Mode and PineConnector Syntax inputs remain authoritative. Dashboard syntax changes do not override them. Changing EA Inputs reinitializes the EA and reconnects it.
In PineConnector mode, also match all five unit settings: risk=, sl= / tp=, pending=, accfilter=, and the partial-close percentage. Use the same settings source as the mode. Native PineHook parameters keep their explicit units.
cTrader always reads these settings from the dashboard. See the PineConnector setup and commands for unit choices and command differences. MT5 dashboard syntax control requires an EA build that supports it; older builds continue reporting their EA input mode. Confirm the connected license's syntax badge before resuming alerts after a change.
Webhook alerts that open a trade must always carry their own sizing parameter, so this value is not used as a fallback for them. Leave it at 0.
Strategy identifier applied to trades opened through the license. Separate magic numbers can isolate several strategies on the same symbol when the broker account uses hedging mode.
Maximum spread in pips or ticks allowed when opening a trade. PineHook rejects the entry if the current spread is higher. Set this to 0 to disable the limit. An alert can override it with maxspread_pips.
Maximum spread as a percentage of the current price. This works well when one license trades instruments at very different prices. Set this to 0 to disable the limit. An alert can override it with maxspread_pct.
Position limits#
Turn this off to stop PineHook from opening a new entry while a position or pending order on the same symbol points the other way, which helps when your broker or prop firm forbids holding both sides. It only applies to hedging accounts, and hedging entry protection explains how it works, how a license override inherits, and how to override it for a single alert.
Maximum long lot size for one magic number on one symbol. Set to 0 for unlimited.
Maximum short lot size for one magic number on one symbol. Set to 0 for unlimited.
Maximum long exposure for one magic number on one symbol, as a percentage of account equity. Set to 0 for unlimited.
Maximum short exposure for one magic number on one symbol, as a percentage of account equity. Set to 0 for unlimited.
Determines what happens when a trade would exceed a limit. Reject blocks the trade entirely. Cap reduces the lot size to fit within the limit.
These settings cap your exposure and prevent over-leveraging on a single instrument. They apply to the license you set them on, and they are counted per symbol, per magic number.
How the limits are counted
Each limit is measured against the exposure held by one magic number on one symbol, not against everything open on that symbol.
Each distinct magic number has its own allowance. Three strategies on EURUSD with a 1-lot cap can therefore hold up to 3 lots between them on a hedging account. Set the cap to the amount you want any one strategy to hold.
Netting and Exchange accounts keep one broker position per symbol, so separate magic numbers cannot create independent position exposure there.
Target positions. A setposition alert names the exact final size you want, so these limits never shrink it, even when When Limit Exceeded is set to Cap, and PineHook instead refuses the opening part of any target that would go past your long or short lot or equity limits, while closes and reductions toward the target still go ahead.
Risk management#
Drawdown protection acts when your account equity drops too far below a reference level.
There are two separate limits, and you can run either one or both:
- Max Daily Loss caps what you can lose in a single day. It resets every day at the hour you choose, and you can set it as a percentage or as a cash figure.
- Max Overall Drawdown caps how far the account can fall in total. It does not reset, and you choose how it is measured.
Many prop firms enforce daily and overall limits at the same time. Check how your firm calculates each one and set PineHook's triggers inside the breach levels. A trigger at the exact firm limit leaves no room for a close to fill.
Whichever limit trips first blocks the account. The EA chart panel and the Experts log name the one that fired, so you always know which number stopped you and when it lifts.
How much the account may lose in one day before the EA blocks new trades.
Read as a percentage or as a cash amount depending on Limit Unit, so you can enter your firm's figure exactly as they state it. 3 with the unit on % means three percent of the day's starting equity; 3000 with the unit on $ means three thousand of your account currency.
The day starts at DD Reset Hour in UTC. PineHook uses the higher of equity and balance at that moment as its baseline. Firms can calculate the daily floor differently. FTMO, for example, subtracts a fixed percentage of initial simulated capital from the balance recorded at midnight Central European time. If you hold an open winner through the reset, PineHook's higher baseline can trigger earlier than FTMO's. Setting a percentage in PineHook also makes the allowed loss vary with its baseline; use a currency amount when the firm's allowed loss is fixed in account currency.
Set to 0 to disable.
This limit resets every day whatever your Drawdown Mode is. A block it raised lifts at the next reset hour, and a block raised by the overall limit does not.
Not available in End of Day mode, because that mode already measures the day. If you want both a daily and an overall limit, choose one of the other four modes for the overall one.
How far equity may fall below the reference level before the EA acts, as a percentage or as a currency amount depending on Limit Unit below. What the reference level is depends on Drawdown Mode. Set to 0 to disable; the dashboard also offers this as an on/off switch that remembers your last value.
Separate from the daily loss limit above, and the two run happily together.
While a block is active the EA also cancels its own pending orders, because an order placed before the breach could otherwise fill and open a new position while you are blocked. Manual orders are untouched. Cancelled pending orders are not restored, so re-send the entry alerts if you still want them.
How the reference level is measured. Five options:
| Mode | Reference level | Moves? |
|---|---|---|
| End of Day | Your equity at the reset hour each day | Re-anchors daily |
| Trailing (floating) | The highest equity you have ever reached, including unrealised profit on open trades | Only up |
| Trailing (closed) | The highest balance from closed trades only | Only up |
| Static | Your equity when you switched the mode on, or your override | Never |
| Relative | A percentage of your highest account value | Only up |
End of Day is the default and is the behaviour PineHook has always had.
The two trailing modes keep a fixed dollar distance behind your peak. If you start at $100,000 with a 5% limit, the distance is $5,000 and stays $5,000, so at a $108,000 peak your floor is $103,000. The difference between them is what counts as a peak. Trailing (floating) counts a trade that runs to +$3,000 while still open, so giving that profit back can trip the limit. Trailing (closed) only counts profit you actually banked, so a trade that runs up and closes at breakeven never moves your floor.
Relative keeps a fixed percentage instead, so the distance grows with the account: at a $100,000 peak your floor is $95,000, and at a $200,000 peak it is $190,000.
In practice the trailing modes get stricter as the account grows. Five percent of $100,000 is a $5,000 buffer, and it is still a $5,000 buffer at a $200,000 peak, which works out to 2.5%. That is the prop-firm style. Relative keeps risk proportional to size: the buffer stays 5% of the peak, so it doubles when the account doubles.
The three peak modes climb without limit unless you set a Lock Floor At Profit %, described next.
Stops a trailing floor from rising once you are far enough ahead, then freezes it there for good. 0 turns it off, which is how the three peak modes have always worked.
Use this only when your firm's trailing floor stops rising at a defined profit level. FTMO's current 1-Step rule does not have such a lock: its floor follows the highest balance recorded at a daily reset. FTMO's 2-Step maximum loss is static.
To reproduce that, set this to the same number as your Max DD. On a $100,000 account with a 6% limit and a 6% lock, the floor trails up to $100,000 as your equity reaches $106,000, and then stays at $100,000 however high the account climbs.
| Equity | Floor without a lock | Floor with a 6% lock |
|---|---|---|
| $103,000 | $97,000 | $97,000 (still trailing) |
| $106,000 | $100,000 | $100,000 (locks here) |
| $130,000 | $124,000 | $100,000 |
- It applies to the three peak modes only. End of Day and Static have no peak to freeze, so the setting is ignored there and the dashboard hides it.
- In Relative mode, matching the lock to your Max DD does not land the floor exactly on your starting balance, because Relative's distance is a percentage of the peak rather than a fixed amount. With a 6% limit and a 6% lock the floor settles about 0.36% below your starting balance. Use one of the two trailing modes if you need it to sit exactly on the balance.
Do not try to imitate this with Static mode. Static measures down from your baseline, so pinning a $100,000 baseline with a 6% limit puts the floor at $94,000, which is $6,000 lower than the firm's and leaves you unprotected in exactly the situation you were guarding against.
What the EA does when the limit is hit:
- Block new trades refuses new entries. Open positions are left alone.
- Close everything closes all positions and cancels all orders, then resumes trading.
- Close and block closes everything and also refuses new entries.
Close actions are unfiltered by magic number: everything in the terminal is closed, on the basis that a drawdown limit sparing half your exposure is not a limit.
Applies to both limits. Whether each number is read as a percent of its own reference level or as a fixed amount in your account currency. With percent (the default and the historical behaviour), 5 means 5% below the reference. With currency, 2000 means the guard trips 2,000 account-currency units below the reference, which is your equity at anchor time, the high-water mark in the moving modes, or the declared level if the override is set.
One consequence worth knowing: in currency mode every mode keeps a fixed amount, so Relative behaves the same as Trailing (floating). The elastic percentage gap is Relative's whole difference, and a currency limit removes it.
How many seconds in a row your equity must stay past the limit before the EA acts. The guard reads equity once per second, and a single reading can lie: a spread blowout or a bad tick moves marked-to-market equity for a moment without any real loss. The default of 3 filters those out.
Set it to 1 only if you need the fastest possible reaction and accept the risk: at 1 the guard acts on a single reading, bad ticks included. Traders running close to an external hard limit usually do better keeping 3 here and setting their threshold with some margin instead.
Hour (0-23) in UTC when the drawdown baseline re-anchors and trading resumes on MT5 and cTrader. The default of 0 means midnight UTC.
Existing saved hours keep their numeric values and are interpreted as UTC. Existing drawdown state is preserved until the next UTC reset boundary.
Used by Max Daily Loss in every mode, and by End of Day mode for its own baseline. It is hidden and ignored only when neither of those is active.
The level your account started at. If your account sits at $49,875 but your firm treats it as a $50,000 account, set this to 50000 and the guard measures from that.
Because the starting level is also the account's opening high point, each mode uses it accordingly. Static pins the floor to it permanently. Relative and the trailing modes start their high-water mark from it and trail above it once your account genuinely exceeds it, and in the trailing modes it also sizes the fixed dollar gap (5% of the declared $50,000, not of whatever your floating P&L showed at the moment you saved). A value below your current equity does nothing in the moving modes, because your real high already exceeds it.
End of Day ignores this field and logs that it did, because it re-anchors from live equity every day, so a fixed level has no meaning there. The dashboard greys the field out in that mode. Set to 0 to use live equity at the moment the guard is armed.
A drawdown block stays active
A drawdown block does not clear just because the account moves back above the limit.
To resume trading:
- In End of Day mode, trading resumes automatically at the next reset hour.
- To unblock immediately in any mode, set Max Drawdown to
0. This disables the guard and clears the block.
Modes other than End of Day have no automatic reset. Disable the guard to clear their block, then review the account before turning it on again.
Alert recovery#
These settings control what PineHook does with eligible alerts after an MT5 or cTrader execution connection returns.
Choose how PineHook handles missed alerts.
| Mode | Behavior |
|---|---|
| Auto-close, notify opens | Automatically executes missed close alerts but only notifies you about missed opens. (Default, Recommended) |
| Notify Only | The safest option. Logs missed alerts but takes no action. You handle them manually. |
On MT5, an alert that arrived in the 60 seconds before your EA reconnected, and that the EA never received, is not treated as missed: it runs like any other alert in either mode. A short connection drop, or a PineHook update moving your EA to another server, takes a few seconds, and those alerts are still current. With EA 0.0.16 or later this includes an alert PineHook sent just as the connection dropped, when the EA reconnects from the same MetaTrader terminal. If the EA had in fact run it, it recognises the repeat and does not trade it twice. From a different terminal or computer, such an alert is reported as missed instead.
Your trade history works the other way round. With EA 0.0.16 or later, the EA keeps every report it sends (fills, closes, stop and target changes, deposits and withdrawals) until PineHook confirms it is saved, and sends it again after a reconnect or a MetaTrader restart. A dropped connection or a PineHook update cannot leave a trade out of your history, and a report sent twice is recorded once.
Maximum age of a missed alert before it is ignored. Options: 5 min, 15 min, 30 min, 1 hour.
Symbol filtering#
PineHook has two modes for controlling which symbols a license can trade:
- Blacklist is the default. Every symbol is enabled except those on the list.
- Whitelist enables only the symbols on the list.
The filter mode and symbol list are managed from the dashboard or via the webhook commands below.
| Command | Effect |
|---|---|
eaoff,SYMBOL | Adds a symbol to the blacklist, or removes it from the whitelist. |
eaon,SYMBOL | Removes a symbol from the blacklist, or adds it to the whitelist. |
eaoff,ALL | Switches to whitelist mode with an empty list, disabling all symbols. |
eaon,ALL | Switches to blacklist mode with an empty list, enabling all symbols. |
eaoffexcept=SYM1;SYM2 | Switches to whitelist mode with only the listed symbols enabled. |
eaonexcept=SYM1;SYM2 | Switches to blacklist mode with only the listed symbols disabled. |
When enabled, PineHook also closes manually opened trades on filtered symbols. Alert-based entries on those symbols remain blocked.
This is a Dashboard-managed setting (default off). It is not exposed as a MetaTrader input, so in MetaTrader settings mode it stays off.
Broker symbol mapping#
Translates TradingView's instrument names into your broker's, for accounts where the two differ (EURUSD against EURUSD.micro, or US30 against DJ30). All three fields default to empty, and empty means no translation happens, so most accounts leave this alone.
| Setting | Example | Effect |
|---|---|---|
| Prefix | i. | Added to the front of every symbol |
| Suffix | .micro | Added to the end of every symbol |
| Renamed instruments | US30 to DJ30.r | Replaces the whole symbol, skipping the affixes |
Configure it in whichever source your Settings Source names: the dashboard in Dashboard mode, or the EA Inputs in MetaTrader mode. The other source is ignored. When you first customize a license mapping in the dashboard, PineHook copies the account prefix, suffix and renames into the license form, then saves your edited copy as one independent mapping.
Read Broker symbol mapping for examples and a checklist.
Active hours#
Configure Active Hours in the dashboard, or in the EA inputs when using MetaTrader settings mode. These settings restrict when a license can open new positions. Signal commands cannot change this window. Close, cancel, and trade-management alerts still run outside the window, so you can exit or adjust an open position after trading hours end.
Turns the time filter on or off. While active hours are enabled, entry alerts are blocked outside the window, but close, cancel, and trade-management alerts always run.
Start of the trading window in UTC, using HH:MM format.
End of the trading window in UTC, using HH:MM format.
Active hours use UTC on MT5 and cTrader. Saved clock values are kept and interpreted as UTC, including schedules previously set to Server or Local. Review your trading window after updating. This clock is separate from the drawdown reset hour.
When enabled, PineHook closes all positions and cancels pending orders when active hours end.
In Dashboard mode, set this on the dashboard. In MetaTrader mode, use the EA's Close Positions Outside Hours input. It is off by default in both modes.
Overnight sessions
The EA handles sessions that cross midnight. Setting start to 22:00 and end to 06:00 means "active from 10 PM tonight until 6 AM tomorrow."
News Filter#
Holds new entries in a window either side of a high-impact economic release, where spreads widen and fills slip. The calendar comes from the server and is visible on the News page of your dashboard, so you can see in advance which releases would hold an alert.
Closes and cancels always run, whatever else you configure here. A rule about volatility should never stop you leaving a position.
The master switch. With it off nothing below has any effect.
The minutes before and after a release are set independently, so 5 and 60 is a valid asymmetric window. Each side accepts 0 to 240 minutes, where 0 means no window on that side rather than a default.
High-impact (red) releases always count when the filter is on. Medium-impact (orange) is an opt-in checkbox. Low impact never counts, because a guard that stands down for every minor print stands down permanently.
By default every symbol is guarded. You can narrow it to a named list, and that is the case you have to type out, because an empty list means all symbols rather than none.
Widens the window from "no new entries" to "no stop or target changes either". Off by default, which keeps the behaviour the filter has always had.
With it on, for the length of the window:
modify,breakeven,nobreakeven,trailandnotrailalerts are refused, and show in your Signal Logs as blocked by the news filter.- PineHook trailing and auto-breakeven pause, so your stops sit still rather than being walked by PineHook. They are paused rather than cancelled, and resume after the window. On cTrader, PineHook converts its native trails to Bridge-managed steps while this option is on; broker-native trailing enabled directly in the cTrader app stays under broker control.
- A partial close that would move the remainder's stop to breakeven still closes, but leaves the stop where it is.
Turn it on if your firm treats a stop moving inside a news window as a breach. Several do. Leave it off if you would rather your trailing stop kept working through the release.
This stops your levels being moved. It cannot stop the market from reaching a stop that is already sitting on your account. If your firm counts that as a breach, look ahead at the calendar and plan around releases that sit near your open positions, because no setting will solve it for you.
Logging#
Which value wins#
When an alert includes a parameter, it overrides the stored value:
- Alert parameters
- Stored trading settings
- Broker defaults
For example, if your EA has Default Lot Size: 0.1 but the alert specifies size_lots=0.05, the trade will use 0.05 lots.
Keep going#
See the Creating Alerts guide to set up your first TradingView webhook alert.