HPotter

Average True Range Trailing Stops, by Sylvain Vervoort

Average True Range Trailing Stops, by Sylvain Vervoort
The related article is copyrighted material from Stocks & Commodities Jun 2009
Remove from Favorite Scripts Add to Favorite Scripts
////////////////////////////////////////////////////////////
//  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: 1Lo1GoTNsPbrjGAgPgF4MYZPhBFdoVHaTm
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?
Reply
HPotter PRO prolongwealth
I don`t know.
Reply
Even the weekly trend chart has turned against Bitcoin:

snapshot
Reply
HPotter PRO ChartArt
it happened from nz(xATRTrailingStop, 0) Formula use previos value and can not get it. This function return 0.
Reply
ChartArt HPotter
I have no problem with the beginning of the weird ATR trailing stop, because the end of the chart is what interests me.
Reply
You mean where the red line passes thru and above the price. I was frowning at that too.
Reply
ChartArt FluidicFX
yes, exactly
Reply
United States
United Kingdom
India
Deutschland
France
España
Italia
Polska
Türkiye
Россия
Brasil
Indonesia
Malaysia
ประเทศไทย
Việt Nam
日本
한국
简体
繁體
Home Stock Screener Forex Signal Finder Cryptocurrency Signal Finder Economic Calendar How It Works Chart Features House Rules Moderators Website & Broker Solutions Widgets Stock Charting Library Feature Request Blog & News FAQ Help & Wiki Twitter
Profile Profile Settings Account and Billing My Support Tickets Contact Support Ideas Published Followers Following Private Messages Chat Sign Out