Skip to content
parchmentdocs
Open app

Stop loss and take profit

A take profit (TP) closes your position when the price moves far enough in your favor. A stop loss (SL) closes it when the price moves far enough against you. Both are optional. You can set each one as a price or as an ROI.

TP and SL are not orders on chain. Parchment's trigger service stores them, watches the price, and sends a normal close request for you when a price is reached. This is best effort: there is no guarantee that a trigger fires, or fires at your price. The app puts it this way: "When the price reaches your take profit or stop loss, the whole position closes at market. The fill can be worse than your trigger, and triggers are best-effort."

TP/SL is available when Parchment's trigger service is enabled. Otherwise the app does not show the TP/SL controls. While the service is down or catching up, the app shows TP/SL is temporarily unavailable.

Example

You open a long at 100x with $10 of margin, so your size is $1,000. You fill at $100.00. At 100x, the bust price (the app calls it the liquidation price) is 0.95% below entry, at about $99.05. Using the fees at full payout factor:

PriceIf the close fills exactly there
Take profit$100.50A $5 price gain, about $4.44 credited after the win share and the close fee
Stop loss$99.60A $4 price loss, about $4.04 with the close fee

Both rows leave out the $0.02 execution fee on each request.

If the price rises to $100.50 first, the take profit fires and closes the whole position. If it falls to $99.60 first, the stop loss fires and closes it. Once the position is closed, the other trigger has nothing left to close.

The fill can be worse than these prices, and the position can still be liquidated before the close fills. See When a trigger fires and Stop loss and liquidation.

Turn on TP/SL access

Before you can set a TP or SL, you turn on TP/SL access for your account. This is one wallet transaction, and you pay its gas. The app describes it as: "Lets the TP/SL service close your positions at your take profit and stop loss. It can only close, never withdraw."

Turn it on in any of these places:

  • Settings, then Trading, then TP/SL access: press Turn on.
  • When you turn on one-click trading in Settings, then Trading: tick Also turn on TP/SL. Both go in the same wallet transaction.
  • In the order ticket: switch on TP/SL, then press Turn on.
TP/SL access allowsTP/SL access does not allow
Requesting a close of your positionsOpening a position
Emergency closing a position that has a pending close request, once the 15-second wait has passedWithdrawing from your account, or moving your funds
Closing a position on a retired marketCancelling your orders
  • TP/SL access has no expiry. It stays until you turn it off. Your one-click trading session is separate.
  • Turning off one-click trading does not turn off TP/SL access. To turn it off, press Turn off in Settings, then Trading, then TP/SL access. The app warns: "Turning it off stops every take profit and stop loss from firing."

If Parchment changes the trigger service's address, TP/SL access shows as off and your saved triggers do not fire until you turn it on again. The old access keeps working until you revoke it. Settings lists it as Earlier TP/SL access · can still close positions, with a Revoke button.

Set TP/SL

With an open

Switch on TP/SL in the order ticket. The Take profit and Stop loss fields appear.

  • With one-click trading on, your session key signs the TP/SL while the open is built. There is no extra prompt. If saving fails after the open is sent, the app shows TP/SL not saved and "Set it on the position once it opens."
  • Otherwise, once you sign the open, your wallet asks you to sign the TP/SL message. The TP/SL is saved before the open is sent. If it cannot be saved, the open is not sent: the app shows the reason followed by Order not sent.

If the open does not fill, nothing is armed. See TP/SL set with an open.

On an open position

In your positions, press Add TP/SL, or Edit TP/SL if one is already set. Enter prices and press Save. Each change asks your wallet, or your one-click session key, to sign a message. It is not a transaction and costs no gas.

If TP/SL access is off, the app shows Turn on TP/SL access in Settings first.

By ROI

Each field has a price box and an ROI box. Type in either one and the app fills in the other.

  • Take profit ROI % is the gain on your margin.
  • Stop loss ROI % (loss) is the loss on your margin, typed as a positive number. A negative stop loss ROI locks in a gain.
  • The stop loss ROI stops just short of liquidation. At that limit the app shows Max …%: a bigger loss is past liquidation.
  • Until there is a price to work from, the app shows Waiting for a price to set TP/SL by ROI.

Next to each field, the app shows the ROI and PnL of a close at exactly that price, before any builder fee.

On the chart

TP and SL show on the price chart as lines.

  • In the order ticket, the TP and SL show as dashed (preview) lines. Drag one to set that field. Nothing is sent.
  • On an open position, drag its TP or SL line to a new price. On release, press ✓ or Enter to save, or ✕ or Esc to put it back. Saving asks for a signature, like the editor.

While you drag, the line's label shows the PnL at that price, or why the level cannot be set there.

Remove TP/SL

Press Remove TP/SL (✕) next to the levels, then choose Remove take profit, Remove stop loss or Remove both. Keep closes it without changes. Each removal asks for a signature.

When a position closes for any reason, its triggers go with it.

Status in your positions

The app showsWhat it means
TP and SL with their pricesThe trigger is saved.
Near liq."Stop is near liquidation: it may not fire before the position is liquidated."
Paused"TP/SL is off. These will not trigger." Your prices are saved, but TP/SL access is off.
Stop not armedThe stop sent with the open was not armed. Use Set stop. See Stop loss and liquidation.
Take profit hit · closing… or Stop loss hit · closing…A trigger fired and its close is in flight. You cannot change TP/SL until it ends.

If you turn TP/SL access back on, any TP or SL still saved on an open position is armed again and can fire right away. Editing or removing a trigger needs TP/SL access to be on, so remove the ones you no longer want before you turn it off.

When a trigger fires

The trigger service watches the same signed oracle price that fills orders. It never acts on a price older than one the market has already used on chain.

