Hi
the full article is linked below but the premise is to use the entry signal for a vectorial system as an exit signal for swing trading systems giving plunge protection, for the systems that I have tested so far this reduces the time in market, draw down and increases P&L through an increased trade count
https://robofuturestrader.com/prorealtime-code-library-vexit/
Code I used: Optimising for ang1 and ang2
timeframe(5minutes)
once periodea = 12
once nbchandeliera = 14
once periodeb = 20
once nbchandelierb = 33
mma = exponentialaverage[periodea](close)
adjasuroppo = (mma-mma[nbchandeliera]*pipsize) / nbchandeliera
angle = (atan(adjasuroppo))
mmb = exponentialaverage[periodeb](close)
pente = (mmb-mmb[nbchandelierb]*pipsize) / nbchandelierb
trigger = exponentialaverage[periodeb+lag](pente)
once lag = 5
// buy conditions
condbuy = angle >= ang1
condbuy = condbuy and (pente crosses over trigger) and (pente < 0)
condbuy = condbuy and average[20](totalprice)>average[20](totalprice)[1]
condbuy = condbuy and close>low
// short conditions
condsell = angle <= -ang2
condsell = condsell and (pente crosses under trigger) and (pente > -2)
condsell = condsell and average[35](totalprice)<average[35](totalprice)[1]
condsell = condsell and close<high
if longonmarket and condsell then
sell at market
endif
if shortonmarket and condbuy then
exitshort at market
endif
I use this as well as the usual trailing stop, it helps if the trailing stop hasn’t kicked in and there is a sudden move and also if the trailing take profit is keeping its distance but the market reverses, you can can get out before the trailing stop/BE is hit
How to combine this with trailing stop?
Have a great day, traders. Not a long time ago, I started my trading career in the crypto market.