#
Getting Started

#### Welcome to ProfitView, enabling automated indicator & script based trading on TradingView

#### — using the exchange of your choice!

This page will give you an overview of the steps required and guide you through the setup process, getting you started as quickly as possible.

Note: When you trade through brokers via our app or use our links to sign up with those brokers, we may receive a small commission through affiliate programs, at no additional cost to you!

#### 1. Setup permissions and API accounts

- Tip: To make sure Chrome does not close completely in case of an update it is highly recommended to always have more than only the ProfitView Options tab open — even `about:blank` (blank page) is sufficient!

  It is also recommended to enable the option `Always keep options page open` under ➔ General Options.

  To further bullet proof your ProfitView setup install a tool like "Restart on Crash" that can make sure that Chrome is always running.

  To be able to communicate with an exchange that you want to use, you need to grant ProfitView the permission to connect to it's API — do that by simply clicking on the corresponding `ON` button on the ➔ Setup: Permissions page and confirming the following permission prompt.

  Afterwards select the respective exchange in the main menu on the lower left side of this window (under `Accounts`) and configure either the default account (named simply `*`) or add multiple accounts, each with a user defined name (alias) — this alias will be used in the next step to target each account.

  Step 1 ➔ go to Setup: Exchange Permissions

#### 2. Create custom TradingView Alerts

- For your indicators and custom strategies on TradingView to be able to place and cancel orders on an exchange through ProfitView, you have to create an alert on TradingView and put either the name of a script you defined under ➔ Setup: PV Alerts or some of the commands specified under ➔ Setup: Commands directly into its `Message` section!

  Whenever TradingView then triggers one of those alerts, ProfitView will intercept it 1 and look up each line of the message (= the alerts `Message` section) as the name of a ➔ PV Alert to be triggered 2 — if a matching ➔ PV Alert cannot be found the commands in the message are executed directly, which is referred to as a legacy alert by ProfitView!

  1 This is done by directly listening to TradingViews event stream and also intercepting events in any open TradingView tabs as a backup; you have to log in to your TradingView account at least once while ProfitView is installed for it to get the necessary credentials!

  2 Highly recommended as ➔ PV Alerts offer a lot of benefits like much easier editing/saving/export, much more flexible filtering, timeouts, locking, unified alerts (buy/long, sell/short in one script!) and more — see ➔ Setup: Commands sections Unified Alerts and Custom Plots / Variables for passing data to ➔ PV Alerts

  Important: The field `Alert Name` in TradingView can be ignored – it is only used for display purposes!

  Step 2 ➔ go to Setup: ProfitView Alerts

#### 3. Purchase / unlock PRO features

- The final step: To test the general functionality of your setup the free trial license for ProfitView is sufficient — however, once you want to start live trading you will need to acquire a pro license as most Exchanges are only supported in the PRO version.

  Step 3 ➔ go to Setup: Unlock PRO Features

#
Setup: Exchange Permissions

Note: To be able to communicate with the respective Exchange that you want to use, you need to grant ProfitView the permission to connect to the Exchange's website — do that by simply clicking on the corresponding `ON` button below and confirming the following permission prompt!

Supported Exchanges

➔ continue to Setup: Unlock PRO features

#
Setup: Unlock PRO Features

ProfitView Account
Account ID: | `n/a`
License: | n/a
TV Account: | n/a
| Everyone ## TRIAL Thanks for trying out ProfitView! | PRO ## $399.99 / lifetime! Enable hassle free automated trading! | PRO – MONTHLY ## $36.99 / month Automated trading on a budget!

Supported Exchanges

Additional Features

E-Mail Discord Telegram Twilio IFTTT Notifications |  |  |
TV Indicator Preset Manager |  |  |
TV Backtesting Export |  |  |

➔ continue to Setup: ProfitView Alerts

#
Setup: ProfitView Alerts

Note: When ProfitView is receiving an alert from TradingView it checks each line of its message for any of the alert names listed here (in a line by itself), applies the filter options and runs the syntax defined below. Any additional syntax in the original alert message will be run after applying the legacy filters set under ➔ General Options!

# Setup: Available Alert Commands

Note: For your studies on TradingView to be able to place and cancel orders etc. on an Exchange through ProfitView you have to create an alert on TradingView with either the name of a ➔ PV Alert or some of the following commands in its `Message` section!

➔ End of this page for examples ➔ Click here for Unified Alerts ➔ See IF / ELSE ➔ See Custom Plots / Vars

Name | Key(s) | Cmd | Def | Default | Values | Description
--- | --- | --- | --- | --- | --- | ---
Account | `a`, `acc`, `account` |  |  | * | Account Name(s) (no special characters!) | The account name of the API key to use for this command (as defined under `Accounts` on the left) Multiple account names can be specified as comma separated list: `a=acc1,acc2,acc3` For different exchanges/symbols per account use: `a=ex1:sym1:acc1,ex2:sym2:acc2` If 'ex' or 'sym' is left empty the current defaults (first local, then ➔ General Options) are used, alternatively `a=ex1:acc1,ex2:acc2` is possible! Example:
    ex=bitmex-testnet sym=xbtusd acc=bitmex:acc1,acc2,acc3
