It is always recommended to use testnet/sandbox first!
Long/Short Signal (unified)
### Deribit Long/Short (Market) ### # Uncomment this to set exchange & symbol (if different from your chart/alert!) #ex=deribit-testnet sym=btc-perpetual # Uncomment this for multi accounts (and fill in your accounts) #ap=acc1,acc2,acc3 # Uncomment this to skip entry if ANY position is already open #ifpos=abort # Close open positions on the opposite side at market # ..if no matching position is found, skip the delay and jump to main order # (uncomment the last part to *not* add to the same side!) marketclose=[!side] ifnone=entry #wrongside=abort # Give closing order time to execute delay=0.5s # Place main position order at market # err abort : Abort/skip rest on error (after retries, configured under accounts) # (Deribit has no isolated margin, so lev just multiplies your buy in!) :entry cancel # cancel any open order/stop first [side]=YOUR_BUY_IN% lev=YOUR_LEVERAGE market err=abort #notify=discord:1 # Give main order time to execute delay=0.5s # Add market stop loss order (reduce/close only) # expect : Expect to place an order (needed in case main order takes longer to fill) # err closeside : If we cannot place SL, cancel orders, close position & abort close=[side] stoploss=[-]YOUR_STOP_LOSS% market expect err=closeside id=[id]-SL #notify=discord:"`SL at \z` {stop}" # Add limit take profit order (reduce/close only) close=[side] price=[+]YOUR_TAKE_PROFIT% pr=pos expect err=closeside id=[id]-TP #notify=discord:"`TP at \z` {price}"
YOUR_BUY_IN (Quantity), YOUR_LEVERAGE (Leverage), YOUR_STOP_LOSS (Stop Loss) and YOUR_TAKE_PROFIT (Take Profit) have to be replaced with your actual values!
Simple Post-Only Entry (unified)
### Deribit Long/Short (Simple Post-Only) ### # Uncomment this to set exchange & symbol (if different from your chart/alert!) #ex=deribit-testnet sym=btc-perpetual # Uncomment this for multi accounts (and fill in your accounts) #ap=acc1,acc2,acc3 # Uncomment this to skip entry if ANY position is already open #ifpos=abort # Close open positions on the opposite side at market # ..if no matching position is found, skip the delay and jump to main order # (uncomment the last part to *not* add to the same side!) marketclose=[!side] ifnone=entry #wrongside=abort # Give closing order time to execute delay=0.5s # Place main position order as post-only limit (automatic retries if rejected) # err abort : Abort/skip rest on error (after retries, configured under accounts) # (Deribit has no isolated margin, so lev just multiplies your buy in!) :entry cancel # cancel any open order/stop first [side]=YOUR_BUY_IN% lev=YOUR_LEVERAGE price=[-]0.2 save id=[id]-ENTRY postrep=3m err=abort #notify=discord:1 # Add market stop loss order (reduce/close only) [!side]=lastqty@ reduce market stop=[-]YOUR_STOP_LOSS% id=[id]-SL #notify=discord:"`SL: \z` {stop}" # Add limit take profit order (reduce/close only) [!side]=lastqty@ reduce price=[+]YOUR_TAKE_PROFIT% stop=p[-]0.45% id=[id]-TP #notify=discord:"`TP: \z` {stop} / {price}"
YOUR_BUY_IN (Quantity), YOUR_LEVERAGE (Leverage), YOUR_STOP_LOSS (Stop Loss) and YOUR_TAKE_PROFIT (Take Profit) have to be replaced with your actual values!
The entry is a post-only limit order 0.2 below the bid (above the ask for a short),
postrep=3m places it again while the exchange rejects it, for up to 3 minutes. Stop loss and take profit go out right away as reduce-only orders for the saved size (lastqty@), ready for the fill. The take profit is a limit order triggered 0.45% before its price.Attention: Always double check that you are using the right syntax/alert!