Dear all,
I hope somebody can help me out with this challenge.
When i open a position with a trailing stop, i have to fill in 2 fields in my trade-interface. The distance (difference between stoploss and current price) and the step (the amount the price has to change before the trailing stop is adjusted). I would like to plot the trailingstop, including these 2 variables, on my chart so i can evaluate the settings of these parameters.
For simplicity sake i use a simple RSI-system to show how far i'm right now.
LE:=Cross(RSI(14),30);
LX:=Cross(70,RSI(14));
Distance:=(ATR(14)*2);
Step:=Distance/10;
Target:=(ATR(14)*5);
Signal:=If(LE=1,1,If(LX=1,-1,0)); {long = 1 and short = -1}
If(Signal=1,C-distance,If(Signal=-1,C+distance,c))
I would like to plot a trailing stop below the prices, if the last signal was long. On the other hand a trailing stop above the prices if the last signal was short. In the formula above the trailing stop is only visible on the day of the signal. On the other days the close is shown. The step is not included yet, because i don't know how to do that.
I hope i explained it clearly and that somebody can help me out.
Greetings,
Arne from the Netherlands