Trailing Stop level indicator

Custom MT4 expert advisors published here.

Moderator: admin

Trailing Stop level indicator

Postby Alexander.Gettinger » Wed Oct 09, 2013 11:31 am

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_MQL.PNG


Download:
Trailing_Stop_Level.mq4
(1.72 KiB) Downloaded 988 times
Alexander.Gettinger
FXCodeBase: Confirmed User
 
Posts: 3785
Joined: Wed Mar 31, 2010 9:40 pm
Location: Russia, Omsk

Return to MT4 Expert Advisors

Who is online

Users browsing this forum: No registered users and 15 guests