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
즐겨찾기 스크립트에서 빼기 즐겨찾기 스크립트에 넣기
////////////////////////////////////////////////////////////
//  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.
응답
HPotter azizgokbas
@azizgokbas, Look at this
+1 응답
azizgokbas HPotter
@HPotter, Awesome! Thank you so much! Do you know c#?
+1 응답
HPotter azizgokbas
@azizgokbas, Yes.
응답
azizgokbas HPotter
@HPotter, do you have this indicator in c# language too?
응답
HPotter azizgokbas
@azizgokbas, I should to see in my database, but I think yes.
응답
azizgokbas HPotter
@HPotter, If you can find that can you share with me? I just like this indicator as a trailing stopp loss.
+1 응답
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?
응답
HPotter prolongwealth
I don`t know.
응답
Even the weekly trend chart has turned against Bitcoin:

응답
홈으로 스탁 스크리너 포렉스 스크리너 크립토 스크리너 이코노믹 캘린더 사용안내 차트 특징 프라이싱 하우스룰(내부규정) 모더레이터 웹사이트 & 브로커 솔루션 위젯 차팅 솔루션 라이트웨이트 차팅 라이브러리 헬프 센터 프렌드 리퍼하기 기능 개발/개선 요청 블로그 & 뉴스 잦은물음 위키 트위터
프로화일 프로화일설정 계정 및 빌링 프렌드 리퍼하기 나의 서포트 티켓 헬프 센터 공개아이디어 팔로어 팔로잉 비밀메시지 채팅 로그아웃