Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Last revision Both sides next revision
syntax:bybit [2020/05/12 05:36]
profitview
syntax:bybit [2023/04/07 13:26]
profitview
Line 9: Line 9:
 ### Bybit Long/Short ### ### Bybit Long/Short ###
  
-If necessary uncomment the following line to set exchange & symbol+Uncomment this to set exchange & symbol ​(if different from your chart/​alert!)
 #​exchange=bybit-testnet symbol=btcusd #​exchange=bybit-testnet symbol=btcusd
  
-Optionally ​for multi accounts ​uncomment the following ​and fill in your accounts+Uncomment this for multi accounts ​(and fill in your accounts)
 #​parallel=acc1,​acc2,​acc3 #​parallel=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 # 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
-close=position side=[!side] type=market ifnone=main+close=[!side] type=market ifnone=main
 # Give closing order time to execute # Give closing order time to execute
-delay=5+delay=2s
  
 # Place main position order at market # Place main position order at market
Line 25: Line 28:
 # 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 +cancel # 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]=YOUR_BUY_IN% leverage=YOUR_LEVERAGE type=market error=abort retries=3 ~~codedoc:​clean:#​notify=discord:​1~~
  
 # Give main order time to execute # Give main order time to execute
-delay=3+delay=2s
  
 # 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_px}"~~+close=[side] stoploss=[-]YOUR_STOP_LOSS% ​type=market ​expect=1 error=closeside retries=10 id=SL ~~codedoc:​clean:#​notify=discord:"​`SL at   \z` {stop}"~~
  
 # 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=[side] price=[+]YOUR_TAKE_PROFIT% ​priceref=pos 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!''​
 </​panel>​ </​panel>​
  
 +
 +==== Different Margin Modes ====
 +
 +<codedoc code:​ini>​
 +# ~~codedoc:​clean:​switch to 10x isolated margin (on USDT Perpetual will only change leverage of that side) and place market long order using 25% available balance~~
 +
 +long=25% leverage=10 mt=isolated type=market
 +
 +# ~~codedoc:​clean:​switch to 10x cross margin and place market long order using 25% available balance~~
 +
 +long=25% leverage=10 mt=crossed type=market
 +
 +# ~~codedoc:​clean:​switch to 20x isolated margin & hedging mode and place market long order using 25% available balance~~
 +
 +long=25% leverage=20 mt=isolated pm=hedge type=market
 +</​codedoc>​
 +
 +\\
 <callout type="​warning"​ icon="​true">​ <callout type="​warning"​ icon="​true">​
 === Attention === === Attention ===