Voir comment télécharger gratuitement des robots de trading
Retrouvez-nous sur Twitter !
Rejoignez notre page de fans
Rejoignez notre page de fans
Vous avez aimé le script ? Essayez-le dans le terminal MetaTrader 5
- Vues:
- 5626
- Note:
- Publié:
- 2018.06.06 13:56
- Mise à jour:
- 2018.06.15 11:34
-
Besoin d'un robot ou d'un indicateur basé sur ce code ? Commandez-le sur Freelance Aller sur Freelance
The indicator displays possible StopLoss levels on the price chart. Levels are shown separately for Long and Short positions.
It has two parameters:
- Period - calculation period;
- Coefficient - distance from the price.
Calculation:
-
If Close[i] < TS[i-1] and Close[i-1] < TS[i-1]
TS[i] = Min(TS[i-1], Close[i] + loss) -
Если Close[i] > TS[i-1]
TS[i] = Close[i] - loss -
If Close[i] < TS[i-1]
TS[i] = Close[i] + loss
where
loss = Coeff*WMA(Diff, Period), WMA - Wilder Exponential Moving Average, Diff[i] = Max(HiLo, Href, Lref), HiLo[i] = Min(High[i] - Low[i], MVA(High - Low, Period))
-
If Low[i]<=High[i-1]
Href[i] = High[i] - Close[i-1] -
If Low[i]>High[i-1]
Href[i] = (High[i] + High[i-1] - Low[i] - Close[i-1])/2 -
If High[i]>=Low[i-1]
Lref[i] = Close[i-1] - Low[i] -
If High[i]<Low[i-1]
Lref[i] = (Close[i-1] + High[i] - Low[i-1] - Low[i])/2
Traduit du russe par MetaQuotes Ltd.
Code original : https://www.mql5.com/ru/code/20423

Least Square Moving Average - a moving average calculated by the least squares method.

Instantaneous Trendline by J. Ehlers.

Universal trailing of positions and pending orders.

Smoothed Positive Volume Index