PositionTake profit fires when the price isStop loss fires when the price is
Longat or above your TPat or below your SL
Shortat or below your TPat or above your SL

When a trigger fires, the trigger service sends a market close of the whole position. The close has no price limit. Parchment's keeper fills it at the next valid oracle price after the request, like any close, not at your trigger price. If the price is moving fast, or jumps past your level, the fill can be worse than your trigger price. This applies to take profits as well as stop losses.

Once the trigger service sees a price past your level, it sends the close even if the price moves back before the close fills. If a trigger's close request ends without a fill and the position is still open, the trigger is armed again.

When a trigger does not fire, or fires late

Triggers rely on Parchment's trigger service, which runs off chain. A trigger does not fire, or fires late, when:

  • the trigger service is down or behind,
  • the price reaches your level only briefly, between two of the trigger service's price checks,
  • there is no fresh signed price for the market (a stale price is never used),
  • the market's price feed is switched off,
  • the market is closed (a stock market outside its session), or a session close is under way,
  • the market is retired (close the position yourself),
  • the position is still inside its minimum hold (the close is retried after a short wait, if the price is still past your level),
  • you already have a pending close on that position,
  • TP/SL access is off for your account.

A pause does not stop trigger closes. See Pauses.

Fees

A trigger close is a normal close and pays the normal fees: the $0.02 execution fee and the close fee, plus, on a winning close, the win fee and any builder fee for a code you approved. See Fees.

There is no extra fee for using a trigger. Each close request it sends pays the execution fee, so a close that expires and is sent again can pay it again.

If your free balance cannot cover the $0.02 execution fee, the trigger still sends the close. The missing part is taken from the close payout when it fills, and dropped otherwise.

Rules and limits

RuleThe app shows
One TP and one SL per position.
A long's TP must be above the current price, a short's below.Take profit must be above the current price … (or below)
A long's SL must be below the current price, a short's above.Stop loss must be below the current price … (or above)
A long's SL must be below its TP, a short's above.Must be below take profit / Must be above take profit
An SL at or past the liquidation price is refused.Past liquidation: it would never fire
A level the price has already reached is refused.The price is already past that level.
You cannot change triggers while one is closing the position.A trigger is already closing this position.
New triggers need a current price for the market.No current price for this market. Try again.
New triggers need the trigger service to be up.TP/SL is unavailable right now.

The app also warns, without refusing:

  • Near liquidation: the stop is close to the liquidation price.
  • May be dropped if the fill is worse: a worse fill at open could put the stop past liquidation.
  • Below entry: closes at a loss (long) or Above entry: closes at a loss (short), on a take profit.

An armed TP or SL on a position has no expiry. It is never cancelled for age or for failed attempts.

At most 256 orders with TP/SL can wait to fill per wallet, and no more than your account's 64 pending opens. At the limit, the app shows Too many orders with TP/SL are waiting to fill. Wait for one to fill. or Your account is at its pending-order limit. Wait for an order to fill.

TP/SL set with an open

A TP/SL you set in the order ticket waits for its open to fill. When that open fills, the prices move to the new position and are armed. If the open fills late, its TP/SL is still attached.

If the open has not appeared on chain a few minutes after you sign, the app shows TP/SL waiting to attach: "Its open has not been seen on chain yet. The TP/SL is kept and still attaches if the open fills."

If the TP/SL cannot be attached, it is voided. The app lists voids from the last seven days above your positions as TP/SL not attached, with one of these reasons:

  • The open did not fill, so its TP/SL was not set.
  • The transaction did not open this market and side, so its TP/SL was not set.
  • The transaction opened more than one position on this market and side, so its TP/SL was not attached. Set TP/SL on each position.
  • The open transaction failed, so its TP/SL was not set.
  • The open filled while the account was at its pending-order limit, so its TP/SL was not attached. Set TP/SL on the position.
  • The open expired before it ran, so its TP/SL was not set.
  • The position closed before its TP/SL could attach.

Stop loss and liquidation

A stop loss does not protect you from liquidation. At high leverage the distance from entry to the bust price is small (about 0.06% at 1000x), so the price can reach it before a stop's close fills. If the position is liquidatable when the close fills, it is liquidated instead and you lose your margin.

When you set a stop at open, the app checks it against liquidation at the expected fill and warns May be dropped if the fill is worse when it is close. Your actual fill can be worse, and that moves the liquidation price. If the fill puts your stop at or past liquidation, the stop is dropped and the take profit stays. The app then shows Stop not armed: "Your position filled without the requested stop. Set a stop on the position." Press Set stop to set a new one. In your positions, Stop not armed stays on the row, with the reason ("Stop was past liquidation at the fill, so it was not armed.") and the time, until you set the position's TP/SL again.

FAQ

Does a stop loss guarantee my maximum loss? No. The close fills at the next oracle price with no limit, the trigger service can be delayed, and the position can be liquidated first. The position's loss is capped at its margin; the $0.02 execution fee on each request is on top.

Can the trigger service take my funds or open trades? No. TP/SL access only lets it close your positions. It cannot open positions, withdraw, or move funds.

Do I need to keep the app open? No. Triggers are saved with Parchment's trigger service and watched there.

Does TP/SL access expire? No. It lasts until you turn it off. Your one-click trading session is separate.

I turned TP/SL access off. Are my triggers gone? No. They are saved but cannot fire. If you turn TP/SL access on again, they are live again. Remove them first if you do not want that.

Why did my take profit fill worse than my TP price? The close fills at the next oracle price after the trigger fires. If the price moved back in the meantime, you get that price.

Can I close part of a position with a trigger? No. Every trigger closes the whole position.