Notifications

Custom Notifications

Information about an Open Position etc.

It is always recommended to use testnet/sandbox first!

Pre-defined Variables for Custom Notifications

Note: For some variables (eg. balance) to be accessible you need to use the notify option together with a command (like updatebalance, check, close etc.) – see the “Cmd” column on the “Setup: Commands” page in PV
VariableDescription
_countNumber of times the current command has been run
accountPV Account used for this command
alertCurrent PV alert name
availableAvailable (free) balance of this account
balanceBalance information (free + total) of this account
bartimeBar time (position in bar) when this alert was triggered
exchangeExchange used for this command
leverageLeverage information (set for this command or present in checked order/position)
priceFinal price calculated (or present in checked order/position)
timeCurrent time
totalTotal balance (equity) of this account
Note: Additionally all syntax parameters (like q, b, s etc.) can be used and also all exchange specific fields – see the PV log when submitting orders for the corresponding field names!

Receive Information about an Open Position

check=pos notify=telegram:"{_symbol} {_side} position - entry: {_entry} - size: {_size} ({relSize}) - profit: {_profit} ({pnlTotal})"
Tip: Check the log or the position monitor in ProfitView for all the fields that can be used in custom notifications! In addition the following built in variables are available for notifications on position check or close commands:
VariableDescription
_dateDate/Time when position was opened (if supported)
_entryAverage entry price of the position
_profitAbsolute profit/loss of the position (native units/contracts)
_sideSide of the position - long or short
_sizeAbsolute size of the position (in native units/contracts)
_sizeUSDAbsolute size of the position (in USD)
_sizeCoinAbsolute size of the position (in “Coin”/market currency)
_symbolSymbol/market of the position
_symbolsSymbols/markets of multiple positions (eg. ch=pos sym=*)
pnlPnL relative to the unleveraged margin used by the position
pnlLevSame as above but taking position leverage into account (multiplied by leverage)
pnlTotalCurrent PnL in relation to total account equity (use yield=balance for relation to available balance)
relSizeRelative size of the position in relation to total account equity (use yield=balance for relation to available balance)
Attention: Always double check that you are using the right syntax/alert!