커뮤니티

중심선 매수

프로필 이미지
요타
2018-12-14 11:11:31
178
글번호 124439
답변완료
* 좋은 주말 되십시요. * 지그재그선 마지막선 기준으로 이전 3개선의 중심선좀 표현(그려주시고)해주시고 매매식좀 부탁 드립니다. 1. 마지막 중심선 이하 이면 매도 2. 마지막 중심선 이상 이면 매수 3. 마지막 중심선 고점 보다 높은 3개봉 이상 이면 매수 4. 마지막 중심선 저점 보다 낮은 3개봉 이상 이면 매도 수식좀 부탁 드립니다. 고맙습니다. ### ### 지그지그선 Input:length(15); Var:j(0),lastHiVal(0),lastLoVal(0),sBar(0),eBar(0),TL1(0),T(0),Text1(0),처리구분(""); Var:tl2(0),TL3(0),TL4(0),TL5(0); Array:고점[10,2](0),저점[10,2](0); 처리구분 = ""; If Highest(H,length) == H and lastHiVal <> H and Lowest(L,length) == L and lastLoVal <> L Then { If 저점[1,1] > L Then 처리구분 = "저점처리"; If 고점[1,1] < H Then 처리구분 = "고점처리"; } Else If Highest(H,length) == H and lastHiVal <> H Then 처리구분 = "고점처리"; Else If Lowest(L,length) == L and lastLoVal <> L Then 처리구분 = "저점처리"; If 처리구분 == "고점처리" Then { T = 1; lastHiVal = H; If 고점[1,2] < 저점[1,2] Then {For j = 10 DownTo 2 {고점[j,1] = 고점[j-1,1]; 고점[j,2] = 고점[j-1,2]; } } If 고점[1,2] < 저점[1,2] or 고점[1,1] < H Then { 고점[1,1] = H; 고점[1,2] = Index; sBar = Index - 저점[1,2]; eBar = 0; If TL_GetBeginDate(TL1) == sDate[sBar] and TL_GetBeginTime(TL1) == sTime[sBar] Then {TL_Delete(TL1); Text_Delete(Text1); } TL1 = TL_New(sDate[sBar],sTime[sBar],저점[1,1],sDate[eBar],sTime[eBar],고점[1,1]); } } If 처리구분 == "저점처리" Then { T = -1; lastLoVal = L; If 저점[1,2] < 고점[1,2] then {For j = 10 DownTo 2 {저점[j,1] = 저점[j-1,1]; 저점[j,2] = 저점[j-1,2]; }} If 저점[1,2] < 고점[1,2] or 저점[1,1] > L then { 저점[1,1] = L; 저점[1,2] = Index; sBar = Index - 고점[1,2]; eBar = 0; If TL_GetBeginDate(TL1) == sDate[sBar] and TL_GetBeginTime(TL1) == sTime[sBar] Then {TL_Delete(TL1); Text_Delete(Text1);} TL1 = TL_New(sDate[sBar],sTime[sBar],고점[1,1],sDate[eBar],sTime[eBar],저점[1,1]); } } TL_SetSize(TL1,1); * 좋은 주날 되십시요.
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2018-12-14 11:18:19

