HPotter

Average True Range Trailing Stops, by Sylvain Vervoort

5218 görüntülenme
1309
5218 14
Average True Range Trailing Stops, by Sylvain Vervoort
The related article is copyrighted material from Stocks & Commodities Jun 2009
Favori Komutlardan Çıkart Favori Komutlara Ekle
////////////////////////////////////////////////////////////
//  Copyright by HPotter v1.0 16/09/2014
// Average True Range Trailing Stops, by Sylvain Vervoort
// The related article is copyrighted material from Stocks & Commodities Jun 2009 
////////////////////////////////////////////////////////////
study(title="Average True Range Trailing Stops, by Sylvain Vervoort", overlay = true)
nATRPeriod = input(5)
nATRMultip = input(3.5)
xATR = atr(nATRPeriod)
nLoss = nATRMultip * xATR
xATRTrailingStop = iff(close > nz(xATRTrailingStop[1], 0) and close[1] > nz(xATRTrailingStop[1], 0), max(nz(xATRTrailingStop[1]), close - nLoss),
                    iff(close < nz(xATRTrailingStop[1], 0) and close[1] < nz(xATRTrailingStop[1], 0), min(nz(xATRTrailingStop[1]), close + nLoss), 
                        iff(close > nz(xATRTrailingStop[1], 0), close - nLoss, close + nLoss)))
plot(xATRTrailingStop, color=red, title="ATR Trailing Stop")

DONATE/TIP

BTC: 3FKWwtaYrf5NHZzaCi1fyAfQj7XSgtyCqe
Can you please help me to convert this study to a strategy? it gives an error when I'm trying to convert it :((
it says:
xATRTrailingStop = iff(close > nz(xATRTrailingStop, 0) and close > nz(xATRTrailingStop, 0), max(nz(xATRTrailingStop), close - nLoss),
iff(close < nz(xATRTrailingStop, 0) and close < nz(xATRTrailingStop, 0), min(nz(xATRTrailingStop), close + nLoss),
iff(close > nz(xATRTrailingStop, 0), close - nLoss, close + nLoss)))
this part has an error when I'm trying to convert this to a starategy :((
I'm using a crossover(close, xATRTrailingStop) for open long.
Cevap Gönder
HPotter azizgokbas
@azizgokbas, Look at this
+1 Cevap Gönder
azizgokbas HPotter
@HPotter, Awesome! Thank you so much! Do you know c#?
+1 Cevap Gönder
HPotter azizgokbas
@azizgokbas, Yes.
Cevap Gönder
azizgokbas HPotter
@HPotter, do you have this indicator in c# language too?
Cevap Gönder
HPotter azizgokbas
@azizgokbas, I should to see in my database, but I think yes.
Cevap Gönder
azizgokbas HPotter
@HPotter, If you can find that can you share with me? I just like this indicator as a trailing stopp loss.
+1 Cevap Gönder
So what is the strategy that can be used.. How do you know if you should take an ATR change trade. I get the buy point on the change but is there something that help say this change is better than the last?
Cevap Gönder
HPotter prolongwealth
I don`t know.
Cevap Gönder
Even the weekly trend chart has turned against Bitcoin:

Cevap Gönder
Ana Sayfa Hisse Senedi Takipçisi Forex Takipçisi Kripto Takipçisi Ekonomik Takvim Nasıl Çalışır Grafik Özellikleri Ücretlendirme Kurallarımız Moderatörler Web Sitesi & Aracı Kurum Çözümleri Görsel Bileşenler(Widget) Grafik Çözümleri Yardım Alın Yeni Özellik Talebi Blog ve Haberler SSS Viki Twitter
Profil Profil Ayarları Hesap ve Ödemeler Yardım Alın Yayınlanmış Fikirler Takip Edenler Takip Ediliyor Özel Mesajlar Sohbet Çıkış