It is always recommended to use testnet/sandbox first!
Long/Short Signal (unified)
### OKX Long/Short (Market) ### # Uncomment this to set exchange & symbol (if different from your chart/alert!) #ex=okex-demo sym=btc-usd-swap # 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) :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!
Attention: Always double check that you are using the right syntax/alert!