커뮤니티

키움식 변경 부탁드립니다.

프로필 이미지
cs아빠
2021-12-02 18:11:17
941
글번호 154126
답변완료
함수 : 상한계산(day) (nPreDayHigh(day) == nPreDayClose(day)) and 상하루전 = (IF(nPreDayClose(day)<1000, nPreDayClose(day)+1, IF(nPreDayClose(day)<5000, nPreDayClose(day)+5, IF(nPreDayClose(day)<10000, nPreDayClose(day)+10, IF(nPreDayClose(day)<50000, nPreDayClose(day)+50, IF(nPreDayClose(day)<100000, nPreDayClose(day)+100, IF(nPreDayClose(day)<500000, nPreDayClose(day)+500, nPreDayClose(day)+1000))))))); IF(Date >= 20150615, 상하루전 / nPreDayClose(day+1) > 1.30, 상하루전 / nPreDayClose(day+1) > 1.15); 함수 : JL (date < 20150615 and (dayhigh() == dayclose()) and ((if(dayclose()<5000,dayclose()+5, if(dayclose()<10000,dayclose()+10, if(c<50000,dayclose()+50, if(c<100000,dayclose()+100, if(c<500000,dayclose()+500,dayclose()+1000)))))) / PreDayClose() > 1.15)) or (date >= 20150615 and (dayhigh() == dayclose()) and ((if(dayclose()<5000,dayclose()+5, if(dayclose()<10000,dayclose()+10, if(c<50000,dayclose()+50, if(c<100000,dayclose()+100, if(c<500000,dayclose()+500,c+1000)))))) / PreDayClose() > 1.3)); (nPreDayHigh(day) == nPreDayClose(day)) and 상하루전 = (IF(nPreDayClose(day)<1000, nPreDayClose(day)+1, IF(nPreDayClose(day)<5000, nPreDayClose(day)+5, IF(nPreDayClose(day)<10000, nPreDayClose(day)+10, IF(nPreDayClose(day)<50000, nPreDayClose(day)+50, IF(nPreDayClose(day)<100000, nPreDayClose(day)+100, IF(nPreDayClose(day)<500000, nPreDayClose(day)+500, nPreDayClose(day)+1000))))))); IF(Date >= 20150615, 상하루전 / nPreDayClose(day+1) > 1.30, 상하루전 / nPreDayClose(day+1) > 1.15); 수식 1 : Q1 D = CountSince(상한계산(1), Date != Date(1)); HH = max(dayhigh(),predayhigh(),npredayhigh(2),npredayhigh(3),npredayhigh(4),npredayhigh(5),npredayhigh(6)); H1 = max(dayhigh(),predayhigh(),npredayhigh(2)); DZ = valuewhen(1, 상한계산(1) , max(dayhigh(),predayhigh())); DZ2 = if(D < 2,H1,HH); DZ3 = if(D < 3,H1,HH); DZ4 = if(D < 4,H1,HH); DZ9= max(dayhigh(),predayhigh(),npredayhigh(2)); DZ10 = max(npredayhigh(2),npredayhigh(3)); DZ11 = max(predayhigh(),npredayhigh(2),npredayhigh(3)); DL = LowestSince(1, Crossdown(RSI(14),30) and !JL() ,L); DLL = if(상한계산(1),DL(78),if(상한계산(2),DL(156),if(상한계산(3),DL(234),if(상한계산(4),DL(312),if(상한계산(5),DL(390),DL(468)))))); Q1= (DZ-DLL)*(1-0.236)+DLL; Q2= (DZ2-DLL)*(1-0.5)+DLL; Q1C = if(DZ9 >= DZ,2,1); if(D < Q1C,Q1,0); 수식 2 : Q2 Q2C = if(DZ10 >= DZ4,6, if(DZ11 >= DZ3,5,4)); if(D < Q2C,Q2,0); ==> Plot1 에 Q1, Plot2 에 Q2 가 나오도록 부탁드립니다.
지표
답변 2
프로필 이미지

