Guaranteed stop loss (gsl=) by exchange
A guaranteed stop closes your trade at the stop price even when the market gaps past it. The broker sells that promise, so only a broker that offers it can take one. In Autoview the key is gsl=, with fgsl= as the fixed-price form. Two connections read it: Capital.com and OANDA. They read it in different ways, and an alert written for one does the wrong thing on the other.
This page comes from the Autoview integrations code that runs on our servers today. We read the code; we did not send these orders live for this guide.
The short version
| Exchange | What gsl= means | Where the stop price comes from |
|---|---|---|
| Capital.com | A switch. Its value is not read. | sl= or fsl=, which you must also send |
| OANDA | A price. It places its own guaranteed stop. | gsl= or fgsl= itself |
| Every other exchange | Ignored | Not sent |
Capital.com: gsl= marks your stop as guaranteed
On Capital.com the stop level always comes from sl= or fsl=. Adding gsl= tells Capital.com to make that same stop a guaranteed one. Autoview checks only that gsl= is in the line, so gsl=1, gsl=0 and fgsl=95 all do the same thing.
e=capital s=<EPIC> b=buy q=1 t=market fsl=1.0650 gsl=1 d=1Autoview refuses three kinds of line before they reach Capital.com:
- No stop level.
gsl=withoutsl=orfsl=is rejected, because there is no price to guarantee. - A trailing stop in the same line.
gsl=withts=orfts=is rejected rather than dropping one of them. - Hedging mode. If the Capital.com account is set to hedging, a line with
gsl=is rejected.
The same rules apply to a c=position line that amends an open position. There, gsl= counts as an amend key, so c=position fsl=1.0650 gsl=1 moves the stop and makes it guaranteed instead of closing the position. If you amend only the take profit, Autoview sends the current stop back as it is, and keeps it guaranteed if it already was. If you move the stop with sl= or fsl= and leave gsl= out, Autoview sends the new stop without asking for a guarantee, so put gsl= in that line too if you want the moved stop to stay guaranteed. The Capital.com command reference has the full rules.
OANDA: gsl= is the guaranteed stop price
On OANDA, gsl= is a price in its own right, just like sl=. The relative form is measured from the current bid or ask, or from price= if you send one. fgsl= is the exact price. Autoview attaches it to the order as a guaranteed stop that OANDA places when the order fills.
e=oanda s=EURUSD b=buy q=1000 t=market fgsl=1.0650 d=1sl= is a separate stop. If you send both sl= and gsl=, Autoview attaches both, each at its own price. You do not need sl= for a guaranteed stop on OANDA, and gsl= does not change what sl= does.
Your OANDA account has to allow guaranteed stops on that instrument. Where it does not, OANDA creates the order and cancels it straight away, and Autoview reports the cancel reason from OANDA rather than a success. The OANDA command reference covers how stops attach.
Changing the stop on open OANDA trades
c=position with an & section edits the stops on each open trade instead of closing it. With gsl= in that section, Autoview sends a guaranteed stop at that price for every open trade, written over the trade's current stop loss order if it has one. A gsl= that works out to 0 cancels the trade's stop loss order. Run it with d=1 first and read the log before you send it live.
Every other exchange
No other Autoview connection reads gsl= or fgsl=. The alert still goes through, and the key does nothing. If you send gsl= to Bybit or Binance expecting protection from a gap, you get the plain stop from sl=, or no stop at all if sl= is missing.
Test it before you rely on it
Add d=1 to the line and send it. The log shows what Autoview would send, including the stop price and whether it is marked guaranteed. For stops in general, see stop loss, take profit and trailing stop. For moving a stop on a position you already hold, see edit open orders by exchange.