Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
syntax:deribit [2020/04/24 15:06] profitview ↷ Page moved and renamed from syntax-setup:deribit-syntax to syntax:deribit |
syntax:deribit [2021/01/16 14:36] profitview |
||
---|---|---|---|
Line 15: | Line 15: | ||
#parallel=acc1,acc2 | #parallel=acc1,acc2 | ||
- | # Cancel all orders ..if none found jump ahead to main order | + | # Optionally ignore this alert if ANY position is already open |
- | cancel=order ifnone=main | + | #check=position iffound=abort |
# Close open positions on the opposite side at market | # Close open positions on the opposite side at market | ||
# ..if no matching position is found, skip the delay and jump to main order | # ..if no matching position is found, skip the delay and jump to main order | ||
Line 28: | Line 29: | ||
# retries 3 : Give up after 3 retries in case of overload | # retries 3 : Give up after 3 retries in case of overload | ||
:main | :main | ||
+ | cancel=order # cancel any open order/stop first | ||
side=[side] quantity=YOUR_BUY_IN% leverage=YOUR_LEVERAGE type=market error=abort retries=3 ~~codedoc:clean:#notify=discord:1~~ | side=[side] quantity=YOUR_BUY_IN% leverage=YOUR_LEVERAGE type=market error=abort retries=3 ~~codedoc:clean:#notify=discord:1~~ | ||
Line 34: | Line 36: | ||
# Add market stop loss order | # Add market stop loss order | ||
- | # return 1 : Expect to place an order (needed in case main order takes longer to fill) | + | # expect 1 : Expect to place an order (needed in case main order takes longer to fill) |
# error closeside : If we cannot place SL, cancel orders, close position & abort | # error closeside : If we cannot place SL, cancel orders, close position & abort | ||
- | close=position side=[side] stoploss=[-]YOUR_STOP_LOSS% t=market return=1 error=closeside retries=10 id=SL ~~codedoc:clean:#notify=discord:"`SL at \z` {stop_price}"~~ | + | close=position side=[side] stoploss=[-]YOUR_STOP_LOSS% type=market expect=1 error=closeside retries=10 id=SL ~~codedoc:clean:#notify=discord:"`SL at \z` {stop_price}"~~ |
# Add limit take profit (reduce/close only) order | # Add limit take profit (reduce/close only) order | ||
- | close=position side=[side] price=[+]YOUR_TAKE_PROFIT% reduce return=1 error=closeside retries=10 id=TP ~~codedoc:clean:#notify=discord:"`TP at \z` {price}"~~ | + | close=position side=[side] price=[+]YOUR_TAKE_PROFIT% expect=1 error=closeside retries=10 id=TP ~~codedoc:clean:#notify=discord:"`TP at \z` {price}"~~ |
</codedoc> | </codedoc> | ||
''Quantity, leverage, stoploss and takeprofit have to be adjusted to your strategy / personal needs!'' | ''Quantity, leverage, stoploss and takeprofit have to be adjusted to your strategy / personal needs!'' |