Prop Account Guard

Prop Account Guard for Sierra Chart — User Guide

Sales are not open yet. Buying and activating a licence works as described here once sales open.

When a limit is reached, the trading day ends on every chart with the Guard: positions closed, orders cancelled, new entries blocked.

Prop Account Guard is a paid custom study for Sierra Chart by Uniano Dev. It includes everything in the free Prop Drawdown Monitor: the daily loss limit, the drawdown floor and the panel. It also acts on those limits. When a limit reaches its trigger, the Guard closes the position of its chart symbol, cancels that symbol’s working orders and turns on Sierra Chart’s trading lock. The lock stays until the session reset, or until you clear a drawdown lock yourself.

What it does

  • Daily loss limit. It acts at the limit minus a safety buffer: with a 1,000 limit and a 10% buffer it acts at 900, before the firm’s own limit is reached. It closes the position and cancels the orders of its chart symbol, and locks trading until the session reset.
  • Drawdown floor. It handles static, intraday trailing and end-of-day trailing floors, with an optional floor stop. It acts at the floor plus the buffer. This lock survives the session reset and a restart of Sierra Chart, and ends only when you set Clear drawdown lock to Yes.
  • Flat by a set time. At the time you choose, positions are closed and trading stays locked until the reset.
  • Discipline limits (optional):
    • max trades per session;
    • max losing trades in a row;
    • a daily profit target, which either closes and locks, or only blocks new entries.
  • Anything that appears while locked is removed. A position or an order in the chart symbol that shows up while trading is locked is closed or cancelled at the next update.
  • Clear reporting. The panel shows the state, the reason, the lock time and what ends the lock. Every action is written once to the Message Log, with the numbers behind it.

What it does not do

  • It never opens positions or places entry orders. Its only trading actions are closing positions, cancelling orders, and setting or clearing the trading lock.
  • It does not know your firm’s rules. You enter the rule type and the amounts from your firm’s dashboard. The Guard does not replace the firm’s own rules or its own risk system.
  • It acts only through a running chart. It acts on the chart it is on, while that chart receives data and Sierra Chart is running. Slippage, gaps, data delays and connection loss exist. The safety buffer is there for that reason, but it is not a guarantee.
  • It protects only the symbols that have a Guard. There must be one Guard on each traded symbol chart; read One Guard on each traded symbol chart.

Before you start: confirm with your firm that a risk tool which closes positions and locks trading is allowed on your account. Some firms restrict automated tools.

Install

  1. Once sales open, buy a licence on the product page. With your order, give us the name of the Sierra Chart account you sign in with. We authorise that account within one business day and confirm by email.
  2. Restart Sierra Chart. It downloads UnianoPropAccountGuard_64.dll into the Data folder by itself. The Message Log shows “File has been written to: …UnianoPropAccountGuard_64.dll”.
  3. Open a chart of a symbol you trade, then Analysis >> Studies >> Add Custom Study.
  4. Select Prop Account Guard by Uniano >> Prop Account Guard, press Add, then OK.
  5. Repeat steps 3–4 on a chart of every symbol you trade on this account.

If the panel says This Sierra Chart account is not authorised for Prop Account Guard, the licence is not active for the account you are signed in with. In that state the Guard measures nothing and does nothing. Write to hello@uniano.dev with your account name.

Required Sierra Chart settings

  • Trade >> Auto Trading Enabled - Global and Trade >> Auto Trading Enabled - Chart must both be on. Sierra Chart ignores a study’s trading actions without them. In that case the panel shows CANNOT ENFORCE with the menu item to turn on. The lock state is kept and enforced as soon as you turn it on.
  • Leave Trade >> Disable Auto Trading On Startup off, or Auto Trading is off after every restart.
  • Recommended: turn on Global Settings >> General Trade Settings >> Hold Market Order Until Pending Cancel Orders Confirmed. When the Guard cancels orders and closes a position at the same moment, this setting stops the closing market order from filling while an old order is still working.

The trading lock is global

The Guard uses Sierra Chart’s own trading lock, Trade >> Trading Locked. That lock applies to every trade account in this Sierra Chart, not only the one the Guard watches. If you trade several accounts in one Sierra Chart, a lock on one of them stops trading on all of them until the lock ends. The panel reminds you of this when more than one trade account is connected. We recommend trading one account per Sierra Chart instance while the Guard is on.

Apart from the short lifts described in this guide (while it closes a position, and while a position it cannot close is open), the Guard releases the trading lock only when its own lock ends: at the session reset, or when you clear a drawdown lock. A trading lock that was already on when the Guard locked counts as part of the Guard’s lock and is released then too. A trading lock you turn on while the Guard has no lock is left alone. When Guards of other accounts run in the same Sierra Chart, a Guard whose lock ends leaves the trading lock on while another account’s Guard still holds it and releases it once no Guard holds it, and a lift of the lock while another account’s Guard flattens is not taken as your unlock. While a position of another account is open in this Sierra Chart, the Guard does not set the trading lock (it would block closing that position too) and keeps its own chart symbol flat; the Message Log names that position.