안녕하세요 예스스탁입니다. 1. Input:length(15); Var:j(0),lastHiVal(0),lastLoVal(0),sBar(0),eBar(0),T(0),처리구분(""); Var:TL1(0),tl2(0),TL3(0),TL4(0),TL5(0); Array:고점[10,2](0),저점[10,2](0); 처리구분 = ""; If Highest(H,length) == H and lastHiVal <> H and Lowest(L,length) == L and lastLoVal <> L Then { If 저점[1,1] > L Then 처리구분 = "저점처리"; If 고점[1,1] < H Then 처리구분 = "고점처리"; } Else If Highest(H,length) == H and lastHiVal <> H Then 처리구분 = "고점처리"; Else If Lowest(L,length) == L and lastLoVal <> L Then 처리구분 = "저점처리"; If 처리구분 == "고점처리" Then { T = 1; lastHiVal = H; If 고점[1,2] < 저점[1,2] Then { For j = 10 DownTo 2 { 고점[j,1] = 고점[j-1,1]; 고점[j,2] = 고점[j-1,2]; } } If 고점[1,2] < 저점[1,2] or 고점[1,1] < H Then { 고점[1,1] = H; 고점[1,2] = Index; sBar = Index - 저점[1,2]; eBar = 0; If TL_GetBeginDate(TL1) == sDate[sBar] and TL_GetBeginTime(TL1) == sTime[sBar] Then { TL_Delete(TL1); } TL1 = TL_New(sDate[sBar],sTime[sBar],저점[1,1],sDate[eBar],sTime[eBar],고점[1,1]); } if T[1] != 1 Then { TL5 = TL4[1]; TL4 = TL3[1]; TL3 = TL2[1]; TL_Delete(TL5); TL2 = TL_New(sDate[sBar],sTime[sBar],(고점[1,1]+저점[1,1])/2,sDate[eBar],sTime[eBar],(고점[1,1]+저점[1,1])/2); } TL_SetBegin(TL2,sDate[sBar],sTime[sBar],(고점[1,1]+저점[1,1])/2); TL_SetEnd(TL2,sDate[eBar],sTime[eBar],(고점[1,1]+저점[1,1])/2); } If 처리구분 == "저점처리" Then { T = -1; lastLoVal = L; If 저점[1,2] < 고점[1,2] then { For j = 10 DownTo 2 { 저점[j,1] = 저점[j-1,1]; 저점[j,2] = 저점[j-1,2]; } } If 저점[1,2] < 고점[1,2] or 저점[1,1] > L then { 저점[1,1] = L; 저점[1,2] = Index; sBar = Index - 고점[1,2]; eBar = 0; If TL_GetBeginDate(TL1) == sDate[sBar] and TL_GetBeginTime(TL1) == sTime[sBar] Then { TL_Delete(TL1); } TL1 = TL_New(sDate[sBar],sTime[sBar],고점[1,1],sDate[eBar],sTime[eBar],저점[1,1]); } if T[1] != -1 Then { TL5 = TL4[1]; TL4 = TL3[1]; TL3 = TL2[1]; TL_Delete(TL5); TL2 = TL_New(sDate[sBar],sTime[sBar],(고점[1,1]+저점[1,1])/2,sDate[eBar],sTime[eBar],(고점[1,1]+저점[1,1])/2); } TL_SetBegin(TL2,sDate[sBar],sTime[sBar],(고점[1,1]+저점[1,1])/2); TL_SetEnd(TL2,sDate[eBar],sTime[eBar],(고점[1,1]+저점[1,1])/2); } TL_SetSize(TL1,1); 2 Input:length(15); Var:j(0),lastHiVal(0),lastLoVal(0),sBar(0),eBar(0),T(0),처리구분(""); Var:TL1(0),tl2(0),TL3(0),TL4(0),TL5(0); Array:고점[10,2](0),저점[10,2](0); 처리구분 = ""; If Highest(H,length) == H and lastHiVal <> H and Lowest(L,length) == L and lastLoVal <> L Then { If 저점[1,1] > L Then 처리구분 = "저점처리"; If 고점[1,1] < H Then 처리구분 = "고점처리"; } Else If Highest(H,length) == H and lastHiVal <> H Then 처리구분 = "고점처리"; Else If Lowest(L,length) == L and lastLoVal <> L Then 처리구분 = "저점처리"; If 처리구분 == "고점처리" Then { T = 1; lastHiVal = H; If 고점[1,2] < 저점[1,2] Then { For j = 10 DownTo 2 { 고점[j,1] = 고점[j-1,1]; 고점[j,2] = 고점[j-1,2]; } } If 고점[1,2] < 저점[1,2] or 고점[1,1] < H Then { 고점[1,1] = H; 고점[1,2] = Index; sBar = Index - 저점[1,2]; eBar = 0; If TL_GetBeginDate(TL1) == sDate[sBar] and TL_GetBeginTime(TL1) == sTime[sBar] Then { TL_Delete(TL1); } TL1 = TL_New(sDate[sBar],sTime[sBar],저점[1,1],sDate[eBar],sTime[eBar],고점[1,1]); } if T[1] != 1 Then { TL5 = TL4[1]; TL4 = TL3[1]; TL3 = TL2[1]; TL_Delete(TL5); TL2 = TL_New(sDate[sBar],sTime[sBar],(고점[1,1]+저점[1,1])/2,sDate[eBar],sTime[eBar],(고점[1,1]+저점[1,1])/2); } TL_SetBegin(TL2,sDate[sBar],sTime[sBar],(고점[1,1]+저점[1,1])/2); TL_SetEnd(TL2,sDate[eBar],sTime[eBar],(고점[1,1]+저점[1,1])/2); if C > (고점[1,1]+저점[1,1])/2 Then buy(); if C < (고점[1,1]+저점[1,1])/2 Then sell(); if countif(C >고점[1,1],3) == 3 Then buy(); if countif(C <저점[1,1],3) == 3 Then sell(); } If 처리구분 == "저점처리" Then { T = -1; lastLoVal = L; If 저점[1,2] < 고점[1,2] then { For j = 10 DownTo 2 { 저점[j,1] = 저점[j-1,1]; 저점[j,2] = 저점[j-1,2]; } } If 저점[1,2] < 고점[1,2] or 저점[1,1] > L then { 저점[1,1] = L; 저점[1,2] = Index; sBar = Index - 고점[1,2]; eBar = 0; If TL_GetBeginDate(TL1) == sDate[sBar] and TL_GetBeginTime(TL1) == sTime[sBar] Then { TL_Delete(TL1); } TL1 = TL_New(sDate[sBar],sTime[sBar],고점[1,1],sDate[eBar],sTime[eBar],저점[1,1]); } if T[1] != -1 Then { TL5 = TL4[1]; TL4 = TL3[1]; TL3 = TL2[1]; TL_Delete(TL5); TL2 = TL_New(sDate[sBar],sTime[sBar],(고점[1,1]+저점[1,1])/2,sDate[eBar],sTime[eBar],(고점[1,1]+저점[1,1])/2); } TL_SetBegin(TL2,sDate[sBar],sTime[sBar],(고점[1,1]+저점[1,1])/2); TL_SetEnd(TL2,sDate[eBar],sTime[eBar],(고점[1,1]+저점[1,1])/2); if C > (고점[1,1]+저점[1,1])/2 Then buy(); if C < (고점[1,1]+저점[1,1])/2 Then sell(); if countif(C >고점[1,1],3) == 3 Then buy(); if countif(C <저점[1,1],3) == 3 Then sell(); } 즐거운 하루되세요 > 요타 님이 쓴 글입니다. > 제목 : 중심선 매수 > * 좋은 주말 되십시요. * 지그재그선 마지막선 기준으로 이전 3개선의 중심선좀 표현(그려주시고)해주시고 매매식좀 부탁 드립니다. 1. 마지막 중심선 이하 이면 매도 2. 마지막 중심선 이상 이면 매수 3. 마지막 중심선 고점 보다 높은 3개봉 이상 이면 매수 4. 마지막 중심선 저점 보다 낮은 3개봉 이상 이면 매도 수식좀 부탁 드립니다. 고맙습니다. ### ### 지그지그선 Input:length(15); Var:j(0),lastHiVal(0),lastLoVal(0),sBar(0),eBar(0),TL1(0),T(0),Text1(0),처리구분(""); Var:tl2(0),TL3(0),TL4(0),TL5(0); Array:고점[10,2](0),저점[10,2](0); 처리구분 = ""; If Highest(H,length) == H and lastHiVal <> H and Lowest(L,length) == L and lastLoVal <> L Then { If 저점[1,1] > L Then 처리구분 = "저점처리"; If 고점[1,1] < H Then 처리구분 = "고점처리"; } Else If Highest(H,length) == H and lastHiVal <> H Then 처리구분 = "고점처리"; Else If Lowest(L,length) == L and lastLoVal <> L Then 처리구분 = "저점처리"; If 처리구분 == "고점처리" Then { T = 1; lastHiVal = H; If 고점[1,2] < 저점[1,2] Then {For j = 10 DownTo 2 {고점[j,1] = 고점[j-1,1]; 고점[j,2] = 고점[j-1,2]; } } If 고점[1,2] < 저점[1,2] or 고점[1,1] < H Then { 고점[1,1] = H; 고점[1,2] = Index; sBar = Index - 저점[1,2]; eBar = 0; If TL_GetBeginDate(TL1) == sDate[sBar] and TL_GetBeginTime(TL1) == sTime[sBar] Then {TL_Delete(TL1); Text_Delete(Text1); } TL1 = TL_New(sDate[sBar],sTime[sBar],저점[1,1],sDate[eBar],sTime[eBar],고점[1,1]); } } If 처리구분 == "저점처리" Then { T = -1; lastLoVal = L; If 저점[1,2] < 고점[1,2] then {For j = 10 DownTo 2 {저점[j,1] = 저점[j-1,1]; 저점[j,2] = 저점[j-1,2]; }} If 저점[1,2] < 고점[1,2] or 저점[1,1] > L then { 저점[1,1] = L; 저점[1,2] = Index; sBar = Index - 고점[1,2]; eBar = 0; If TL_GetBeginDate(TL1) == sDate[sBar] and TL_GetBeginTime(TL1) == sTime[sBar] Then {TL_Delete(TL1); Text_Delete(Text1);} TL1 = TL_New(sDate[sBar],sTime[sBar],고점[1,1],sDate[eBar],sTime[eBar],저점[1,1]); } } TL_SetSize(TL1,1); * 좋은 주날 되십시요.