Wilders Trailing Stop indicator

Here you can post and download custom indicators written in JavaScript.

Moderator: admin

Wilders Trailing Stop indicator

Postby Alexander.Gettinger » Wed May 02, 2018 3:07 pm

WTS[i] = Max(WTS[i-1], Close[i]-loss), if Close[i]>WTS[i-1] and Close[i-1]>WTS[i-1],
WTS[i] = Min(WTS[i-1], Close[i]+loss), if Close[i]<WTS[i-1] and Close[i-1]<WTS[i-1],
WTS[i] = Close[i]-loss, if Close[i]>WTS[i-1],
WTS[i] = Close[i]+loss, in other cases, where
loss = Coeff*ATR,
ATR - Average True Range with Period.


(2.4 KiB) Downloaded 1001 times
FXCodeBase: Confirmed User
Posts: 3785
Joined: Wed Mar 31, 2010 9:40 pm
Location: Russia, Omsk

Return to JavaScript Indicators and Strategies

Who is online

Users browsing this forum: No registered users and 5 guests