예스스탁
예스스탁 답변
2021-01-06 11:27:33
안녕하세요
예스스탁입니다.
최근 고점과 저점에 대한 정의가 없으셔서
스윙하이,스윙로우로 판단하게 작성했습니다.
input : left(3),right(3),소숫점자리표시(2);
var : hd(0),ht(0),hh(0),hi(0);
var : ld(0),lt(0),ll(0),li(0),t(0);
var : TL(0),tl1(0),tl2(0),tl3(0),tl4(0),tl5(0),tl6(0);
var : tl7(0),tl8(0),tl9(0),tl10(0),tl11(0),tl12(0),TL13(0);
var : tx1(0),tx2(0),tx3(0),tx4(0),tx5(0),tx6(0);
var : tx7(0),tx8(0),tx9(0),tx10(0),tx11(0),tx12(0),tx13(0);
if SwingHigh(1,h,Left,right,left+right+1) != -1 Then
{
hd = sDate[right];
ht = sTime[right];
hh = h[right];
hi = Index[right];
if ll > 0 Then
{
t =1;
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_Delete(TL8);
TL_Delete(TL9);
TL_Delete(TL10);
TL_Delete(TL11);
TL_Delete(TL12);
TL_Delete(TL13);
TL = TL_New(ld,lt,ll,hd,ht,hh);
TL1 = TL_New(ld,lt,hh,hd,ht,hh);
TL2 = TL_New(ld,lt,hh-(hh-ll)*0.236,hd,ht,hh-(hh-ll)*0.236);
TL3 = TL_New(ld,lt,hh-(hh-ll)*0.382,hd,ht,hh-(hh-ll)*0.382);
TL4 = TL_New(ld,lt,hh-(hh-ll)*0.500,hd,ht,hh-(hh-ll)*0.500);
TL5 = TL_New(ld,lt,hh-(hh-ll)*0.618,hd,ht,hh-(hh-ll)*0.618);
TL6 = TL_New(ld,lt,hh-(hh-ll)*0.764,hd,ht,hh-(hh-ll)*0.764);
TL7 = TL_New(ld,lt,hh-(hh-ll)*1.000,hd,ht,hh-(hh-ll)*1.000);
TL8 = TL_New(ld,lt,hh-(hh-ll)*1.236,hd,ht,hh-(hh-ll)*1.236);
TL9 = TL_New(ld,lt,hh-(hh-ll)*1.382,hd,ht,hh-(hh-ll)*1.382);
TL10 = TL_New(ld,lt,hh-(hh-ll)*1.500,hd,ht,hh-(hh-ll)*1.500);
TL11 = TL_New(ld,lt,hh-(hh-ll)*1.618,hd,ht,hh-(hh-ll)*1.618);
TL12 = TL_New(ld,lt,hh-(hh-ll)*2.000,hd,ht,hh-(hh-ll)*2.000);
TL13 = TL_New(ld,lt,hh-(hh-ll)*2.618,hd,ht,hh-(hh-ll)*2.618);
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);
TL_SetExtRight(TL8,true);
TL_SetExtRight(TL9,true);
TL_SetExtRight(TL10,true);
TL_SetExtRight(TL11,true);
TL_SetExtRight(TL12,true);
TL_SetExtRight(TL13,true);
Text_Delete(Tx1);
Text_Delete(Tx2);
Text_Delete(Tx3);
Text_Delete(Tx4);
Text_Delete(Tx5);
Text_Delete(Tx6);
Text_Delete(Tx7);
Text_Delete(Tx8);
Text_Delete(Tx9);
Text_Delete(Tx10);
Text_Delete(Tx11);
Text_Delete(Tx12);
Text_Delete(Tx13);
Tx1 = Text_new(hd,ht,hh,"0.00% : "+NumToStr(hh,소숫점자리표시));
Tx2 = Text_new(hd,ht,hh-(hh-ll)*0.236,"23.60% : "+NumToStr(hh-(hh-ll)*0.236,소숫점자리표시));
Tx3 = Text_new(hd,ht,hh-(hh-ll)*0.382,"38.2% : "+NumToStr(hh-(hh-ll)*0.382,소숫점자리표시));
Tx4 = Text_new(hd,ht,hh-(hh-ll)*0.500,"50.0% : "+NumToStr(hh-(hh-ll)*0.500,소숫점자리표시));
Tx5 = Text_new(hd,ht,hh-(hh-ll)*0.618,"61.8% : "+NumToStr(hh-(hh-ll)*0.618,소숫점자리표시));
Tx6 = Text_new(hd,ht,hh-(hh-ll)*0.764,"76.4% : "+NumToStr(hh-(hh-ll)*0.764,소숫점자리표시));
Tx7 = Text_new(hd,ht,hh-(hh-ll)*1.000,"100.0% : "+NumToStr(hh-(hh-ll)*1.000,소숫점자리표시));
Tx8 = Text_new(hd,ht,hh-(hh-ll)*1.236,"123.6% : "+NumToStr(hh-(hh-ll)*1.236,소숫점자리표시));
Tx9 = Text_new(hd,ht,hh-(hh-ll)*1.382,"138.2% : "+NumToStr(hh-(hh-ll)*1.382,소숫점자리표시));
Tx10 = Text_new(hd,ht,hh-(hh-ll)*1.500,"150.0% : "+NumToStr(hh-(hh-ll)*1.500,소숫점자리표시));
Tx11 = Text_new(hd,ht,hh-(hh-ll)*1.618,"161.8% : "+NumToStr(hh-(hh-ll)*1.618,소숫점자리표시));
Tx12 = Text_new(hd,ht,hh-(hh-ll)*2.000,"200.0% : "+NumToStr(hh-(hh-ll)*2.000,소숫점자리표시));
Tx13 = Text_new(hd,ht,hh-(hh-ll)*2.618,"261.8% : "+NumToStr(hh-(hh-ll)*2.618,소숫점자리표시));
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_SetStyle(tx8,0,0);
Text_SetStyle(tx9,0,0);
Text_SetStyle(tx10,0,0);
Text_SetStyle(tx11,0,0);
Text_SetStyle(tx12,0,0);
Text_SetStyle(tx13,0,0);
}
}
if Swinglow(1,l,Left,right,left+right+1) != -1 Then
{
ld = sDate[right];
lt = sTime[right];
ll = l[right];
li = Index[right];
if hh > 0 Then
{
t = -1;
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_Delete(TL8);
TL_Delete(TL9);
TL_Delete(TL10);
TL_Delete(TL11);
TL_Delete(TL12);
TL_Delete(TL13);
TL = TL_New(hd,ht,hh,ld,lt,ll);
TL1 = TL_New(hd,ht,ll,ld,lt,ll);
TL2 = TL_New(hd,ht,ll+(hh-ll)*0.236,ld,lt,ll+(hh-ll)*0.236);
TL3 = TL_New(hd,ht,ll+(hh-ll)*0.382,ld,lt,ll+(hh-ll)*0.382);
TL4 = TL_New(hd,ht,ll+(hh-ll)*0.500,ld,lt,ll+(hh-ll)*0.500);
TL5 = TL_New(hd,ht,ll+(hh-ll)*0.618,ld,lt,ll+(hh-ll)*0.618);
TL6 = TL_New(hd,ht,ll+(hh-ll)*0.764,ld,lt,ll+(hh-ll)*0.764);
TL7 = TL_New(hd,ht,ll+(hh-ll)*1.000,ld,lt,ll+(hh-ll)*1.000);
TL8 = TL_New(hd,ht,ll+(hh-ll)*1.236,ld,lt,ll+(hh-ll)*1.236);
TL9 = TL_New(hd,ht,ll+(hh-ll)*1.382,ld,lt,ll+(hh-ll)*1.382);
TL10 = TL_New(hd,ht,ll+(hh-ll)*1.500,ld,lt,ll+(hh-ll)*1.500);
TL11 = TL_New(hd,ht,ll+(hh-ll)*1.618,ld,lt,ll+(hh-ll)*1.618);
TL12 = TL_New(hd,ht,ll+(hh-ll)*2.000,ld,lt,ll+(hh-ll)*2.000);
TL13 = TL_New(hd,ht,ll+(hh-ll)*2.618,ld,lt,ll+(hh-ll)*2.618);
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);
TL_SetExtRight(TL8,true);
TL_SetExtRight(TL9,true);
TL_SetExtRight(TL10,true);
TL_SetExtRight(TL11,true);
TL_SetExtRight(TL12,true);
TL_SetExtRight(TL13,true);
Text_Delete(Tx1);
Text_Delete(Tx2);
Text_Delete(Tx3);
Text_Delete(Tx4);
Text_Delete(Tx5);
Text_Delete(Tx6);
Text_Delete(Tx7);
Text_Delete(Tx8);
Text_Delete(Tx9);
Text_Delete(Tx10);
Text_Delete(Tx11);
Text_Delete(Tx12);
Text_Delete(Tx13);
Tx1 = Text_new(ld,lt,ll,"0.00% : "+NumToStr(ll,소숫점자리표시));
Tx2 = Text_new(ld,lt,ll+(hh-ll)*0.236,"23.60% : "+NumToStr(ll+(hh-ll)*0.236,소숫점자리표시));
Tx3 = Text_new(ld,lt,ll+(hh-ll)*0.382,"38.2% : "+NumToStr(ll+(hh-ll)*0.382,소숫점자리표시));
Tx4 = Text_new(ld,lt,ll+(hh-ll)*0.500,"50.0% : "+NumToStr(ll+(hh-ll)*0.500,소숫점자리표시));
Tx5 = Text_new(ld,lt,ll+(hh-ll)*0.618,"61.8% : "+NumToStr(ll+(hh-ll)*0.618,소숫점자리표시));
Tx6 = Text_new(ld,lt,ll+(hh-ll)*0.764,"76.4% : "+NumToStr(ll+(hh-ll)*0.764,소숫점자리표시));
Tx7 = Text_new(ld,lt,ll+(hh-ll)*1.000,"100.0% : "+NumToStr(ll+(hh-ll)*1.000,소숫점자리표시));
Tx8 = Text_new(ld,lt,ll+(hh-ll)*1.236,"123.6% : "+NumToStr(ll+(hh-ll)*1.236,소숫점자리표시));
Tx9 = Text_new(ld,lt,ll+(hh-ll)*1.382,"138.2% : "+NumToStr(ll+(hh-ll)*1.382,소숫점자리표시));
Tx10 = Text_new(ld,lt,ll+(hh-ll)*1.500,"150.0% : "+NumToStr(ll+(hh-ll)*1.500,소숫점자리표시));
Tx11 = Text_new(ld,lt,ll+(hh-ll)*1.618,"161.8% : "+NumToStr(ll+(hh-ll)*1.618,소숫점자리표시));
Tx12 = Text_new(ld,lt,ll+(hh-ll)*2.000,"200.0% : "+NumToStr(ll+(hh-ll)*2.000,소숫점자리표시));
Tx13 = Text_new(ld,lt,ll+(hh-ll)*2.618,"261.8% : "+NumToStr(ll+(hh-ll)*2.618,소숫점자리표시));
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_SetStyle(tx8,0,0);
Text_SetStyle(tx9,0,0);
Text_SetStyle(tx10,0,0);
Text_SetStyle(tx11,0,0);
Text_SetStyle(tx12,0,0);
Text_SetStyle(tx13,0,0);
}
}
if T == -1 Then
{
Text_SetLocation(tx1,nextbarsdate,nextbarstime,ll);
Text_SetLocation(tx2,nextbarsdate,nextbarstime,ll+(hh-ll)*0.236);
Text_SetLocation(tx3,nextbarsdate,nextbarstime,ll+(hh-ll)*0.382);
Text_SetLocation(tx4,nextbarsdate,nextbarstime,ll+(hh-ll)*0.500);
Text_SetLocation(tx5,nextbarsdate,nextbarstime,ll+(hh-ll)*0.618);
Text_SetLocation(tx6,nextbarsdate,nextbarstime,ll+(hh-ll)*0.764);
Text_SetLocation(tx7,nextbarsdate,nextbarstime,ll+(hh-ll)*1.000);
Text_SetLocation(tx8,nextbarsdate,nextbarstime,ll+(hh-ll)*1.236);
Text_SetLocation(tx9,nextbarsdate,nextbarstime,ll+(hh-ll)*1.382);
Text_SetLocation(tx10,nextbarsdate,nextbarstime,ll+(hh-ll)*1.500);
Text_SetLocation(tx11,nextbarsdate,nextbarstime,ll+(hh-ll)*1.618);
Text_SetLocation(tx12,nextbarsdate,nextbarstime,ll+(hh-ll)*2.000);
Text_SetLocation(tx13,nextbarsdate,nextbarstime,ll+(hh-ll)*2.618);
}
Else
{
Text_SetLocation(tx1,nextbarsdate,nextbarstime,hh);
Text_SetLocation(tx2,nextbarsdate,nextbarstime,hh-(hh-ll)*0.236);
Text_SetLocation(tx3,nextbarsdate,nextbarstime,hh-(hh-ll)*0.382);
Text_SetLocation(tx4,nextbarsdate,nextbarstime,hh-(hh-ll)*0.500);
Text_SetLocation(tx5,nextbarsdate,nextbarstime,hh-(hh-ll)*0.618);
Text_SetLocation(tx6,nextbarsdate,nextbarstime,hh-(hh-ll)*0.764);
Text_SetLocation(tx7,nextbarsdate,nextbarstime,hh-(hh-ll)*1.000);
Text_SetLocation(tx8,nextbarsdate,nextbarstime,hh-(hh-ll)*1.236);
Text_SetLocation(tx9,nextbarsdate,nextbarstime,hh-(hh-ll)*1.382);
Text_SetLocation(tx10,nextbarsdate,nextbarstime,hh-(hh-ll)*1.500);
Text_SetLocation(tx11,nextbarsdate,nextbarstime,hh-(hh-ll)*1.618);
Text_SetLocation(tx12,nextbarsdate,nextbarstime,hh-(hh-ll)*2.000);
Text_SetLocation(tx13,nextbarsdate,nextbarstime,hh-(hh-ll)*2.618);
}
즐거운 하루되세요
> 시그너스 님이 쓴 글입니다.
> 제목 : 피보나치
> 안녕하세요?
최근 형성된 고점과 저점을 기준으로 피보나치 되돌림 비율을 지표로 부탁합니다.
파일 참고해 주세요.