커뮤니티

문의드립니다

프로필 이미지
해피데이m
2014-07-25 14:06:57
190
글번호 77096
답변완료
아래 지표를 첨부파일 처럼 피보나치 수평선 출력하고,피보나치 출력조건은 고점 저점 폭이 1.0 이상일때만 출력되게하고, 1.0 수치는 수정할수있게해주시고,첨부파일 현재진행 시점전 동그라미 친 부분 즉 마지막 피보나치 수치만 출력하고, 지표 고점 저점에 고저 가격 및 고저가격 진폭 수치를 텍스트 출력 부탁드립니다. 지표속성에서 선두께가 변경이안됩니다. 변경가능하게 부탁드립니다 Input:전환율(2); Var:j(0),상승(100),하락(-100),상승률(0),하락률(0),기준고(0),기준저(0), 기준고Bar(0),기준저Bar(0),추세(0),ZZ(0),TL1(0),TL2(0),방향(0); Array:고[20](0),저[20](0),고Bar[20](0),저Bar[20](0),고Idx[20](0),저Idx[20](0); 상승률 = 1 + (전환율/100); 하락률 = 1 - (전환율/100); #---------------------------------------------------------# # Index()와 마찬가지로 1봉이 바뀔 때마다 1씩 증가 #---------------------------------------------------------# for j = 1 to 19 { 고Bar[j] = 고Bar[j] + 1; 저Bar[j] = 저Bar[j] + 1; 고Idx[j] = Index - 고Bar[j]; 저Idx[j] = Index - 저Bar[j]; } #---------------------------------------------------------# # 최근 고,저 갱신 #---------------------------------------------------------# if 기준고 <= H or 기준고 == 0 then { 기준고 = H; 기준고Bar = 0; } else 기준고Bar = 기준고Bar + 1; if 기준저 >= L or 기준저 == 0 then { 기준저 = L; 기준저Bar = 0; } else 기준저Bar = 기준저Bar + 1; #---------------------------------------------------------# # 파동 계산 Main #---------------------------------------------------------# if 기준고 * 하락률 <= H[1] and 기준고 * 하락률 > H then 추세 = 하락; else if 기준저 * 상승률 >= L[1] and 기준저 * 상승률 < L then 추세 = 상승; if 추세[1] == 상승 and 추세 == 하락 then { for j = 18 downto 1 { 고[j+1] = 고[j]; 고Bar[j+1] = 고Bar[j]; 고Idx[j+1] = 고Idx[j]; } 고[1] = 기준고; 고Bar[1] = 기준고Bar; 고Idx[1] = Index - 고Bar[1]; ZZ = 기준고; 기준고 = H; 기준고Bar = 0; 기준저 = L; 기준저Bar = 0; } if 추세[1] == 하락 and 추세 == 상승 then { for j = 18 downto 1 { 저[j+1] = 저[j]; 저Bar[j+1] = 저Bar[j]; 저Idx[j+1] = 저Idx[j]; } 저[1] = 기준저; 저Bar[1] = 기준저Bar; 저Idx[1] = Index - 저Bar[1]; ZZ = 기준저; 기준저 = L; 기준저Bar = 0; 기준고 = H; 기준고Bar = 0; } if ZZ[1] != ZZ then { if 추세 == 상승 Then{ TL1 = TL_New(sdate[고bar[1]],stime[고bar[1]],고[1],sdate[저bar[1]],stime[저bar[1]],저[1]); TL_SetColor(TL1,BLUE); } if 추세 == 하락 Then{ TL1 = TL_New(sdate[저bar[1]],stime[저bar[1]],저[1],sdate[고bar[1]],stime[고bar[1]],고[1]); TL_SetColor(TL1,RED); } } TL_Delete(TL2); if ZZ[1] == ZZ then { if 추세 == 상승 Then{ TL2 = TL_New(sdate[저bar[1]],stime[저bar[1]],저[1],sdate,stime,c); TL_SetColor(TL2,RED); } if 추세 == 하락 Then{ TL2 = TL_New(sdate[고bar[1]],stime[고bar[1]],고[1],sdate,stime,c); TL_SetColor(TL2,BLUE); } }
지표
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2014-07-25 13:59:51