(equals `acc=bitmex:xbtusd:acc1,bitmex-testnet:xbtusd:acc2,bitmex-testnet:xbtusd:acc3`) Note: When multiple accounts are specified, each command is repeated per account sequentially which introduces time slippage between the accounts, thus for all time critical operations the alternative option `ap=` should be used! (see below) Note: Besides time slippage also conditional options (ifnone/iffound/iferror etc.) work different over multiple accounts – for "success" the command has to be successfully completed for all accounts, for "failure" just one error within all accounts is enough, thus again the alternative option `ap=` should be used in these cases as the control flow will be completely individual for each account! Note: Empty account names are ignored (eg. `ap=def,[accs bybit:*strat1],[$myAccVar]` could resolve to `ap=def,,`) More info about built-in market/symbol name mapping on our Wiki
Accounts Parallel | `ap`, `par`, `parallel` |  |  | n/a | Account Name(s) (no special characters!) | Similar to `a=` above but instead runs all commands following it in parallel for the given API keys Note: Replacement for `a=` command, can only be used once per alert and in a line by itself or with new defaults (`e=`, `s=` etc.)!
Book Side | `b`, `book`, `side` |  |  | n/a | buy / long ; sell / short | The side of the market this order should be placed on (for limit/market opening orders) or side to filter by (for `c/ch=order` and `c/ch=pos`) Supported shorthands: `long=50%` for `side=long q=50%` // `sell=10$` for `side=sell q=10 unit=currency` // `marketbuy=50%` for `side=buy q=50% type=market` etc. Note: Use `buy`/`sell` for spot markets and `long`/`short` for margin – especially important when an exchange/market supports both!
Callback Rate | `cbrate` |  |  | n/a | <number> | Binance Futures / OKX only: Callback rate (distance) for trailing stops (Binance: min 0.1, max 5 – where 5 = 5%) Note: This value can be automatically calculated if you specify both `so=123` (activation price) and `ts=1%` (trailing distance) instead!
Cancel / Close | `c`, `cancel`, `close` |  |  | order (for `cancel=`) ; pos (for `close=`) | order / position / pos takeprofit / tp ; stoploss / sl ; ts ; so ; open / limit ; close / stops | Cancel open orders (`c=order`) or close open positions by placing a closing order (`c=pos`) according to other specified parameters (see below) Can be combined with filtering options like `b`, `id`, `minpl`, `mins` etc. Supported shorthands: `check=sell` for `check=order side=sell` (side optional) // `checkpos=long` for `check=pos side=long` (side optional) // `close=50%` for `close=pos q=50%` // `close=short` for `close=pos side=short` // `marketclose=50%` for `close=pos q=50% type=market` (quantity optional) // `closeall` for `close=pos sym=*` Find more info regarding filtering on our Wiki!
Cancel / Close Maximum | `cm`, `maximum` |  |  | 100% | Static: <number> / <percent>% Random: <min>-<max> / <min>%-<max>% | Specify how many open orders or positions should be canceled/closed (see `cmo` for ordering)
Cancel / Close Maximum Order | `cmo`, `order` |  |  | oldest | newest / oldest; lowest / highest; smallest / biggest; random | Sort order for orders to be canceled (`c=order`) or positions to be closed (`c=pos`) newest / oldest: By timestamp of when the order was submitted or changed (not supported on Bitfinex, Deribit, Phemex, Poloniex!) lowest / highest: By order or average position price smallest / biggest: By total order amount or position size
Cancel / Close Reverse Match | `cr`, `reverse`, `nonmatch` |  |  | 0 | 0 / off / false ; 1 / on / true | Inverse the filtering of orders (for `close/check=order`) or positions (for `close/check=pos`) For example when using `cancel id=foo` to only cancel orders with a custom id starting with "foo", when adding `cr=1` all orders not starting with "foo" will be canceled!
CMC Ticker ID | `cmcid` |  |  | BTC | <symbol> | Specifies the CoinMarketCap ticker symbol to query for min/max price change checks (see `min1h` etc. below) Note: When using this command the returned data is saved as local variables: `price`, `volume_24h`, `volume_change_24h`, `percent_change_1h`, `percent_change_24h`, `percent_change_7d`, `percent_change_30d`, `market_cap`, `market_cap_dominance`, `fully_diluted_market_cap`
Cached Balance | `cb`, `bc`, `cachedbalance` |  |  | n/a | 0 / off / false ; 1 / on / true | Use last cached balance info for an account if possible, otherwise current balance is queried! Supported shorthand: `cached` for `cachedbalance=1 cachedprice=1` Note: If specified without a value it defaults to on/true, eg. `cb` equals `cb=1`!
Cached Price | `cp`, `pc`, `cachedprice` |  |  | n/a | 0 / off / false ; 1 / on / true | Use last cached price data (ticker) for a symbol if possible, otherwise new ticker data is queried! Supported shorthand: `cached` for `cachedbalance=1 cachedprice=1` Note: If specified without a value it defaults to on/true, eg. `cp` equals `cp=1`!
Check | `ch`, `check` |  |  | n/a | order / position / pos takeprofit / tp ; stoploss / sl ; open / limit ; close / stops | Similar to the cancel/close command but will only check if a matching order/position exists Can be combined with filtering options like `b`, `id`, `minpl`, `mins` etc. – best used with `ifn`/`ifo` conditionals (see below) to jump to other commands or abort the alert if matching items found (or not found)! Find more info regarding filtering on our Wiki!
Check for Order ID | `cid`, `checkid` |  |  | n/a | Anything (excluding special characters) | Option for `c=pos` to first check if any open orders match the given custom order ID(s) (same format as `id=` below) before placing a closing order – to specify an action or jump mark in case no order matches see option `wid=` further down!
Check for Alert | `cha`, `checkalert`, `alertcheck` |  |  | n/a | <alert> | Checks if the given alert (by alert id or name) exists and is enabled. If `ife=` or `ifd=` are specified as well those are processed according to the state of the alert (enabled or disabled) – otherwise the rest of the line is skipped if the alert is not found or disabled!
Delay | `delay`, `sleep`, `wait` |  |  | n/a | Static: <number> / <percent>% Random: <min>-<max> / <min>%-<max>% | Pauses execution between this and the previous command for the specified time in seconds (eg. `delay=7.5`) – supports different time units eg. `1.5m` for 90 seconds, `2.5h` for 150 minutes etc. Note: Percentages are based on the bar time (chart resolution) of the alert!
Disabled | `d`, `debug`, `disabled` |  |  | 0 | 0 / off / false ; 1 / on / true | Disables placement or cancelation/closing of orders/positions (read-only mode) This is helpful for debugging by outputting the calculated parameters to be used (or to check for open orders/positions, although `ch` and `ifn`/`ifo` is now recommended for this!) Note: If specified without a value it defaults to on/true, eg. `disabled` equals `disabled=1`!
Disable Alert | `disable` |  |  | n/a | <alert> ; PV / APP | Disable given ➔ PV Alert or current running alert (if none is specified) To disable running of any received alerts (global "pause" mode) use `disable=app` Note: Alert can be specified by one of its names or by its unique ID (found under the name field of the expanded alert) – wildcards (`*`) supported for alert names!
Exchange | `e`, `ex`, `exchange` |  |  | Exchange Name from Alert | <exchange> | The receiving exchange for this command Available: `binance`, `binanceus`, `binanceft`, `binanceft-testnet`, `bitfinex`, `bitmex`, `bitmex-testnet`, `bybit`, `bybit-demo`, `bybit-testnet`, `coinbase`, `coinbase-sandbox`, `deribit`, `deribit-testnet`, `gemini`, `gemini-sandbox`, `kraken`, `krakenft`, `krakenft-demo`, `kucoin`, `kucoin-sandbox`, `kucoinft`, `kucoinft-sandbox`, `oanda`, `oanda-sandbox`, `okx`, `okx-demo`, `phemex`, `phemex-testnet`, `poloniex`, `simplefx`, `simplefx-demo` Note: When targeting multiple accounts via comma separated list in `a=` or `ap=` the exchange can be specified per account in the same way! (and in the same order as for `a=` / `ap=`) Note: It is highly recommended to use the `Symbol` button (found in the alert editor and under the account settings) to insert exchange and symbol options conveniently and safely! More info about built-in market/symbol name mapping on our Wiki
Stop / Pause / Resume Alerts | `exitall`, `pauseall`, `resumeall` |  |  | n/a | n/a | Force-exit / pause or resume all running alerts Note: Forcefully stopping running alerts can lead to unprotected positions!
Else / Check Variable | `else` |  |  | n/a | cancel / cancelall / cancelside / closemarket / closeall / closeside / abort / back / this / continue / retry / <number> / <label> | See `if` below – specify what action to take when the if-conditon evaluated to false or zero! (instead of executing the rest of the current command line)
Enable Alert | `enable` |  |  | n/a | <alert> ; PV / APP | Enable given ➔ PV Alert or current running alert (if none is specified) To enable running of any received alerts (resume from global "pause" mode) use `enable=app` Note: Alert can be specified by one of its names or by its unique ID (found under the name field of the expanded alert) – wildcards (`*`) supported for alert names!
Error Handling | `err`, `error`, `iferror`, `onerror` |  |  | 0 | cancel / cancelall / cancelside / closemarket / closeall / closeside / abort / back / this / retry / continue / <number> / <label> | Determines what to do when the current command encounters an error – use either the listed values, their aliases or specify a custom jump label: cancel (-7): Cancel all orders, continue alert (use `eid=` to target orders) cancelall (-6): Cancel all orders, skip rest of alert (use `eid=` to target orders) cancelside (-5): Cancel orders matching commands side (b=), skip rest of alert (use `eid=` to target orders) closemarket (-4): Cancel orders, close all positions at market, skip rest of alert closeall (-3): Cancel orders, close all positions, skip rest of alert closeside (-2): Cancel orders, close all positions matching commands side (b=), skip rest of alert abort (-1): Don't process any more commands in this alert back (-0.5): Resume execution after the command that initiated the last jump this (-0.2): Resume execution at the command right after the last jump mark (loop) retry (0): Default – retry and/or continue with the next command (according to Exchange or local retry settings) continue (0.5): Continue with the next command (no retries / same as `retries=0`) <number> / <label>: Skip over the next given number of commands or jump to given label Note: If `ep=` is also specified, positions are closed via limit order (otherwise market)
Error Handling Price | `ep`, `errorp`, `errorprice` |  |  | n/a | Offset: <number> Relative: <percent>% Absolute: @<number> Random: <min>-<max> / <min>%-<max>% | Amount to undercut or overcut the top order in the book – either by percentage or absolute price in case positions are closed due to error handling! (see above) Note: When targeting multiple accounts via comma separated list in `a=` or `ap=` the quantity can be specified per account in the same way! (and in the same order as specified for `a=` / `ap=`) Note: Absolute prices can also be entered for all price parameters by prefixing them with `@`! (eg. `p=@7500`)
Fallback Action | `fb`, `fallback` |  |  | n/a | cancel / cancelall / cancelside / closemarket / closeall / closeside / abort / back / this / retry / continue / <number> / <label> | Fallback action or jump mark (label) to be used in case a non existing label has been specified for another conditional option – useful if placeholders like `[id]` or `[sym]` are used for jump marks and not all possible values can be defined!
FIFO | `fifo` |  |  | 1 | 0 / off / false ; 1 / on / true | SimpleFX only: Set FIFO order flag (true by default) Note: If specified without a value it defaults to on/true, eg. `fifo` equals `fifo=1`!
Filter Trades | `ft`, `filtertrades` |  |  | 0 | 0 / off / false ; 1 / on / true | OANDA only: Apply `cm`/`maximum` and `cmo`/`order` filtering options per trade making up a position for `close=pos` Note: If specified without a value it defaults to on/true, eg. `ft` equals `ft=1`!
Fixed Price | `fp`, `fixed`, `fixedp` |  |  | n/a | Static: <number> Random: <min>-<max> | Fixed price for which to place an order or filter by it (if used with cancel/check orders/positions command – more info on our Wiki! ) Note: When targeting multiple accounts via comma separated list in `a=` or `ap=` the quantity can be specified per account in the same way! (and in the same order as specified for `a=` / `ap=`) Note: Absolute prices can also be entered for all price parameters by prefixing them with `@`! (eg. `p=@7500`)
From / To (Time Span) | `from`, `to` |  |  | n/a | Static: <number> / <percent>% Random: <min>-<max> / <min>%-<max>% | Bybit only: Define starting/ending time window from which to query PnL records (see `query` further below) Offset calculated from current time (see `since` below on how to change the reference) eg. `from=-5m` => starting from 5 minutes ago Note: Percentages are based on the bar time (chart resolution) of the alert!
Guaranteed Stop Loss | `gsl`, `guaranteed` |  |  | 0 | 0 / off / false ; 1 / on / true | OANDA only: Used together with sl/stoploss (see further below) to place a guaranteed stop loss (for higher fees) Note: If specified without a value it defaults to on/true, eg. `gsl` equals `gsl=1`!
Above / Below Price Filter | `above` / `gt`, `aboveeq` / `gte`, `below` / `lt`, `beloweq` / `lte` |  |  | n/a | Static: <number> / <percent>% Random: <min>-<max> / <min>%-<max>% | Filter open positions with `c/ch=pos` by their average entry price or open orders with `c/ch=order` by their limit or market stop price For relative prices (eg. `gt=+5%`) the current or cached (with `pc=1`) ticker bid/ask is used as base for the calculation – alternatively a custom plot can be specified either via `gtref=`/`gteref=`/`ltref=`/`lteref=` options or directly via shorthand (eg. `gt=_myplot+5%`)! Note: When targeting multiple accounts via comma separated list in `a=` or `ap=` this option can be specified per account in the same way! (and in the same order as specified for `a=` / `ap=`) Find more info regarding filtering on our Wiki!
Hidden / Iceberg | `h`, `hidden`, `iceberg` |  |  | n/a | Static: <number> / <percent>% Random: <min>-<max> / <min>%-<max>% | Binance / Binance US: Portion of the order to be invisible Bitfinex: Whether the order should be hidden (eg. `h=1` = whole order invisible) BitMEX / Deribit / KuCoin Futures: Portion of the order to be visible, rest will be hidden (eg. `h=0` = whole order invisible)
Custom Order ID | `id`, `custom`, `name` |  |  | n/a | Anything (excluding special characters) | Give the order a custom ID (if used with an order placing command) or filter by it (if used with cancel/check orders command) – for `c/ch=order` a comma separated list can be specified to check for any matches! Note: When used with a cancel/check orders command the app checks if an order ID starts with any of the listed IDs – also supports wildcards eg. `id=1H*SL,*TP` Native support: Binance, Binance Futures, BitMEX, Bybit, Deribit, Gemini, KuCoin, KuCoin Futures, OANDA, OKX, Phemex, SimpleFX Using ID Cache: Bitfinex, Coinbase Pro, Kraken, Kraken Futures, Poloniex Note: If you are using IDs with exchanges that rely on the ID Cache please make sure to check the `Custom Order ID Cache Time` setting under ➔ General Options! Note: As most exchanges require every order ID to be unique over a certain timeframe, clever mechanisms have been built in that "uniquify" every ID with a combination of alert/event id, command number and current timestamp etc. – if despite all of this you still receive an error about a duplicate order ID this usually points to a problem of running multiple app instances in parallel that try to place orders at the same time!
Set Auto Interval | `interval` |  |  | n/a | [<alert>,]interval | Configure given ➔ PV Alert or current running alert (if none is specified) to run automatically according to the given interval (best use the `Edit interval` button in the ➔ PV Alert Editor to create the correct syntax or look up "crontab syntax"!) Note: If interval is specified as `+<number>` the alert will be configured to run once in given number of minutes from now – supports different time units eg. `1.5m` for 90 seconds, `2.5h` for 150 minutes etc. Note: Alert can be specified by one of its names or by its unique ID (found under the name field of the expanded alert) – wildcards (`*`) supported for alert names!
If / Check Variable | `if` |  |  | n/a | (<condition>) | The specified condition is evaluated before the rest of the current command line is processed but while the syntax is running – any other commands in the same line are only executed when the condition resolves to true or a non-zero value Uses the same format for condition as the preprocessor version of ➔ IF / ELSE described below! Note: If the condition contains any spaces it has to be enclosed in brackets, eg. `if=(close < open) abort` Note: All pre-defined variables listed under ➔ Unified Alerts can also be used freely in the condition! More info on our Wiki!
If Alert(s) Enabled / Disabled | `ife`, `ifenabled`, `ifd`, `ifdisabled` |  |  | n/a | cancel / cancelall / cancelside / closemarket / closeall / closeside / abort / back / this / continue / retry / <number> / <label> | See `ifn` below – specify what action to take when the alert(s) matching the `checkalert` command are enabled (`ife=`) or disabled (`ifd=`)!
If None Open / None Found | `ifn`, `ifnot`, `ifnone` |  |  | 0 | cancel / cancelall / cancelside / closemarket / closeall / closeside / abort / back / this / continue / retry / <number> / <label> | Determines what to do IF the current command does NOT match (if used with `ch`), cancel/close (if used with `c`) or place at least one order/position – use either the listed values, their aliases or specify a custom jump label: cancel (-7): Cancel all orders, continue alert (use `cid=` to target orders) cancelall (-6): Cancel all orders, skip rest of alert (use `cid=` to target orders) cancelside (-5): Cancel orders matching commands side (b=), skip rest of alert (use `cid=` to target orders) closemarket (-4): Cancel orders, close all positions at market, skip rest of alert closeall (-3): Cancel orders, close all positions, skip rest of alert closeside (-2): Cancel orders, close all positions matching commands side (b=), skip rest of alert abort (-1): Don't process any more commands in this alert back (-0.5): Resume execution after the command that initiated the last jump this (-0.2): Resume execution at the command right after the last or closest jump mark (loop) continue (0): Default – Continue with the next command retry / repeat (0.5): Run the command again (same as jumping to a label right before the current command) <number> / <label>: Skip over the next given number of commands or jump to given label Supported shorthands: `ifnoorder=...` for `check=order ifnone=...` // `ifnopos=...` for `check=pos ifnone=...`
If Open Or Found | `ifo`, `ifopen`, `iffound`, `ifmatch` |  |  | n/a | cancel / cancelall / cancelside / closemarket / closeall / closeside / abort / back / this / continue / retry / <number> / <label> | Supported shorthands: `iforder=...` for `check=order iffound=...` // `ifpos=...` for `check=pos iffound=...` See `ifn` above – works in the "opposite" way, specifying what action to take IF the conditions ARE met!
If Bigger / Smaller | `ifbg`, `ifbigger`, `ifsm`, `ifsmaller` |  |  | n/a | cancel / cancelall / cancelside / closemarket / closeall / closeside / abort / back / this / continue / retry / <number> / <label> | See `ifn` above – specify what action to take when the current commands returned position size (for `close/check=pos`) or order quantity (for `cancel/check=order` or opening orders) is bigger or smaller than the last saved order quantity (in the variable `lastqty`; see `save=` below)
If Partially Filled | `ifp`, `ifpartial` |  |  | n/a | cancel / cancelall / cancelside / closemarket / closeall / closeside / abort / back / this / continue / retry / <number> / <label> | See `ifn` above – will trigger if an order (for `cancel/check=order`) was found and partially filled!
If Long Or Short | `ifl`, `iflong`, `ifs`, `ifshort` |  |  | n/a | cancel / cancelall / cancelside / closemarket / closeall / closeside / abort / back / this / continue / retry / <number> / <label> | See `ifn` above – will trigger if an order (for `cancel/check=order`) or position (for `close/check=pos`) for the specified side is found!
If Min / Max Bid-Ask Spread | `ifminsp`, `ifmaxsp`, `ifminspread`, `ifmaxspread` |  |  | n/a | cancel / cancelall / cancelside / closemarket / closeall / closeside / abort / back / this / continue / retry / <number> / <label> | See `ifn` above – specify what action to take when the spread between bid and ask price is lower (`ifminsp`) than the minimum or higher (`ifmaxsp`) than the maximum set with the min and max spread options (see `minsp` and `maxsp` below for more info!)
If Order Rejected | `ifr`, `ifreject`, `ifrejected` |  |  | n/a | cancel / cancelall / cancelside / closemarket / closeall / closeside / abort / back / this / continue / retry / <number> / <label> | See `ifn` above – specify what action to take when the limit post-only order (`type=post`) placed by this command is rejected because it would be filled immediately (taker instead of maker)! Currently supported on: Binance Futures / BitMEX / Deribit / Kraken Futures (native), Bybit / OKX / Phemex (additional API call) Supported shorthands: `postrep`/`postrepeat`/`postretry` for `type=post ifreject=retry`
If Slippage | `ifsl`, `ifslip` |  |  | n/a | cancel / cancelall / cancelside / closemarket / closeall / closeside / abort / back / this / continue / retry / <number> / <label> | See `ifn` above – specify what action to take when slippage is higher than the maximum set with the max slippage option (see `msl` below for more info!)
If Maximum Time | `ift`, `iftime` |  |  | n/a | cancel / cancelall / cancelside / closemarket / closeall / closeside / abort / back / this / continue / retry / <number> / <label> | See `ifn` above – specify what action to take when more time than specified with `time=` has elapsed! (see `time` below)
If Partially (Not) Filled after Maximum Time | `iftf`, `iftimefill`, `iftnf`, `iftimenofill` |  |  | n/a | cancel / cancelall / cancelside / closemarket / closeall / closeside / abort / back / this / continue / retry / <number> / <label> | See `ifn` above – will trigger if maximum time elapsed AND an order was found afterwards and partially filled (iftf) or not filled at all (iftnf)!
If (No) Position after Maximum Time | `iftp`, `iftimepos`, `iftnp`, `iftimenopos` |  |  | n/a | cancel / cancelall / cancelside / closemarket / closeall / closeside / abort / back / this / continue / retry / <number> / <label> | See `ifn` above – will trigger if maximum time elapsed AND a position was found afterwards (iftp) or not (iftnp)!
Is Isolated | `iso`, `isolated` |  |  | n/a | 0 / off / false ; 1 / on / true | Binance / KuCoin Margin: Use isolated margin (instead of crossed) with spot margin order or transfer command (see `transfer` below) Note: If specified without a value it defaults to on/true, eg. `iso` equals `iso=1`!
Jump Delay | `jd`, `jumpdelay` |  |  | -3 | Static: <number> / <percent>% Random: <min>-<max> / <min>%-<max>% | Pauses execution between this and the next command for the specified time in seconds IF a conditional jump is made (eg. `jd=7.5`) Note: Use a negative value to delay only if execution jumps backwards – percentages are based on the bar time (chart resolution) of the alert!
Jump Back Delay | `rd`, `retrydelay` |  |  | 3 | Static: <number> / <percent>% Random: <min>-<max> / <min>%-<max>% | Shorthand for `jumpdelay`(see above) with negative value (delay only backward jumps)``
Leverage | `l`, `lev`, `leverage` |  |  | n/a (1) | <number> (>= 0) | Leverage, multiplying the available balance while increasing risk (!) BitMEX: Use 0 for cross margin – on other exchanges see `mt=crossed` further below! Where leverage can be changed: Binance Futures, BitMEX, Bitfinex, Bybit, Kraken, Kraken Flex Futures, KuCoin Futures, OANDA, OKX, Phemex Where leverage is queried (when not given): Binance Futures, BitMEX, Bybit, Kraken Flex Futures, OANDA, OKX, Phemex Note: When targeting multiple accounts via comma separated list in `a=` or `ap=` the leverage can be specified per account in the same way! (and in the same order as for `a=` / `ap=`) NOTE: Only acts as a filter when used with `c/ch=pos`!
Leverage Calculation | `lc`, `levcalc` |  |  | 1 | <number> (>= 1) | Override the amount of leverage used for internal quantity calculation for this order, ignoring what was auto detected (if supported) or specified via `l=` (see above) Supported shorthands: `q=_var@` for `q=_var levcalc=1` // `q=@123` for `q=123 levcalc=1`
Leftover Quantity | `lq`, `leftover` |  |  | 0 | 0 / off / false ; 1 / on / true | If set to 1 will use previously saved "leftover" quantity from an unfilled or only partially filled order – see option `save=` below for more information (useful for trailing limit entry loops, optionally in conjunction with max slippage) Note: If specified without a value it defaults to on/true, eg. `leftover` equals `leftover=1`!
Leverage Reference | `lr`, `lref` |  |  | n/a | custom<number> / _name / $name | Specifies from which custom plot data to take an optional multiplier by which the given leverage (see `leverage=` above) is multiplied Note: Since version 1.3 instead of using the reference options you can specify custom plot variables directly in the original parameters – in this case `l=_someplot`, optionally with a multiplier (`*`) or divider (`/`) eg. `l=_someplot*3` See Price Reference below for info on custom plot names!
Loan / Borrow | `loan` |  |  | n/a | <asset> (BTC / BNB / ...) | Binance / KuCoin: Apply for margin account loan of assets (comma separated list for multiple assets, use `q` to specify amount) Note: When using relative quantities, upper/lower limits can be defined by using `minq=` / `maxq=` options!
Lock / Unlock | `lock` |  |  | n/a | 1 / -<number> / 0, <ex:sym> / <name>, <timeframe> | 1: Lock symbol to ignore all consecutive alerts (same as alert filter options) -<number> (negative number): Same as above, but set lock expiration time to given number of minutes 0: Remove lock from symbol / alert (Unlock) Optionally specify symbol (in the form of `exchange:symbol`) and timeframe (in minutes) Note: Expiration and timeframe support different time units eg. `1.5m` for 90 seconds, `2.5h` for 150 minutes etc. Note: Instead of `exchange:symbol` a custom lock name can be specified as well – more info on our Wiki!
Check Lock | `lockcheck` |  |  | n/a | 1 / 2, <ex:sym> / <name>, <timeframe> | 1: Check for lock from same timeframe, treat as error if lock found 2: Same as above (check for lock) but ignores timeframe Optionally specify symbol (in the form of `exchange:symbol`) and timeframe (in minutes) Note: Instead of `exchange:symbol` a custom lock name can be specified as well – more info on our Wiki!
Log Level | `log`, `loglevel` |  |  | n/a | all / nosyntax / nodebug / cond / warn / err / debug / none | Log level to use for this command all (15): Log everything nosyntax (31): Log everything excluding raw syntax nodebug (14): Log everything excluding debug information cond (8): Only log conditionals warn (6): Only log warnings and errors err (2): Only log errors debug (1): Only log debug information none (0): Nothing at all being logged Note: Only effective if less than the alert log level (add '!' in front to force a higher log level)
Log All Variables | `logvars`, `dumpvars` |  |  | 0 | 0 / off / false ; 1 / on / true | Prints a complete listing of all currently defined variables with their respective values to the log
Is Margin Trade / Check | `margin`, `ismargin` |  |  | 0 | 0 / off / false ; 1 / on / true | Place as margin order instead of spot; alternative to b=long/short Note: If specified without a value it defaults to on/true, eg. `iso` equals `iso=1`!
Maximum Number of Iterations | `max`, `maxcount` |  |  | n/a | <number> | Maximum number of iterations for a command – will be treated as a warning unless used with `do`/`goto`/`jump`/`loop`/`skip`, then it will limit the number of iterations for the current jump or loop! (see `skip=` further below) Note: Iterations are always checked before a command line containing this option is executed – thus if the number of iterations has passed the maximum when reaching this line the rest of the line will be ignored!
Min / Max Balance | `minb` / `minbalance`, `maxb` / `maxbalance` |  |  | n/a | Static: <number> / <percent>% Random: <min>-<max> / <min>%-<max>% | Check for minimum and maximum balance, if below (or above for `maxb`) treat as error Note: Percentages are resolved based on the account equity (total balance incl. profit/loss) Note: When targeting multiple accounts via comma separated list in `a=` or `ap=` this option can be specified per account in the same way! (and in the same order as specified for `a=` / `ap=`)
Min / Max Historic Volatility | `minhvd` / `mindailyvola`, `maxhvd` / `maxdailyvola`, `minhvw` / `minweeklyvola`, `maxhvw` / `maxweeklyvola`, `minhvm` / `minmonthlyvola`, `maxhvm` / `maxmonthlyvola` |  |  | n/a | <number> (> 0) | Minimum and maximum daily/weekly/monthly BTC volatility index check (via BitMEX API) – if below or above treat as error Use `minhvw` & `maxhvw` for the weekly or `minhvm` & `maxhvm` for the monthly index Click here for more info from BitMEX! Note: Requires permission to connect to bitmex.com even if not otherwise used! Note: When using this command the returned volatility value is saved as a local variable: `hvd` / `hvw` / `hvm` (respectively)
Min / Max Price | `minp` / `minprice`, `maxp` / `maxprice` |  |  | n/a | <number> | Set absolute minimum and/or maximum limits for relative price calculations Note: When targeting multiple accounts via comma separated list in `a=` or `ap=` this option can be specified per account in the same way! (and in the same order as specified for `a=` / `ap=`)
Min / Max Profit Loss | `minpl` / `minpnl`, `maxpl` / `maxpnl` |  |  | n/a | Static: <number> / <percent>% Random: <min>-<max> / <min>%-<max>% | Filter open positions for `c` or `ch` commands by their current profit and loss (use either absolute contracts/units or PnL %) Note: See `plref` below to select which relative PnL to compare! Note: When targeting multiple accounts via comma separated list in `a=` or `ap=` this option can be specified per account in the same way! (and in the same order as specified for `a=` / `ap=`) Find more info regarding filtering on our Wiki!
Min / Max Quantity | `minq` / `minquantity`, `maxq` / `maxquantity` |  |  | n/a | <number> | Set absolute minimum and/or maximum limits for relative quantity calculations (specified in contracts or the markets native "currency") Note: When targeting multiple accounts via comma separated list in `a=` or `ap=` this option can be specified per account in the same way! (and in the same order as specified for `a=` / `ap=`)
Min / Max Position Size | `mins` / `minsize`, `maxs` / `maxsize` |  |  | n/a | Static: <number> / <percent>% Random: <min>-<max> / <min>%-<max>% | Filter open positions for `c` or `ch` commands by their current size – use either absolute contracts/units or % (based on available balance, use `y=equity` to base on total account equity) Note: When targeting multiple accounts via comma separated list in `a=` or `ap=` this option can be specified per account in the same way! (and in the same order as specified for `a=` / `ap=`) Find more info regarding filtering on our Wiki!
Min / Max Size Reference | `minsr`, `minsizeref`, `maxsr`, `maxsizeref` |  |  | n/a | custom<number> / _name / $name | Specifies from which custom plot data to take an optional multiplier by which the given min / max position size (see `mins=` etc. above) is multiplied Note: Since version 1.3 instead of using the reference options you can specify custom plot variables directly in the original parameters – in this case `mins=_someplot`, optionally with a multiplier (`*`) or divider (`/`) eg. `mins=_someplot*3` See Price Reference below for info on custom plot names!
Min / Max Bid-Ask Spread | `minsp`, `minspread`, `maxsp`, `maxspread` |  |  | n/a | Static: <number> / <percent>% Random: <min>-<max> / <min>%-<max>% | Optional parameter to be used with a market or limit (opening) order command – calculates the bid-ask spread of the price ticker and only places the order if the calculated spread is above the specified minimum and below specified maximum (see `spa=`/`spb=` below on how to use different price data for calculation) Note: When targeting multiple accounts via comma separated list in `a=` or `ap=` this option can be specified per account in the same way! (and in the same order as for `a=` / `ap=`)
Min / Max Bid-Ask Spread Reference | `spa`, `spreadask`, `spb`, `spreadbid` |  |  | n/a | ask / bid / mid / last / pos / even / mark / index / price (open / high / low / close / oc / hl / custom<number> / _name / $name) | Override the default price reference (`bid` ticker data for lower bid, `ask` ticker data for higher ask) for bid-ask spread calculation Also see Price Reference below! (section about OHLCV data from TradingView)
Max Slippage | `msl`, `maxslip` |  |  | n/a | Static: <number> / <percent>% Random: <min>-<max> / <min>%-<max>% | Optional parameter to be used with a market or limit (opening) order command – compares the current ticker price to the last cached price (use `updateprice` before in that case) or OHLC / custom plot data (see `mslr=` below) and only places the order if the price is not further against us than specified (a better entry price is always accepted!) Note: When targeting multiple accounts via comma separated list in `a=` or `ap=` this option can be specified per account in the same way! (and in the same order as for `a=` / `ap=`)
Max Slippage Reference | `mslr`, `maxslipref` |  |  | n/a | ask / bid / mid / last / pos / even / mark / index / price (open / high / low / close / oc / hl / custom<number> / _name / $name) | Override the default price reference (cached price ticker, auto detected, depending on book side) for slippage comparison Also see Price Reference below! (section about OHLCV data from TradingView)
Max Slippage Exchange (native) | `msle`, `maxslipex` |  |  | n/a | Static: <percent>% Random: <min>%-<max>% | Bybit only: Maximum price slippage to be allowed for market order to be filled at (allowed range 0.05% to 2.0%)
Min / Max Price Change | `min1h` / `max1h`, `min24h` / `max24h`, `min7d` / `max7d` |  |  | n/a | <number> | Check CoinMarketCap price ticker for minimum and/or maximum hourly (1h), daily (24h) or weekly (7d) price change percentage – if under or over treat as error
Margin Type | `mt`, `margintype` |  |  | n/a | isolated / iso ; crossed / cross ; borrow / repay | Binance Futures / Bybit / Kraken Flex Futures / OKX / Phemex: Switch symbol margin type to specified type when placing this order Binance / KuCoin Margin: borrow = auto borrow margin order, repay = auto repayment after order filled Note: Only Bybit and Phemex currently support auto detection of the margin type if this option is NOT supplied! Note: Kraken Futures cross margin does not support custom leverage!
If No Position / Order | `nr`, `noresult`, `nopos`, `noorder` |  |  | n/a | cancel / cancelall / cancelside / closemarket / closeall / closeside / abort / back / this / continue / retry / <number> / <label> | See `ifn` above – specify what action to take when no position (for `c/ch=pos`) or order (for `c/ch=order`) at all is open; to be used with filtering options to distinguish between "no filter match" and "nothing at all" conditions!
Send Notifications | `n`, `notify` |  |  | n/a | Target:"Message":"Subject":Recipient, ... 0, 1, 2, 3 | Send custom messages to the specified platforms or enable/disable notifications target: any of... `d` / `discord` = Discord (optionally with `:webhook`), `e` / `email` = Email (optionally with `:subject` & `:recipients`), `i` / `ifttt` = IFTTT, `l` / `log` = Log (optionally with `:loglevel` 0-6), `s` / `sms` / `twilio` = Twilio (optionally with `:recipient-nr`), `t` / `telegram` = Telegram (optionally with `:chat-id`) 0, 1: Disable/suppress or enable/force built-in notifications for this command 2: Force built-in notifications including balance info for this command 3: Force built-in notifications including balance and account info for this command 4: Force built-in notifications including balance, account and leverage info for this command All syntax parameters (`p`, `q` etc.) can be used in custom messages via `{fieldname}` – and if an order was created or checked/canceled all returned order/position fields (check ➔ the log to see what a particular exchange sends!) Optionally numbers in fields can be formatted via `{field.x}` eg. `{price.3}` outputting 123.456 – for text the same format will truncate it to the specified number of "subparts" eg. `{lastid.2}` will shorten an order ID like `SOME-ENTRY-ALERT-12345` to `SOME-ENTRY` Other pre-defined fields: `alert`, `account`, `exchange`, `leverage`, `bartime`, `time`, `balance`, `available`, `total`, `price`, `_count` For positions: `_date`, `_entry`, `_profit`, `_side`, `_size`, `_sizeCoin`, `_sizeUSD`, `_symbol`, `_symbols` (multiple orders / positions), `pnl`, `pnlLev`, `pnlTotal`, `relSize` With cached price (or `up=1`): `ask`, `bid`, `mid`, `custom1`.. etc. Note: Since version 1.3.35 calculations (`+` (addition), `-` (subtraction), `/` (division), `*` (multiplication), `%` (modulo) and `^` (power of)) are supported for numeric fields in placeholders – eg. `{price-close}` (use `:` to specify number of decimals eg. `{price/2:3}` produces 12345.123) Supported shorthand: `echo="price was {lastprice}!"` for `notify=log:"price was {lastprice}!"` See examples! (.. and more on our Wiki )
PnL Reference | `plref`, `pnlref` |  |  | lev | pos / lev / total | Specify which position relative profit/loss value (%) to use for min/max PnL checks: pos: PnL relative to the unleveraged margin used by the position lev: Same as pos but taking position leverage into account (multiplied by leverage) total: Current PnL in relation to total account equity (use `y=balance` for relation to available equity) (all three values are printed in this order for position info output in the log)
Price | `p`, `price` |  |  | 0 | Offset: <number> Relative: <percent>% Absolute: @<number> Random: <min>-<max> / <min>%-<max>% | Amount to undercut or overcut the top order in the book – either by percentage or absolute price! Note: When targeting multiple accounts via comma separated list in `a=` or `ap=` the price can be specified per account in the same way! (and in the same order as specified for `a=` / `ap=`) Note: For relative ranges both values have to be specified in % eg. `q=2%-5%`! Note: Absolute prices can also be entered for all price parameters by prefixing them with `@`! (eg. `p=@7500`)
Price Bound | `pb`, `bound` |  |  | n/a | Offset: <number> Relative: <percent>% Absolute: @<number> Random: <min>-<max> / <min>%-<max>% | OANDA only: Worst market price allowed for an order to be filled at Note: Absolute prices can also be entered for all price parameters by prefixing them with `@`! (eg. `p=@7500`)
Price Reference (TP/SL/TS/SO etc. Reference) | `pr`, `priceref`, `tpref`, `slref`, `tsref`, `soref`, `trref` / `transref`, `minspr` / `minspref`, `maxspr` / `maxspref` |  |  | bid (for buy) ; ask (for sell) ; pos (for `c=pos` with `tp` `sl` `so` `ts`) | ask / bid / mid / last / pos / even / liq / mark / index / price (open / high / low / close / oc / hl / custom<number> / _name / $name) | ask / bid: Force to use last ask or bid price as reference for `p`, `tp`, `sl` etc., no matter what side of the book (bid is default for buy / long orders, ask for sell / short orders) mid: Use the average (middle) of last ask and bid price as reference last: Use the exchange's "last trade price" as price reference (not available on Deribit and OANDA) price: Use the final calculated order price as stop price reference (only for `tp`, `sl`, `so` or `ts`!) lastprice: Price from a previous order or position saved with the `save` command (previous values as lastprice2 / lastprice3) lastavg: Same like lastprice but averaged over all previously saved prices in the current alert laststop: Stop price from a previous order saved with the `save` command (previous values as laststop2 / laststop3) Binance Futures / Bitfinex / BitMEX / Bybit / Deribit / Kraken / Kraken Futures / KuCoin Futures / OANDA / OKX / Poloniex / Phemex: pos: Use the average entry price of the position (default for `c=pos` with any of `tp`, `sl`, `so` or `ts`!) BitMEX: even: Use the price where the position reaches break even Binance Futures / BitMEX / Bybit / Deribit / KuCoin Futures / OKX / Phemex: liq: Use the estimated liquidation price of the position Binance Futures / BitMEX / Bybit / Deribit / Kraken Futures / KuCoin Futures: mark: Use the exchange's "mark price" as price reference (Binance FT and Bybit also offer `pr=index` in addition) Optionally, if OHLCV data was sent from TradingView: open, high, low, close: OHLCV data from the candle that triggered the alert oc: Average price between open and close hl: Average price between high and low custom<number>: Custom data/plots added via `,{{plot_0}},{{plot_1}},...` _somename: Custom data/plots when given a name (see below) Add the following as last line in a TradingView alert `#{{open}},{{high}},{{low}},{{close}},{{volume}}` – optionally add `,{{plot_0}}` or `,somename:{{plot_0}}` for custom plots to be referenced in syntax! Note: The `[side]` placeholder for unified alerts can also be controlled this way (making a single entry alert possible for example!) – following variants are supported: `side:1:0` / `side:0:1` (useful for two bool plots, one per side) `side:1` / `side:-1` `side:long` / `side:short` `side:buy` / `side:sell` (useful for strategy alerts) Note: Since version 1.3 instead of using the reference options you can specify custom plot variables directly in the original parameters – eg. `q=_someplot`, optionally with a multiplier (`*`) or divider (`/`) eg. `q=_someplot*3` or interpreted as percantages eg. `q=_someplot%` (allowed operators for `q=` and `l=` are '*' and '/', for all other parameters '+' and '-'!) Click here for more info!
Position Mode | `pm`, `posmode` |  |  | auto | normal / oneway ; hedge / hedged ; auto | Binance Futures / Bybit / OKX Futures & Swap / Phemex only: Position mode for order or to filter by (for `c/ch=pos`; Binance only) Note: Will switch hedge mode on or off if necessary – `auto` (default!) will place the order according to current state!
Price Protect | `pp`, `protect` |  |  | n/a | 0 / off / false ; 1 / on / true | Binance Futures (stop order) only: When price reaches the stop price, the difference between mark and contract price cannot be larger than the "trigger protect" of the symbol Note: If specified without a value it defaults to on/true, eg. `pp` equals `pp=1`!
Query PnL | `query` |  |  | n/a | PNL | Bybit only: Query closed PnL records for the current symbol and print to log; limited to 100 by default Use `from=` / `to=` and `since=` to specify a query time window (see `from` / `to` options above; `since` below) Use `maximum=` / `cm=` to limit number of records and `order=` / `cmo=` to change sorting order Results can be filtered via `minpl`/`maxpl`/`mins`/`maxs`/`gt`/`gte`/`lt`/`lte`, saved to variables via `save` and sent via `notify` option!
Quantity | `q`, `quantity`, `amount` |  |  | 100% | Static: <number> / <percent>% Random: <min>-<max> / <min>%-<max>% | Portion of the balance or position (for `c=pos`) that should be used for the order (based on available balance, use `y=equity` to base on total account equity or `y=pos` to base on position size – see yield option below!) For absolute values see unit option below and find more info on our Wiki! Supported shorthands: `q=50%p` for `q=50% yield=pos` // `q=50%e` for `q=50% yield=equity` // `q=50$` for `q=50 unit=currency` // `q=_var@` for `q=_var levcalc=1` // `q=@123` for `q=123 levcalc=1` Note: When targeting multiple accounts via comma separated list in `a=` or `ap=` the quantity can be specified per account in the same way! (and in the same order as specified for `a=` / `ap=`) Note: For relative ranges both values have to be specified in % eg. `q=2%-5%`!
Quantity Reference | `qr`, `qref`, `sizeref` |  |  | n/a | custom<number> / _name / $name | Specifies from which custom plot data to take an optional quantity multiplier Note: Is applied after the regular quantity parameter is resolved – eg. `q=50% qref=_someplot` will first calculate the quantity for half the available balance and if the custom plot data contains the value 0.2 for example, the final quantity would be 0.2 times (20%) of that 50% available balance = 10% Note: Since version 1.3 instead of using the reference options you can specify custom plot variables directly in the original parameters – in this case `q=_someplot`, optionally with a multiplier (`*`) or divider (`/`) eg. `q=_someplot*3` or as percentage `q=_someplot%*3` See Price Reference above for info on custom plot names! (in addition you can use lastqty to reference the leftover quantity or filled to reference the filled quantity from a previous order saved with the `save` command)
Reduce Only | `r`, `reduce` |  |  | 0 ; 1 (for `c=pos`!) | 0 / off / false ; 1 / on / true | Binance Futures / BitMEX / Bybit / Deribit / Kraken / Kraken Futures / KuCoin Futures / OANDA / OKX / Phemex: Place order with reduce only flag so it cannot increase or flip position (or filter by it if used with cancel/check orders command – more info on our Wiki! ) Note: Enabled by default for position closing orders, so for `c=pos` there is no need to specify `r=1`! Note: Where supported special position closing orders are used automatically for `c=pos` which are usually exempt from load shedding while "reduce only" orders can fail! (see BitMEX API documentation for example) Note: If specified without a value it defaults to on/true, eg. `reduce` equals `reduce=1`!
Repay Loan | `repay` |  |  | n/a | <asset> (BTC / BNB / ...) | Binance / KuCoin: Repay margin account loan for assets (comma separated list for multiple assets, use `q` to specify amount) Note: When using relative quantities, upper/lower limits can be defined by using `minq=` / `maxq=` options!
Return Expected | `ret`, `return`, `expect` |  |  | 1 | <number> | Command is expected to return an order / at least number of orders (minimum) or none (ret=0), otherwise treat as error (retry etc.); also checks the number of matching positions for `check=pos` (negative number = skip retries!)
Number of Retries | `retries` |  |  | Exchange Setting | <number> | Number of times the command is repeated in case of an error (overriding Exchange specific global settings)
Retry On All Errors | `retryall` |  |  | n/a | 0 / off / false ; 1 / on / true | If set to 1 / on will force to ignore the built-in list of errors that are usually exempt from the default retry-on-error options (eg. no balance available, internal errors etc.) Note: To just enable retries also for "not enough balance" errors see the corresponding option under ➔ General Options!
Run Alert | `run`, `runen` |  |  | n/a | <alert> | Run specified ➔ PV Alert using currently set exchange, symbol, account, OHLCV data and custom variables/plots (can be overridden within the alert) and wait for it to execute completely – similar to "including" the other alert! The following parameters can be used with this command to specify different default values: `e` (Exchange), `s` (Symbol), `a` (Account), `b` (Side) Note: All filtering / locking etc. settings of the "included" alert are ignored – use `runen` to only run enabled alerts (otherwise also disabled alerts are run)! Note: Alert can be specified by one of its names or by its unique ID (found under the name field of the expanded alert) – wildcards (`*`) supported for alert names, but only first match will be run!
Symbol | `s`, `sym`, `symbol` |  |  | Chart Symbol from Alert | <symbol> (XBTUSD / ETHEUR / ...) | Market on the receiving exchange to be targeted by this command – on margin exchanges specify `sym=*` with `check=pos` or `close=pos` to target all markets on the selected exchange! Note: When targeting multiple accounts via comma separated list in `a=` or `ap=` the symbol can be specified per account in the same way! (and in the same order as for `a=` / `ap=`) Note: It is highly recommended to use the `Symbol` button (found in the alert editor and under the account settings) to insert exchange and symbol options conveniently and safely! More info about built-in market/symbol name mapping on our Wiki
Set / Change Variable | `set`, `setvar` |  |  | n/a | var:number / var:"text" / var:(expression), ... (list) | A list of comma separated variable assignments (either local via `_name:...` or global via `$name:...`) that is processed after the main command in the current command line was executed – supports expressions (calculations) in the same format as the preprocessor ➔ Placeholders described below! Supported shorthands: `inc=_var:1` or `inc=_var` for `set=_var:(_var+1)` // `dec=_var:1` or `dec=_var` for `set=_var:(_var-1)` // `mul=_var:1` or `mul=_var` for `set=_var:(_var*1)` // `div=_var:1` or `div=_var` for `set=_var:(_var/1)` More info on our Wiki!
Since (Time / Count Reference) | `since` |  |  | fired | fired / bar / candle / cbar / eod / eodutc | Specify which time / count reference to use for maximum time/count elapsed checks (see `time=` below) or PnL query (see `query=` above) fired: Default, time since the alert was fired and started to execute bar / candle: Time since the current alerts bar started (depends on the alerts bar resolution used; note that for alerts set to `Per Bar Close` in TV this will be >= 100% or longer than the total bar time since the alert is sent only after the whole bar time has elapsed! – see bar time % info in the log for received events) cbar: Same like the `bar` option with the difference that PV ensures it is always calculated relative to the bar that is current when the alert commands actually start processing (mainly only affects `Per Bar Close` TV alerts) eod / eodutc: Time since last midnight, either local time or UTC based (only for PnL query)
Skip / Jump | `skip`, `jump`, `goto`, `go`, `do`, `loop` |  |  | continue / 0 ; this / -0.2 (for `loop`) | cancel / cancelall / cancelside / closemarket / closeall / closeside / abort / back / this / retry / continue / <number> / <label> | Skip over the next given number of commands (-1 = all) or jump to given label, unless error Note: See `err=` above for all available options! Supported shorthands: `back` or `end` for `skip=back` (-0.5) // `abort` or `exit` or `quit` for `skip=abort` (-1)
Stop Loss | `sl`, `stoploss` |  |  | n/a | Offset: <number> Relative: <percent>% Absolute: @<number> Random: <min>-<max> / <min>%-<max>% | Bybit / OANDA / SimpleFX: Can be used as option with opening order to set TP/SL on-fill (managed by the exchange)! All Spot: Place stop loss option with main buy/sell All Margin: Place buy/sell order when price hits stop price (or close position with `c=pos`, also see `pr` above) (or filter by it if used with cancel/check orders command – more info on our Wiki ) Note: When targeting multiple accounts via comma separated list in `a=` or `ap=` the stop loss can be specified per account in the same way! (and in the same order as specified for `a=` / `ap=`) Note: Absolute prices can also be entered for all price parameters by prefixing them with `@`! (eg. `p=@7500`)
Stop Order Price | `so`, `stop` |  |  | n/a | Offset: <number> Relative: <percent>% Absolute: @<number> Random: <min>-<max> / <min>%-<max>% | Bybit / OKX / Phemex: Place buy/sell order when price hits stop price, can be used with normal orders to place as stop instead of SL/TP attributes with main order or OCO Binance / Binance Futures / Bybit Inverse Futures & Inverse Perpetual / OKX / Phemex: Same as above, can be used in conjunction with trailing stop (`ts=123`) to specify activation price BitMEX / Coinbase / Gemini / KuCoin / KrakenFT / OANDA / Phemex: Place buy/sell order when price hits stop price (plain stop/conditional order; often same as SL stop) Note: When targeting multiple accounts via comma separated list in `a=` or `ap=` the stop can be specified per account in the same way! (and in the same order as for `a=` / `ap=`) Note: For custom OHLC/variable stop price reference see `soref` above! Note: Absolute prices can also be entered for all price parameters by prefixing them with `@`! (eg. `p=@7500`)
Stop Reference | `sr`, `stopref` |  |  | last | last / mark / index | BitMEX / Bybit / Deribit / Kraken Futures / KuCoin Futures / OKX / Phemex: Which contract reference price type should be used to trigger this stop (default: last) Binance Futures: "mark" or "contract" (default: contract) Note: For custom OHLC/variable stop price reference see `soref` above!
Save Order / Position / Ticker Data | `sv`, `save` |  |  | 0 | 0 / off / false ; 1 / on / true | Saves the following attributes from the first returned order (`c/ch=order` or opening order) or position (`c/ch=pos`) per account locally for the current running alert: `filled`, `left`, `lastqty`, `lastqtysum`, `lastprice`, `lastavg`, `laststop`, `lastid`, `lastside`, `lasttype`, `laststatus`, `lastprofit`, `lastrelsize`, `lastrelsizesum`, `lastpnl`, `lastpnltotal`, `lastpnlsum`, `lastnum`, `lastnumsum`; additionally `lastask`, `lastbid`, `lastmid`, `lastlast`, `lastmark`, `lastindex` when price ticker data was queried by the command (and `lastavail`, `lasttotal` for balance data) Note: Previously saved values can be accessed via field2 / field3 – eg. `lastprice2` (see `lq=`, `pr=`, `n=` etc. above – can be used in custom notification fields) Note: If specified without a value it defaults to on/true, eg. `save` equals `save=1`! Supported shorthands: `saveprice` or `getprice` for `updateprice=1 save=1` // `savebalance` or `getbalance` for `updatebalance=1 save=1` // `saveorder` or `getorder` for `check=order save=1` // `savepos` or `getpos` for `check=pos save=1`
Order Type | `t`, `type` |  |  | limit | limit / market / fok / ioc / post / day / settle / open / close | Limit: Place order on the books waiting to be filled for price `p` Market: Fill order immediately for whatever prices are available (`p` is ignored – slippage and taker fees!) FOK: Fill Or Kill orders will be cancelled if they cannot be filled immediately completely IOC: Immediate Or Cancel orders can be partially filled – any remaining portion is cancelled Post: If any part of the order would be filled immediately (for price `p`) the whole order will be cancelled (forces maker rebate) Day (BitMEX / OANDA): "Good For Day", will be cancelled at 5pm EDT (New York) Settle (Kraken): Settle position(s) at the original order price Click here for more info from Kraken! Supported shorthand: `limit` for `type=limit` // `market` for `type=market` // `post` for `type=post` // `postrep`/`postrepeat`/`postretry` for `type=post ifreject=retry` Open / Close: Can be used together with `c=order` for specific order types – `open` targets limit/opening orders, `close` targets stops/closing orders
Transfer Balance | `tb`, `transfer` |  |  | n/a | <asset> (BTC / BNB / ...) | Binance: Transfer balance from spot to margin (`y=spot`) or margin to spot account (`y=margin`) for specified assets (comma separated list for multiple assets, use `q` to specify amount, use `iso=1 s=symbol` to target isolated instead of cross margin balance!) Deribit: Transfer balance(s) to subaccount – comma separated list for multiple assets, use `q` to specify amount and `y` to specify id or alias of target subaccount Note: When using relative quantities, upper/lower limits can be defined by using `minq=` / `maxq=` options!
Transpose Plots | `tr`, `transpose` |  |  | n/a | custom<number> / _name / $name, ... (list) | Transposes all specified custom plot points from OHLC close price as base to the current ticker price (according to either `trref=` or `pr=` option, see above) of the current command as base – by converting them first into relative offsets from OHLC close and then back into absolute prices from new base Note: If an absolute value is present in the given list it is used as a factor for the following plot transpositions – eg. `tr=_tp,0.7,_sl` transposes the custom plot "tp" fully (for example 1%) but the custom plot "sl" is additionally multiplied by 0.7 (for example -1% turning into -0.7%)! Note: Requires OHLC data from TradingView to be present in the alert message – see option `pr=` above!
Trigger Alert | `trigger`, `triggeren` |  |  | n/a | Anything (excluding special characters) | Trigger specified ➔ PV Alert using currently set exchange, symbol, account, OHLCV data and custom variables/plots (can be overridden within the alert) and immediately resuming running this alert in parallel – similar to triggering the other alert externally via an event! Note: All filtering / locking etc. settings of the triggered alert are ignored – use `triggeren` to only trigger enabled alerts (otherwise also disabled alerts are triggered)! Note: Alert can be specified by one of its names or by its unique ID (found under the name field of the expanded alert) – wildcards (`*`) supported for alert names, but only first match will be triggered!
Maximum Time Elapsed | `time`, `maxtime` |  |  | n/a | Static: <number> / <percent>% (of bar time) Random: <min>-<max> / <min>%-<max>% | Maximum time allowed to have passed since the initial firing of an alert (or since the beginning of the current bar if `since=bar` is specified) in either seconds or as % of bar time – will be treated as a warning if more time has passed, unless `ift=` is specified (see further above) Note: Time is always checked before a command line containing this option is executed – thus if too much time already passed when reaching this line the rest of the line will be ignored!
Retry Timeout | `timeout` |  |  | Exchange Setting | <number> (> 0) | Timeout in seconds between command retries in case of an error (overriding Exchange specific global settings)
Toggle Alert | `toggle` |  |  | n/a | <alert> ; PV / APP | Toggle given ➔ PV Alert or current running alert (if none is specified) between enabled/disabled To toggle running of any received alerts (global "pause" mode) use `toggle=app` Note: Alert can be specified by one of its names or by its unique ID (found under the name field of the expanded alert) – wildcards (`*`) supported for alert names!
Take Profit | `tp`, `takeprofit` |  |  | n/a | Offset: <number> Relative: <percent>% Absolute: @<number> Random: <min>-<max> / <min>%-<max>% | Bybit / OANDA / SimpleFX: Can be used as option with opening order to set TP/SL on-fill (managed by the exchange)! All Spot: Place take profit with main buy/sell All Margin: Place buy/sell when price hits stop price (or close position with `c=pos`, also see `pr` above) (or filter by it if used with cancel/check orders command – more info on our Wiki! ) Note: When targeting multiple accounts via comma separated list in `a=` or `ap=` the take profit can be specified per account in the same way! (and in the same order as specified for `a=` / `ap=`) Note: Absolute prices can also be entered for all price parameters by prefixing them with `@`! (eg. `p=@7500`)
Trailing Stop | `ts`, `trailing` |  |  | n/a | Offset: <number> Relative: <percent>% Absolute: @<number> Random: <min>-<max> / <min>%-<max>% | Binance / Binance Futures / Bitfinex / BitMEX / Bybit / Deribit / Kraken / Kraken Futures / OANDA / OKX / Phemex: Trailing stop offset (trailing starts immediately when placed!) Binance / Binance Futures / Bybit Inverse Futures & Inverse Perpetual / OKX / Phemex: Optionally specify activation price via `so=123`! (usually used with close position `c=pos`, also see `pr` above) Note: When targeting multiple accounts via comma separated list in `a=` or `ap=` the trailing stop can be specified per account in the same way! (and in the same order as specified for `a=` / `ap=`) Note: Absolute prices can also be entered for all price parameters by prefixing them with `@`! (eg. `p=@7500`) Find more info regarding trailing on our Wiki!
Unit | `u`, `unit` |  |  | contracts | contracts / ct ; currency / ccy | Unit to be used for absolute values in the provided quantity (`q`) and min/max position size (`mins`/`maxs`) parameters (ignored for percentages!) Find more info regarding units on our Wiki!
Unset / Delete Variable | `unset`, `unsetvar` |  |  | n/a | custom<number> / _name / $name, ... (list) | Comma separated list of local (`_name`) and/or global (`$name`) variables to remove – afterwards they will not be available anymore to the rest of the alert Note: Removal of any global variable will affect all running alerts immediately!
Update Balance | `ub`, `updatebalance` |  |  | n/a | 0 / off / false ; 1 / on / true | Update balance info – use to query the current account balance (eg. for notifications) without executing a trade Supported shorthand: `update` for `updatebalance=1 updateprice=1` Note: If specified without a value it defaults to on/true, eg. `ub` equals `ub=1`!
Update Price | `up`, `updateprice`, `updateticker` |  |  | n/a | 0 / off / false ; 1 / on / true | Update and cache price data (ticker) for a symbol – use on its own or as a trade option When used with the `save` option (see above) these additional variables are saved: `lastask`, `lastbid`, `lastmid` and if available `lastlast`, `lastmark`, `lastindex` Supported shorthand: `update` for `updatebalance=1 updateprice=1` Note: If specified without a value it defaults to on/true, eg. `up` equals `up=1`!
Failed Order ID Check | `wid`, `wrongid` |  |  | n/a | cancel / cancelall / cancelside / closemarket / closeall / closeside / abort / back / this / continue / retry / <number> / <label> | See `ifn` above – specify what action to take when no order was found matching the given ID or list of IDs (see `cid` above for more info!)
Wrong Side | `ws`, `wrongside` |  |  | n/a | cancel / cancelall / cancelside / closemarket / closeall / closeside / abort / back / this / continue / retry / <number> / <label> | See `ifn` above – specify what action to take when an open position (for `c/ch=pos`) or order (for `c/ch=order`) was found but it is on the opposite side of the given book parameter (`b=`/`side=`, see above)
Yield | `y`, `yield` |  |  | free ; pos (for `c=pos`) | free / balance ; total / equity ; pos / possize | Which part of equity to use as base for relative quantity calculations – default for `c=pos` is `pos`, otherwise `free`! free / balance: Available free balance excluding open positions total / equity: Total account equity including all profit and loss pos / possize: Size of current open position (default for `c=pos`)
Yield / Add Position | `yp`, `yieldpos`, `addpos`, `usepos` |  |  | n/a | Static: <number> / <percent>% Random: <min>-<max> / <min>%-<max>% | Portion of an open position (specified as percent) you want to add to the calculated order size – if an absolute amount is specified it will be added directly to the raw order quantity Note: If no open position is found for the same symbol a warning is logged and the order is placed with the originally calculated amount!

