Shizaru

Fractal Adaptive Moving Average (real one)

Ignore the other one (it contains some errors).

On this FRAMA you can play with length, SC and FC .
Just read on below links to understand more about this super useful moving average:
즐겨찾기 스크립트에서 빼기 즐겨찾기 스크립트에 넣기
//@version=2
study("Fractal Adaptive Moving Average",shorttitle="FRAMA",overlay=true)
price = input(hl2)
len = input(defval=16,minval=1)
FC = input(defval=1,minval=1)
SC = input(defval=198,minval=1)
len1 = len/2
w = log(2/(SC+1))
H1 = highest(high,len1)
L1 = lowest(low,len1)
N1 = (H1-L1)/len1
H2 = highest(high,len)[len1]
L2 = lowest(low,len)[len1]
N2 = (H2-L2)/len1
H3 = highest(high,len)
L3 = lowest(low,len)
N3 = (H3-L3)/len
dimen1 = (log(N1+N2)-log(N3))/log(2)
dimen = iff(N1>0 and N2>0 and N3>0,dimen1,nz(dimen1[1]))
alpha1 = exp(w*(dimen-1))
oldalpha = alpha1>1?1:(alpha1<0.01?0.01:alpha1)
oldN = (2-oldalpha)/oldalpha
N = (((SC-FC)*(oldN-1))/(SC-1))+FC
alpha_ = 2/(N+1)
alpha = alpha_<2/(SC+1)?2/(SC+1):(alpha_>1?1:alpha_)
out = (1-alpha)*nz(out[1]) + alpha*price
plot(out,title="FRAMA",color=blue,transp=0)
I think still 1 error on line 18, is aduot Fractal Dimension ane I check for formula.

D = (Log(HL1 + HL2) – Log(HL)) / Log(2)

XXXX Note: Log(2) = Log(N / (½N)) XXXXX ___ Look at Log(2) _____

HL1 = (Max(High,½N..N) – Min(Low,½N..N)) / ½N

HL2 = (Max(High,½N) – Min(Low,½N)) / ½N

HL = (Max(High,N) – Min(Low,N)) / N

N = Periods

If D < 1 then D = 1

If D > 2 then D = 2
응답
janfry MarcoValente
Has the @Shizaru indicator been updated with this correction?
+1 응답
janfry janfry
Ok MarcoValente told me that in the they found out that there is no need for this change, it's exactly the same.
응답
janfry janfry
...therefore the indicator works as it is.
+1 응답
Thanks for update on FRAMA.
응답
can you please explain how to use it for trading ?
응답
홈으로 스탁 스크리너 포렉스 스크리너 크립토 스크리너 이코노믹 캘린더 사용안내 차트 특징 프라이싱 하우스룰(내부규정) 모더레이터 웹사이트 & 브로커 솔루션 위젯 차팅 솔루션 도움 받기 기능 개발/개선 요청 블로그 & 뉴스 잦은물음 위키 트위터
프로화일 프로화일설정 계정 및 빌링 트레이딩뷰 코인 나의 서포트 티켓 도움 받기 공개아이디어 팔로어 팔로잉 비밀메시지 채팅 로그아웃