The syntax alert goes straight into the ProfitView GUI.
Use alert name as first line in “Message” field on TradingView (Alt + A).

Please change the alert condition accordingly.

Long/Buy Signal

# LONG XBTUSD
c=order t=open
c=position b=short t=market
c=position b=short t=market
delay=3
b=long l=25 q=50% t=market err=-1
delay=5
b=long c=position q=300% sl=-2.5% t=market r=1 ret=1 err=-2
b=long c=position q=300% tp=0% p=1.3% r=1 ret=1 err=-2

q= l= sl= p= needs to be adjusted to your needs



Syntax Explanation

Command Description
c=order t=open close open orders
c=position b=short t=market close open shorts @ market
c=position b=short t=market safety
delay=3 3 seconds delay.
b=long l=10 q=50% t=market open market long 50% @ 10x
delay=5 5 seconds delay.
b=long c=position q=300% sl=-2.5% t=market r=1 ret=1 err=-2 fixed stop loss @ 2.5% below current price. expect to place an order, otherwise close all & abort
b=long c=position q=300% tp=0% p=1.3% r=1 ret=1 err=-2 fixed take profit @ 1.3% above current price. expect to place an order, otherwise close all & abort

Short/Sell Signal

# SHORT XBTUSD
c=order t=open
c=position b=long t=market
c=position b=long t=market
delay=3
b=short l=25 q=50% t=market err=-1
delay=5
b=short c=position q=300% sl=2.5% t=market r=1 ret=1 err=-2
b=short c=position q=300% tp=0% p=-1.3% r=1 ret=1 err=-2

q= l= sl= p= needs to be adjusted to your needs



Syntax Explanation

Command Description
c=order t=open close open orders
c=position b=long t=market close open longs @ market
c=position b=long t=market safety
delay=3 3 seconds delay.
b=short l=10 q=50% t=market open market short 50% @ 10
delay=5 5 seconds delay.
b=short c=position q=300% sl=2.5% t=market r=1 ret=1 err=-2 fixed stop loss @ 2.5% above current price. expect to place an order, otherwise close all & abort
b=short c=position q=300% tp=0% p=-1.3% r=1 ret=1 err=-2 fixed stop loss @ 1.3% above current price. expect to place an order, otherwise close all & abort


Available Commands

Name Key Default Values Description
Account a * Anything (excluding special characters) The account name of the API key you want to use for this command.
Book b all buy, long; sell, short The side of the market you would like to place your order.
Cancel / Close c n/a order, position Cancel open orders or close open positions according to other specified parameters.
Cancel / Close Maximum cm all Static: #, %Random: #-#, %-% Cancels orders or closes positions (see cmo for ordering).
Cancel / Close Maximum Order cmo oldest newest, oldest; lowest, highest; smallest, biggest; random How the orders are sorted for canceling. How the positions are sorted for closing.
Delay delay n/a > 0 Pauses execution between previous and this command (line) for the specified time (e.g. delay=10).
Disabled d 0 0, 1 Disables placement or cancelation/closing of orders/positions.This is helpful for debugging by outputting the calculated parameters to be used.
Exchange e Exchange Name from Alert BitMEX, Binance, … The receiving exchange for your command.
Fixed Price fp n/a Static: # Random: #-# Fixed price for which to place an order or close a position.
Hidden / Iceberg h n/a Static: #, % Random: #-#, %-% Bitfinex: Whether the order should be hidden (i.e. h=1). BitMEX: If set to 0, order will be hidden. Otherwise this portion of the position will be visible (i.e. Iceberg).
Leverage l all >= 0 Leverage, multiplying your available balance while increasing risk (!).
Linking Identifier lid n/a Anything BitMEX: Create an order that is part of this linking identifier. To be used when oco, oto, ouoa, or ouop are not set explicitly.
One Cancels the Other oco n/a Anything BitMEX: The first order that fully or partially executes (or activates for Stop orders) will cancel all other orders with the same linking identifier.
One Triggers the Other oto n/a Anything BitMEX: Apply on the primary order and then subsequent orders with the same identifier will not be triggered until the primary order fully executes.
One Updates the Other Absolute ouoa n/a Anything BitMEX: As one order has an execution, other orders with the same linking identifier will have their order quantity amended down by the execution quantity.
One Updates the Other Proportional ouop n/a Anything BitMEX: As one order has an execution, other orders with the same linking identifier will have their order quantity reduced proportionally by the fill percentage.
Price p 0 Static: #, % Random: #-#, %-% Amount to undercut or overcut the top order in the book - either by percentage or absolute price!
Quantity q 100% Static: #, % Random: #-#, %-% The portion of your balance or position (!) you would like to effect.
Reduce r 0 0, 1 BitMEX: Place order as “reduce only”
Symbol s Chart Symbol from Alert XBTU18, ETHEUR, … Market on the receiving exchange to be used for this command.
Stop Loss sl n/a Static: #, % Random: #-#, %-% Bitfinex: Whether the order is a stop order (i.e. sl=1) 1Broker, Binance, BitMEX: Provided value is applied to the position's entry price. Kraken: Triggers the order (buy or sell) when the last traded price hits the stop price.
Shared shared 0 0, 1 1Broker: Whether or not the trade will be visible to others.
Order Type t limit limit, market, fok, ioc, post, close, open, settle close, open, settle Limit: Order will be placed in the books to await being filled. Market: Place order in the book for immediate filling (p is ignored). FOK: Fill Or Kill orders will either completely fill or be aborted. IOC: Immediate Or Cancel orders can be partially or completely filled, but any remaining portion is cancelled. Post: If any part of the order would have executed, it will be cancelled instead. Close / Open: Can be used together with c=order for specific order types. Settle (Kraken only): Settle position(s) at the original order price. Learn more
Take Profit tp n/a Static: #, % Random: #-#, %-% 1Broker, Binance, BitMEX: Provided value is applied to the position's entry price. Kraken: Triggers the order (buy or sell) when the last price hits the profit price.
Trailing Stop ts n/a Static: #, % Random: #-#, %-% 1Broker: Whether the position has a trailing stop loss (i.e. disabled ts=0, enabled ts=1) Bitfinex: Whether the order is a trailing stop (i.e. ts=1) Kraken: Triggers a market order (buy or sell) when the last traded price goes against the position by the stop offset amount.
Unit u contracts contracts, currency Unit to be used for the provided quantity (q) parameter.
Yield y balance balance, equity Balance: Your available balance excluding open orders/positions. Equity: Grand total including all profit and loss.

Attention

Always double check that you are using the right syntax/alert!