Flipping a Position on Entry

# If necessary uncomment the following line to set exchange & symbol
#exchange=binanceft symbol=btcusdt
 
# Optionally for multi accounts uncomment the following and fill in your accounts
#parallel=acc1,acc2,acc3
 
# Flip existing position on the opposite side (of our entry) by using quantity 200% (and reduce-only set to false)
# If no position is open at all → goto “main” 
# If position on the same side (of our entry) is open → abort
close=[!side] quantity=200% reduce=0 type=market nopos=main wrongside=abort
exit
 
# Place main position order at market
# error abort : Abort/skip rest on error (after retries)
# retries 3   : Give up after 3 retries in case of overload
:main
cancel # cancel any open order/stop first
[side]=YOUR_BUY_IN% leverage=YOUR_LEVERAGE type=market error=abort retries=3

Quantity, leverage, stoploss and takeprofit have to be adjusted to your strategy / personal needs!

Attention

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