One Guard on each traded symbol chart

Sierra Chart lets a study close the position and cancel the orders of its own chart’s symbol. So:

  • Put the Guard on one chart of each symbol you trade on the account.
  • The Guards of one account share their locks. When one chart locks, the others take the lock over: a lock that closes positions closes their own symbols too, and a block new entries lock keeps their open positions and blocks new ones. The Message Log line says “lock set on another chart of this account is applied here”.
  • A symbol without a Guard chart is not closed by the Guard.

How the account is measured. This depends on what your trading service reports to Sierra Chart; see Equity source in the Monitor guide.

  • The account balance is not reported (for example Sierra Chart’s Trade Simulation Mode, where version 1 was tested): each Guard measures only its chart’s symbol. The limits are then checked for each symbol on its own, and the losses of different symbols are not added together. Set the limits with that in mind, or trade one symbol per account. The measuring starts from Account size, which is right only on the first day of an evaluation: when you add the Guard on a later day, also enter Session start balance today from your firm’s dashboard that day (the next days continue from the stored balance). If Highest balance so far is above Account size and no session start is entered, the panel asks for it and the Guard measures no loss or drawdown; the locks already in force, the trade limits and the flatten time still apply.
  • The account balance is reported: the Guard uses the account values from the service. This mode was not tested in version 1 and measuring the whole account is not promised; try it on a simulated account first. With Equity source = Automatic, once the balance has been reported, the Guard waits for it after a restart or a connection loss instead of measuring the chart symbol for a while. While it waits, no loss or drawdown is measured; the locks already in force, the trade limits and the flatten time still apply.

When a symbol has no Guard

The Guard never keeps a trading lock against a position it cannot close. A lock would also block your own orders to close that position.

  • Sierra Chart lists the position. If Sierra Chart lists an open position of the account in a symbol without a Guard chart, the Guard does not set the lock. A lock it had already set is lifted. The panel shows “trading lock waits: NQZ26-CME +2 open without a Guard”, and one log line says what to do. Close that position, or add the Guard to a chart of that symbol.
  • Sierra Chart does not list positions. Some connections do not list positions (Trade Simulation Mode does not), so the Guard cannot see such a position and locks as usual. Use the emergency exit below to close it.
  • A Guard chart cannot enforce. A position on a Guard chart that shows CANNOT ENFORCE is a position no Guard can close: the other Guard charts of the account do not set the lock (a lock they had set is lifted) and log that it “is open on a Guard chart that cannot enforce”. Fix what that chart’s panel names, or close the position.

Emergency exit

To close a position yourself while the account is locked, untick Trade >> Trading Locked and close the position.

  • If the unlock lasts more than 2 seconds, the Guard takes it as yours. It logs “emergency exit” and does not lock trading again for this lock.
  • Meanwhile it keeps its own chart’s symbol flat: anything that opens there is closed at the next update.
  • The panel shows “trading lock off: you unlocked it; this chart is kept flat”.
  • The next new lock (a new limit reached, a new session lock) locks trading again as usual.

Settings

The Guard has every input of Prop Drawdown Monitor (rule preset, account size, limits, reset time, panel), set up the same way; see the Monitor guide, which is in the download of the free Prop Drawdown Monitor. Write to Message Log turns off the Monitor’s warning lines only: the Guard always writes its actions. Its own inputs are listed below.

InputDefaultWhat it does
Safety buffer (% of each limit)10The Guard acts this much before each limit. 10% of a 1,000 daily limit means it acts at 900.
Flatten at a set timeNoYes: close everything at the flatten time and stay locked until the reset.
Flatten time (session reset time zone)15:55:00The time of day for the previous input, in the same time zone as the session reset.
Max trades per session (0 = off)0After this many trades, new entries are blocked. A trade is counted from flat to open; a reversal counts as one trade.
Max losing trades in a row (0 = off)0After this many losing trades in a row, new entries are blocked.
Daily profit target (0 = off)0The session’s profit at which the next input applies.
At profit targetFlatten and lockFlatten and lock closes and locks until the reset. Block new entries only keeps open positions and blocks new ones.
Clear drawdown lock (once)NoSet to Yes to end a drawdown lock. It goes back to No by itself. If the account is still below the trigger, the lock comes back.