예스스탁 예스스탁 답변

2021-12-03 13:21:15

안녕하세요 예스스탁입니다. 1번,2번을 사용자함수로 만드신 후에 3번식 지표로 작성해 적용하시면 됩니다. 1 사용자함수명 : 상한계산 반환값형 : 논리형 input : day(Numeric); var : 상하루전(0); 상하루전 = 0; if DayHigh(day) == DayClose(day) then { 상하루전 = (IFf(DayClose(day)<1000, DayClose(day)+1, IfF(DayClose(day)<5000, DayClose(day)+5, IfF(DayClose(day)<10000, DayClose(day)+10, IfF(DayClose(day)<50000, DayClose(day)+50, IfF(DayClose(day)<100000, DayClose(day)+100, IfF(DayClose(day)<500000, DayClose(day)+500, DayClose(day)+1000))))))); } if sDate >= 20150615 then { if 상하루전 / DayClose(day+1) > 1.30 Then 상한계산 = true; Else 상한계산 = False; } Else { if 상하루전 / DayClose(day+1) > 1.15 Then 상한계산 = true; Else 상한계산 = False; } 2 사용자함수명 : JL 반환값형 : 논리형 JL = (date < 20150615 and (dayhigh() == dayclose()) and ((iff(dayclose()<5000,dayclose()+5, iff(dayclose()<10000,dayclose()+10, iff(c<50000,dayclose()+50, iff(c<100000,dayclose()+100, iff(c<500000,dayclose()+500,dayclose()+1000)))))) / DayClose(1) > 1.15)) or (date >= 20150615 and (dayhigh() == dayclose()) and ((iff(dayclose()<5000,dayclose()+5, iff(dayclose()<10000,dayclose()+10, iff(c<50000,dayclose()+50, iff(c<100000,dayclose()+100, iff(c<500000,dayclose()+500,c+1000)))))) / DayClose(1) > 1.3)); 3 var : DD(-1),HH(0),H1(0),DZ(0),DZ2(0),DZ3(0),DZ4(0),DZ9(0),DZ10(0),DZ11(0),RSIV(0); var : DL(0),DLL(0),Q1(0),Q2(0),Q1C(0),Q2C(0); if sDate != sDate[1] Then { if 상한계산(1) == true then { DD = 0; } if DD >= 0 Then DD = DD+1; } HH = max(dayhigh(),dayhigh(1),dayhigh(2),dayhigh(3),dayhigh(4),dayhigh(5),dayhigh(6)); H1 = max(dayhigh(),dayhigh(1),dayhigh(2)); if 상한계산(1) == true Then DZ = max(dayhigh(),dayhigh(1)); DZ2 = iff(DD < 2,H1,HH); DZ3 = iff(DD < 3,H1,HH); DZ4 = iff(DD < 4,H1,HH); DZ9= max(dayhigh(),dayhigh(1),dayhigh(2)); DZ10 = max(dayhigh(2),dayhigh(3)); DZ11 = max(dayhigh(1),dayhigh(2),dayhigh(3)); RSIV = RSI(14); if CrossDown(RSIV,30) and JL == False Then { DL = L; } Else { if DL > 0 and L < DL Then DL = L; } DLL = iff(상한계산(1)==true,DL[78],iff(상한계산(2),DL[156],iff(상한계산(3),DL[234],iff(상한계산(4),DL[312],iff(상한계산(5),DL[390],DL[468]))))); Q1= (DZ-DLL)*(1-0.236)+DLL; Q2= (DZ2-DLL)*(1-0.5)+DLL; Q1C = iff(DZ9 >= DZ,2,1); if DD < Q1C then var1 = Q1; Q2C = iff(DZ10 >= DZ4,6,iff(DZ11 >= DZ3,5,4)); if DD < Q2C Then Var2 = Q2; Plot1(var1,"Q1"); plot2(Var2,"Q2"); 즐거운 하루되세요 > cs아빠 님이 쓴 글입니다. > 제목 : 키움식 변경 부탁드립니다. > 함수 : 상한계산(day) (nPreDayHigh(day) == nPreDayClose(day)) and 상하루전 = (IF(nPreDayClose(day)<1000, nPreDayClose(day)+1, IF(nPreDayClose(day)<5000, nPreDayClose(day)+5, IF(nPreDayClose(day)<10000, nPreDayClose(day)+10, IF(nPreDayClose(day)<50000, nPreDayClose(day)+50, IF(nPreDayClose(day)<100000, nPreDayClose(day)+100, IF(nPreDayClose(day)<500000, nPreDayClose(day)+500, nPreDayClose(day)+1000))))))); IF(Date >= 20150615, 상하루전 / nPreDayClose(day+1) > 1.30, 상하루전 / nPreDayClose(day+1) > 1.15); 함수 : JL (date < 20150615 and (dayhigh() == dayclose()) and ((if(dayclose()<5000,dayclose()+5, if(dayclose()<10000,dayclose()+10, if(c<50000,dayclose()+50, if(c<100000,dayclose()+100, if(c<500000,dayclose()+500,dayclose()+1000)))))) / PreDayClose() > 1.15)) or (date >= 20150615 and (dayhigh() == dayclose()) and ((if(dayclose()<5000,dayclose()+5, if(dayclose()<10000,dayclose()+10, if(c<50000,dayclose()+50, if(c<100000,dayclose()+100, if(c<500000,dayclose()+500,c+1000)))))) / PreDayClose() > 1.3)); (nPreDayHigh(day) == nPreDayClose(day)) and 상하루전 = (IF(nPreDayClose(day)<1000, nPreDayClose(day)+1, IF(nPreDayClose(day)<5000, nPreDayClose(day)+5, IF(nPreDayClose(day)<10000, nPreDayClose(day)+10, IF(nPreDayClose(day)<50000, nPreDayClose(day)+50, IF(nPreDayClose(day)<100000, nPreDayClose(day)+100, IF(nPreDayClose(day)<500000, nPreDayClose(day)+500, nPreDayClose(day)+1000))))))); IF(Date >= 20150615, 상하루전 / nPreDayClose(day+1) > 1.30, 상하루전 / nPreDayClose(day+1) > 1.15); 수식 1 : Q1 D = CountSince(상한계산(1), Date != Date(1)); HH = max(dayhigh(),predayhigh(),npredayhigh(2),npredayhigh(3),npredayhigh(4),npredayhigh(5),npredayhigh(6)); H1 = max(dayhigh(),predayhigh(),npredayhigh(2)); DZ = valuewhen(1, 상한계산(1) , max(dayhigh(),predayhigh())); DZ2 = if(D < 2,H1,HH); DZ3 = if(D < 3,H1,HH); DZ4 = if(D < 4,H1,HH); DZ9= max(dayhigh(),predayhigh(),npredayhigh(2)); DZ10 = max(npredayhigh(2),npredayhigh(3)); DZ11 = max(predayhigh(),npredayhigh(2),npredayhigh(3)); DL = LowestSince(1, Crossdown(RSI(14),30) and !JL() ,L); DLL = if(상한계산(1),DL(78),if(상한계산(2),DL(156),if(상한계산(3),DL(234),if(상한계산(4),DL(312),if(상한계산(5),DL(390),DL(468)))))); Q1= (DZ-DLL)*(1-0.236)+DLL; Q2= (DZ2-DLL)*(1-0.5)+DLL; Q1C = if(DZ9 >= DZ,2,1); if(D < Q1C,Q1,0); 수식 2 : Q2 Q2C = if(DZ10 >= DZ4,6, if(DZ11 >= DZ3,5,4)); if(D < Q2C,Q2,0); ==> Plot1 에 Q1, Plot2 에 Q2 가 나오도록 부탁드립니다.
프로필 이미지

cs아빠

2021-12-03 13:39:08

감사드립니다.~~~