Note: Any of the parameters `a` (Account), `e` (Exchange), `s` (Symbol), `p` (Price), `q` (Quantity), `l` (Leverage), `d` (Disabled), `retries`, `timeout`, `minb` (min balance), `maxb` (max balance), `bc` (Balance Cached), `pc` (Price Cached), `jd` (Jump Delay), `err` (Error Handling), `pr` (Price Reference), `qr` (Quantity Reference), `y` (Yield), `pm` (Position Mode), `sv` (Save Order) can be specified in a line by themselfes to set new defaults to be used for the following commands in the same alert, overwriting previous defaults or prefilled values coming from TradingView!

## Unified Alerts / Placeholders

Unified alerts are supported since version 1.2.21 – this feature allows you to define one single ➔ PV Alert for both long and short (or buy and sell) conditions!

This is made possible by using the following placeholders in your syntax instead of specifying long/short or +/- for price offsets directly.
These placeholders are then resolved to the correct values before the syntax is run when triggered (pre-processor).
Note: They can also be used in notifications and jump marks!

The direction of long/short or buy/sell for the placeholders is determined in the following way:

- If OHLCV data is present in the TradingView alert message and contains a `side` parameter – useful for single alert entries, see Custom Plots / Vars below! (since 1.2.90)
- If the `Detect Side` checkbox is enabled for the triggered ➔ PV Alert or the OHLCV `side` parameter is set to `auto`, the first occurence of exchange/symbol/account in the triggered syntax (or as fallback the chart symbol that triggered the alert or configured defaults) will be used to check for an open position and use its side (since 1.2.90)
- Checking the name that triggered the alert for occurrences of `long`, `short`, `buy` or `sell` (case insensitive) and afterwards also for any of the letters `L`, `S` or `B`

To make use of this feature simply create a ➔ PV Alert and give it both names for long & short (or buy & sell)!

For example: Create one ➔ PV Alert with the name `XBT1H LONG, XBT1H SHORT` and then create two alert conditions in TradingView, with the one for long entries having `XBT1H LONG` as message text and the other one for short entries with `XBT1H SHORT` as message text.

Important: The field `Alert Name` in TradingView will be ignored – it is currently only used for display purposes within TradingView!

Note: Since version 1.3 calculations are supported within placeholders!
Valid operators are `+` (addition), `-` (subtraction), `/` (division), `*` (multiplication), `%` (modulo) and `^` (power of) – besides the listed pre-defined placeholder variables below you can also use all of your custom plot variables, see Custom Plots / Vars below!
eg. `price=[close - (_myplot * 2)]` – keep in mind that all placeholder expressions are evaluated before the syntax is actually run!

Name | Key(s) | Description
--- | --- | ---
Alert Name | `[name]`, `[NAME]` | Resolves to the ➔ PV Alert name that effectively triggered the alert (either lowercase or uppercase)
Alert ID (Short Name) | `[id]` | Resolves to the first alphanumeric part of the triggering ➔ PV Alert name eg. `XBT5M_LONG` resolves to `XBT5M`
Resolution | `[res]` | Resolves to the resolution (in minutes) of the event that triggered the alert (usually the chart resolution) eg. `0.01` = 1 Sec., `60` = 1 Hour etc.
Timeframe | `[tf]` | Resolves to the timeframe of the event that triggered the alert (usually the chart resolution) eg. `1s` = 1 Sec., `1h` = 1 Hour etc.
Book Side | `[side]`, `[SIDE]` | Resolves to the side of the book that was auto detected from the alert name – `long` / `short` or `buy` / `sell` (either lowercase or uppercase)
Opposite Side | `[!side]`, `[!SIDE]` | Resolves to the opposite side of the above – eg. `long` for an auto-detected `short` (either lowercase or uppercase)
Price Offset Sign | `[+]`, `[-]` | Resolves to `+` or `-` from the "perspective" of a long – depending on the auto-detected side. For example `sl=[-]3% tp=[+]5%` will resolve to `sl=-3% tp=+5%` for a long or buy alert, but will resolve to `sl=+3% tp=-5%` for a short or sell alert!
Exchange Alias | `[ex]` | Resolves to the first valid exchange alias found in the triggering alert name eg. `Some Bitmex XBTUSD Entry` resolves to `BITMEX` If no valid exchange alias was found in the name it resolves to the exchange of the triggering event (chart) or configured default Note: Useful when combined with wildcards in ➔ PV Alert names (enable under ➔ General Options!) to handle different exchanges/symbols through a single ➔ PV Alert – eg. `Foo-*-Signal` as ➔ PV Alert name and then using `Foo-Bitmex-XBTUSD-Signal`, `Foo-BinanceFT-BTCPERP-Signal` etc. as TradingView alert messages!
Symbol | `[sym]` | Resolves to the alphanumeric part directly following a valid exchange alias in the alert name eg. `Some Bitmex XBTUSD Entry` resolves to `XBTUSD` If no valid exchange alias was found in the name it resolves to the symbol of the triggering event (chart) or configured default Note: Useful when combined with wildcards in ➔ PV Alert names (enable under ➔ General Options!) to handle different exchanges/symbols through a single ➔ PV Alert – eg. `Foo-*-Signal` as ➔ PV Alert name and then using `Foo-Bitmex-XBTUSD-Signal`, `Foo-BinanceFT-BTCPERP-Signal` etc. as TradingView alert messages!
Account | `[acc]` | Resolves to the account this alert "instance" is being run for if any of `ap=`, `run=` or `trigger=` were being used with a list of accounts As fallback the next part of the ➔ PV Alert name following a valid exchange/symbol combo (see above) will be used!
Account (empty default) | `[accx]` | Same like `[acc]` above, but in case of the default account name (*) will resolve to an empty string – eg. `maxslip=$mslfor[accx]`
Multiple Accounts | `[accs <(ex:(sym:))filter>]` | Resolves to a list of all accounts defined for the given exchange (otherwise the alert or global default is used) and optionally filters the list entries by name – if needed a symbol name can also be added For example `ap=[accs]` and `ap=[accs *]` is synonymous, while `ap=[accs bybit:group1*]` would resolve to a list of all Bybit account names that start with "group1"! Specifying a symbol can be useful to cover multiple exchanges at once, for example `ap=[accs bybit:btcusd:*1],[accs bitmex:xbtusd:*2]` would resolve to `ap=bybit:btcusd:acc1,bitmex:xbtusd:acc2` or similar Note: Even other placeholders can be used for the filter name via curly braces, eg. `ap=[accs {id}*]` Note: When used in alert messages to call a ➔ PV Alert for multiple accounts make sure to enclose in double quotes, eg. `PVALERT(ap="[accs]")` Note: For manual runs it might be necessary to specify the exchange (ex:) since placeholders get resolved before running the commands and at that point it's unknown which exchange should be targeted!
Caller Alert | `[caller]` | Resolves to the ➔ PV Alert ID of the alert firing this one when using `run=` or `trigger=` (otherwise resolve to the current alert ID)
This Alert | `[this]` | Resolves to the ➔ PV Alert ID of the currently running alert
Is TV Alert | `[alert]` | Resolves to 1 if this alert was triggered from a TradingView chart alert (otherwise 0)
Is TV Screener | `[screener]` | Resolves to 1 if this alert was triggered from a TradingView screener alert (otherwise 0)
Is Manual Run | `[manual]` | Resolves to 1 if this alert was manually run (otherwise 0)
Is Auto/Interval Run | `[auto]` | Resolves to 1 if this alert was triggered by the scheduler (otherwise 0)
Is Internal Run/Trigger | `[internal]` | Resolves to 1 if this alert was triggered internally by another ➔ PV Alert using `run=` or `trigger=` (otherwise 0)
Is Internal Run (Fork) | `[fork]` | Resolves to 1 if this alert was triggered internally by another (waiting) ➔ PV Alert using `run=` (otherwise 0)
Run Mode | `[mode]` | Resolves to one of the following, depending on the run mode (see previous placeholders): alert / screener / manual / auto / internal / fork
Is Telegram Bot / ID | `[telebot]` | Resolves to the Telegram user id that triggered the current alert (otherwise 0)
Is Long | `[long]` | Resolves to 1 if the auto-detected side (see above) was long (otherwise 0)
Is Short | `[short]` | Resolves to 1 if the auto-detected side (see above) was short (otherwise 0)
Is Disabled | `[disabled]` | Resolves to 1 if running of newly received alerts is disabled (global pause mode) (otherwise 0)
Instance Name | `[inst]` | Resolves to the custom instance name configured under ➔ General Options
Is Weekend | `[weekend]` | Resolves to 1 if the current day is either Saturday or Sunday (otherwise 0)
Day of Week | `[weekday]` | Resolves to a value of 0 to 6 representing the current week day (0 = Sunday, 6 = Saturday)
Month of Year | `[month]` | Resolves to a value of 1 to 12 representing the current month of the year
Day of Month | `[day]` | Resolves to a value of 1 to 31 representing the current day of the month
Date | `[date]` | Resolves to a value of 101 to 1231 representing the current month * 100 plus day of the month
Hour of Day | `[hour]` | Resolves to a value of 0 to 23 representing the current hour of the day
Minute of Hour | `[minute]` | Resolves to a value of 0 to 59 representing the current minute of the hour
Time | `[time]` | Resolves to a value of 0 to 2359 representing the current hour * 100 plus minute of the hour
Bar Position | `[barpos]` | Relative position in % (0-100) of bar time where the alert triggered (`Once Per Bar Close` should be >= 100)
Bar Time | `[bartime]` | Number of seconds between the start of the bar and where the alert was fired (`Once Per Bar Close` should be >= full bar time in sec)
Time Slippage | `[slip]` | Number of seconds between where the alert was fired and when it was actually received by PV (see `Maximum time since alert fired` under ➔ General Options)

## IF / ELSE (Preprocessor)

Since version 1.3 it is also possible to use the new conditional placeholders `[IF condition] ... [ELSE] ... [END]` to run parts of your syntax only when the specified conditions are met!

The `[ELSE] ...` (shorthand `[] ...`) part of the construct is optional.
A condition can be preceded by they keyword `not` to invert its evaluation result.
Multiple conditions can be combined by using the keywords `and` / `or` (outside of brackets only!) with `and` being inner binding.

The condition is a simple comparison – supported comparison operators are `<` (less than), `<=` (less than or equal), `=` / `==` (equal), `<>` / `!=` (unequal), `>=` (greater than or equal) and `>` (greater than).

For the right-hand side of the comparison, calculations/expressions are supported including grouping in brackets – valid operators are `+` (addition), `-` (subtraction), `/` (division) , `*` (multiplication), `%` (modulo) and `^` (power of)
(same as in the Unified Alerts section above for placeholder calculations!)

All placeholder variables in the table above and also OHLC data (if sent with the TradingView alert message) can be used in a condition – including custom plots (`_name`).

