Long Signal

### BitMEX Long ###

# Optionally for multiple accounts uncomment the following line and fill in your accounts
#ap=acc1,acc2,acc3

# Cancel all orders
c=order
# Close open short positions at market
# ..if no matching position is found, skip the next command (the delay)
c=position b=short t=market ret=-1 err=1
# Give closing order time to execute
delay=5

# Open market long (main position order)
# err=-1    : Abort/skip rest on error (after retries)
# retries=3 : Give up after 3 retries in case of overload
b=long q=YOUR_BUY_IN% l=YOUR_LEVERAGE t=market err=-1 retries=3 n=d:1

# Give main order time to execute
delay=3

# Add market stop loss order
# ret=1  : Expect to place an order..
# err=-2 : Otherwise retry, afterwards close all positions & abort
b=long c=position q=100% sl=-YOUR_STOP_LOSS% t=market ret=1 err=-2 retries=10 id=SL n=d:"`SL at   \z` {stoppx}"

# Add limit take profit order
# ret=1  : Expect to place an order..
# err=-2 : Otherwise retry, afterwards close all positions & abort
b=long c=position q=100% tp=0% p=YOUR_TAKE_PROFIT% ret=1 err=-2 retries=10 id=TP n=d:"`TP at   \z` {price}"

q= l= sl= p= has to be adjusted to your strategy / personal needs!



Short Signal

### BitMEX Short ###

# Optionally for multiple accounts uncomment the following line and fill in your accounts
#ap=acc1,acc2,acc3

# Cancel all orders
c=order
# Close open long positions at market
# ..if no matching position is found, skip the next command (the delay)
c=position b=long t=market ret=-1 err=1
# Give closing order time to execute
delay=5

# Open market short (main position order)
# err=-1    : Abort/skip rest on error (after retries)
# retries=3 : Give up after 3 retries in case of overload
b=short q=YOUR_BUY_IN% l=YOUR_LEVERAGE t=market err=-1 retries=3 n=d:1

# Give main order time to execute
delay=3

# Add market stop loss order
# ret=1  : Expect to place an order..
# err=-2 : Otherwise retry, afterwards close all positions & abort
b=short c=position q=100% sl=YOUR_STOP_LOSS% t=market ret=1 err=-2 retries=10 id=SL n=d:"`SL at   \z` {stoppx}"

# Add limit take profit order
# ret=1  : Expect to place an order..
# err=-2 : Otherwise retry, afterwards close all positions & abort
b=short c=position q=100% tp=0% p=-YOUR_TAKE_PROFIT% ret=1 err=-2 retries=10 id=TP n=d:"`TP at   \z` {price}"

q= l= sl= p= has to be adjusted to your strategy / personal needs!



Attention

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