Open Close Cross Indicator

Standard Entry Syntax for Bybit

Entry syntax for the default OCC entry alert messages.

It is always recommended to use testnet/sandbox first!

Overview

Note: The following syntax works with the default entry alert messages that OCC comes with! They contain everything necessary to transport the configured and calculated quantity, leverage and SL/TP from OCC into PV and place all the orders & stops accordingly.

Market entry, flip own positions

Market Entry with Limit + Market SL – will flip positions only when opened by the same strategy previously! (useful for multiple layers)

# fill in your accounts here if necessary
#parallel=acc1,acc2,acc3

# remove wrongside=abort in the next line if you want to add to an already open position (pyramiding)
# optionally replace [id] in the next line with a list of alert names you want to allow being flipped eg. id=XH1,XH2
# (otherwise it will only flip it's own positions!)
marketclose=[!side] nopos=entry wrongside=abort checkid=[id] wrongid=abort
delay=1s

:entry
cancel
[side]=_q% lev=_l market error=abort retries=2 time=30% notify=discord:1
delay=1s
close=[side]   stoploss=_sl[-]0.5   price=_sl id=[id]-LSL expect=1 notify=discord:"`LSL:     \z` {stop} / {price}"
close=[side]   stoploss=_sl[-]0.06%    market id=[id]-MSL expect=1 notify=discord:"`MSL:     \z` {stop}"
close=[side] takeprofit=_tp[-]0.45% price=_tp id=[id]-TP  expect=1 notify=discord:"`TP:      \z` {stop} / {price}"

Post-only limit entry, flip own positions

Post-Only Limit Entry with Limit + Market SL – will flip positions only when opened by the same strategy previously! (useful for multiple layers)

# fill in your accounts here if necessary
#parallel=acc1,acc2,acc3

# remove wrongside=abort in the next line if you want to add to an already open position (pyramiding)
# optionally replace [id] in the next line with a list of alert names you want to allow being flipped eg. id=XH1,XH2
# (otherwise it will only flip it's own positions!)
marketclose=[!side] nopos=entry wrongside=abort checkid=[id] wrongid=abort
delay=1s

:entry
cancel
cachedbalance
# optionally adjust maxtime/maxslip in the following line
[side]=_q% lev=_l post ifr=retry price=[-]0.25 save id=[id]-ENTRY maxtime=3m maxslip=0.2% maxslipref=close error=abort notify=discord:1
[!side]=lastqty@ reduce price=_sl stop=_sl[-]0.5    id=[id]-LSL   notify=discord:"`LSL:     \z` {stop} / {price}"
[!side]=lastqty@ reduce market    stop=_sl[-]0.06%  id=[id]-MSL   notify=discord:"`MSL:     \z` {stop}"
[!side]=lastqty@ reduce price=_tp stop=_tp[-]0.45%  id=[id]-TP    notify=discord:"`TP:      \z` {stop} / {price}"

# adjust delay to strategy / timeframe if necessary
delay=25m
cancel id=[id]-ENTRY
ifnopos=cancelall
notify=discord:"Filled!"

Market entry, flip any position

Market Entry with Limit + Market SL – will flip position regardless of who opened it!

# fill in your accounts here if necessary
#parallel=acc1,acc2,acc3

# remove wrongside=abort in the next line if you want to add to an already open position (pyramiding)
marketclose=[!side] nopos=entry wrongside=abort
delay=3s

:entry
cancel
[side]=_q% lev=_l market error=abort retries=2 time=30% notify=discord:1
delay=1s
close=[side]   stoploss=_sl[-]0.5   price=_sl id=[id]-LSL expect=1 notify=discord:"`LSL:     \z` {stop} / {price}"
close=[side]   stoploss=_sl[-]0.06%    market id=[id]-MSL expect=1 notify=discord:"`MSL:     \z` {stop}"
close=[side] takeprofit=_tp[-]0.45% price=_tp id=[id]-TP  expect=1 notify=discord:"`TP:      \z` {stop} / {price}"

Market entry, abort if position open

Market Entry with Limit + Market SL – will abort if a position is already open!

# fill in your accounts here if necessary
#parallel=acc1,acc2,acc3

ifpos=abort
cancel
[side]=_q% lev=_l market error=abort retries=2 time=30% notify=discord:1
delay=1s
close=[side]   stoploss=_sl[-]0.5   price=_sl id=[id]-LSL expect=1 notify=discord:"`LSL:     \z` {stop} / {price}"
close=[side]   stoploss=_sl[-]0.06%    market id=[id]-MSL expect=1 notify=discord:"`MSL:     \z` {stop}"
close=[side] takeprofit=_tp[-]0.45% price=_tp id=[id]-TP  expect=1 notify=discord:"`TP:      \z` {stop} / {price}"
Attention: Always double check that you are using the right syntax/alert!