Page 1 of 1

Trailing Stop level indicator

PostPosted: Sat Mar 30, 2019 4:38 pm
by Alexander.Gettinger
The indicator can be used to calculate the stop levels for trading.

Formulas:
TSL[i] = Max(TSL[i-1], Close[i]-loss), if Close[i]>TSL[i-1] and Close[i-1]>TSL[i-1],
TSL[i] = Min(TSL[i-1], Close[i]+loss), if Close[i]<TSL[i-1] and Close[i-1]<TSL[i-1],
TSL[i] = Close[i]-loss, if Close[i]>TSL[i-1],
TSL[i] = Close[i]+loss, if Close[i]<TSL[i-1], where
loss = Close[i]*Percent/100.

Trailing_Stop_Level.PNG


Download:
Trailing_Stop_Level_JS.jsl
(2.17 KiB) Downloaded 589 times