If the left-hand side variable of the comparison is a string (mainly the `name` or `id` placeholders) then only `=` / `==` (equal), `*=` (starts with), `<>` / `!=` (unequal) and `!*=` (doesn't start with) comparison operators are allowed.
Furthermore the right-hand side of the comparison in that case can either be a single string literal or a comma separated list of strings – wildcards (`*`) are supported and comparisons are always case insensitive!
(eg. `[if name=bitmex*entry,bitmex*exit]` will match all of the following: `Bitmex XBTUSD Entry`, `Bitmex XRP Entry`, `Bitmex Some Exit`)

Note: For exact non-wildcard string comparisons enclose the string in double quotes! (eg. `[if acc=test,*]` will ALWAYS match EVERYTHING while `[if acc=test,"*"]` will only match the account names `test` and `*`)

Example Syntax:

    [if not _myplot >= (close + _otherplot) / 2]
    # myplot is below the mid point of OHLC close and otherplot
    notify=log:warning:"we are below!"
    [else]
    notify=log:success:"we are above! (and in the else part)"
    [end]

    [if date > 1115 and time > 530]
    notify=log:warning:"the date is after november 15th and the time after 5:30 am!"
    [end]

    [if long]
    echo="this alert was run with side being buy or long!"
    [end]

Note: These pre-processor conditionals are evaluated before the syntax is run, so they can only check the state of variables (custom plots) at that time!
To check and manipulate variables while syntax is being run see `if=` / `else=` / `set=` commands above!

## Custom Plots / Variables

Since version 1.2.62 custom plot data (price plots, quantity, leverage etc.) can be sent with the TradingView alert message to be referenced later in your syntax commands!

For this to work the TradingView OHLC data and your indicator plot data has to be received in a certain format at the end of your alert message.
The following screenshot is showing the default entry alert for one of our indicators as an example:

Add the following text as the last line in a TradingView alert:
`#{{open}},{{high}},{{low}},{{close}},{{volume}}` – optionally add `,{{plot_0}}` or `,somename:{{plot_0}}` for custom plots that you can later reference in syntax!
(click on the question mark icon under the `Message` text box in TradingView to learn more about how to use TradingViews plot placeholders)

Note: The `[side]` placeholder for unified alerts can also be controlled this way, making a single TradingView entry alert possible!
Simply add a custom plot reference with the name `side` (as shown in the screenshot above) – the following variants are supported:
`side:1:0` / `side:0:1` (useful for two boolean plots, one per side)
`side:1` / `side:-1` (used in the screenshot above)
`side:long` / `side:short`
`side:buy` / `side:sell` (useful for strategy alerts)

After everything is set up correctly, upon receiving an alert message containing valid OHLCV/custom data you can use it in price reference syntax options by name:
open, high, low, close: OHLCV data from the candle that triggered the alert
oc: Average price between open and close
hl: Average price between high and low
custom<number>: Custom data/plots added via `,{{plot_0}},{{plot_1}},...`
_somename: Custom data/plots when given a name

Since version 1.3 instead of using the price reference options (prref etc.) you can specify custom plot variables directly in the original parameters –
eg. `q=_myquantity`, optionally with a multiplier (`*`) or divider (`/`) eg. `q=_myquantity*3` or interpreted as percantages eg. `q=_myquantity%` (allowed operators for `q=` and `l=` are `*` and `/`, for all other parameters `+` and `-`!)

Since version 1.3.0.2 custom plot defaults can be defined in the first line of a ➔ PV Alert via `#var1:value,var2:value,...` – use `!` to overwrite a received OHLC/plot value eg. `#!_sl=123,!close=456`

Since version 1.3.3 custom plot data or values can also easily be sent to a ➔ PV Alert in the form of `PVALERT(var1=value1,var2=value2,...)` –
reserved keywords for parameters in this case are `e` / `ex`, `s` / `sym`, `a` / `acc`, `ap` / `par` as they can be used to set default exchange, symbol and account for the alert being triggered! (or in the form `a=ex:sym:acc` or `ap=ex:sym:acc` in one of them)

Example TradingView Alert Message:

    PV_ALERT_ONE(ex=bitmex,sym=xbtusd,myExit={{plot("Take Profit")}})
    PV_ALERT_TWO(acc=binanceft:btcusdt:test)
    #{{open}},{{high}},{{low}},{{close}},{{volume}}

➔ See our Wiki for an example how to use custom plots in Syntax!

Note: OHLCV data and custom plots can easily be added to your TradingView alert message through the ProfitView addon context menu – simply right-click into the `Message` section of your TradingView alert as shown below and select `Insert OHLCV`:

## Examples

Note: For more examples and standard syntax visit the syntax section of our Wiki !

Command | Description
--- | ---
`side=long quantity=10% notify=0 time=10%` | Place a limit order to open a long position using 10% of the available balance and disable any notifications for this command Additionally check that less than 10% of bar time has elapsed since the event was fired, otherwise don't place the order (eg. on a 5 minute resolution chart this would be 30 seconds in)
`side=long quantity=10% notify=0,discord:3,telegram:"Hello Telegram: {price}",email:1:"Hello World!"` | Place a limit order to open a long position using 10% of the available balance, disable default notifications but send a built-in notification to Discord including balance and account info (3), a custom notification to Telegram including the entry price (via `{price}`) and finally a built-in notification to E-Mail but with a custom subject "Hello World!" Click here for more info on Notifications!
`close=short tp=-1.1% price=-1.2% notify=d:"`SL at \z` {stop}"` | Place a limit take profit stop order to close a short position that triggers when the price hits 1.1% below the average position entry price with a limit price at 1.2% below the average position entry price Additionally send a custom notification to Discord containing the stop price from the placed order Click here for more info on Notifications!
`check=pos iffound=abort` | Skip the rest of the alert if an open position is found Use `check=order` for orders, optionally specify a side with `side=` Click here for more info on Checks / Conditionals!
`check=pos ifnone=abort` | Skip the rest of the alert if NO position is found Use `check=order` for orders, optionally specify a side with `side=` Click here for more info on Checks / Conditionals!
`a=demo e=coinbase minb=50%` | Set new defaults so following commands will all use the account 'demo', run on Coinbase and require half the equity being available as balance unless specified explicitly in their command
`cancel type=open` | Cancel all "opening" (eg. limit / non-stop!) orders (to cancel ALL type of orders remove the `type=` option!)
`close type=market` | Close all open positions using market orders
`e=bybit-demo close=25% market` | Close 25% of any open positions using market orders
`e=bybit-demo s=btcusdts buy=5 p=0.50` | Place a 5 USD limit order $0.50 above the current bid price Example: Top bid is $66150, order will be placed at $66150.5 Click here for more info on Units!
`e=bybit-demo s=btcusdts buy=0.1 u=currency p=-5` | Place a 0.1 BTC limit order $5 below the current bid price Example: Top bid is $66150, order will be placed at $66145 Click here for more info on Units!
`e=bybit-demo s=btcusdt long=100 l=10` | Place a long limit order for 100 contracts using 10x leverage at current bid price
`close=long tp=1.1% p=1.2% expect error=closeside` | Place a limit take profit order with a price 1.2% above the positions average entry price that triggers 1.1% above average entry If no order could be placed – possibly due to no position open – treat it as an error (`expect`) If command fails even after retries, issue a long position close command and abort the alert (`error=closeside`)
`e=binance s=ethbtc b=sell q=1` | Place a limit sell order for 1 ETH at the current asking price
`e=binance s=ethbtc b=buy q=0.025-0.05` | Place buy order for a random amount between 0.025 and 0.05 "ETH paid with BTC" Example: 0.05 BTC / 0.0279 = ~1.79 ETH

#
Setup: Notify / Bot

Note: All settings on this page are always stored locally and never synced –
notification options in syntax always override configuration below, even if `Notify on` is unchecked!

#### Email Notifications
ON OFF

Recipient(s)
Use comma to separate multiple email addresses
Subject
Use the placeholder `{action}`, eg. `TradeBot {action} Notification`
Notify on
Start
Order
Cancel
Error
Stall
No alert
min
Name
Id
Qty
Acc
Ex
Bal
Lev
TF
T
P
S
H

#### Discord Notifications
ON OFF

Webhook URL
Go to Edit Channel / Webhooks on Discord to create a webhook and paste its URL here
Notify on
Start
Order
Cancel
Error
Stall
No alert
min
Name
Id
Qty
Acc
Ex
Bal
Lev
TF
T
P
S
H
Style:
Emoji
Buy
Sell
Close

#### Telegram Notifications / Bot
ON OFF

Bot Token
Send a message to @BotFather on Telegram to create a new bot and paste its bot token here,
afterwards send a message to your new bot on Telegram (or press Start) and press the Chat ID button below
Notify on
Start
Order
Cancel
Error
Stall
No alert
min
Name
Id
Qty
Acc
Ex
Bal
Lev
TF
T
P
S
H
Style
Emoji
Buy
Sell
Close

Telegram Bot
Enable
Whitelist

!!! CAUTION !!! Note: Requires `Telegram Notifications` set to ON and valid `Bot Token` setting above!

When enabled, ProfitView will immediately start to listen for syntax commands or ➔ PV Alert names (optionally with parameters) under the bot identity that belongs to the `Bot Token` above.
By default ProfitView will ignore all messages until a list of Telegram user names or IDs (comma separated) is put in the `Whitelist` field – then only messages from those users are permitted.
Note: If the `Whitelist` field contains a single asterisk `*` messages from ALL users are permitted which poses a big security risk!

*If `Over` below is enabled, messages to the bot can be prefixed by the following: `!` – for no filtering, `!!` – to ignore pause mode, `!!!` – to run even disabled ➔ PV Alerts

Tip: Message `@userinfobot` on Telegram to look up your ID!
Additional commands: `/help`, `/status`, `/disable`, `/enable`, `/pause`, `/resume`, `/stop`, `/restart`, `/accounts`, `/balances`, `/positions`, `/alerts`, `/log`
Allow
Stat
AppCtrl
AlrtCtrl
AppRest
Acc
Pos
Alrt
Log
RunAlrt
RunCmd
*Over
Log Echo
Summary
PV Alert Defaults
Alert TF (Min) | 1

Channels / Groups
Enable
Whitelist
Reply To
Allow Channels / Groups
Stat
AppCtrl
AlrtCtrl
AppRest
Acc
Pos
Alrt
Log
RunAlrt
RunCmd
*Over

#### Twilio Notifications
ON OFF

Account SID
Auth Token
From (Phone #)
To (Phone #)
Notify on
Start
Order
Cancel
Error
Stall
No alert
min
Name
Id
Qty
Acc
Ex
Bal
Lev
TF
T
P
S
H
Style
Emoji
Buy
Sell
Sell

#### IFTTT Triggers
ON OFF

Webhook URL

Use the placeholder `{action}`, eg. `https://maker.ifttt.com/trigger/{action}/with/key/insertYourKeyHere`

Notify on
Start
Order
Cancel
Error
Stall
No alert
min

#
General Options

Note: All settings on this page are always stored locally and never synced! TradingView Legacy Filters

#### General

Instance Name
Disable running of newly received alerts
Close background process tab when PV is disabled
Note: When the background process tab is closed NO alert can be received or processed!
Force default ✱ CAUTION ✱
Force default ✱ CAUTION ✱
Force default ✱ CAUTION ✱
Account(s)
WARNING: When enabled each setting will overwrite the prefilled value coming from TradingView! (but values in syntax will always have priority)
Only warn about missing exchange permissions instead of error
Only warn about non-existent accounts specified instead of error
Disable confirmations for manual alert run ✱ CAUTION ✱
Automatically switch to App Log on manual alert run
Always keep ProfitView options page open
Enable remote configuration updates via Google Sync Storage Note: Will update alert & exchange account settings on this instance when saved on another using the same Google Account (enable on both!)
Use Local Storage for alerts instead of Sync Storage Note: Removes size restrictions (~7kb / ~90 lines per alert, ~20 alerts) but disables syncing of alert definitions accross instances!
Use Local Storage for accounts instead of Sync Storage Note: Removes size restrictions (~40 accounts) but disables syncing of API accounts accross instances!
Allow wildcards in ProfitView Alert names (eg. `XBTUSD-*`)
Use current time for alert received / fired time (instead of TradingView info) Note: Only applies to per-alert stats and info, not for syntax time commands!
Enable retry-on-error also for `not enough balance` errors
Update balances for ALL accounts in popup
Show run alerts in icon
w/filtered & inactive
w/interval
Reset on click
Also track manual alert run times in stats
Minimum alert run time for stats (Seconds) | 0.1
Default alert timeframe (Minutes) | 60
Maximum alerts run in parallel | 0
Maximum time since alert fired (Seconds) | 60
Automatic restart interval (Minutes) | 0
⤷ Add. wait time if alert running (Minutes) | 3
Maximum log retention (Days) | 3
Interval offset (Seconds) | 0
Exchange time sync interval (Hours) | 8
Split order delay (Seconds) | 0
CoinMarketCap API
➔ Click here to sign up for an API key

#### Caching

Price ticker cache time (Seconds) | 0
Ignore for `updateprice` command
Exchange symbol info cache time (Hours) | 168
Custom order ID cache time (Hours) | 168
CoinMarketCap cache time (Minutes) | 5

#### Auto Export

Note: Options below only work while this tab is open – enable `Always keep ProfitView options page open` above!

Export config in time interval:
Export config on each save / change
Export app log in time interval:
Delta (from previous auto export on)
Export balance info in time interval:
use Excel format
Send balance info in time interval:
E-Mail
Note: Requires `Email Notifications` to be switched ON and configured under ➔ Setup: Notify / Bot!
Export position info in time interval:
use Excel format
Send position info in time interval:
E-Mail
Note: Requires `Email Notifications` to be switched ON and configured under ➔ Setup: Notify / Bot!

#### TradingView Connection

Only process alerts that start with
Prefix
Note: All TradingView messages NOT starting with the text above (eg. `#PV`) will be ignored!
Always use Event Stream, even with TradingView open
Auto open TradingView on start Note: Enable only on main trading instance to avoid refresh loops
Reload TradingView on connection loss, recheck after
min | 5
Note: Enable only on main trading instance to avoid refresh loops
Reload TradingView if no alert has been received for
min | 480
Warning: Only use as last resort in case TradingView or the strategy you use regularly stalls! (try previous option first)
Automatically reconnect chart on `Max Devices` message Warning: Enable only on main trading instance to avoid reconnect loops
Automatically suppress `Unsaved Changes` prompt Warning: If enabled you can lose unsaved changes on TradingView charts
Reload TradingView on ProfitView update or restart Warning: If this option is disabled you should do a manual TradingView reload after an update!
Modify / fix indicator `Settings` and `Edit Alert` windows on TradingView Note: Requires reload of open TradingView tabs to take effect!
Disable `Study Repaints` warning for indicator alerts
Fire only one alert for the first symbol in multi-symbol Screener Alerts
Default Screener Alert Timeframe (Minutes) | 60
Zoom Level (%) for Screenshots (0 = same as TV window) | 0

#### Legacy Alert Filter Options

Note: The term legacy alert refers to syntax directly included in the TradingView alert message, not ➔ PV Alerts – if you are only using ➔ PV Alerts this section can be ignored!

Disable `long`/`short`/`buy`/`sell` shorthand commands for legacy alerts
Disable legacy alerts – ignore any direct syntax in TradingView alert messages not matching ProfitView Alert names
Ignore syntax errors in legacy alerts (usually caused by non-syntax comments/text in the message) Note: When enabled ProfitView will try to run any direct syntax anywhere in a TradingView alert messages – even just the word `sell` for example!
Once per Bar
Solo per Bar
No Repeat
Timeout
Open
Start
Mid1
Mid2
End
Close
Pos %
OR
Dur %

#
Setup: Global Variables

Note: Variables defined below can be used in syntax via `$name` – to edit double-click, right-click for context menu or use `F2`/`F4`!

#
Open Positions

Exchange:

#
View App Log

Clear Start
Collect Dbg
Debug
Only:
Evt
Ord
Wrn
Err
Cnd
Bal
Ntfy
Follow

Timestamp | Type | Message
--- | --- | ---

#
View Statistics

#### ProfitView General

#### Received Events

#### Bot Events

#### Executed Alerts

#### Sent Notifications

#### TradingView Connection

# Changelog

1.3.106 – 19/4/2026

- Binance Futures: Fixed error when placing stops on live exchange
- SimpleFX: Fixed "Authorization has been denied" error

1.3.104 – 22/3/2026

- Added chart resolution check to `Once per Bar` signal filter if `TF chk` option is enabled
- Added syntax shorthands `postrep`/`postrepeat`/`postretry` for `type=post ifreject=retry`
- Added automatic update option to position monitor (update whenever the tab gets selected)
- Fixed global variable value staying `0` when changed from `0` to empty string in UI
- Gemini: Updated market data
- SimpleFX: Fixed error on querying symbol information

1.3.103 – 3/3/2026

- Fixed broken TradingView connection (both event stream and addon) caused by data format changes (fixes @ 1.3.103)
- Improved `Detect Side` PV alert option for syntax that uses placeholders (eg. `ap=[$strat1_accounts]`)
- Fixed Telegram Bot replies and notifications sometimes not being delivered because of Telegrams maximum message size
- Fixed calculations in placeholders, mustache fields and `setvar` command when using signed operands (eg. `2 * -_myvar`)
- Added hotkeys to faster navigate in the options window (`Alt+A` for Alerts, `Alt+V` for Variables etc.)
- Gemini: Updated market data

1.3.101 – 15/1/2026

- Fixed `setvar` syntax command for strings containing ":" (eg. `setvar=$live:"bybitdemo:main"`)
- Added global variables to output of `logvars` syntax command
- TV Indicator Settings: Fixed loading of symbol input fields
- Binance Futures: Implemented market state caching to reduce API calls and speed up order placement
- Binance Futures: Optimized number of API calls for average order (without caching 4, with caching 3 instead of 5)
- Gemini: Updated market data

1.3.100 – 25/12/2025

- Implemented variable support within conditional placeholders via curly brackets, eg.:
  `[if id={$myvar}]` => Will check if the alert id matches any of the ones listed (comma separated) in global variable `$myvar`
- Implemented variable expansion within placeholders via curly brackets, eg.:
  `[${_var}foo]` => Will insert a global variable by name of the CONTENTS of custom variable `_var`, suffixed by "foo"
- Added support for empty global variables that resolve to nothing instead of "0"
- Added warning for use of non-existent global variables in placeholders (eg. `ap=[$something]`)
- Improved keyboard navigation/selection in global variables user interface
- TV Addon/Interceptor: Fixed intermittently not loading (especially when TV tab opened in background) (fixes @ 1.3.100)
- TV Indicator Settings: Fixed loading of multiple drop-down selections sometimes failing
- Binance Futures: Due to new separate "algo" endpoints `cancel/check=order` requires two separate API calls,
  to reduce again to one API call add either `t=open` (limit orders) or `t=close` (only stops) to the command
- Gemini: Updated market data

1.3.98 – 10/12/2025

- Binance Futures: Fixed error when placing SL/TP/TS orders by migrating to new conditional order endpoints
- Binance Futures: Fixed missing leverage and size information for positions due to differences in new V3 endpoint
- Gemini: Updated market data

1.3.97 – 24/11/2025

- Fixed market symbol info being requested for each order when they are placed at the same time (via `ap`/`parallel`)
- Added option for market symbol info cache to never expire by setting it to 0 (see ➔ General Options / Caching)
- Allowing empty entries in comma separated lists for `e=` / `s=` / `a=` (easier use of conditional placeholders that could be empty)
- Implemented checking of triggering alert name if `Once per Bar` and `Chk Name` filtering options are both enabled
- Fixed keyboard navigation in global variables user interface
- TV Indicator Settings: Fixed save/load & copy/paste not working due to TV update
- TV Indicator Settings: Styling fixes (TV update)
- Gemini: Updated market data

1.3.96 – 2/11/2025

- Added `since=eod` / `since=eodutc` options for query PNL syntax command (eg. `query=pnl since=eod from=-1d to=0`)
- Added new placeholder `[accx]` resolving to the current account, but to empty string for default account (instead of `*`)
- Added realtime variable support to `msl` option (eg. `msl=_mymaxslip%`)
- Binance Futures / Bybit / Phemex: Fixed automatic order splitting when order size exceeds instrument maximum
- Binance Futures: Improved speed of position info query by upgrading to V3 endpoint
- BitMEX: Added support for multi asset margin mode (beta)
- BitMEX: Added support for setting leverage in cross margin mode
- BitMEX: Added support for spot markets (beta)
- BitMEX: Implemented market state caching to reduce API calls and speed up order placement
- Coinbase Advanced: Fixed incorrect time sync API query
- Gemini: Updated market data
- Kraken: Fixed wrong order quantity for non-margin spot orders
- OKX: Fixed errors caused by removal of isolated margin support in Multi-Currency/Portfolio Margin account modes
- OKX: Further fixes for use of wrong currency when using cached balance in Multi-Currency margin mode

1.3.94 – 13/9/2025

- Fixed Telegram "Unauthorized" error due to Telegram blocking Bot API for browsers
- Fixed unwanted one second delay between commands for parallel alerts/accounts (MV3 only)
  when `--disable-background-timer-throttling` browser command line flag is not used
- Fixed automatic log export in delta mode only exporting empty log files
- Fixed log export stalling or not working when a lot of debug information was collected
- Binance Futures: Fixed incorrect calculation of leftover order quantity
- Bybit / OKX: Added additional API call after order cancelation when `save` syntax option is used to get correct leftover quantity

1.3.93 – 31/8/2025

- State Cache is now cleared on "Test API key" if enabled (otherwise only on app restart)
- Improved pause/stop button behaviour in log viewer and added number of running alerts
- Improved number formatting of balances in the popup window
- Gemini: Updated market data
- OKX: Fixed "ccy" field error when placing closing orders & stops in Multi-Currency margin mode
- OKX: Fixed detection of correct leverage for margin type crossed in Multi-Currency margin mode
- OKX: Fixed use of wrong currency when using cached balance in Multi-Currency margin mode

1.3.92 – 23/8/2025

- Added syntax option `yp` (`yieldpos`/`addpos`/`usepos`) to easily add the size of an open position to new order size
- Added syntax shorthand for quantity: `q=50%l` => `q=50% qr=lastqty lc=1` (same as `q=lastqty@*0.5`)
- Added `lastrelsize` / `lastrelsizesum` to `save` syntax option containing relative position size (% of equity) for `c/ch=pos`
- Fixed global variables sometimes not being found due to UI allowing renaming with upper/mixed case
  (make sure to delete all existing global variables manually that have upper or mixed case names!)
- TV Indicator Settings Manager: Styling fixes (TV update)
- Internal refactoring for improved MV3 compliance and MV2 backward compatibility
- Bybit: Improved caching of market state (hedge, margin type & leverage) to reduce API calls and speed up order placement
  (use only for accounts where no other manual or automated account state changes are taking place!)
- Bybit: Added syntax option to specify maximum allowed market order slippage (`msle=`/`maxslipex=`)
- Gemini: Updated market data
- Kraken: Added warning and automatic limiting of leverage to allowed min/max of instrument (margin trades)

1.3.89 – 22/7/2025

- Improved price ticker caching to prevent deadlocks under certain conditions (disabled by default, see ➔ General Options / Caching)
- TV Indicator Settings Manager: Fixed context menu not working due to recent TV update
- Fix for "runtime.sendMessage" error in TV addon leading to alerts not being picked up (caused by Chrome update; fixes @ 1.3.89)
- Gemini: Updated market data
- Phemex: Fixed "Currency not supported" error when checking positions caused by new USDC API changes

1.3.87 – 20/5/2025

- Fixed `msg is not defined` error when disabling/enabling PV (introduced in 1.3.86)
- Fixed PV alert disabled/locked state not updating live in UI when changed via syntax
- Gemini: Updated market data
- SimpleFX: Updated ticker source from SignalR (deprecated) to Websockets

1.3.86 – 28/4/2025

- Added `minplr`/`maxplr` plot reference for `minpl`/`maxpl` filter (allowing eg. `minpl=_myvar%`)
- Fixed quantity variable shorthand for percentage calculation eg. `q=lastqty*7%` (was equal to `q=lastqty*7`)
- Internal changes for better MV3 compliance
- SimpleFX: Fixed error on asset value conversion introduced in 1.3.81 update

1.3.85 – 18/4/2025

- Fixed syntax error being shown for direct use of global vars (eg. `q=$buyin`)
- OANDA: Fixed error on asset value conversion introduced in 1.3.81 update

1.3.84 – 1/4/2025

- Added option to close the background process tab (MV3 only) when PV is disabled (see ➔ General Options)
- Added support for quotes when specifying `e=` / `s=` / `a=` syntax options (eg. `s="btcusdt"`)
- OANDA: Fixed some alternative market names containing spaces and other unsupported characters

1.3.83 – 25/3/2025

- Updated to Manifest V3

1.3.82 – 3/3/2025

- Added support for Coinbase Advanced (beta!)
- Made all placeholder variables available to `if`/`set`/`notify` commands, eg. `if=(res=5 and _myplot>100)`
- Added `barpos`/`bartime`/`slip` placeholders and local variables with bar time/position and slippage info
- Added `logvars` command to list all currently available local variables to the log
- Fixed bug in alert editor sometimes duplicating '=' while typing parameters
- Gemini: Updated market data

1.3.81 – 20/2/2025

- Added user interface for inspecting, changing and deleting global variables (see ➔ Setup: Global Vars)
- Implemented support for global variables (automatically saved) that can be set, checked and used in the same way as local variables (prefixed with `$`, eg. `q=$risk*3%`)
  Note: When not prefixing `$` explicitly, if a local variable of the given name is not found the global one will be used as fallback!
- Implemented `if=` syntax command to check custom/saved variables "live" via expression before running rest of a syntax command (eg. `if=(_myplot > 3) abort`)
  and corresponding `else=` conditional to skip commands or jump to a label when the `if=` expression evaluated to false or zero
- Implemented `set`/`setvar`/`unset` syntax commands to set custom variables "live" via expression while running (eg. `set=_myplot:(close / 3)`)
  with syntax shorthands `inc=` (increment) / `dec=` (decrement) / `mul=` (multiply) / `div=` (divide) (eg. `inc=_var` or `mul=_var:3`)
- Implemented price ticker caching per exchange to reduce API calls and increase consistency for parallel orders (disabled by default, see ➔ General Options / Caching)
- Implemented support for querying all markets' closed PNL of an account via `query=pnl sym=*` (currently Bybit only!)
- Improved handling of `not` in placeholder or new `if=` command expressions (eg. `[if not _myplot < close and not id=foo]`)
- Added general slippage info to log when `maxslip` option is used but not triggered (slippage within limits)
- Fixed Telegram Bot sometimes only delivering partial information back when the reply was over 4KB in length
- Fixed "from undefined" error in Telegram Bot when sending an edited message to the bot
- Fixed query closed PnL command calculating wrong relative position PnL for shorts
- Fixed warnings in alert editor for some valid saved order data (`lastxxx`)
- Fixed error on balance info export caused by removed exchange support
- Bybit: Removed support for retired v3 API and renamed Bybit v5 to Bybit
- Gemini: Updated market data

1.3.78 – 17/1/2025

- Added alert id to the `/alerts` command in Telegram Bot
- Fixed `lc=`/`levcalc=` being ignored for absolute quantity closing orders (eg. `q=100 lc=1` or `q=@100`)
- Bybit: Fixed free balance info not being available for UTA 2.0 accounts due to API change (only `y=equity` worked)

1.3.77 – 31/12/2024

- Added support for Channels / Groups to the Telegram Bot (disabled by default, also needs enabling in Telegram via `@BotFather`)
- Fixed `save` syntax option when used with different accounts in one alert (eg. `ub acc=acc1 sv=a|ub acc=acc2 sv=b|log="{atotal};{btotal}"`)
- Fixed `n=d:"{price}"` and similar producing the same notification output like `n=d:1` (built-in notifications) instead of intended output
- Improved splitting of strings in notification placeholders (eg. `{total.1}` now produces the account balance without currency suffix)
- Bybit v5: Fixed some linear markets not being found (eg. `ZENUSDT`)
- Gemini: Updated market data
- Kraken Futures (Flex): Fixed misleading log output when leverage AND `mt=cross` are both specified and added info message
- Kraken Futures (Non-Flex/Cross): Implemented saving of last used order leverage in account balance info (per market) and using it for position checks/monitoring
- OKX: Fixed order quantity calculation for contract markets in Multi-Currency/Portfolio margin modes
- OKX: Fixed switching back from Multi-Currency/Portfolio margin to "Spot and Futures" mode not being detected correctly

1.3.74 – 10/12/2024

- Added new `query` syntax command to query closed PnL with `minpl`/`maxpl`/`mins`/`maxs`/`gt`/`gte`/`lt`/`lte` filtering (Bybit only, more to come!)
  (eg. `query=pnl from=-2d maximum=1 order=oldest` => get the oldest PnL record two days back from now)
- Added new conditionals `ifnp=` / `ifnnp=` (if no order found/matched and has position / no position)
- Added new conditionals `ifslp=` / `ifslnp=` (if too much slippage and has position / no position)
- Added option to `Open Positions` wizard to place opening and closing orders as post-only (maker fees)
- Added auto saving of last used price offset to `Open Positions` wizard (separately for New/Add/Close actions)
- Changed `Close All` button under `Open Positions` to use limit orders by default and respect `Filter by symbol` setting
- Added way to override alert resolution when triggered via Telegram Bot via `PVALERT(res=15m)`
- Added `firstqty` / `firstprice` to `save` syntax option (only saved on first run per alert)
- Fixed `lc=`/`levcalc=` to only affect quantity calculation and not also the leverage to be set on the exchange
- OANDA: Added syntax flag `ft`/`filtertrades` to apply `cm`/`maximum` and `cmo`/`order` options per trade for `close=pos`
  (eg. `close filtertrades maximum=1 order=lowest` => close only the trade with the lowest price making up a position)
- OKX: Added support for Multi-Currency and Portfolio Margin modes (relative quantity calculation differs slightly from platform)
  (beware that OKX does NOT support reduce-only stops in Portfolio Margin mode!)
- Phemex: Fixed error when testing API without any BTC balance

1.3.73 – 20/11/2024

- Added new syntax conditional `ifr`/`ifrejected` to check if a post-only order was rejected (eg. `ifrejected=retry`)
  (Binance Futures / BitMEX / Deribit / Kraken Futures: native support, Bybit / OKX / Phemex: via additional API call) (beta!)
- Added TP/SL to average/mark price hover tooltip under `Open Positions` where available
- Added variable support to `ep`, `fp`, `minb`, `maxb`, `minpl`, `maxpl` and `msl` options (eg. `msl=_var%*2`)
- Added comma separated list support to `ep` and `fp` options targeting different accounts with `a=`/`ap=`
- Added new boolean placeholder `[weekend]` for simpler checks (`[if weekday<1 or weekday>5]` equals `[if weekend]`)
- Added new placeholder `[telebot]` that resolves to the Telegram user id that triggered an alert (otherwise 0)
- Added syntax option `retryall=1` to ignore built-in "don't retry on this error" list and force retries
- Added setting under ➔ General Options to also retry on balance errors (no or not enough balance)
- Added closing order emoji options for built-in notifications and improved detection of side
- Added support for `a=/ap=ex:sym:acc` format to the auto-detect `[side]` alert option (by querying open positions)
- Fixed some cases where syntax defaults were set for rest of the alert when they shouldn't (eg. `loop=this jd=0`)
- Fixed range support for delay command when using timeframe suffix (eg. `wait=1-3m`)
- Fixed stacked `[if]` placeholders causing warning in live syntax check (eg. `ap=acc1[if res<5],acc2[end][if sym*=doge],acc3[end]`)
- Fixed `[name]` placeholder giving error in live syntax check and manual run for alerts with multiple names (comma separated)
- Fixed "assignment to constant variable" error when using `/alertname` (with leading slash) in Telegram Bot
- Fixed internal Telegram Bot commands only working when lowercase (now also `/Positions` or `/LOG` will work)
- Bybit v5: Implemented support for new UTA 2.0 account types (mainly affecting contract/inverse markets now using unified balance) (fixes @ 1.3.73)
- Bybit / Kraken Futures / Kucoin Futures: Fixed `noorder`/`noresult` syntax conditional not working when bulk order cancelation was used
- Deribit: Fixed post-only orders to be rejected instead of getting price adjusted (added reject-post-only attribute)
- KuCoin: Fixed order size calculation for spot market buy orders with absolute quantity and `unit=currency` option
- OKX: Fixed mapping of some Futures market alias names (this/next month)
- Phemex: Fixed incorrect max quantity check and splitting for spot orders
- Phemex: Fixed "Tick size check failed" due to rounding error on some markets

1.3.71 – 26/9/2024

- Added syntax option `max` / `maxcount` limiting the number of iterations for a command (or per loop/jump when used with `do`/`goto`/`jump`/`loop`/`skip`)
- Added `do`/`goto`/`jump`/`loop` option repeat (same as `do=retry` / `do=0.5`) (eg. `echo="foo" do=repeat max=3`)
- Fixed `loop` command (`do=loop`) sometimes not working correctly when an explicit jump (`do`/`goto`/`jump`/`skip`) occured before
- Fixed `loop` command (`do=loop`) skipping first command after jumping back
- Fixed `close` command without any parameter not defaulting to position (should be equal to `close=pos` or `closepos`)
- Deribit: Implemented saving of last used order leverage in account balance info (per market) and using it for position checks/monitoring
- Kraken / Kraken Futures: Fixed incorrect calculation of `leftover` order quantity and detection of partial order fills
- BitMEX / Bybit / Deribit / Kraken Futures / Phemex / OKX: Fixed using `leftover` quantity for orders on some markets failing with "toFixed digits argument must be between 0 and 100" error

1.3.68 – 5/9/2024

- Added options to automatically send balance and position info via email according to set schedule (see ➔ General Options / Auto Export)
- Fixed `Auto Export` options not respecting the `Interval offset` setting under ➔ General Options
- Fixed escaping of acc/sym/ex placeholders for "child" alerts run in parallel via `ap=` command or `PVALERT(ap="acc1,acc2")`
- Fixed `[accs <(ex:(sym:))filter>]` placeholder giving an error if the exchange was specified lowercase
- Added syntax shorthand `post` for `type=post`
- TV Indicator Settings: Fixed naming of exported file (text/JSON) due to recent TV update
- Binance Futures / KuCoin / KuCoin Futures: Not using bulk order cancelation with `save` function (otherwise no data)
- Phemex: Reduced number of API calls for non-bulk order cancelation from 4 to 2 by using internal order cache

1.3.66 – 31/7/2024

- Added support for Bybit Demo Trading
- Added support for OANDA Hedging accounts (long & short on one symbol simultaneously)
- Added `gt`/`above`, `gte`/`aboveeq`, `lt`/`below`, `lte`/`beloweq` price filters for `check/close=pos` and `check/cancel=order`
  for relative prices (eg. `gt=+5%`) the current or cached (with `pc=1`) ticker bid/ask is used as base if no custom plot is specified (eg. `gt=_myplot+5%`)
- Added option to specify a custom variable name prefix for the `save` function via `svn=prefix` (or simply `sv/save=prefix`)
- Added saving of balance data to vars when using the `save` function via `updatebalance save` (for ticker AND balance use `update save`)
- Added support for `minsp/maxsp=_myvar` (added `minspref` / `maxspref` syntax options)
- Added new syntax shorthands:
  `saveprice/getprice` => `updateprice save`
  `savebalance/getbalance` => `updatebalance save`
  `saveorder/getorder` => `check=order save`
  `savepos/getpos` => `check=pos save`
  (all with optional custom variable name prefix, eg. `getprice=foo`)
- Corrected stop price reference syntax in `Open Positions` wizard when "Place stops immediately" is selected
- Fixed not being able to select an exchange under `Open Positions` right after adding the first account to it
- Fixed `side` parameter being ignored for `checkpos/closepos=side` syntax shorthands
- Fixed "unknown parameter" error for `marketbuy/marketsell/marketlong/marketshort` syntax shorthands

1.3.65 – 8/6/2024

- Implemented option to save accounts in local instead of sync storage to increase account limits! (see ➔ General Options; sync limit ~40 accounts))

1.3.64 – 31/5/2024

- Migrated logging from deprecated WebSQL to IndexedDB (fixing log being empty with Chrome v125+)
- Fixed calculation of `lastprice`, `lastprofit` and `lastpnl` variables for save function when used with positions (eg. `check=pos save`)
- TV Indicator Settings: Fixed broken export to file (text/JSON) due to recent TV update

1.3.63 – 15/5/2024

- BitMEX: Fixed market orders leading to "invalid timeInForce" error due to API change
- BitMEX: Fixed open positions found with size of 0 under certain conditions due to API change
- KuCoin Spot/Margin: Fixed incorrect warning about too high/low order size

1.3.62 – 31/3/2024

- Added syntax option `cr=1` (or `reverse` / `nonmatch`) to inverse filtering of orders and positions (`check`/`cancel`/`close` commands)
- Added search and replace function to alert editor (via right-click context menu and `Ctrl+F` / `Ctrl+H` hotkeys)
- Added more functions to alert editor right-click context menu including hotkeys (toggle comment, indentation etc.)
- Added syntax option `since=cbar` to use the closest bar start time when processing started as reference for time checks instead of bar time provided by TV
- Added options to ignore missing exchange permissions and account name errors (when disabling them on purpose eg. testing/load balancing etc.)
- Corrected stop placement in `Open Positions` wizard for exchanges that support "Stops on Fill" (`sl=`/`tp=` with entry: Bybit, OANDA, Phemex, SimpleFX)
- Disabled simple limit TP for `Place stops immediately` option in `Open Positions` wizard since reduce-only limit orders require an open position
- Fixed some input problems in `Open Positions` wizard dialog and added action button to cancel orders without an open position
- Improved log output for min/max balance checks (`minb=`/`maxb=`)
- Telegram Bot: Changed whitelist behaviour, if empty (default) the bot will react to NO messages
- Telegram Bot: Added support for user names in whitelist
- TV Indicator Settings: Added hotkeys for "Save as" (`Ctrl+S`) and "Load from" (`Ctrl+O`) commands
- TV Indicator Settings: Fixed some cases of the button and context menu not being loaded correctly
- Binance Futures: Fixed incorrect symbol mapping for `PERPUSDT`
- Binance Futures: Fixed incorrect available balance in some account states
- BitMEX Testnet: Workaround for `filter columns are not valid` error
- Bybit v5: Fixed USDC "params error" when querying position info for Non-UTA accounts
- Bybit v3: Fixed spot market order placement error
- Bybit v3/v5: Fixed order placement error when using `leftover` quantity option
- Bybit v3/v5: Ignoring "order does not exist" error caused by server side API caching issues
- Deribit: Added support for reduce-only order filtering (`cancel/check=order r=0 / r=1`)
- Deribit: Added TV spot symbol name mapping (eg. `DERIBIT:BTCUSD.P` => `DERIBIT:BTC-PERPETUAL`)
- Gemini: Updated market data
- Kraken Futures: Fixed custom order ids (via order id cache) not working for stops due to API change
- Kraken Futures: Workaround for error when requesting tickers after exchange maintenance (old data cached by browser)
- KuCoin Spot/Margin: Fixed `lastqty` variable and notification placeholders (`{price}` etc.) not working for live orders
- Bittrex: Removed

1.3.59 – 15/11/2023

- Added function to remove stored account balance info to both the account configuration and popup window (via right-click context menu)
- Added option to place stops immediately with entry (not using `close=pos`) to `Open Positions` wizard
- Added syntax shorthands for yield/unit: `q=50%p` => `yield=pos` // `q=50%e` => `yield=equity` // `q=50$` => `unit=currency`
- Fixed calculation of `lastqtysum` / `lastavg` variables for save function with normal orders using `yield=pos` (using pos AND new order data)
- Fixed `pr=pos` using old entry price for `close=pos` when `yield=pos` or `pr=pos` was previously used with a normal order in the same alert
- Added skipping of balance queries when using absolute quantity (also `lastqty`) or `yield=pos` (less API calls!)
- Added logging of position info queried for normal order when using `yield=pos` or `pr=pos`
- Fixed stored balances sometimes not being removed correctly when an account was removed
- Bybit v5: Made `ex=bybit5` the default for alerts from Bybit charts
- Bybit v5: Implemented querying max borrow amount for spot cross margin trades (eg. `sym=btcusdts long=100%`; not used for `y=equity`!)
- Bybit v5: Fixed `lastqty` variable and notification placeholders (`{price}` etc.) not working for live orders
- Bybit v3: Upgraded discontinued v2 to newer v3 endpoints (Note: still highly recommended to migrate to newer v5 API!)
- Binance Futures: Fixed available balance being reported as zero in some account states
- Gemini: Updated market data
- KuCoin Margin: Added support to specify auto repay for margin orders (via `mt=repay`)

1.3.57 – 30/10/2023

- Implemented workaround for deprecation of Web SQL in Chrome v119 (used for logging)
- Bybit v5: Added support for spot cross margin trades
  (use `long`/`short` instead of `buy`/`sell` or add `ismargin=1` on spot markets like BTCUSDTS, leverage can be set as well)

1.3.56 – 10/10/2023

- Entries for deleted or renamed accounts are now removed after data update in position monitor
- Added Telegram markdown character escape (`*` / `_`) for built-in error notifications
- Added option to set Bybit v5 as default for alerts from Bybit charts (see ➔ General Options / TradingView Connection)
- Bybit v5: Fixed setting leverage not working anymore after API update (@ 1.3.56)
- Bybit v5: Implemented correct cross/isolated switching for Non-UTA accounts (@ 1.3.56)
- Bybit v5: Added support for improved cancel all orders endpoint to reduce API calls (@ 1.3.56)
- Bybit v5: Fixed spot market TP/SL/SO order placement and cancelation (@ 1.3.56)
- Bybit v5: Fixed relative position size info not working correctly for Non-UTA accounts
- Bybit v5: Fixed double listing of USDT positions in position monitor and for `checkpos sym=*`
- Bybit v2 / Bybit v5: Made account test compatible with API keys that have either no spot or no contract trading permissions
  (instead warnings are logged and an error will only be displayed if BOTH permissions are missing)

1.3.54 – 19/9/2023

- Added `Message Prefix` option, alerts without it will be ignored! (see ➔ General Options / TradingView Connection)
- Added position monitor buttons to export position info in CSV/Excel format or copy to clipboard (incl. auto export)
- Added clipboard paste functionality for accounts via buttons and right-click context menu
- Fixed `Ctrl+Q` hotkey to delete accounts not working
- Increased popup width and added text trimming for better support of long account names
- Added filter to target all non reduce-only orders (`cancel/check=order r=0`)
- Improved exchange auto detection for `[accs]` placeholder
  (eg. `pvalert(ex=bybitv5,ap="[accs]")` now inserts Bybit v5 accounts instead of alert/chart source)
- Bybit v5: Added support for Non-UTA (Standard / Legacy) accounts (auto-detect / beta!)
- Gemini: Updated market data
- OANDA: Added support for reduce-only order filtering (`cancel/check=order r=0 / r=1`)
- OKX: Fixed custom order id filter not working (`cancel/check=order id=...`)
- OKX: Improved unique custom order id generation to mitigate `algoClOrdId already exists` errors
  (native custom order id support for stop orders was added in 1.3.47)
- Phemex: Quickfix for `Cannot read properties` error introduced in 1.3.53 update

1.3.52 – 25/8/2023

- Added Bybit v5 API (UTA) support (beta!) (fixes @ 1.3.51)
  (unified margin balance is named `USDM` / balances for inverse contracts have `CT` suffix)
- Added indicator for unsaved alert or account changes and prevent accidental reload of options window
- Added Shift-Click shortcut to `Close` button in position monitor and popup to adjust TP/SL
- Added Ctrl-Click shortcut to `Close` button in position monitor and popup to cancel orders
- Added liquidation price and "coin size" tooltips to position monitor
- Added context menu with all available operations to position monitor
- Added option to cancel only limit orders or stops to `Open Positions` wizard (quantity 0 => only cancel)
- Added separate auto saved quantity for `Add` action in `Open Positions` wizard (default 100%)
- Fixed wrong or missing display of balance info in `Open Positions` wizard for some markets
- Improved display of hedged/oneway and cross/isolated info in position monitor
- Implemented auto saving of position monitor data, persistent between restarts
- Implemented workaround for broken Telegram markdown character escape (`*` / `_`)
- Added context menu with all available general operations to the options window (fixes @ 1.3.50)
- Added Shift-Click option to export button to copy all saved balances to clipboard (@ 1.3.50)
- Added support for simple calculations (`+`, `-`, `*`, `/`) to `_var%` shortcuts (eg. `sl=_myvar%*1.5`)
- Added pre-defined NaN variable for preprocessor if/else (eg. `[if _myvar = NaN]`)
- Added `skip` alias to skip next command for if/err conditionals (`ifnone=skip` => `ifnone=1`)
- Added number of results (order/pos) and overall number to save function as `lastnum` / `lastnumsum` (@ 1.3.50)
- Fixed error when using `PVALERT(acc=exchange:symbol:account)` in alert message after 1.3.46 update
- Fixed preprocessor if/else left-side number comparison with decimal places (eg. `[if 1.5 < high/low-1]`)
- Fixed preprocessor explicit string compare (`*=` `!*=`) not working
- Improved preprocessor placeholder live syntax check for value-divided-by cases (eg. `[123 / _myvar]`)
- Improved preprocessor conditional live syntax check in editor (eg. `[if _myvar = "string"]`)
- TV Indicator Settings: Fixed context menu/button not working due to recent TV update
- Bitfinex: Fixed derivatives position info not working correctly after 1.3.47 update
- Bybit Spot: Fixed incorrect quantity precision for limit orders on some markets
- OANDA: Added custom id support for SL/TP "on fill" parameters with main order (eg. `long=5% id=foo sl=123 tp=456`)
- OANDA: Experimental workaround for "units specified contain more precision than allowed" error (@ 1.3.52)
- Phemex: Implemented workaround for incorrect PnL calculation with less rate limiting
- Phemex: Fixed position opening (funding) time not available or leading to error

1.3.48 – 18/7/2023

- Fixed Telegram notifications not working for some exchange/action combinations
- Fixed unnecessary retries when wrong or no account was specified
- Fixed account Clone button not reading the current account name
- Added syntax shorthands `marketbuy/marketsell/marketlong/marketshort` => `buy/sell/long/short type=market`
- Added syntax shorthands `unit=ct/ccy` => `unit=contracts/currency`
- Gemini: Updated market data

1.3.47 – 5/7/2023

- Alert editor `Filter by name` now also searches for alert id
- Improved dynamic scaling of position monitor data
- Fixed incorrect syntax warnings for several price reference options
- Added support for amount with `closeall/marketcloseall` (eg. `marketcloseall=50%` => `close=pos type=market sym=* quantity=50%`)
- Added syntax shorthand `mc/marketclose/closemarket` => `close=pos type=market` (optional with quantity)
- Added syntax shorthand `limit/market` => `type=limit/market`
- Added option to specify value for shorthand `cached` (eg. `long cached=0` => `b=long bc=0 pc=0`)
- Added option for market stop TP to `Open Positions` wizard
- Added auto saving of quantity and leverage (can be empty!) to `Open Positions` wizard
- TV Indicator Settings: Improved naming of exported settings and screenshots
- Binance Futures: Added update time to position info and support for `cmo=newest/oldest`
- Binance Futures Testnet: Implemented workaround for random "System error"
- Bybit: Added TV spot symbol name mapping (eg. `BYBIT:BTCUSDT` => `BYBIT:BTCUSDTS`)
- Kraken Spot/Margin: Added support for reduce only orders
- KuCoin Margin: Fixed error in `loan` syntax command
- OANDA: Added support for dedicated close API call to fix "more precision than allowed" error (`close=pos type=market`)
- OKX: Added support for trailing stops (`ts=distance`, optionally `so=activation`)
- OKX: Added support for stop trigger reference option `sr=` (default is `sr=last`)
- OKX: Added support to specify auto borrow/repay for margin orders (via `mt=borrow/repay`)
- OKX Futures/Swap: Added support to switch position mode (via `pm=hedge/normal`) and improved auto detection
- OKX Futures/Swap: Fixed "Trigger orders are not available" when placing single stop orders in `One-way mode`
- Phemex: Corrected all stops, allowing for SL/TP on-fill with opening orders (`price=.. sl=.. tp=..`) (optionally `so=activation`)
- Phemex: Fixed order cancelation with SL/TP filtering (eg. `cancel=sl` / `c=order sl=1`)
- Phemex: Fixed zero size position found/shown when no position open
- Phemex: Fixed time sync data not being used

1.3.46 – 31/5/2023

- Added support for Kraken Flexible Futures w/variable leverage (beta) (use `mt=crossed/isolated` for margin type)
- Added support for Phemex Hedged Contract USDT API (beta) (use `pm=hedge/normal` for position mode)
- Added bid-ask spread check syntax options (`minsp` / `maxsp` / `ifminsp` / `ifmaxsp` / `spa` / `spb`)
- Added syntax shorthand `c/ch/close/check=123%` => `c/ch/close/check=pos q=123%`
- Added syntax aliases `pm=oneway` => `pm=normal` / `mt=iso` => `mt=isolated` / `mt=cross` => `mt=crossed`
- Telegram Bot: Added event stream loss/reconnect info to status message
- TV Indicator Settings: Split text and JSON copy/export into separate menu entries
- TV Indicator Settings: Added PV button as alternative to right-click context menu
- TV Indicator Settings / TV Alert Dialog: Styling fixes (TV update)
- Improved some error messages and documentation
- Binance Futures: Made trailing stops easier to use with `so=activation ts=distance` (instead of `cbrate`)
- Binance Futures / Bybit / Phemex: Added hedge mode/side info to position monitor
- Binance / KuCoin / Deribit: Added support for `minq`/`maxq` (quantity limits) for transfer, loan and repay commands
- BitMEX / Bybit / Deribit / Kraken Futures / Phemex: Improved symbol type naming
- Bitfinex: Added support for `sym=*` and made margin/future positions visible in position monitor
- Bitfinex: Fixed SL/TP/SO stops, added support for limit stops and OCO orders (both `sl=` and `tp=`)
- Bitfinex: Fixed compatibility with newer markets, paper trading and margin/future orders & balances
- Bitfinex: Fixed errors on order cancelation
- Bitfinex: Added new TV symbol name mapping (eg. `BITFINEX:BTCUST.P` => `BITFINEX:BTCF0USTF0`)
- Bybit: Fixed error when placing order and switching from hedged to one-way mode at the same time
- Bybit: Fixed per market maximum leverage check
- Bybit Spot: Fixed price precision error for limit buy orders on some markets
- Bybit Spot: Fixed filtering for stops on order cancelation
- Gemini: Updated market data
- Kraken Futures: Added support for trailing stops
- Kraken Futures: Added new TV symbol name mapping (eg. `KRAKEN:BTCUSD.PM` => `KRAKENFT:PF_XBTUSD`)
- KuCoin Margin: Implemented correct balance handling for isolated margin trades
- KuCoin Margin: Using 1x leverage when `mt=borrow` is NOT specified or `iso=1` is used (doesn't support auto-borrow!)
- KuCoin Margin: Added support for dedicated `loan` and `repay` commands
- KuCoin Margin: Fixed error when placing market orders (quote instead of base currency sizing)
- OANDA: Fixed `save` syntax option (`lastqty` variable) for short orders
- Phemex: Added support for using both cross and isolated variable leverage via `mt=crossed/isolated`
- Phemex: Added support for using high ratelimit endpoint (optionally, enabled per account)
- Phemex: Added automatic splitting of orders bigger than the contract limit (beta)
- Phemex: Added support for bulk order cancelation on all markets
- Phemex: Added new TV symbol name mappings (eg. `BTCUSD.P` => `UBTCUSD`, `SOLUSDT.P` => `SOLUSDT`, `TRXUSDT` => `STRXUSDT` etc.)
- SimpleFX: Implemented automatic renewal of expired authorization token (fixes @ 1.3.46)

1.3.44 – 4/4/2023

- Fixed TradingView Event Stream reconnecting every 60 minutes (TV update)
- Syntax options `ismargin` / `iso` / `mt` can now be all set as defaults
- KuCoin: Reduced number of API requests for `c/ch=order`
  (for margin orders use either `side=long/short` or add `ismargin=1`, to only target isolated margin add `iso=1`, to only target crossed margin add `iso=0`)

1.3.43 – 31/3/2023

- Made custom plot values as % more user-friendly eg. `sl=[-]_someplot%` (before `sl=[-][_someplot]%`)
- Added price ticker data to `save` syntax option, useable as refs (eg. for `updateprice save` command – lastbid/lastask/lastmid)
- Fixed `maxslip=` check assuming correct trade direction for some edge cases
- Fixed `maxslipref=bid/ask` working correctly with cached ticker data
- Fixed newer conditional options (eg. `maxslip=`) to be correctly treated as errors when explicit `if..` (`ifslip=` etc.) not specified
- Added `margin`/`ismargin` syntax option to force margin mode for markets with both spot & margin (eg. OKX BTCUSDT `check=pos margin`)
- Added quantity type / base currency to position monitor where available
- Fixed `retrydelay=`/`rd=` syntax option having no effect
- Fixed TradingView Pine Editor hanging with ProfitView TV Addon installed (TV update)
- Binance Futures: Fixed symbol naming (eg. `BTCH2023` => `BTCUSDH2023`)
- Binance Futures: Added new TV symbol name mapping (eg. `BINANCE:BTCUSDT.P` => `BINANCEFT:BTCUSDT`)
- BitMEX: Added new TV symbol name mapping (eg. `BITMEX:XBTUSD.P` => `BITMEX:XBTUSD`)
- Bybit Futures: Added new TV symbol mapping (eg. `BTCUSDH2023` => `BTCUSDH23`)
- Kraken Futures: Fixed symbol naming (eg. `XBTUSD31H` => `XBTUSDH2023`)
- Kraken Futures: Added new TV symbol name mapping (eg. `KRAKEN:BTCUSD.P` => `KRAKENFT:PI_XBTUSD`)
- OKX: Added new TV symbol name mapping (eg. `OKX:BTCUSD.P` => `OKX:BTCUSDPERP`)
- OKX: Fixed incorrect position size in some cases with open limit orders for position check/monitor

1.3.42 – 25/2/2023

- Fixed automatic time sync option not retrying command correctly in case of a timestamp error
- Fixed log entries from TV script addon module missing in app log
- Fixed '0' added to values in `Open Positions` wizard for absolute price offsets
- Bybit: Fixed "account needed" error for `Symbols` info when no account was defined
- OANDA: Fixed "unsupported type" error for `fp=` (fixed price) option (only `price=@123` worked)
- OKX: Fixed swap/future long positions in `Buy/Sell` account mode always detected as short positions

1.3.41 – 7/2/2023

- Improved retaining of TV event stream token after logging in and out of TV
- Fixed incompatibility with older Chrome versions introduced by previous update (1.3.39)
- Phemex: Improved filtering of open orders to avoid canceling orders for all symbols

1.3.39 – 20/1/2023

- Added notification placeholder `_symbols` for checks that return multiple orders or positions with different symbols
- Improved `minpl`/`maxpl` (PnL) and `mins`/`maxs` (size) position checks that were sometimes incorrect and their log outputs
- Added account and `ex:sym` information to built in error notifications
- Binance Futures: Improved detection of cross margin mode for position check/monitor

1.3.38 – 9/1/2023

- Bybit / Binance Futures: Fixed `sym=*` (check all markets) throwing timestamp errors for `check=pos` / `close=pos`
- Binance Futures: Improved detection of multi asset margin status

1.3.37 – 22/12/2022

- Added options to automatically export configuration, app log and balance infos according to set schedule
- Fixed very small numbers in custom variables being printed in scientific notation (log, notify, placeholders)
- TV Indicator Settings Manager: Added save/load support for input types Symbol, Textarea and Time
- TV Indicator Settings Manager: Styling fixes (TV update) and added improvements for more input types
- TV Indicator Settings Manager: Fixed screenshot function glitches (TV update)
- Bybit / Binance Futures: Corrected position side attribute for reduce only orders not using `close=pos` in hedge mode
- Coinbase Pro: Fixed very low prices causing order placement error due to scientific notation
- KuCoin: Fixed very low prices causing order placement error due to scientific notation (eg. `JARBTC`)
- KuCoin Margin: Fixed checking and cancelation of isolated margin orders
- OANDA: Added syntax option `pb=` to set worst market price allowed for an order to be filled at

1.3.36 – 30/11/2022

- Added buttons to export current balances in CSV or Excel format (see ➔ General Options and popup window)
- Telegram Bot: Made sending of execution summary after triggering of alerts or commands optional (enabled by default)
- Fixed certain account names given via `yield=` for the transfer balance command being changed (eg. "free", "total", "pos")
- Fixed backslashes being inserted into field names containing underline/asterisk for built in Telegram notifications
- Fixed context menu & shortcuts in popup window balances to open/add/close positions sometimes not working
- Increased popup window size
- Added button to clear symbol info cache manually (see ➔ General Options)
- Binance Futures: Added automatic splitting of orders bigger than the contract limit (beta)
- Binance Futures: Fixed "available" balance for COIN-M markets always being zero (only `yield=equity` worked!)
- Binance Futures: Corrected "min notional" check after slight API change
- Bybit / Binance Futures: Added option to specify a delay between automatically split orders (see ➔ General Options)
- Deribit: Fixed error in transfer balance command when targeting the main account with `yield=`
- Deribit: Added listing of available account names/ids when given one is not found by transfer balance command

1.3.35 – 11/10/2022

- Added support for equations to notification placeholders (eg. `notify=t:"offset is {price-close}"`)
- Added new syntax conditionals to check if a PV Alert is enabled or disabled (`checkalert=alert ifenabled=...` / `ifdisabled=...`)
- Added support for `ex:sym` to `[accs <(ex:(sym:))filter>]` account list placeholder (see ➔ Setup: Commands section Unified Alerts!)
- Added option to disable `long`/`short`/`buy`/`sell` shorthand commands for legacy alerts / direct syntax (disabled now by default!)
- Ignoring `/` at the beginning of custom Telegram bot commands (eg. syntax or PV Alert names)
- Changed "Order not found" error on order cancelation to warning only
- Improved error messages when wrong or no account specified or no permission given for exchange
- Fixed PV Alerts not found if first line(s) of TV message were empty or commented out
- Fixed escape of some special characters for Telegram notifications
- Fixed division using variables in placeholder calculations triggering a false syntax error
- Fixed price reference options `even`, `liq` and `index` (where available) triggering a false syntax error
- Fixed wrong distance for trailing stops when ts is specified as fixed price (`ts=@12345`)
- Fixed bug in Telegram bot that could lead to endless Telegram request loops
- Compatibility fixes for latest Chrome updates
- TV Indicator Settings Manager: Fixed message dialogs not showing correctly (TV update)
- TV Indicator Settings Manager: Fixed missing exchange, symbol & resolution prefix for saved files (TV update)
- TV Indicator Settings Manager: Adapted indicator dialog styling fixes (TV update)
- Binance/Binance Futures/OKX: Fixed order id check failing for ids containing non-alphanumeric characters
- Binance Spot/Margin: Added support for trailing stop orders
- Binance Spot/Margin: Corrected error for market OCO (SL & TP both provided) orders
- Binance Futures: Added support for Multi Asset mode (beta)
- Binance Futures: Improved symbol browser market type info (COIN-M / USDⓈ-M)
- Binance Margin: Added support for canceling isolated margin orders
- BitMEX: Implemented use of time synchronization data
- Bybit: Fixed `ifpartial=` conditional not triggering
- Bybit: Corrected maximum order size for post-only orders
- Bybit: Fixed `sym=*` (all symbols) not working for `check=pos` / `close=pos`
- Bybit: Added mapping for changed market names on TV (`XXX.P` => `XXX`)
- Deribit: Added support for new markets settled in USDC and SOL
- Gemini: Updated market data
- Kraken Futures: Fixed incorrect quantity precision for some symbols
- KuCoin Margin: Corrected assumed leverage for quantity calculation to 5x (was 10x)
- KuCoin Margin: Fixed cancelation of stop orders
- KuCoin Futures: Corrected error message when wrong or no account specified
- OKX: Fixed relative quantity calculation for some markets (inverse swap etc.)
- OKX: Fixed margin short positions not correctly recognized and limit close not working
- OKX: Added support for `mt=crossed` / `mt=isolated` option to specify leverage for cross
- OKX: Fixed order placing error occuring under some circumstances due to API changes
- OKX: Improved unit option for absolute quantities (see "Quantity Units" in Wiki)

1.3.34 – 31/5/2022

- Added syntax shorthands for side w/quantity: `buy/sell/long/short=xxx` => `q=xxx`
- Fixed `{_side}` placeholder in custom notifications
- Fixed modulo (`%`) and power of (`^`) not working in simple placeholders (eg. `[_plot^5]`)
- Fixed custom variables in placeholders only working when being lowercase (eg. `[_plot]` vs `[_PLOT]`)
- Fixed error being logged by Chrome each time a TV tab loads the PV addon
- Bybit: Added automatic splitting of orders bigger than the contract limit (beta)
- Bybit: Added dedicated switch between crossed and isolated margin (independently of leverage) via `mt=crossed/isolated` (default: no switch)
- Bybit: Added support for trailing stop trigger price (non-USDT only!) via `ts=aaa so=bbb` (`aaa` = distance, `bbb` = trigger)
- Bybit: Implemented auto detection of position mode and changed default for `pm=` option to `auto`
- Bybit: Fixed "position status not normal" error when trying to change managed SL/TP on linear markets (USDT)
- Bybit: Fixed "position mode" error for non-stop closing orders with hedged positions (`close=pos`)
- Deribit: Added support for trailing stops (updated API)
- Deribit: Changed TP stops to use dedicated "takeprofit" stop type (updated API)
- Deribit: Use cancel-all API command also for canceling only entry/stop/TP/SL/TS orders
- Deribit: Fixed incorrect leftover order quantity saved with `save` command
- FTX: Added one-by-one fallback when cancel-all API command fails
- KuCoin Margin: Added support for isolated margin order flag (`iso=1`)
- Phemex: Added support to target trailing stops only (`c/ch=order ts=1`)

1.3.33 – 18/4/2022

- Added syntax shorthand `c/ch=buy/sell` => `c/ch=order b=buy/sell`
- Added warning if new placeholder `[accs]` doesn't find or match any accounts
- Phemex: Fixed open positions not being found (slight API format change)

1.3.30 – 31/3/2022

- Added new syntax shorthands:
  `buy/sell/long/short` => `side=buy/sell/long/short`
  `cancel` => `cancel=order`
  `close` => `close=pos`
  `close=long/short` => `close=pos side=long/short`
  `closeall` => `close=pos sym=*`
  `iforder=x` => `check=order iffound=x`
  `ifnoorder=x` => `check=order ifnone=x`
  `ifpos=x` => `check=pos iffound=x`
  `ifnopos=x` => `check=pos ifnone=x`
  `retrydelay=x` => `jumpdelay=-x`
  `echo=x` => `notify=log:x`
  `cached` => `cachedprice cachedbalance`
  `update` => `updateprice updatebalance`
- Implemented syntax placeholders to work for legacy alerts / direct syntax as well (@ 1.3.30)
- Added new placeholder `[accs]` that expands to a list of all accounts for an exchange (eg. `ap=[accs]`, see ➔ Setup: Commands!) (@ 1.3.29)
- Added new run/trigger command variants `runen=` / `triggeren=` that check if an alert is enabled before running (@ 1.3.29)
- Added "Disable legacy alerts" option under ➔ General Options to ignore all non-PV Alerts (@ 1.3.29)
- Added support to trigger PV Alerts for multiple accounts in parallel via `PVALERT(ap="acc1,acc2,acc3")` (fixes @ 1.3.27)
- Added new conditionals `iftf=` / `iftnf=` (if timeout and (partially) filled / not filled) (fixes @ 1.3.29)
- Added new conditionals `iftp=` / `iftnp=` (if timeout and have position / no position) (fixes @ 1.3.29)
- Added `/log` command to Telegram bot to query recent log entries
- Added option to Telegram bot to send more log messages/results from triggered commands (enabled by default!)
- Improved "uniqueness" of generated custom order id for alerts called via the `run=` command (fixes @ 1.3.28)
- Assuming `check=pos` as command for `ifbg`/`ifsm`/`ifl`/`ifs` checks if not specified
- Assuming `check=order` as command for `ifp` check if not specified
- Added filled/executed quantity as `filled` to saved order data
- Changed `loop=` syntax command to default to `this` and fixed wrong jump for `this` (repeat from last jump or closest jump mark further up)
- Added shorthand `quantity=var@` which sets `levcalc=1` to ensure exact quantity (eg. `q=lastqty@`) (use `quantity=@123` for numbers!)
- Added new parameter `lc=` (levcalc) to specify leverage used for calculations only (eg. `q=lastqty lc=1`)
- Fixed `cancel` (cancel & continue) option for `err=` and conditionals resulting in endless loop after canceling orders
- Fixed `maxslip` check for cases when `side=` is not explicitly specified for a command
- Fixed `{price}` placeholder for notifications showing more (calculated) precision on some exchanges than what was sent
- Fixed wrong leverage in notifications when running in test/disabled mode
- Added support for different multipliers/divisors per account when using variable shorthands (eg. `q=_var%*2,/3,*1`)
- Added support for different addends/subtrahends per account when using variable shorthands (eg. `p=_var+2,-3,+1`) (fixes @ 1.3.26)
- Added support for `++` / `--` (plus) and `-+` / `+-` (minus) number prefixes (eg. `sl=[+][_var]%` => `sl=+-3%`)
- Implemented workaround for bug in Chrome v98 that stopped "Always keep PV options open" from working correctly (+other issues) (fixes @ 1.3.26)
- Added "Force Time Sync" button under ➔ General Options to force synchronization of internal clock correction
- Added alert editor option to show/hide advanced filtering options (NOTE: Now hidden by default!)
- Added option to pause/resume all running alerts when pausing/resuming PV through popup menu (Shift-Click on pause button)
- Added support for "power of" to placeholder calculations (eg. `q=[base^exp]%`)
- Added `[this]` placeholder always containing the current alert id
- Added support for non-wildcard string comparisons to preprocessor via double quotes (eg. `[if acc="*"]` to match only *)
- Added notification options to not include custom order ids in built-in notifications
- Fixed processing of comments in syntax to allow "#" and ";" in string literals (eg. custom notifications etc.)
- Made syntax commands and parameters case insensitive (previously lowercase only)
- Adapted indicator dialog styling fixes to latest TV update
- Fixed several slightly incorrect descriptions in ➔ Setup: Commands
- Added some missing commands to live help
- Binance/Coinbase/Bitfinex/Gemini/KuCoin/Poloniex: Fixed symbol browser error introduced in 1.3.24
- Binance / Binance Futures: Generating shorter unique order ids to avoid custom id errors
- Binance / Binance US: Fixed error when using "last" price (`priceref=last`) due to API changes
- BitMEX: Fixed notifications often showing maximum market leverage instead of used one
- FTX: Added check/warning for minimum order quantity (if info available for market)
- FTX: Added correct saving of changed leverage when using cached balances
- FTX / FTX US: Added support for time synchronization endpoint (NOTE: Requires re-granting permission!)
- Kraken: Added support for available spot balance (prev. only total equity) via new API command

1.3.24 – 20/1/2022

- Added syntax option `since=bar` to use the current alert bar start (instead of "fired") as reference for time check
- Added support for `priceref=pos` and `maxslipref=pos` for maxslip check when used with `close=pos` command
- Added support for `nopos` conditional for non-closing orders when using `priceref=pos` or `yield=pos`
- Added `ifbg`/`ifsm` conditionals to compare current order or position quantity with `lastqty` (saved) variable
- Added `minsr`/`maxsr` plot reference for `mins`/`maxs` filter (allowing eg. `mins=_someplot`)
- Added `[time]` and `[date]` placeholders for easier time/date checks in preprocessor if/else (eg. `[if date > 1200 and time > 0530]`)
- Fixed "side" being ignored when sent via `PVALERT(side=xxx)` without OHLC data present in last line of alert message
- Fixed saved order data (lastxxx) sometimes not available in notifications (when used without any order or check command)
- Fixed encoding error sometimes occuring for Email notifications (esp. error/warning messages)
- Fixed several API key UI glitches (when newly added key is immediately deleted etc.)
- Added error message to symbol browser in case market symbols can't be updated (eg. OANDA requiring valid API key)
- Binance Futures: Fixed filtering by leverage for `close/check=pos` never matching and always resulting in no position found
- Bybit: Added support for new one way mode (non-hedge) on linear markets (USDT Perp) via `pm=normal` order option
- Deribit: Fixed error when using fp (fixed price) filter with open market stop orders
- OKX: Using conditional stops in "net mode" and trigger stops for "long/short mode" (avoiding reduce-only problems)
- OKX: Setting closing orders to reduce-only by default only when supported (avoiding errors)
- OKX: Fixed error when placing OCO stops (both SL and TP given with `close=pos`)
- OKX: Fixed quantity error (sz) for short closing orders in "net mode"
- OKX: Fixed long positions detected as shorts in "net mode"
- OKX: Added missing relative position sizes in "net mode"
- OKX: Renamed from OKEX and changed URL/endpoints

1.3.23 – 29/11/2021

- Added variable/plot support to transfer command quantity (eg. `transfer=usd q=lastpnlsum%`)
- Added sum of total closed/checked positions relative PnL to save function as `lastpnlsum` (fixes @ 1.3.23)
- Added sum of all order quantities and overall avg price to save function as `lastqtysum` / `lastavg`
- Added close/check positions option to target all symbols via wildcard (`close/check=pos sym=*`) (fixes @ 1.3.22)
- Added new order dialog shortcut to balances in popup (Alt-Click / context menu)
- Added new order dialog button to margin exchange accounts
- Fixed syntax option `save` for orders without id when using order id cache
- Added support for different time units to lock syntax expiration and timeframe options (eg. `lock=-3h`)
- Fixed "cancel/close on error" options sometimes not canceling orders / closing positions
- Improved speed when changing log viewer filter options (@ 1.3.22)
- FTX: Fixed `transfer` command not printing the transfered and total amounts
- FTX: Fixed `transfer` command on error not listing available accounts correctly
- Kraken Futures: Fixed error when updating symbol info (caused by new API data)
- Phemex: Added support for ETH margin account balances
- Phemex: Added skipping of random balance query errors (esp. on Testnet)

1.3.20 – 11/11/2021

- Implemented position monitor action buttons (open / add / close / flip) with easy to use order dialog including useful options (SL/TP, yield etc.) and syntax builder!
- Added new shorthand options to cancel/check order command for filtering:
  `cancel=takeprofit/tp` => `cancel=order tp=1`
  `cancel=stoploss/sl` => `cancel=order sl=1`
  `cancel=open/limit` => `cancel=order type=open` (non-stops)
  `cancel=close/stops` => `cancel=order type=close` (stops)
- Added new `err=cancel` option to cancel orders and continue (use `eid=` to target orders by id; `cid=` for non-error conditionals)
- Added new syntax option `log=` to specify log level per command and new log level "cond" (errors + conditionals)
- Fixed delay and interval offset miscalculations when specified in different time units (eg. `delay=10s`, `interval=+5m`)
- Fixed relative (%) delay, maxtime and jump delay parameters not being correctly reset in loops and retries
- Fixed `pos`/`even`/`liq` options for `slref`/`tpref`/`soref`/`tsref` not working with `close=position` when explicitly specified
- Fixed `iftime=cancelside`/`closeall` etc. not canceling orders / closing positions when maxtime reached
- TV Indicator Settings Manager: Fixed broken and/or missing dropdowns in screenshots
- Added mark price column to position monitor (when available)
- Added indicators for next refresh/last update to position monitor
- Added account name check for invalid/illegal characters
- Changed default button in confirmation dialogs to no/cancel
- Improved performance of exchange/symbol browser UI and changed copy/export to all rows
- Binance Futures: Added automatic mapping of delivery futures (eg. `BINANCE:BTCZ2021` => `BINANCEFT:BTCUSD_211231`)
- BitMEX: Added full support for new USDT markets and balance
- BitMEX: Corrected fee calculation to use instrument data
- Kraken Futures: Added automatic mapping of delivery futures (eg. `KRAKEN:XBTUSD31Z` => `KRAKENFT:FI_XBTUSD_211231`)
- KuCoin Futures/Spot: Fixed direction of stop orders for some cases (eg. entry buy stop under current price)
- KuCoin Spot: Updated API calls for creation and checking/cancelation of stops
- KuCoin Spot: Fixed custom SL/TP plot reference not being used

1.3.19 – 30/9/2021

- Added OKEX v5 support (all markets!) (beta)
- Fixed indicator settings paste/load errors caused by latest TV update
- Made `lock`/`lockcheck` syntax commands usable for legacy alerts
- Added shortcut for symbol browser (`Alt+S`) to PV Alert page (@ 1.3.17)
- Fixed run/long shortcut (`Ctrl+L`) in PV Alert page (@ 1.3.17)
- Fixed error message when placing locks via syntax (cosmetic / still worked)
- Added check for Bot Token to Telegram bot
- Added check for CoinMarketCap API key (and signup link)
- Added timestamp to error notifications
- Binance: Added support for spot-margin OCO orders (SL & TP together)
- Bybit: Corrected closing and reduce-only orders to fix rejection of stops (@ 1.3.19)
- Bybit: Added alias names for futures eg. `s=ETHUSD1231` equals `s=ETHUSDZ21` (@ 1.3.19)
- FTX: Fixed correct rounding/stepping of quantity for certain markets
- FTX: Fixed some orders without any ID being found/canceled when filtered by ID
- Gemini: Updated market data
- Kraken: Fixed updating of all fetched balances
- KuCoin/KuCoin Futures: Updated authentication to V2 API keys
- KuCoin: Corrected relative quantity calculations for spot-margin (10x leverage)
- KuCoin Futures: Fixed relative quantity calculations for some markets (`BCHUSDTM`, `TRXUSDTM` etc.)
- OANDA: Added support for guaranteed stop-loss (gsl=1)
- OKEX: Fixed order placement error when using custom ID (@ 1.3.17)
- OKEX: Fixed custom leverage multiplier/variable being ignored (@ 1.3.17)
- OKEX: Added auto detection of position mode / fixed posSide error (@ 1.3.17)
- OKEX: Added custom ID cache for stop orders without native ID support (@ 1.3.18)
- OKEX: Changed single SL/TP stop types from "conditional" to "trigger" (no margin freeze) (@ 1.3.18)
- Phemex: Fixed ticksize error occuring on spot markets (further fixes)
- Phemex: Fixed placing of trailing stop orders (use ts with any of tp/sl/so!)

1.3.15 – 2/9/2021

- Added value2 and value3 for IFTTT messages (built in: price/size/balance, custom: `"val1;val2;val3"`)
- Added syntax commands `exitall` / `pauseall` / `resumeall` to control other running alerts
- Added syntax command to `restart` PV (caution!)
- Fixed Telegram bot stuck in parallel starting loop with "conflict error"
- Fixed `go=back`/`do=loop` syntax commands not working properly
- "Detect Side" alert option now honors ex/sym/acc submitted via parameters (eg. `PVALERT(acc=test)`)
- Binance / Binance US: Fixed cancel=order only canceling a single order (caused by API change)
- Bybit: Added support for spot markets (beta)
- Bybit: Fixed order/position check option `save` not working
- Bybit: Fixed cross leverage (`l=0`) and position size check/info not working (@ 1.3.15)
- Kraken Futures: Changed to use official market order type
- Phemex: Fixed some fields for notifications
- Phemex: Fixed ticksize error occuring on some markets
- Removed DueDEX support

1.3.13 – 13/6/2021

- Fixed jump labels followed by comments in the same line producing a syntax error
- Fixed indicator settings copy & paste errors caused by latest TV updates (@ 1.3.13)
- Fixed random "Tabs cannot be queried right now" error occurring since recent Chrome update (@ 1.3.13)
- Binance Futures: Added support to get correct fill price for market orders (for log/notify) (@ 1.3.11)
- BitMEX: Implemented rounding of order quantity to market lot size (further fixes @ 1.3.12)

1.3.9 – 27/5/2021

- Changed default preprocessor conditional string check operator from "starts with" to "equals" and added dedicated "starts with" string check operators `*=` and `!*=`
  (eg. `[if id=foo,bla]` was matching any alert id STARTING with "foo" or "bla" before and will now match only exact ids "foo" and "bla" - change to `[if id=foo*,bla*]` or the new `[if id*=foo,bla]` to achieve the previous check!)
- Added shorthands `[]` for `[else]` and `[end]` for `[endif]` in preprocessor conditionals
- Fixed indicator settings copy & paste errors caused by latest TV updates (@ 1.3.9)
- Fixed some false errors in the syntax editor when using preprocessor conditionals within one line (`price=[if..]1%[else]2%[end]` etc.)
- Fixed preprocessor conditional operators being case sensitive (now `[IF]` / `[if]` / `[If]` are all equal)
- Fixed most underscore/asterisk Telegram notification/bot escaping issues
- Fixed number formating on mobile for some Telegram bot commands
- Bybit: Added support for TP/SL "on fill" parameters for opening order stops (currently only working on USDT markets)
- OANDA: Added support for TP/SL "on fill" parameters for opening order stops

1.3.7 – 7/5/2021

- Implemented Telegram Bot commands to list accounts, balances and positions!
- Added Telegram Bot options to disable/enable functionality more granular
- Added option to ignore filtering for alerts triggered via Telegram bot (prefix "!" to message)
  or to forcefully run alerts/commands even when PV itself is paused (prefix "!!" to message)
  or to forcefully run alerts even when PV OR THE ALERT is disabled (prefix "!!!" to message)
- Fixed error occuring when placing non-closing orders using `yield=possize`
- Added position details window to position monitor (by clicking on a list entry)
- Added support for modulo (`%`) to expressions in placeholders / conditions (@ 1.3.5)
- Added `ifbuy`/`ifsell` aliases for `iflong`/`ifshort` conditionals (for TV Strategy alerts)
- Added syntax placeholder `[tf]` for the formatted alert/chart resolution (1h instead of 60 etc.)
- Added syntax aliases `end` and `back` for `go=back`
- Added UI to browse cached custom order IDs (see ➔ General Options / Browse ID cache)
- Adapted indicator dialog styling fixes to latest TV update
- Binance Futures: Fixed order cancelation errors on some markets (workaround for long order IDs) (further fixes @ 1.3.5)
- Binance Futures: Fixed order quantity changing on `close=position` retries (@ 1.3.6)
- Binance Futures: Improved error handling (@ 1.3.5)
- Bybit: Added support for new Futures API (beta, use pm=hedge for hedge mode!)
- Bybit: Implemented quantity adjustment in case supplied leverage is limited by market
- Bybit: Corrected assumed leverage for cross to 100x (WARNING: Affects relative quantities!)
- Bybit: Added auto detection of cross margin setting
- Bybit Testnet: Added workaround for random API change (@ 1.3.7)
- FTX / FTX US: Fixed coin/spot wallet balances using the correct "available" amount (@ 1.3.6)
- FTX US: Fixed "not logged in" API authentication error
- KuCoin: Upgraded margin order endpoint and added auto borrow support (mt=borrow)

1.3.3 – 28/2/2021

- Implemented Telegram Bot functionality (see "Setup: Notifications" / added to stats - BETA!)
  Completely remote control PV and trigger PV Alerts via Telegram! (see Telegram Bot `/help` command)
- Added PV Alert option to interpret auto run interval as schedule ("allow only then")
- Added support to submit custom variables/plots to PV Alerts via `ALERTNAME(var1=value1,var2=value2,...)`
  (use `ex=` / `sym=` / `acc=` or `acc=ex:sym:acc` to set default exchange / symbol / account for alert!)
- Fixed unified placeholder comparisons/checks still being interpreted even when commented out
- Exchange time sync can be disabled now by setting the interval to 0 (see ➔ General Options)
- Added automatic triggering of exchange time sync if error message mentions "timestamp"
- Fixed error occuring when position PL is higher than given maxpl= parameter
- Added option to show empty entries in position monitor when exchange set to "all" (now hidden by default)
- Slightly improved use of space in PV Alert GUI
- Binance Margin: Added correct balance query & cache for isolated spot margin with relative quantity (`side=long/short iso=1`)
- Binance Margin: Added correct balance query for crossed spot margin trades with relative quantity (`side=long/short mt=borrow`)
- Binance Margin: Implemented transfer balance option for isolated spot margin balance (eg. `tb=etc iso=1 s=etcbtc`)
- Binance Margin: Implemented querying the correct amount for loan/repay commands with relative quantity
- Binance Delivery: Fixed auto-detected leverage being incorrect sometimes if not specified via syntax
- Bybit: Switched to realtime order query endpoints to avoid getting out-of-date/corrupt order information
- FTX: Implemented quantity adjustment in case supplied leverage has to be rounded down
- FTX US: Fixed error when testing API key
- Gemini: Implemented `type=market` workaround (immediate-or-cancel order with wide limit price)
- Gemini: Updated market data
- Kraken Futures: Fixed `type=market` workaround for `close=position`
- KuCoin Futures: Implemented quantity adjustment in case supplied leverage is limited by market
- OANDA: Implemented quantity adjustment in case supplied leverage is limited by market
- Phemex: Fixed error when canceling multiple orders at once
- Phemex: Fixed error for `cancel/check=order` when no order is open

1.3.2 – 5/2/2021

- Fixed comparisons in placeholders always evaluating as true (broken in 1.3.1)
- Added aliases "free" (for "balance") and "total" (for "equity") to `yield=` option
- Kraken Futures: Added _sizeUSD and _sizeCoin position infos
- Bybit: Improved ticker query for USDT markets

1.3.1.2 – 25/1/2021

- Fixed new format ex:sym:acc (or ex:acc) for `a=`/`ap=` not working sometimes
- Kraken: Added support for custom SL/TP references/plots
- Kraken: Added correct leverage info to notifications
- Kraken Futures: Added correct leverage info to notifications

1.3.1.1 – 22/1/2021

- Added option to Run & Test buttons in PV Alert editor for spot markets (via Alt-Key while clicking)
- Added conditional option to check if an order was partially filled (see `ifp=`/`ifpartial=`)
- Added conditional option to differentiate between other error or max time reached (see `ift=`/`iftime=`)
- Added placeholder `[caller]` for the id of the alert that ran/triggered this alert (fallback current alert id)
- Added placeholder `[acc]` for account name from `ap=`/`run=`/`trigger=` (fallback from alert name; name format EX-SYM-ACC)
- Added placeholders `[internal]`, `[fork]` and values internal/fork to `[mode]` (see "Unified" under ➔ Setup: Commands!)
- Moved min/max balance checks to work with updatebalance command (`ub=1 minb=x`)
- Added columns to command list (➔ Setup: Commands) showing if key can be used as standalone command and/or set as default
- Added syntax command `exit` as alias for `do=abort`
- Coinbase Pro: Fixed error when canceling orders
- FTX: Always calculate positive order amount, even when negative balance (eg. spot margin short)
- Kraken Futures: Implemented "pseudo" market orders (`type=market`) via order type IOC and price offset
- Kraken Futures: Fixed log confirmation and caching of custom IDs for stop orders
- Kraken Futures: Fixed wrong order type for take profit stops
- Kraken Futures: Added event source mapping of KRAKEN:XXXPERP to KRAKENFT:XXX
- Kraken: Added correct spot balance query and separated margin balance
- Kraken: Added support for the new Position Monitor (fixes @ 1.3.1.1)
- Kraken: Added PnL calculations for positions (margin) (fixes @ 1.3.1.1)
- Kraken: Corrected free margin balance info (`yield=balance` / default)
- Kraken: Fixed error when closing positions (via `close=position`)
- KuCoin: Added support for spot margin orders/balances (via `side=long/short`)

1.3.0.2 – 26/12/2020

- TV Indicator Settings Manager: Copy/Paste/Save/Load settings + Take screenshots (Beta!)
  (holding the `Shift` key will disable confirmations, holding the `Ctrl` key will switch between JSON & text formats)
- Added position monitoring GUI (Beta!)
- Added support for DueDEX exchange
- Added support for Phemex exchange
- Added support for Twilio (SMS) notifications
- Added syntax commands to run or trigger other PV Alerts (see `run=` and `trigger=`)
- Added conditional option to compare current vs cached price or custom plot (see `maxslip=` / `maxslipref=` / `ifslip=`)
- Added syntax option "transpose" to adjust custom plots based on new price (useful for signals from different chart, see `transpose=`)
- Added saving of quantity, price, id, status and leftover quantity of canceled/checked orders for later reference (see `save=` and `leftover=`)
- Added reference options `lastqty`, `lastprice` & `laststop` to use quantity, price or stop from last placed or canceled order
- Added `yield=possize` option for normal non-closing orders to reference size of open position
- Added support for equations to unified placeholders and the new conditionals (eg. `sl=[(close + _myplot)/2]` etc.)
- Added custom plots to unified placeholders (eg. `quantity=[_myplot]`)
- Added support to specify different exchanges/symbols per account in lists via exchange:symbol:account (see a= and ap=)
- Added list support to `e=` and `s=` options, allowing to specify different exchange/symbol per account given in `a=`/`ap=`
- Added preprocessor conditional syntax to check any predefined placeholder, OHLC and custom plot data against values or other plots
  (eg. `[if not _myplot < 7000] ... [else] ... [endif]` ; see ➔ Setup: Commands under "Unified Alerts")
- Added new placeholders to be used in preprocessor conditional syntax
  (`[alert]`, `[screener]`, `[manual]`, `[auto]`, `[mode]`, `[long]`, `[short]`, `[weekday]`, `[day]`, `[month]`, `[hour]` and `[minute]`)
- Added `priceref=pos/even/liq` option for normal non-closing orders to reference price of open position
- Added option for `interval=` command to schedule an alert to run given minutes from now (via `interval=+x`)
- Added support to specify time in minutes/hours/weeks/months for `delay=`, `jd=`, `time=` and `interval=+x` options (eg. `delay=5.5m`)
- Added option to allow running of specific alerts even when in global pause/disabled mode
- Added syntax command to disable/enable PV via `disable`/`enable`/`toggle=PV` (same as global "pause" button)
- Added support to specify custom plot defaults in first line of PV Alert via `#var1:value,var2:value,...`
  (use '!' to overwrite a received OHLC/plot value eg. `#!_sl=123,!close=456`)
- Added shortcut syntax for custom plot references (eg. `sl=_myplot-1%` instead of `sl=-1% slref=_myplot`)
  (Note: Only works for `p=` / `q=` / `l=` / `tp=` / `sl=` / `ts=` / `so=` / `msl=` ; allowed op for `q` and `l` are '*' and '/', for all others '+' and '-'!)
- Added syntax options to check for no position/order and opposite direction if `side=` filter was specified (see `nopos=`, `noorder=` and `wrongside=`)
- Added syntax shortcut to check for existing order IDs before closing a position (see `checkid=` and `wrongid=`)
- Added jump option "this" to loop within the last (current) jump label / made "back" option (stack) ignore loops
- Added support for wildcard placeholders in custom order ID checks (eg. `check=order id=*-TP`)
- Added workaround and internal stats for missed scheduler runs (missed runs will trigger up to 3 minutes later)
- Added possibility to define multiple jump labels directly one after another (or in one line separated by comma)
- Added option to specify a fallback jump label/action in case of an invalid label (useful for placeholders, see `fb=`)
- Added wildcard support for alert names in `disable`/`enable`/`toggle` syntax commands (eg. `disable=*entry`)
- Added support for buy/sell/long/short for side in alert message OHLC "footer" (useful for strategy alerts)
- Added support for writing custom messages to the PV log via notify command (eg. `notify=log:"Hello!"`)
- Added CMC data to local OHLC data when queried so it can be used in notifications (see `min24h=` etc.)
  (`{volume_24h}`, `{percent_change_1h}`, `{percent_change_24h}`, `{percent_change_7d}`, `{market_cap}`)
- Added string formatting option to notification placeholders, eg. `{lastid.2}` turns XH5-MSL-123456-1 into XH5-MSL (fixes @ 1.3.0.2)
- Added generic placeholder `{stop}` to reference stop prices in notifications
- Added received/fired numbers to the minimized PV Alert view
- Added separate "auto" (interval fired) stats count per alert
- Added human readable description of configured schedule to "Edit interval" GUI
- Added position monitor shortcut to balances in popup window (via Shift-Click or context menu on right click)
- Added unified side and order leverage to last success/error info in popup
- Fixed wrong or missing leverage in notifications when custom plot multiplier used
- Added unified side to alert names for short notifications
- Updated and cleaned up ➔ Setup: Commands help page
- Added account copy and clone functions via buttons and context menu to exchange API pages
- Added changing of PV icon to orange when not connected to TV event stream nor TV interceptor addon
- Added automatic time offset adjustment for exchanges requiring a timestamp (solving time sync issues)
- Added more details to logging of filtered alerts and a number suffix for events triggering multiple alerts
- Fixed alert log level "none" still logging notifications and "automatic interval run fired" messages
- Fixed alert log level "no debug" not logging standard info messages
- Fixed manual "Reset" button for repeat filter in PV Alerts sometimes not working
- Fixed several errors related to multiple accounts specified via `a=` option
- Changed all closing orders (close=position) to reduce only by default unless explicitly set to false
- Binance: Added option to specify isolated margin flag for orders and loan/repay (see iso=)
- Binance Delivery: Fixed size and PnL calculations for position info and check
- Binance Delivery: Fixed balance placeholders not working in notifications
- Binance Delivery: Fixed balance not available error for BNB based markets
- Binance Delivery: Fixed all positions being closed instead of only selected symbol
- Binance Futures/Delivery: Made pm=auto (automatic detection of hedge mode) default
- Binance Futures/Delivery: Fixed reduceOnly errors for hedged position orders
- Binance Futures/Delivery, BitMEX, Bybit, FTX, KuCoin Futures, SimpleFX: Added support for `unit=currency` to `minsize`/`maxsize` position filter option
- Binance Futures/Delivery, BitMEX, Bybit, FTX, KuCoin Futures, SimpleFX: Added position info/notification fields `{_sizeUSD}` and `{_sizeCoin}`
- Binance Futures, BitMEX, Bybit, KuMEX: Fixed `close=position q=100%` not always posting close-on-trigger orders without quantity
- Binance Futures: Added support for priceProtect stop order option (see `pp=`)
- Binance Futures: Fixed leverage not set correctly when using custom plot multiplier
- Binance Futures, BitMEX, Bybit, Deribit, FTX, KuCoin Futures: Added support for position liquidation price (via `pr=liq`)
- Binance, Deribit, FTX: Fixed transfer balance command (invalid error given for custom yield options)
- Bitfinex: Fixed iflong/ifshort for c/ch=position and added basic position info logging
- BitMEX: Added support for position breakeven price (via `pr=even`)
- BitMEX: Fixed PnL display/calculation to show in XBT instead of Satoshi
- Bybit: Upgraded inverse perpetual markets to v2 API endpoints
- Bybit: Automatically placing real stop instead of SL/TP attribute change if custom order ID specified (id=)
- Bybit: Fixed "not modified" error when changing SL/TP position attribute
- Bybit: Fixed switch between cross/isolated margin for linear markets
- Bybit: Fixed errors when canceling stop orders under certain conditions
- Coinbase Pro: Added support for custom stop references
- Deribit: Added relative quantity calculation for transfer balance command when target is main account
- FTX, FTX US: Fixed calculation of PnL % values (lev% was used as pos%)
- FTX, FTX US: Added rounding down of specified leverage to next valid value
- FTX, FTX US: Fixed leverage not shown correctly in notifications
- FTX, FTX US: Added support for transfer balance command to transfer to/from sub accounts (see `tb=`)
- FTX, FTX US: Added support for retryUntilFilled stop order option (true by default, see `rf=`)
- FTX, FTX US: Added support for currency conversion via new syntax command (see `convert=`) (fixes @ 1.3.0.2)
- FTX, FTX US: Fixed trailing stop value for normal (non-closing) short/sell orders
- Gemini: Added support for stop orders
- Gemini: Updated market information
- Kraken: Fixed quantity calculations for margin long trades
- KuCoin Futures: Fixed relative quantity calculations for USDT based markets
- OANDA, FTX: Added support for simple trigger/stop orders (see `so=`)
- OANDA: Fixed leverage sometimes not shown correctly in notifications
- Poloniex: Fixed error when closing position
- SimpleFX: Fixed relative quantity calculations for equities and indices
- SimpleFX: Fixed wrong side shown in log for close position orders

1.2.90.20 – 5/10/2020

- Added support for FTX US
- Fixed scheduler drift so interval alerts fire on time (see ➔ General Options / Fire Offset)
- Updated built-in syntax examples and Wiki links
- Improved handling of some log writing errors

1.2.90.18 – 8/9/2020

- FTX: Fixed profit calculation and PnL checks via syntax
- Kraken Futures: Fixed order cancelation not being confirmed in log and order id cache

1.2.90.17 – 2/9/2020

- Fixed order ID cache not being purged correctly and overflowing
- Added more helpful error messages for some connection problems
- Binance Futures: Fixed error when checking for server time offset on startup
- KuCoin: Fixed error when testing API key without any ETH balance

1.2.90.16 – 22/8/2020

- Added side info to icon tooltip and log (when supplied via OHLC at the end of TV message)
- Fixed syntax check errors for unified placeholders without side in alert name
- Binance Futures: Added support for Delivery markets / DAPI (requires re-granting of permission in Chrome!) (further fixes @ 1.2.90.15)
- Binance Futures: Added support for index price (`pr=index`)
- Binance Futures: Fixed error when placing trailing stop (further fixes @ 1.2.90.16)
- Bitfinex: Added leverage parameter to orders
- BitMEX: Corrected error message for failed setting of leverage
- FTX: Fixed filtering by custom ID for order cancelation/check
- KuCoin: Fixed quantity precision error

1.2.90.13 – 5/8/2020

- Changed discord API from discordapp.com to discord.com (requires re-granting of permission in Chrome!)
- Fixed custom IDs leading to order errors in syntax loops on some exchanges
- Binance Futures, BitMEX, Bybit, FTX, Kraken Futures, KuCoin Futures: Fixed order cancelation/check not filtering correctly for stops or when `type=` option was missing
- Binance Futures: Fixed step size error occuring for some instruments
- Binance Futures: Added minimum trade size check
- Gemini: Added new instruments and fixed precisions
- KuCoin Futures: Fixed direction parameter for stops being wrong (causing immediate trigger)
- KuCoin Futures: Renamed from KuMEX and adjusted API endpoints (requires re-granting of permission in Chrome!)

1.2.90.12 – 12/7/2020

- Fixed price reference "ask" not working (`pr=ask`)
- Fixed additional cases leading to PRO license being removed
- Fixed syntax warning for `id=[id]` with catchall alert names (containing '*')
- Fixed TV backtest export not working @ 1.2.90.12
- Bybit: Fixed error on order placement for USDT markets (further fixes @ 1.2.90.11)
- BitMEX: Fixed wrong time in force option for market orders @ 1.2.90.11

1.2.90.9 – 17/6/2020

- Added custom leverage plot reference option (`lref=`)
- Added workaround for new Discord Webhook URLs
- Binance Futures: Replaced `posside` with `posmode=hedge/auto` option to fully support hedge mode
- Binance Futures: Upgraded to v2 balance/risk endpoints (improved performance)
- Binance Futures: Fixed `cancel=order` w/o additional filters not canceling all orders
- BitMEX: Fixed `cancel=order` w/o additional filters not canceling all orders
- ByBit: Added ability to set separate buy/sell leverage in USDT markets
- ByBit: Added support for close-on-trigger & reduce-only in USDT markets
- ByBit: Changed position closing orders to close-on-trigger by default
- ByBit: Fixed quantity/TP/SL calculations for hedge mode / multi positions

1.2.90.8 – 8/6/2020

- Added support for TV Screener Alerts (see ➔ General Options / TradingView Connection)
- Added support for Kraken Futures (beta)
- Added support for KuMEX (beta)
- Added alert option to auto detect `[side]` placeholders from actual open positions
- Added conditional options `iflong=` and `ifshort=` to require less API calls for checks
- Added option to allow wildcards (*) in PV Alert names to easily match multiple TV alerts
- Added new placeholders `[ex]` and `[sym]` to auto extract exchange/symbol from PV Alert name
- Added new placeholder `[id]` for the first only alphanumeric part of current alert name
- Added ability to set the side for unified alerts from custom plot data via `,side:{{plot_x}}`
  (if you have separate plots for long/short use `,side:{{plot("Long")}}:{{plot("Short")}}`)
- Added custom plot data as quantity multiplier (via `qref=_name` / `qref=customx`) (further fixes @ 1.2.90.4)
- Added custom plot data names via `,name:{{plot_x}}` (use with `priceref=_name` etc.) (further fixes @ 1.2.90.8)
- Added expiration/timeout option to symbol locks
- Made repeat filter work independent of alert (optional, when "No Repeat" is unchecked!)
  (alert will only fire if there was no alert fired on the same symbol within given time window)
- Made "Solo per Bar" filter option work for multiple alerts triggered by the same name
- Fixed "Once per Bar"/"Solo per Bar" always filtering over two consecutive bars
- Optimized memory usage (especially for higher number of commands run)
- Code restructuring & optimization for improved command execution and API request speed
- Fixed PV startup failing when log database cannot be opened for writing
- Fixed command parameters like `{p}` not working in custom notifications anymore (further fixes @ 1.2.90.2)
- Changed "don't log" alert option into log level selection drop down
- Added `Ctrl+Shift+UP/DOWN` hotkey to navigate alerts in alert editor
- Fixed alert selection state in alert editor when not using "expand one at a time" option
- Fixed symbol browser for defaults under ➔ General Options not working
- Changed API test function to only check account balance (less warning messages)
- Changed symbol info cache time setting to hours (default 72h)
- Fixed TV strategy tester export breaking copy & paste function
- Fixed option to disable "Study Repaints" warnings for indicators in TV
- Fixed Telegram error 400 caused by unescaped single underscore characters @ 1.2.90.8
- Further performance improvements and reduced package size @ 1.2.90.8
- Binance Futures: Added support for close-only orders/stops without quantity (further fixes @ 1.2.90.1)
- Binance Futures: Added basic hedge mode support (position side via `posside=` option) (further fixes @ 1.2.90.6)
- Binance Futures: Fixed advanced order cancelation filters (`t=open/close/limit`, `sl=1`, `tp=1`, `ts=1`, `r=1`) @ 1.2.90.8
- Binance Futures: Added support for trailing stops (callback rate via `cbrate=` option)
- Binance Futures: Fixed custom plot data not available for non-closing orders
- BitMEX: Added support for advanced order cancelation filters (`t=open/close/limit`, `sl=1`, `tp=1`, `ts=1`, `r=1`) (@ 1.2.90.8)
- BitMEX: Added support for time in force option (via `type=fok/ioc/day`)
- Bybit: Fixed "cannot set TrailingStop" error (`close=position ts=xxx`)
- Bybit: Fixed "param validation for order_status failed" error (cancel/check order for USDT) (further fixes @ 1.2.90.7)
- Gemini: Corrected time in force option IOC and added support for FOK (fill or kill)
- Kraken: Fixed order type "settle" not working
- OANDA: Fixed order type "day" not working
- Poloniex: Fixed error when calculating margin balance

1.2.85.1 – 27/4/2020

- Fixed broken alert import for "Import Config" function

1.2.85 – 20/4/2020

- Enabled quantity and leverage parameters to be set as default in syntax (be careful with following close position commands etc.)
- Fixed unified placeholders (side etc.) not being replaced on interval alerts (filled with first side in name!)
- OANDA: Improved balance/instrument currency conversion (fixing relative quantities & position info)
- SimpleFX: Added realtime PnL calculation for position info (via `ch=position updateprice=1`)
- SimpleFX: Improved balance/instrument currency conversion (fixing relative quantities & position info)
- SimpleFX: Added use of "delete" endpoint when possible to close positions (preventing "no money" error)
- SimpleFX: Fixed SL/TP calculation for positions made from multiple orders
- SimpleFX: Fixed bug introduced in 1.2.81 causing "unauthorized" errors (further fixes @ 1.2.85)
- Bybit: Fixed wrong balance being used for quantity calculations for BTCUSDT market (due to API changes)
- Bybit: Added workaround for "unknown result" error when setting leverage on BTCUSDT market

1.2.83 – 14/4/2020

- Fixed broken position size check (`minsize`/`maxsize`)
- Changed default for `plref` syntax option to "lev" (leveraged PnL)
- OANDA: Added check for instrument leverage limit and improved quantity calculations
- OANDA: Corrected leverage and PnL calculations for position info
- ByBit: Added support for new USDT perpetual contract and endpoints (experimental!) (further fix @ 1.2.83)
  (PnL calculations for USDT require ticker query, invoke via `ch=position updateprice=1`)
- ByBit: Added support for changing SL/TP specified with main open order (via `c=position t=market sl=x tp=x`)
- ByBit: Corrected relative PnL % calculations for pos/lev/total position info
- ByBit: Fixed "insufficient margin" error sometimes occuring on position close

1.2.81 – 8/4/2020

- Fix for lifetime licenses "expiring" on 8/4/2020 (please re-enter your license!)
- Upgraded to new CoinMarketCap API (enter API key under ➔ General Options)
- Added position opening time to position info where available (BitMEX resets hourly)
- Fixed bar time/position for very long and sub-minute timeframes
- Fixed balance sometimes not available or wrong currency in notifications
- Fixed session notification statistics not being reset
- Rewrote TV event hook (addon) for compatibility with recent TV updates
- Improved TV event stream stalling detection and fixed permission denied errors
- Several app log viewer fixes (updating too much, showing too many entries)
- Binance: Added checks for minimum order quantity and minimum notional
- Binance Margin: Fixed `mt=borrow` and `mt=repay` not working
- Binance Futures: Added workaround for error when changing margin type (`mt=`)
- BitMEX: Reduced number of API calls for order cancelation and position checks
- BitMEX: Fixed showing position side instead of order side in log
- FTX: Fixed currency unit option (`u=currency`) for spot market instruments
- SimpleFX: Fixed quantity calculation for positions made up of multiple orders
- SimpleFX: Fixed error message for wrong or missing trade permissions

1.2.79 – 25/2/2020

- Added highlighting of current selected alert in alert editor
- Fixed lock/unlock commands in syntax not working
- Fixed dollar sign ($) being removed or decimated in PV Alert names on loading

1.2.78 – 21/2/2020

- Added syntax command to query and check CMC price change data
- Added support for SimpleFX broker (beta)
- Optimized syntax editor screen space usage
- Added separate run/test alert buttons for long and short (unified alerts)
- Added stop price reference option to base stop on main order price (`slref=price` etc.)
- Optimized performance of PV Alert editor (recommended to keep most alerts minimized)
- Added context menu command to copy/paste PV Alerts in JSON format
- Added event source mapping of `BINANCE:XXXPERP` to `BINANCEFT:XXX`
- Added entry price to position info
- Added last slippage info to PV Alert stats
- Added option to use current time for alert received / fired info (instead of TV event data)
- Added setting to specify interval fire offset (seconds after full minute)
- Added info about unified alerts under ➔ Setup: Commands
- Adapted TV indicator dialog styling fixes after update
- Fixed newlines in config export on Windows
- Increased popup window size
- Deribit Testnet: Fixed authentication errors
- FTX: Relaxed instrument name lookup (`BTC-PERP` vs `BTCPERP`)
- OANDA: Fixed check position command

1.2.75 – 6/2/2020

- Added option to ignore syntax errors in legacy alerts (found under ➔ General Options)
- Bitmex: Fixed quantity calculations for symbols using multiplier (XRPUSD etc.)

1.2.74 – 2/2/2020

- Added symbol browser to exchange pages (requires valid account for OANDA!)
- Added exchange/symbol browser quick insert/replace to syntax editor (via context menu)
- Added custom context menu to alert editor
- Added exchange syntax alias to exchange pages
- Added alert repeat filter option to check for name differences (vs alert id only)
- Added syntax option to specify which PnL type to check (`plref=pos/lev/total` - pos being default)
- Fixed order/position check conditionals in loops not triggering in same cases
- Fixed multiple account processing in loops sometimes failing
- Improved repeat filter to work within bar time (was previously using bar time only vs fire time)
- Binance Futures: Added support for reduce only stops
- Binance Futures: Added option to switch between isolated and cross margin (`mt=isolated/crossed`)
- Binance Futures: Added cancel all and batch/bulk cancelation API calls
- Binance Margin: Added option for auto borrow/repay order flag (`mt=borrow/repay`)
- Bybit: Fixed bulk order cancelation for `t=open/close`
- Bybit: Fixed wrong book side printed in log for `c=position` (further fix @ 1.2.74)
- Bybit: Added support to place trailing stop via `c=position ts=x` (@ 1.2.74)
- FTX: Fixed `pr=pos` option and added new `pr=even` option (last break even)
- FTX: Fixed bulk order cancelation canceling orders for all symbols
- FTX: Fixed trailing stop placement (via `c=position ts=x`)
- OANDA: Added support for `u=currency` option

1.2.71 – 1/1/2020

- Enabled `time`/`maxtime` parameter to be set as default in syntax
- Binance: Fixed quantity precision error occuring for some symbols
- Bybit: Fixed endless loop when certain amount of past orders was reached (further fix @ 1.2.69)
- Bybit: Fixed leverage error message (leverage was still set correctly)
- Deribit: Corrected testnet URL/API endpoint (fix @ 1.2.71)
- FTX: Fixed quantity calculation for spot market sell (further fix @ 1.2.70)

1.2.67 – 14/12/2019

- Added support for Binance Futures
- Added ticker data to notifications, enabling use of eg. `{ask}`, `{last}` etc. (Note: Cached ticker data is used so depending on the type of command `up=1` might be necessary!)
- Added pre-filled notification variables `{pnl}`, `{pnlLev}`, `{pnlTotal}` and `{relSize}` for positions (pnl = abs P/L% for the position, pnlLev = incl. leverage (similar to ROE), pnlTotal = in relation to balance)
- Added access to general position info for notifications on `c=position` commands (instead of just the closing orders)
- Fixed alert editor UI not reflecting when alerts are disabled/enabled via syntax
- Fixed interval settings not updating in UI when changed via syntax
- Fixed option to always keep the PV options page open
- Further unified and fixed position P/L calculations
- BitMEX/Bybit: Implemented querying of current leverage when none specified
- Bitfinex: Fixed error when converting balance for non-USD pairs
- Bybit: Updated code to use new order API v2 and implemented support for bulk order cancelation (further fix @ 1.2.67)
- FTX: Fixed bulk order cancelation and unique IDs for position close
- OANDA: Fixed relative SL/TP/TS calculations for positions with multiple orders
- OANDA: Fixed SL/TP/TS info not accessible in notifications

1.2.65 – 10/12/2019

- Added support for FTX exchange
- Added leverage info for order placement, when changing leverage or checking positions
- Fixed relative position size sometimes not showing in close/check position info
- Added command pass number to unique order ID to avoid duplicate orders in loops
- Added number of passes (counts) that a command is being executed to the log
- Updated TV user interface "fixes"
- OANDA: Added calculation of correct position leverage
- OANDA: Added query of/info about account leverage (no need to specify leverage for relative quantities)
- OANDA: Added support to set account leverage via `l=` syntax and order type GFD (Good For Day)
- Gemini: Fixed API communication error preventing access

1.2.64 – 5/12/2019

- Added fire offset info (event slippage) to "alert received" log message
- Disabled retries for duplicate order ID errors
- Fixed wrong syntax highlighting for certain command parameters
- BitMEX/Deribit: Fixed order check syntax accidentally bulk canceling orders
- Bybit: Fixed order cancellation not working anymore after API update

1.2.63 – 27/11/2019

- Added general support for absolute prices to all price options via @<number> (eg. `p=@7000`)
- Added support for positive numbers written in syntax with leading "+"
- Added OHLC data to `{}` notification placeholders (eg. `{close}` for close price)
- Fixed non-sensical TV OHLC data always being "detected"
- BitMEX/Bybit/Deribit/Kraken/OANDA: Added new parameters to specify different price bases for stops (`slref/tpref/tsref`)
- BitMEX/Bybit: Leverage is now set via API only if `l=` option is present in command!
- Bybit: Added support to place stops independend of any position with new stop order parameter (`so=`)
- Bybit: Added support to switch to cross margin via API with `l=0`
- Bybit: Added support for stop reference (`sr=`) option
- Bitfinex: Fixed market order error caused by API change

1.2.62 – 8/11/2019

- Added support for new OHLC and custom plot info from TV by adding the following as the LAST line in the TV alert description: `#{{open}},{{high}},{{low}},{{close}},{{volume}}`
  Those prices can then by referenced in syntax via `pr=open` or `pr=close` etc. (to use custom plotted prices add `,{{plot_0}}` etc. to the line above and use via `pr=custom1` etc.)
- Added support to call multiple PV Alerts from one TV alert by putting their names line after line in the beginning of the TV alert description
- Added command aliases `go=` and `do=` and added the option "back" for jumps/conditionals to resume execution after the original calling command
- Added relative position size and leveraged PnL % info to position info log output (and removed additional details that were basically a duplicate of the debug output)
- Added `{pnlLev}` and `{roe}` notification placeholders (roe only available on BitMEX for now)
- Added option to disable logging completely per alert (useful for interval alerts running quite often)
- Fixed calculation of relative position size for min/max position checks
- Fixed wrong quantity, price etc. being calculated sometimes after jumps/conditionals
- Fixed setting defaults to zero via syntax not working (`retries=0` etc.)
- Fixed PV Alert still firing on intervals even when it was set to "disabled"
- Fixed error when setting alert interval via syntax

1.2.61 – 22/10/2019

- Added live syntax checking including error/warning markers to PV Alert editor (fix for "foreign" chart alerts @ 1.2.61)
- Implemented drag and drop / custom order support for PV Alert UI
- Added descriptive command aliases to syntax parser incl. notification syntax ("discord" instead of "d" etc.)
- Improved interval config UI (launched by "Edit interval" button)
- Added name/syntax search functions and further sort options to PV Alert UI
- Implemented custom jump labels for `err`/`skip` syntax options (including jumping back/looping)
- Added syntax command to enable/disable (or toggle) any PV Alerts
- Added syntax command to configure interval runs for any PV Alerts
- Added syntax options to check P/L (`minpl`/`maxpl`) and size (`mins`/`maxs`) of a position on all margin exchanges
- Added syntax command to check existing positions/orders more easily (`ch=`/`check=`) (see ➔ Setup: Commands!)
- Added syntax conditional commands `ifo`/`ifn`, including support for jump labels (see ➔ Setup: Commands!)
- Added new error handling options incl. aliases and new `ep=` parameter for "on error" closing limit price
- Added pause/resume/stop buttons in log view to temporarily pause or forcefully terminate all running alerts
- Added comma separated list support to `p`, `sl`, `tp`, `ts` for targeting different accounts with `a=`/`ap=`
- Changed log output to use original syntax line number instead of the command number
- Changed syntax parser to make `ub` or `r` (without =) equivalent to `ub=1` / `r=1`
- Added notification variable `{pnl}` for `ch=position` command notifications
- Added notification variable `{time}` containing current timestamp (old `{time}` variable is now `{bartime}`!)
- Added number of errors to per alert stats
- Added option to auto collapse all but the current alert in PV Alert UI
- Fixed counting of actual number of executed commands for stats/log instead of total commands in alert
- Fixed wrong end date sometimes being shown for monthly subscriptions
- Fixed some log entries sometimes not being written to DB (under load)
- Added support for Binance US
- BitMEX: Added support to place SL/TP "close all" stops without a position (`r=1 q=100%` / no `q=`)
- Deribit: Added use of "close position" API command for `c=position` (`q=100%` / no `q=`, no `b=`)
- Deribit: Fixed error for `c=position` without `b=` when no position was open
- OANDA: Relaxed instrument name lookup ('_', '-' and '/' are removed internally)
- BitMEX/Bybit/Coinbase/Deribit/OANDA: Added checks for minimum trade size (Bybit also minimum price)
- BitMEX/Bybit: Fixed permission error on older Chrome versions
- !BREAKING CHANGE! BitMEX/Kraken: Stop orders (not using `c=position` but any of `tp`/`sl`/`ts`) are now placed on the side defined by `b=` instead of the opposite direction! (unified behaviour)

1.2.58 – 23/9/2019

- Added `pc=1` syntax option to skip ticker query and use last cached ticker update instead
- Added `up=1` syntax option tp use newly added internal ticker cache and save current ticker query to it
- Added `bc=1` syntax option to skip balance query and use last cached balance for an exchange/account
- Added internal order id cache for exchanges without native custom order id support
  (enabling `id=` syntax for Bitfinex, Bittrex, Coinbase Pro, Kraken, OKCoin, OKEX and Poloniex)
- Fixed "no repeat" alert filter not working when first matching alert was disabled
- Added built in notification option to format notifications "horizontally"
- Added stronger "muting" of disabled alerts in alert editor
- Started unification of all exchange modules
- Bitfinex, Kraken, OKEX, Poloniex: Added `pr=pos` for position average (with `c=position`)
- BitMEX, Deribit: Added `pr=mark` for mark price
- Bybit: Added new ticker API supporting ask, mid, bid, last, mark and index price (further fixes @ 1.2.58)
- Bybit: Fixed order cancelation error (when no previous stop orders were created) (further fixes @ 1.2.57)
- Deribit: Fixed `c=position d=1` (disabled mode) for conditional syntax
- Deribit Testnet: Updated endpoint to new URL
- Kraken: Added support for `c=position` with sl/tp options

1.2.53 – 2/9/2019

- Added built in notification options to include/exclude balance, quantity or leverage
- Added metrics about sent notifications to the statistics page
- Added notification variable `{leverage}` to print the used leverage or "None"
- Added notification variables `{available}` and `{total}` to reference only available or total balance
- Binance: Added support for OCO orders (specify both `tp=` and `sl=` together, use `p=` for the stop-limit price!)

1.2.52 – 23/8/2019

- Binance: Added syntax commands for margin/spot balance transfer and loan/repay of assets
  (eg. `tb=btc,bnb q=50% y=spot` to transfer 50% of your BTC and BNB from spot to margin, `loan=btc` or `repay=btc` and `q=x` for loan/repay of x amount BTC)
- Deribit: Added syntax command for subaccount balance transfer
  (eg. `tb=btc,eth q=25% y=mysub` to transfer 25% of your BTC and ETH balance from the current account to a subaccount with the alias `mysub`) (further fixes @ 1.2.52)
- BitMEX: Closing orders (`c=position`) will now always ignore already open orders for quantity calculations(!)
- Optimized screen space of minimzed alerts in UI
- Fixed auto interval configuration for "every minute" intervals

1.2.50 – 16/8/2019

- Fixed `minb` / `maxb` syntax options to work with `y=equity`
- Added number of placed/cancelled orders to log & notifications when more than one
- Binance: Added preliminary support for new margin trading market
- Bybit: Added support for reduce only limit orders (layered TP eg. `c=position q=25% p=2% r=1`)
- BitMEX: Corrected final closing order for layered TP orders (further fixes @ 1.2.50)
- Deribit: Fixed bulk order cancelation

1.2.46 – 9/8/2019

- Fixed `d=1` in a line by itself (setting defaults) not being respected
- Fixed per alert stats sometimes not updating and refreshing correctly
- Bybit: Added support for trailing stop (current API only permits it as `ts=value` with main position order)

1.2.44 – 7/8/2019

- Added user interface to configure intervals for auto firing alerts
- Added `minp` / `maxp` syntax options to specify absolute limits for price
- Added syntax placeholders `[res]` for the alert timeframe and `[name]` to use the triggering name anywhere in syntax
  (eg. custom symbol names for `lock`/`lockcheck`, custom order IDs, notifications etc.)
- Added total number of run commands and empty alerts to the statistics page
- Added number of errors, warnings and retries to the statistics page and fixed stats not resetting correctly
- Fixed alert stats not updating automatically while alert page is open or when alerts run on intervals
- Fixed per alert stats not being tracked correctly
- Added reset button for per alert statistics
- Added option to set minimum alert run time before alert is tracked for run time stats
- Added option (default enabled) to count manual run alerts in syntax time stats
- Fixed wrong display of durations that were exactly 1 minute, 1 hour or 1 day
- Added warning to "Run in intervals" alert option
- Fixed origin header errors for some exchanges caused by Chrome v76 update
- Fixed "unhandled exception" error sometimes occuring after alert fired
- Bitfinex: Fixed "Key amount should be a decimal string" error (1.2.43)
- Bybit: Fixed "same leverage" error introduced by API change
- Kraken: Fixed time offset check

1.2.41 – 4/8/2019

- Added scheduler for PV Alerts to automatically fire any alert in custom configurable intervals / schedules
- Added `minq` / `maxq` syntax options to specify absolute limits for order quantity (always in contracts or native "currency")
- Added very detailed "Statistics" page with internal metrics covering all aspects of PV
- Added option to automatically restart PV after set time period (optionally extended if alerts are running)
- Added alert filter option to specify both min amount of (once per min only) and min position in bar (also for legacy)
- Added stats about last/min/max/average syntax execution time, fire/manual run numbers and creation date to PV Alerts
- Added option for maximum time allowed to pass between firing and running of alerts
- Added option to limit maximum alerts running in parallel
- Added logging of manual and automatic restarts
- Added automatic reloading of options window after remote config update (sync)
- Added option to log view to disable automatic scrolling
- Fixed instabilities caused by too many log entries (limiting log view to last 1000 entries)
- Fixed download of log with many entries failing (auto-splitting in 1MB chunks)
- Fixed "Once per Bar" filter sometimes filtering over two bars
- Added support for using the equal sign in custom notification messages
- Fixed some TV listener errors occuring under rare circumstances
- IFTTT Notifications: Added support for custom data using the "value1" field
- Coinbase Pro: Fixed price precision errors for certain order types
- Bybit: Added support for non-BTC markets / symbols
- Kraken: Complete rewrite fixing regularly occuring error

1.2.32 – 11/6/2019

- Added new alert filter option "Solo per Bar" restricting alerts to one alert per bar per symbol
- Coinbase Pro / Kucoin: Fixed order quantity calculations for buy orders (further fixes @ 1.2.32)
- Bybit: Fixed order cancelation error caused by API changes
- BitMEX / Bybit / Deribit: Fixed error causing order cancelations to sometimes execute even in testing mode

1.2.29 – 7/6/2019

- Migrated log from local storage to WebSQL for much longer retention
- Changed all internally saved timestamps to UTC (displayed according to local timezone)
- Fixed "command.time.reference" error sometimes occuring when using notifications
- Fixed error causing notification features not to work for monthly subscription
- Added display of license expiration date for monthly subscription
- Added option to disable modification of indicator "Settings" and "Edit Alert" windows on TradingView
- Added command number besides alert id to further uniquify custom order ids
- OANDA: Fixed quantity calculations for matching account/symbol currency and price calculations for trailing stops
- Coinbase Pro: Fixed price precision and unknown market errors occuring with some symbols and added SL/TP support
- Bybit: Fixed "bind error" for reduce only limit orders (`r=1` is currently only supported for stop orders on Bybit)
- KuCoin: Added support for current API version, newer symbols (incl. caching) and added KuCoin Sandbox
- Gemini: Added support for newer additional symbols

1.2.26 – 26/5/2019

- Binance: Fixed market order error (fixed @ 1.2.26)
- OANDA: Fixed quantity calculation sometimes failing (when not necessary)
- Bybit: Closing orders of at least 100% will be set to "close on trigger" automatically (fixed @ 1.2.25)
- Bybit: Added support for reduce only option
- BitMEX: Fixed price reference option `pr=` not being used for stop prices (sl/tp/ts)

1.2.23 – 23/5/2019

- OANDA: Fixed quantity calculation for relative buy in based on unit price and account currency (`q=%`)
- Fixed deletion of PV Alerts sometimes not working
- Fixed error preventing `ap=` syntax from working
- BitMEX: Fixed error introduced by `c=position` load shedding workaround

1.2.21 – 22/5/2019

- Added support for Bybit
- Added monthly subscription as alternative licensing option
- Added side of the book placeholders (`[side]`, `[!side]`, `[+]`, `[-]`) to PV Alert syntax that are "auto guessed" from the alert name and
  can be used to handle both long & short or buy & sell with only one alert that has two names assigned (eg. "BTC Long, BTC Short")
- Added new syntax option `time=` to define maximum elapsed time since firing of alert (can be specified either as absolute amount of seconds or % of bar time)
- Fixed Discord notification formatting on iOS (Note: works only when the padding option is disabled!)
- Added average price to notifications if different from main price
- Fixed PV Alerts not being removed from sync when switching to local storage
- Fixed log filter options for events and orders
- Changed syntax so lockcheck command can be used by itself now
- Fixed bug that sometimes caused hangs when using `skip=-1`
- Changed "Min Bar %" filter to allow for sub-percent precision
- Enabled "Always use Event Stream" option by default
- BitMEX: Added support for bulk order cancelation (further speeding up entries)
- BitMEX: Removed order quantity for closing orders of at least 100% (thus exempt from load shedding!)
- Deribit: Fixed order cancelation for non-BTC markets
- Deribit: Added support for bulk order cancelation (further speeding up entries)

1.2.19 – 27/4/2019

- Added option to save alerts in local instead of sync storage to lift size restrictions (Note: disables syncing of alert definitions!)
- Added better error handling when alerts get too big for sync storage
- Fixed min bar time filter sometimes not working and not saving/loading correctly
- OANDA: Fixed multiple errors preventing c=position from working
- OANDA: Added parsing/saving of order confirmations

1.2.17 – 19/4/2019

- Added OANDA and OANDA Practice support (incl. custom order ids)
- Added option to specify multiple custom ids with `id=` via comma separated list (for `c=order`)
- Added built in notification option for less verbose notifications
- Added syntax to run an alert parallel for multiple accounts (`ap=`)
- Added alert option to run in parallel instead of consecutively when sharing a name
- Added support to specify `q=` and `l=` values per account via comma separated list (when using `a=`/`ap=`)
- Fixed retry for multiple accounts sometimes not working
- Fixed notifications for multiple accounts sometimes not working
- Fixed notifications & retries for "Event Stream only" connection problems/recovery
- Made repeat filter compatible with multiple alerts sharing a name
- Added exchange, symbol and time to the icon tooltips "last event" info
- Added more and easier to see tooltips to the options page and popup window
- Fixed several causes for "Unknown Error" in main event process
- Added option to disable "study repaints" warning in TradingView
- Deribit: Added support for multiple base currencies (ETH)
- BitMEX: Fixed custom order id sometimes not being unique
- OKEx: Fixed error in account balance query

1.2.14 – 17/3/2019

- Added additional stalling notification for Event Stream connection problems
- Deribit: Fixed order error caused by typo
- BitMEX, Deribit: Added additional price reference option `pr=pos` to force use of position average
- BitMEX, Deribit: Added syntax option `sr=x` to specify price reference to set for stops (last, mark, index)

1.2.13 – 15/3/2019

- Added syntax `minhvd`/`maxhvd` etc. to check BitMEX volatility indices (daily, weekly, monthly)
- Added option to always use Event Stream system to receive TV alerts (even when TV tabs are open)
- Added option to show number of fired or received alerts as badge on the icon (reset by clicking the icon or "Reset" button under ➔ General Options)
- Added info on last run alert to icon and popup last success/error tooltips
- Added info on TV connection state to icon tooltip
- Added syntax command to update exchange/account balance (`ub=1`)
- Implemented popup window balance refresh function
- Implemented `ret=x` for "disabled mode" making commands like the following possible: `c=position d=1 ret=-1 skip=-1` will skip the whole alert if an open position is found
- Implemented `skip=-1` as an option to skip all of the following commands in an alert
- Implemented `ret=0` as an option to check for NO positions/orders returned
- Made error handling / `ret=x` work per account for `a=acc1,acc2,...` syntax (`ret=x err=1` will skip commands only if ALL accounts didn't return enough orders)
- Fixed a bug that made `a=acc1,acc2,...` syntax fail under certain conditions
- Added lock/unlock and checking of lock state to syntax via `lock=...` command
- Added alert option to run only if symbol is locked
- Added manual lock/unlock functions to the alert editor (and clear all locks under ➔ General Options)
- Added information about lock states to the alert editor via lock button
- Removing an alert will now also remove it's lock
- Added lock ignore option to alert editor/filter engine
- Alerts are now sorted by their creation date in UI and for execution (custom order in a later update!)
- Changed global "testmode" to global disable/pause mode (no alerts are run)
- Adapted indicator settings window optimizations to new TV update/redesign
- Fixed bug in error handling (`err=-2`) that sometimes prevented it from closing positions
- Deribit: Added support for reduce only orders (`r=1`)
- BitMEX: Added support for trailing profit (IfTouched) orders via `tp=x ts=1` syntax (needs experimentation!)
- General speed optimizations

1.2.10 – 22/2/2019

- Quickfix for nonce errors (Bitfinex in 1.2.10)
- Added filter option to lock/unlock alerts per symbol, useful for multi timeframe strategies etc.
- Added option to skip retries for `ret=x` syntax parameter (using a negative number for x)
- Fixed/implemented `a=acc1,acc2,...` syntax to work correctly, also for setting alert defaults
- Implemented min bar time alert filter (for once per minute)
- Account balance info is now also removed on account deletion
- Added order type (buy/sell) to built-in notifications
- Added number format option to custom notification fields eg. {p.2} for 123.45 or {p.0} for 123
- Added notification option to include alert timeframe/resolution
- Added notification option to use alert name as notification title
- Added notification option to specify buy/sell emojis
- Added hotkey support to the options page for config import/export, saving, run/min/max alerts etc.
- Added syntax to skip (goto/jump) given number of commands
- Added spinner status info while waiting for email notification permission
- Fixed "Once per Bar" filter to work for alerts (re)used accross different symbols
- Allow fractions of seconds for delay command
- Added small run/test buttons to minimized alerts
- Added muted background for disabled alerts in alert editor
- Added minimize/maximize all buttons to alert editor
- Added button to purge all cached balance info to ➔ General Options
- Fixed exchange options page formatting error
- Added price/quantity etc. to built-in notifications for exchanges without order confirmation
- Bittrex: Fixed cosmetic error message on order cancelation

1.2.7 – 12/1/2019

- Fixed "NaN" in balances popup window for some exchanges
- Fixed PV options tab opening with no PV Alerts defined when "keep options page open" is checked
- Bittrex: Fixed "unknown market symbol" error

1.2.6 – 8/1/2019

- Quickfix for startup notifications not being sent
- Quickfix for built in cancelation notifications sent even when disabled
- Quickfix for BitMEX/BitMEX Testnet permission not granted issue
- Quickfix for "trying to refresh access token" reload loop when no TV tab open
- Complete overhaul of internal TradingView Event Stream system, fixing missed or duplicate alerts etc.
- Added option to format built in notifications with padding
- Added options to add account name or used exchange to notifcations
- Fixed built in notification system (sometimes prefixing messages with "Info" etc.)
- Added syntax to check for min/max account balance before running command
- Added option to always leave the ProfitView settings page open
- Fixed Google Sync remote updates sometimes detecting too many changes
- Added log info about which instance last saved settings and when
- BitMEX: Adding event id to custom order id to fix "duplicate" error
- Binance: Added support for custom order id (with event id suffix)
- Coinbase Pro: Added support for custom order id (with event id suffix)
- Deribit: Added support for custom order id (with event id suffix)
- Gemini: Added support for custom order id (with event id suffix)
- Bittrex: Fixed "symbol not found" error

1.2.2 – 21/12/2018

- Added additional error handling syntax options `err=-3` and `err=-4`
- Final fix for error handling syntax `err=-2` not closing and canceling correctly
- Fixed variables in custom notification messages causing endless loop/hang eg. "{price}"
- Fixed timeout not being set if only `retries=x` specified in syntax
- Fixed email notification credentials expiration (automatic token refresh)
- Added "\n" (newline) and "\t" (tab) escape sequences to custom notification syntax
- Fixed double reload of TV tabs on manual reload in some circumstances
- Fixed TV listener error message on startup in some circumstances
- Added command number and account info to event log entries
- Adjusted Chrome minimum version requirement in manifest to v54
- Improved reloading of TV addon components on updates

1.2.1 – 20/12/2018

- Implemented Email, Discord, Telegram and IFTTT notifications for startup, order placement, cancelation, errors and stalling/timeout including custom notifications via syntax
- Fixed price and quantity calculations for multiple account syntax (`a=acc1,acc2,...`)
- BitMEX: Added support for custom order IDs via `id=abc` syntax incl. filtering and fixed API check with empty balance
- Binance: Added support for new pairs and fixed caching issues
- Bitfinex: Added support for normal SL/TP syntax
- Bittrex: Added support for new pairs and added symbol info caching
- Coinbase Pro: Fixed symbol info caching and updates
- Deribit: Updated API order options
- All exchanges: Added general option to change symbol/market info cache duration and added price/quantity sanity checks
- Fixed balances in popup window being cut off on some browsers
- Fixed error handling syntax `err=-2` not closing positions and canceling orders
- Changed log type of balance updates to notice and added filter for them

1.2.0 – 9/12/2018

- Added syntax options to specify retry & timeout per command
- Fixed error that kept `ret=x` syntax from working correctly sometimes
- Added repeat filter reset button
- Added repeat filter expire options
- Split alert filter mid bar section into two separate areas
- Quick log filter options to show only alerts+orders and/or only errors
- Added warning dialog to "dangerous" options
- Configuration import can now also process JSON containing only alert definitions
- Added option to disable confirmation for manual alert run (caution!)
- Changed TV addon to make all indicator parameters visible in alert edit dropdown
- Changed TV addon to make the indicator settings dialog waste less space
- All binary/unicode characters are now automatically removed from API key/secrets
- BitMEX: Option `pr=last` is now using correct last price
- BitMEX: Better error messages when p or q parameters possibly faulty
- BitMEX: Outstanding limit orders are now ignored for `c=position` in case of `t=market` or `q=100%`!
- Deribit: SL/TP close orders now use the average position price unless pr option is specified
- All Exchanges: Added log output in case all open positions don't match for `c=position`

1.1.0.20 – 9/11/2018

- Binance/Bitfinex/Deribit: Changed symbol info cache timeout from 15 min to 3 hours to reduce API calls and delays
- Binance: Symbol info now cached, reducing number of API calls, delays and data transfer quite a bit
- All exchanges: Implemented command option "pr" to force a price reference (ask / bid / mid / last), option "mid" calculates the average of ask & bid price, "last" uses the last trade price
- Deribit: Fixed cancelation of stop orders (SL & TP)

1.1.0.18 – 9/11/2018

- Fixed error that made order placements fail for some exchanges (eg. Bitfinex)
- Binance: Fixed order amount calculations
- Deribit: Added leverage option (multiplying contracts) and fixed closing of short positions

1.1.0.17 – 7/11/2018

- Deribit: Fixed calculation for `u=currency` and absolute q values / fixed precision / fixed SL & TP

1.1.0.14 – 7/11/2018

- Added Deribit and Deribit Testnet support
- Improved last order success/error info in popup window
- Bitfinex: Added more supported pairs
- BitMEX: Removed OCO, OTO, OUOA and OUOP options from orders as per "contingencyType" deprecation announcement
- BitMEX: Fixed `u=currency` and absolute order quantity as per "SimpleOrderQty" deprecation announcement

1.1.0.12 – 29/10/2018

- Added handshake with confirmation in log when remote Sync Storage configuration changes were picked up
- Bitfinex: Fixed "Invalid order price precision" error
- Binance: Fixed account balance query error
- Fixed alert last received/fired info not updating live anymore

1.1.0.10 – 28/10/2018

- Added option to load remote configuration changes from Google Sync Storage (alerts & exchange options)
- Added information about defaults being used to manual alert run confirmation
- Added option to maximize the list of last accessed balances in the popup window
- Added option to minimize alerts in the local alert editor
- Removed restriction on number of alerts by saving each alert independently in Sync Storage
- Fixed buttons in UI sometimes not reacting to clicks

1.1.0.8 – 28/10/2018

- Moved balance info data from synced to local storage due to size/frequency
- Improved saving of synced configuration data using less Chrome Storage API calls
- Split up handling of TradingView unsaved changes and quick reconnect into separate options
- Fixed configuration import not asking for/restoring all required Exchange permissions
- Fixed PV Alert filter cache being reset sometimes and made it persistent
- Fixed error in TV/PV Alert name matching
- Fixed manual alert testing sometimes running live commands erroneously
- Fixed error in balance processing causing PV popup to become non responsive

1.1.0 – 24/10/2018

- Added alert command management in ProfitView including auto suggest and syntax highlighting
- Added the ability to execute and test alert commands manually
- Added filtering module to filter alerts within bar period, repeats etc. for both local and legacy alerts
- Added configuration import and export functionality
- Added automatic suppression of unsaved changes and quick reconnect on max devices in TradingView
- Added error handling and expected return parameters/logic to alert command syntax
- Added ability to set default account, exchange and symbol for commands both via syntax and GUI
- Added info about the last queried exchange balance to the popup window
- Added additional log output for order cancel/position close commands
- Added info on the number of executed commands to the log
- Error handling doesn't retry anymore on "internal" errors like missing API credentials
- Exchange Account names are now saved in their original case (but still work case insensitive)
- Bitfinex: Fixed price/balance calculation for non USD pairs
- Bitmex: Fixed leverage sometimes not being set correctly
- Coinbase Pro: Fixed errors for newly listed symbols
- Added more sanity checking to command syntax parser
- Added graceful error handling for most exchanges
- Lots of UI bug fixes and improvements

1.0.4.20 – 28/9/2018

- Improved protection against auto tab discard of Chrome
- Added Privacy Policy

1.0.4.19 – 20/9/2018

- Added further protection against auto tab discard feature of Chrome
- Fixed a bug with OKEx failing to query account balances
- Fixed a bug preventing logging of successful order placement details

1.0.4.18 – 17/9/2018

- Big bugfix with loading the TV addon (interceptor), hopefully solving disconnect after reload and caching/update issues

1.0.4.17 – 17/9/2018

- Fixed command retry/timeout not working under certain conditions

1.0.4.16 – 17/9/2018

- Some tweaks regarding TV connection loss detection/refresh

1.0.4.15 – 5/9/2018

- Fixed bug permitting Bitfinex API to work correctly
- Added info on global testmode enable/disable to log

1.0.4.14 – 3/9/2018

- Fixed second problem of command parameters changing between retries

1.0.4.12 – 30/8/2018

- Fixed error of command parameters changing between retries
- Some TV connection loss detection tweaks

1.0.4.10 – 30/8/2018

- Several minor changes to TV reload logic and changed default to disabled

1.0.4.9 – 30/8/2018

- Fixed a bug that kept error retry and timeout from working
- Fixed a bug that kept TradingView reload after timeout from working
- Added event trigger and fire timecodes to log output

1.0.4.8 – 29/8/2018

- Added function to save/download the log
- Alert commands can now have comments with everything after "#" being treated as a comment
- Added option to disabled all commands globally (Testmode) including a button in the popup window
- Added available balance/equity info to log output
- Added Coinbase Pro Sandbox support
- Added option to reload TradingView tabs after time of inactivity
- Added option to open/reload TradingView tabs in case of connection loss
- Added option to disable reloading of TradingView tabs on update/restart
- Error retry and timeout now working and not duplicated anymore per account (settings are per exchange!)
- Added CSS injection to widen the Condition drop down in the Alert Dialog on TradingView
- Bitmex: Fixed ETHUSD calcuations and linked order cancelations
- Fixed last error and success info not being updated in popup window

1.0.4.4 – 15/8/2018

- Fixed 'orderID' error message on closing of orders/positions
- Fixed Poloniex test command

1.0.4.3 – 2/8/2018

- Added support for the Gemini Exchange
- Added CSS injection to widen the Alert Dialog on TradingView
- Added info on last successful and last failed actions (with timestamps) to the menubar popup window
- Added a restart button on the live log page to force a reload of the extension manually
- Improved the live log with message size limits, better formatting, improved scrolling and more options (that are saved now)
- Tightened the requested exchange permissions for better security!
- Improved saving of configuration and permissions

1.0.4.1 – 31/7/2018

- Quickfix: decreased log retention due to Chrome LocalStorage size limitations!

1.0.4 – 28/7/2018

- Overhaul of popup window with easier access to the Settings window
- Added numerous additional debug and status metrics to the log
- Added persistent application log
- Added navigation in Settings window (direct linking to log viewer, browser back/forward/refresh etc. working)

1.0.3.1 – 28/7/2018

- Fixed saving of permissions and unlock state!
- Fixed accidental duplication of API key if it was renamed

1.0.3 – 22/7/2018

- Added Coinbase Pro support

1.0.2 – 22/7/2018

- Fixed bug preventing communication with TradingView in some cases
- GUI changes

1.0.0 – 9/7/2018

- Initial release