Search

Fibonacci Retrace

지표설명

레오나르도 피보나치가 발견한 수열에서 유래한 것으로 Fibonacci Retrace(되돌림)은 가격 변동에서 추세의 지지/저항선을 찾는데 사용 되는 기법 중 하나입니다. 통상 원(Arcs),부채(Fans), 되돌림(retrace),시간대(Time Zone)의 4가지 연구분석으로 나뉘어 집니다. Fibonacci Retrace는 일정 구간의 최고가와 최저가를 기준으로 해당 폭의 비율을 계산하여 지지선과 저항선을 찾아내게 됩니다. 대표적인 피보나치 비율은 23.6%, 38,2%, 50.0%, 61.8%, 76.4% 입니다.
계산식 Hi = m기간동안 최고가 Lo = m기간동안 최저가 Retracement = (Hi - Lo) Retrace1 = Hi - Retracement * 0.236 Retrace2 = Hi +Retracement * 0.382 Retrace3 = Hi - Retracement * 0.500 Retrace4 = Hi - Retracement * 0.618 Retrace5 = Hi - Retracement * 0.764

활용예시

//최근 고점-저점의 피보나치 비율 //고점 저점은 SwingHigh,SwingLow로 체크 input : left(3),right(3),소숫점자리표시(2); var : hd(0),ht(0),hh(0); var : ld(0),lt(0),ll(0); var : TL(0),tl1(0),tl2(0),tl3(0),tl4(0),tl5(0),tl6(0),tl7(0); var : tx1(0),tx2(0),tx3(0),tx4(0),tx5(0),tx6(0),tx7(0); if SwingHigh(1,h,Left,right,left+right+1) != -1 Then { hd = sDate[right]; ht = sTime[right]; hh = h[right]; if ll > 0 Then { var1 = hh-(hh-ll)*0.000; var2 = hh-(hh-ll)*0.236; var3 = hh-(hh-ll)*0.382; var4 = hh-(hh-ll)*0.500; var5 = hh-(hh-ll)*0.618; var6 = hh-(hh-ll)*0.764; var7 = hh-(hh-ll)*1.000; TL_Delete(TL); TL_Delete(TL1); TL_Delete(TL2); TL_Delete(TL3); TL_Delete(TL4); TL_Delete(TL5); TL_Delete(TL6); TL_Delete(TL7); TL = TL_New(ld,lt,ll,hd,ht,hh); TL1 = TL_New(ld,lt,var1,hd,ht,var1); TL2 = TL_New(ld,lt,Var2,hd,ht,Var2); TL3 = TL_New(ld,lt,Var3,hd,ht,Var3); TL4 = TL_New(ld,lt,Var4,hd,ht,Var4); TL5 = TL_New(ld,lt,Var5,hd,ht,Var5); TL6 = TL_New(ld,lt,var6,hd,ht,Var6); TL7 = TL_New(ld,lt,Var7,hd,ht,Var7); TL_SetExtRight(TL1,true); TL_SetExtRight(TL2,true); TL_SetExtRight(TL3,true); TL_SetExtRight(TL4,true); TL_SetExtRight(TL5,true); TL_SetExtRight(TL6,true); TL_SetExtRight(TL7,true); Text_Delete(Tx1); Text_Delete(Tx2); Text_Delete(Tx3); Text_Delete(Tx4); Text_Delete(Tx5); Text_Delete(Tx6); Text_Delete(Tx7);; Tx1 = Text_new(hd,ht,var1,"0.00% : "+NumToStr(var1,소숫점자리표시)); Tx2 = Text_new(hd,ht,var2,"23.60% : "+NumToStr(var2,소숫점자리표시)); Tx3 = Text_new(hd,ht,Var3,"38.2% : "+NumToStr(var3,소숫점자리표시)); Tx4 = Text_new(hd,ht,var4,"50.0% : "+NumToStr(Var4,소숫점자리표시)); Tx5 = Text_new(hd,ht,Var5,"61.8% : "+NumToStr(Var5,소숫점자리표시)); Tx6 = Text_new(hd,ht,Var6,"76.4% : "+NumToStr(Var6,소숫점자리표시)); Tx7 = Text_new(hd,ht,Var7,"100.0% : "+NumToStr(Var7,소숫점자리표시)); Text_SetStyle(tx1,0,0); Text_SetStyle(tx2,0,0); Text_SetStyle(tx3,0,0); Text_SetStyle(tx4,0,0); Text_SetStyle(tx5,0,0); Text_SetStyle(tx6,0,0); Text_SetStyle(tx7,0,0); } } if Swinglow(1,l,Left,right,left+right+1) != -1 Then { ld = sDate[right]; lt = sTime[right]; ll = l[right]; var1 = ll+(hh-ll)*0.000; var2 = ll+(hh-ll)*0.236; var3 = ll+(hh-ll)*0.382; var4 = ll+(hh-ll)*0.500; var5 = ll+(hh-ll)*0.618; var6 = ll+(hh-ll)*0.764; var7 = ll+(hh-ll)*1.000; if hh > 0 Then { TL_Delete(TL); TL_Delete(TL1); TL_Delete(TL2); TL_Delete(TL3); TL_Delete(TL4); TL_Delete(TL5); TL_Delete(TL6); TL_Delete(TL7); TL = TL_New(hd,ht,hh,ld,lt,ll); TL1 = TL_New(hd,ht,var1,ld,lt,var1); TL2 = TL_New(hd,ht,Var2,ld,lt,Var2); TL3 = TL_New(hd,ht,Var3,ld,lt,Var3); TL4 = TL_New(hd,ht,Var4,ld,lt,Var4); TL5 = TL_New(hd,ht,Var5,ld,lt,Var5); TL6 = TL_New(hd,ht,Var6,ld,lt,Var6); TL7 = TL_New(hd,ht,Var7,ld,lt,Var7); TL_SetExtRight(TL1,true); TL_SetExtRight(TL2,true); TL_SetExtRight(TL3,true); TL_SetExtRight(TL4,true); TL_SetExtRight(TL5,true); TL_SetExtRight(TL6,true); TL_SetExtRight(TL7,true); Text_Delete(Tx1); Text_Delete(Tx2); Text_Delete(Tx3); Text_Delete(Tx4); Text_Delete(Tx5); Text_Delete(Tx6); Text_Delete(Tx7); Tx1 = Text_new(ld,lt,var1,"0.00% : "+NumToStr(var1,소숫점자리표시)); Tx2 = Text_new(ld,lt,Var2,"23.60% : "+NumToStr(Var2,소숫점자리표시)); Tx3 = Text_new(ld,lt,Var3,"38.2% : "+NumToStr(Var3,소숫점자리표시)); Tx4 = Text_new(ld,lt,Var4,"50.0% : "+NumToStr(Var4,소숫점자리표시)); Tx5 = Text_new(ld,lt,Var5,"61.8% : "+NumToStr(Var5,소숫점자리표시)); Tx6 = Text_new(ld,lt,Var6,"76.4% : "+NumToStr(Var6,소숫점자리표시)); Tx7 = Text_new(ld,lt,Var7,"100.0% : "+NumToStr(Var7,소숫점자리표시)); Text_SetStyle(tx1,0,0); Text_SetStyle(tx2,0,0); Text_SetStyle(tx3,0,0); Text_SetStyle(tx4,0,0); Text_SetStyle(tx5,0,0); Text_SetStyle(tx6,0,0); Text_SetStyle(tx7,0,0); } } Text_SetLocation(tx1,nextbarsdate,nextbarstime,var1); Text_SetLocation(tx2,nextbarsdate,nextbarstime,Var2); Text_SetLocation(tx3,nextbarsdate,nextbarstime,Var3); Text_SetLocation(tx4,nextbarsdate,nextbarstime,var4); Text_SetLocation(tx5,nextbarsdate,nextbarstime,Var5); Text_SetLocation(tx6,nextbarsdate,nextbarstime,Var6); Text_SetLocation(tx7,nextbarsdate,nextbarstime,Var7);
C
복사
뒤로가기는 좌측상단의 목차 버튼을 눌러주세요.