안녕하세요 예스스탁입니다. Input:전환율(2),지그재그굵기(0),굵기100(0),굵기236(0),굵기382(0),굵기500(0),굵기618(0),굵기0(0); Var:j(0),상승(100),하락(-100),상승률(0),하락률(0),기준고(0),기준저(0), 기준고Bar(0),기준저Bar(0),추세(0),ZZ(0),TL1(0),TL2(0),방향(0); var :TL11(0),TL12(0),TL13(0),TL14(0),TL15(0),TL16(0); var :Tx11(0),Tx12(0),Tx13(0),Tx14(0),Tx15(0),Tx16(0); Array:고[20](0),저[20](0),고Bar[20](0),저Bar[20](0),고Idx[20](0),저Idx[20](0); 상승률 = 1 + (전환율/100); 하락률 = 1 - (전환율/100); #---------------------------------------------------------# # Index()와 마찬가지로 1봉이 바뀔 때마다 1씩 증가 #---------------------------------------------------------# for j = 1 to 19 { 고Bar[j] = 고Bar[j] + 1; 저Bar[j] = 저Bar[j] + 1; 고Idx[j] = Index - 고Bar[j]; 저Idx[j] = Index - 저Bar[j]; } #---------------------------------------------------------# # 최근 고,저 갱신 #---------------------------------------------------------# if 기준고 <= H or 기준고 == 0 then { 기준고 = H; 기준고Bar = 0; } else 기준고Bar = 기준고Bar + 1; if 기준저 >= L or 기준저 == 0 then { 기준저 = L; 기준저Bar = 0; } else 기준저Bar = 기준저Bar + 1; #---------------------------------------------------------# # 파동 계산 Main #---------------------------------------------------------# if 기준고 * 하락률 <= H[1] and 기준고 * 하락률 > H then 추세 = 하락; else if 기준저 * 상승률 >= L[1] and 기준저 * 상승률 < L then 추세 = 상승; if 추세[1] == 상승 and 추세 == 하락 then { for j = 18 downto 1 { 고[j+1] = 고[j]; 고Bar[j+1] = 고Bar[j]; 고Idx[j+1] = 고Idx[j]; } 고[1] = 기준고; 고Bar[1] = 기준고Bar; 고Idx[1] = Index - 고Bar[1]; ZZ = 기준고; 기준고 = H; 기준고Bar = 0; 기준저 = L; 기준저Bar = 0; } if 추세[1] == 하락 and 추세 == 상승 then { for j = 18 downto 1 { 저[j+1] = 저[j]; 저Bar[j+1] = 저Bar[j]; 저Idx[j+1] = 저Idx[j]; } 저[1] = 기준저; 저Bar[1] = 기준저Bar; 저Idx[1] = Index - 저Bar[1]; ZZ = 기준저; 기준저 = L; 기준저Bar = 0; 기준고 = H; 기준고Bar = 0; } if ZZ[1] != ZZ then { if 추세 == 상승 Then{ TL1 = TL_New(sdate[고bar[1]],stime[고bar[1]],고[1],sdate[저bar[1]],stime[저bar[1]],저[1]); TL_SetColor(TL1,BLUE); TL_SetSize(TL1,지그재그굵기); TL_delete(TL11); TL_delete(TL12); TL_delete(TL13); TL_delete(TL14); TL_delete(TL15); TL_delete(TL16); TL11 = TL_New(sdate[고bar[1]],stime[고bar[1]],고[1],sdate[저bar[1]],stime[저bar[1]],고[1]); TL12 = TL_New(sdate[고bar[1]],stime[고bar[1]],고[1]-(고[1]-저[1])*0.236,sdate[저bar[1]],stime[저bar[1]],고[1]-(고[1]-저[1])*0.236); TL13 = TL_New(sdate[고bar[1]],stime[고bar[1]],고[1]-(고[1]-저[1])*0.382,sdate[저bar[1]],stime[저bar[1]],고[1]-(고[1]-저[1])*0.382); TL14 = TL_New(sdate[고bar[1]],stime[고bar[1]],고[1]-(고[1]-저[1])*0.500,sdate[저bar[1]],stime[저bar[1]],고[1]-(고[1]-저[1])*0.500); TL15 = TL_New(sdate[고bar[1]],stime[고bar[1]],고[1]-(고[1]-저[1])*0.618,sdate[저bar[1]],stime[저bar[1]],고[1]-(고[1]-저[1])*0.618); TL16 = TL_New(sdate[고bar[1]],stime[고bar[1]],저[1],sdate[저bar[1]],stime[저bar[1]],저[1]); TL_SetSize(TL11,굵기100);TL_SetSize(TL12,굵기236);TL_SetSize(TL13,굵기382);TL_SetSize(TL14,굵기500);TL_SetSize(TL15,굵기618);TL_SetSize(TL16,굵기0); TL_SetColor(TL11,BLUE);TL_SetColor(TL12,BLUE);TL_SetColor(TL13,BLUE);TL_SetColor(TL14,BLUE);TL_SetColor(TL15,BLUE);TL_SetColor(TL16,BLUE); Text_Delete(tx11); Text_Delete(tx12); Text_Delete(tx13); Text_Delete(tx14); Text_Delete(tx15); Text_Delete(tx16); tx11 = Text_New(sdate[고bar[1]],stime[고bar[1]],고[1],"100%"+NumToStr(고[1],2)); tx12 = Text_New(sdate[고bar[1]],stime[고bar[1]],고[1]-(고[1]-저[1])*0.236,"23.6%"+NumToStr(고[1]-(고[1]-저[1])*0.236,2)); tx13 = Text_New(sdate[고bar[1]],stime[고bar[1]],고[1]-(고[1]-저[1])*0.382,"38.1%"+NumToStr(고[1]-(고[1]-저[1])*0.382,2)); tx14 = Text_New(sdate[고bar[1]],stime[고bar[1]],고[1]-(고[1]-저[1])*0.500,"50.0%"+NumToStr(고[1]-(고[1]-저[1])*0.500,2)); tx15 = Text_New(sdate[고bar[1]],stime[고bar[1]],고[1]-(고[1]-저[1])*0.618,"61.8%"+NumToStr(고[1]-(고[1]-저[1])*0.618,2)); tx16 = Text_New(sdate[고bar[1]],stime[고bar[1]],저[1],"0%"+NumToStr(저[1],2)); Text_setColor(tx11,blue); Text_setColor(tx12,blue); Text_setColor(tx13,blue); Text_setColor(tx14,blue); Text_setColor(tx15,blue); Text_setColor(tx16,blue); text_setstyle(tx11,0,1); text_setstyle(tx12,0,1); text_setstyle(tx13,0,1); text_setstyle(tx14,0,1); text_setstyle(tx15,0,1); text_setstyle(tx16,0,1); } if 추세 == 하락 Then{ TL1 = TL_New(sdate[저bar[1]],stime[저bar[1]],저[1],sdate[고bar[1]],stime[고bar[1]],고[1]); TL_SetColor(TL1,red); TL_SetSize(TL1,지그재그굵기); TL_delete(TL11); TL_delete(TL12); TL_delete(TL13); TL_delete(TL14); TL_delete(TL15); TL_delete(TL16); TL11 = TL_New(sdate[고bar[1]],stime[고bar[1]],고[1],sdate[저bar[1]],stime[저bar[1]],고[1]); TL12 = TL_New(sdate[고bar[1]],stime[고bar[1]],고[1]-(고[1]-저[1])*0.236,sdate[저bar[1]],stime[저bar[1]],고[1]-(고[1]-저[1])*0.236); TL13 = TL_New(sdate[고bar[1]],stime[고bar[1]],고[1]-(고[1]-저[1])*0.382,sdate[저bar[1]],stime[저bar[1]],고[1]-(고[1]-저[1])*0.382); TL14 = TL_New(sdate[고bar[1]],stime[고bar[1]],고[1]-(고[1]-저[1])*0.500,sdate[저bar[1]],stime[저bar[1]],고[1]-(고[1]-저[1])*0.500); TL15 = TL_New(sdate[고bar[1]],stime[고bar[1]],고[1]-(고[1]-저[1])*0.618,sdate[저bar[1]],stime[저bar[1]],고[1]-(고[1]-저[1])*0.618); TL16 = TL_New(sdate[고bar[1]],stime[고bar[1]],저[1],sdate[저bar[1]],stime[저bar[1]],저[1]); TL_SetSize(TL11,굵기100);TL_SetSize(TL12,굵기236);TL_SetSize(TL13,굵기382);TL_SetSize(TL14,굵기500);TL_SetSize(TL15,굵기618);TL_SetSize(TL16,굵기0); TL_SetColor(TL11,red);TL_SetColor(TL12,red);TL_SetColor(TL13,red);TL_SetColor(TL14,red);TL_SetColor(TL15,red);TL_SetColor(TL16,red); Text_Delete(tx11); Text_Delete(tx12); Text_Delete(tx13); Text_Delete(tx14); Text_Delete(tx15); Text_Delete(tx16); tx11 = Text_New(sdate[저bar[1]],stime[저bar[1]],고[1],"100%"+NumToStr(고[1],2)); tx12 = Text_New(sdate[저bar[1]],stime[저bar[1]],고[1]-(고[1]-저[1])*0.236,"23.6%"+NumToStr(고[1]-(고[1]-저[1])*0.236,2)); tx13 = Text_New(sdate[저bar[1]],stime[저bar[1]],고[1]-(고[1]-저[1])*0.382,"38.1%"+NumToStr(고[1]-(고[1]-저[1])*0.382,2)); tx14 = Text_New(sdate[저bar[1]],stime[저bar[1]],고[1]-(고[1]-저[1])*0.500,"50.0%"+NumToStr(고[1]-(고[1]-저[1])*0.500,2)); tx15 = Text_New(sdate[저bar[1]],stime[저bar[1]],고[1]-(고[1]-저[1])*0.618,"61.8%"+NumToStr(고[1]-(고[1]-저[1])*0.618,2)); tx16 = Text_New(sdate[저bar[1]],stime[저bar[1]],저[1],"0%"+NumToStr(저[1],2)); Text_setColor(tx11,red); Text_setColor(tx12,red); Text_setColor(tx13,red); Text_setColor(tx14,red); Text_setColor(tx15,red); Text_setColor(tx16,red); text_setstyle(tx11,0,1); text_setstyle(tx12,0,1); text_setstyle(tx13,0,1); text_setstyle(tx14,0,1); text_setstyle(tx15,0,1); text_setstyle(tx16,0,1); } } TL_Delete(TL2); if ZZ[1] == ZZ then { if 추세 == 상승 Then{ TL2 = TL_New(sdate[저bar[1]],stime[저bar[1]],저[1],sdate,stime,c); TL_SetColor(TL2,RED); } if 추세 == 하락 Then{ TL2 = TL_New(sdate[고bar[1]],stime[고bar[1]],고[1],sdate,stime,c); TL_SetColor(TL2,BLUE); } } 즐거운 하루되세요 > 해피데이m 님이 쓴 글입니다. > 제목 : 문의드립니다 > 아래 지표를 첨부파일 처럼 피보나치 수평선 출력하고,피보나치 출력조건은 고점 저점 폭이 1.0 이상일때만 출력되게하고, 1.0 수치는 수정할수있게해주시고,첨부파일 현재진행 시점전 동그라미 친 부분 즉 마지막 피보나치 수치만 출력하고, 지표 고점 저점에 고저 가격 및 고저가격 진폭 수치를 텍스트 출력 부탁드립니다. 지표속성에서 선두께가 변경이안됩니다. 변경가능하게 부탁드립니다 Input:전환율(2); Var:j(0),상승(100),하락(-100),상승률(0),하락률(0),기준고(0),기준저(0), 기준고Bar(0),기준저Bar(0),추세(0),ZZ(0),TL1(0),TL2(0),방향(0); Array:고[20](0),저[20](0),고Bar[20](0),저Bar[20](0),고Idx[20](0),저Idx[20](0); 상승률 = 1 + (전환율/100); 하락률 = 1 - (전환율/100); #---------------------------------------------------------# # Index()와 마찬가지로 1봉이 바뀔 때마다 1씩 증가 #---------------------------------------------------------# for j = 1 to 19 { 고Bar[j] = 고Bar[j] + 1; 저Bar[j] = 저Bar[j] + 1; 고Idx[j] = Index - 고Bar[j]; 저Idx[j] = Index - 저Bar[j]; } #---------------------------------------------------------# # 최근 고,저 갱신 #---------------------------------------------------------# if 기준고 <= H or 기준고 == 0 then { 기준고 = H; 기준고Bar = 0; } else 기준고Bar = 기준고Bar + 1; if 기준저 >= L or 기준저 == 0 then { 기준저 = L; 기준저Bar = 0; } else 기준저Bar = 기준저Bar + 1; #---------------------------------------------------------# # 파동 계산 Main #---------------------------------------------------------# if 기준고 * 하락률 <= H[1] and 기준고 * 하락률 > H then 추세 = 하락; else if 기준저 * 상승률 >= L[1] and 기준저 * 상승률 < L then 추세 = 상승; if 추세[1] == 상승 and 추세 == 하락 then { for j = 18 downto 1 { 고[j+1] = 고[j]; 고Bar[j+1] = 고Bar[j]; 고Idx[j+1] = 고Idx[j]; } 고[1] = 기준고; 고Bar[1] = 기준고Bar; 고Idx[1] = Index - 고Bar[1]; ZZ = 기준고; 기준고 = H; 기준고Bar = 0; 기준저 = L; 기준저Bar = 0; } if 추세[1] == 하락 and 추세 == 상승 then { for j = 18 downto 1 { 저[j+1] = 저[j]; 저Bar[j+1] = 저Bar[j]; 저Idx[j+1] = 저Idx[j]; } 저[1] = 기준저; 저Bar[1] = 기준저Bar; 저Idx[1] = Index - 저Bar[1]; ZZ = 기준저; 기준저 = L; 기준저Bar = 0; 기준고 = H; 기준고Bar = 0; } if ZZ[1] != ZZ then { if 추세 == 상승 Then{ TL1 = TL_New(sdate[고bar[1]],stime[고bar[1]],고[1],sdate[저bar[1]],stime[저bar[1]],저[1]); TL_SetColor(TL1,BLUE); } if 추세 == 하락 Then{ TL1 = TL_New(sdate[저bar[1]],stime[저bar[1]],저[1],sdate[고bar[1]],stime[고bar[1]],고[1]); TL_SetColor(TL1,RED); } } TL_Delete(TL2); if ZZ[1] == ZZ then { if 추세 == 상승 Then{ TL2 = TL_New(sdate[저bar[1]],stime[저bar[1]],저[1],sdate,stime,c); TL_SetColor(TL2,RED); } if 추세 == 하락 Then{ TL2 = TL_New(sdate[고bar[1]],stime[고bar[1]],고[1],sdate,stime,c); TL_SetColor(TL2,BLUE); } }