Hi all, I notice my strategy is good at picking entries and then cumulates the position when it meets further entry signals and is in profit. Trouble is that this kind of strategy needs to be very protective over its gains or as quick as they come, they go on the first downturn.
I would like to set an exit point based purely on the position performance, that is I want to lock in some gains by identifying when position performance is turning south. Exactly how, not sure, but something like:
if positionperf < (Highest positionperf over 20 bars *0.95) (i.e. we’re losing 5% from our peak gain in the last 20 bars) then
close position
endif
n= highest[20](POSITIONPERF)
I am trying to identify the point in the last 20 bars when my position was best. From there I will exit position if it falls below a certain %.
However the command above when pushed through the GRAPH command does not produce the expected, it’s blank. Is this the right way or is there a way with SET STOP %TRAILING y? Note I am using cumulative orders.