Blocked new entries. A position that was already open when entries were blocked stays open, and you may reduce or close it. If the position grows (also back after a partial close), turns to the other side or a new one opens, the Guard closes it at the next update. When every Guard chart of the account is flat, the Guard locks trading until the reset. Until then the panel of a flat chart shows “trading lock waits: a kept position is open on another Guard chart”, because the trading lock would also block closing that position.

Counting. Each Guard chart counts the trades and the losing streak of its own symbol. When one chart reaches a limit, new entries are blocked on every Guard chart of the account. A chart switched to another symbol (a contract rollover) starts these counts at zero for the new symbol. With Equity source = chart symbol, the measured values (session start, highest balance) also belong to the symbol: after a rollover, enter Highest balance so far and Session start balance today from your firm’s dashboard, or the new contract starts them from Account size.

Reading the panel

The first row is the Guard:

  • Upper line: the state word, and the reason on the right.
  • Lower line: when the lock started and what ends it, or, while nothing is locked, where the Guard acts (“acts at daily loss 900.00, equity 48,200.00 (10% safety buffer)”).
StateMeaning
ACTIVEWatching. Nothing is locked.
WARNINGNear a limit (the Monitor warning level), or “nothing measured”: a value for loss and drawdown is missing or awaited, named in the Needed row below (ENTER: a value to enter; WAITING: the account balance Sierra Chart has not reported yet); the locks already in force, the trade limits and the flatten time still apply.
NEW ENTRIES BLOCKEDA discipline limit or Block new entries only is in force. Positions that were already open may stay.
LOCKED FOR THE SESSIONClosed and locked until the session reset.
LOCKED UNTIL CLEAREDDrawdown floor. Locked until you set Clear drawdown lock to Yes.
NOT FLAT YETThe Guard asked Sierra Chart to close, and a position or order is still there. It asks again every 5 s, and waits while its own exit order can still fill.
CANNOT ENFORCESierra Chart ignores trading actions right now (Auto Trading off, history download, not connected to the trading service). The reason is shown. Limits are still measured.
NOT AUTHORISEDThe licence is not active for this Sierra Chart account. Nothing is measured or done.

The Daily loss and Drawdown rows, the footer and the optional breach price lines work as in the Monitor.

Message Log

Every action is written once. Each line starts with Prop Account Guard | <account> |. Examples:

LOCKED for the session | daily loss 905.00 >= trigger 900.00 (limit 1,000.00, buffer 10%) | flattening positions and cancelling orders Chart symbol flat | trading locked until the session reset Position appeared while locked | flattening positions and cancelling orders Trading was unlocked manually while locked | emergency exit: the Guard does not lock trading again until a new limit is reached and keeps this chart's symbol flat Session reset | daily loss limit lock ended

Restarts, connection loss and Chart Replay

  • Restarts. Locks are stored per account, counters per account and chart symbol, and the measured values per account (Equity source: account data) or per account and chart symbol (chart symbol), in <Sierra Chart>\Data\UnianoPropGuard. A session lock lasts until the reset, and a drawdown lock until it is cleared, also after a restart. Reset stored values clears the measured values, also on the other Guard charts that share them, and the trade count and losing streak of the chart where you run it; the locks are kept. A second Guard chart of the same symbol keeps its count, and the higher count returns to both charts at the next save.
  • Changing the Session reset time. Change it outside trading hours. A lock already in force belongs to the session in which it started: after the change it lasts until the reset of that session under the new time. If the new time puts the current moment into another session, the daily loss is measured again from that moment. Use the same Session reset time and time zone on every Guard chart of one account: each chart ends its locks at its own reset time.
  • Connection loss. The lock state is kept. Enforcement continues when the chart receives data again.
  • Chart Replay. The Guard follows the replay clock, so you can rehearse a locked day in simulation. Two cautions:
    • Jumping a replay backwards can show an older lock state.
    • Chart Replay can fill orders left over from an earlier replay.

FAQ

Will it trade for me? No. It only closes positions, cancels orders and locks trading.

Can I unlock early? A session lock ends at the reset; that is the point of the tool. For a position you must close, use the emergency exit. A drawdown lock is yours to clear once you have checked the account.

Does it work in simulation? Yes. Turn on Trade >> Trade Simulation Mode On and test your settings with simulated orders before you trade.

I trade on a web platform too. The Guard sees only what your connection reports to Sierra Chart and can close only symbols that have a Guard chart.

Compatibility

  • Sierra Chart 64-bit on Windows 10 and 11.
  • Tested in Sierra Chart’s Trade Simulation Mode. With another trading service, try the Guard on a simulated account first. Measuring the whole account is not promised in version 1.
  • Panel theme Dark or Light; text size from 7 to 24 points.

Support

Write to hello@uniano.dev. Please include your Sierra Chart account name and a screenshot of the panel and the Message Log.