커뮤니티

시스템식부탁드립니다

프로필 이미지
당일선물
2022-12-04 13:16:15
1100
글번호 164318
답변완료
아래의 지표수식을 활용하여 지표[1] ( 타주기(15분) a < b or 타주기(5분) a < b ) and 현주기 a < b 이면 매수 ( 타주기(15분) a > b or 타주기(5분) a > b ) and 현주기 a > b 이면 매도 ##### 지표[2] ( 타주기(15분) dir == 1 or 타주기(5분) dor == 1 ) and 현주기 ▲ 이면 매수 ( 타주기(15분) dir == -1 or 타주기(5분) dir == -1 ) and 현주기 ▼ 이면 매도 //수식도움부탁드립니다. /////////지표[1] input : lengthh(22),k(true),gain(0.7); var : Price(0),hma(0),hma3(0),a(0),b(0),clr(0); var : kf1(0),dk1(0),smooth1(0),velo1(0),x1(0),g1(0); var : kf2(0),dk2(0),smooth2(0),velo2(0),x2(0),g2(0); price = (h+l)/2; hma = wma((2 * wma(price, lengthh / 2)) - wma(price, lengthh), round(sqrt(lengthh),0)); hma3= wma(wma(c, (lengthh/2)/3)*3 - wma(c, (lengthh/2)/2) - wma(c, (lengthh/2)), (lengthh/2)); x1 = hma; g1 = gain; kf1 = 0.0; dk1 = x1 - iff(isnan(kf1[1]) == False,kf1[1], x1); smooth1 = iff(isnan(kf1[1]) == False,kf1[1], x1)+dk1*sqrt(g1*2); velo1 = 0.0; velo1 = iff(isnan(velo1[1]) == False,velo1,0) + (g1*dk1); kf1 = smooth1+velo1; x2 = hma3; g2 = gain; kf2 = 0.0; dk2 = x2 - iff(isnan(kf2[1]) == False,kf2[1], x2); smooth2 = iff(isnan(kf2[1]) == False,kf2[1], x2)+dk2*sqrt(g2*2); velo2 = 0.0; velo2 = iff(isnan(velo2[1]) == False,velo2,0) + (g2*dk2); kf2 = smooth2+velo2; a = iff(k == true, kf1 , hma); b = iff(k == true, kf2 , hma3); clr = iff(b > a , red , lime); Plot1(kf1,"a",clr); Plot2(kf2,"b",clr); ////////// ////////지표[2] input : length(2),mult(2),useClose(true),크기(25); var : ATrv(0),longStop(0),longStopprev(0),shortStop(0),shortStopPrev(0); var : dir(1),longcolor(plum),shortcolor(lightblue),tx(0); atrv = mult * atr(length); longStop = IFf(useClose , highest(close, length) , highest(h,length)) - atrv; longStopPrev = longStop[1]; longStop = iff(close[1] > longStopPrev , max(longStop, longStopPrev) , longStop); shortStop = IFf(useClose , lowest(close, length) , lowest(L,length)) + atrv; shortStopPrev = shortStop[1]; shortStop = iff(close[1] < shortStopPrev , min(shortStop, shortStopPrev) , shortStop); dir = iff(close > shortStopPrev , 1 ,iff( close < longStopPrev , -1 , dir)); IF dir == 1 Then { plot1(longStop,"Long Stop",longColor); NoPlot(2); } Else { NoPlot(1); plot2(shortStop,"Short Stop",shortColor); } if dir == 1 and dir[1] == -1 Then { tx = Text_New(sDate,sTime,longStop,"▲"); Text_SetStyle(tx,2,0); Text_SetSize(tx, 크기); Text_SetColor(tx,longcolor); } if dir == -1 and dir[1] == 1 Then { tx = Text_New(sDate,sTime,shortStop,"▼"); Text_SetStyle(tx,2,1); Text_SetSize(tx, 크기); Text_SetColor(tx,shortcolor); } ////////////// 수고하세요
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2022-12-05 09:13:50

안녕하세요 예스스탁입니다. 올려주신 내용은 저희가 작성해 드리기 어렵습니다. 작성해 보는데 많은 시간이 소모됩니다. 업무상 일정시간 이상 요구되는 내용은 저희가 작성을 해드릴수 없습니다. 도움을 드리지 못해 죄송합니다. 즐거운 하루되세요 > 당일선물 님이 쓴 글입니다. > 제목 : 시스템식부탁드립니다 > 아래의 지표수식을 활용하여 지표[1] ( 타주기(15분) a < b or 타주기(5분) a < b ) and 현주기 a < b 이면 매수 ( 타주기(15분) a > b or 타주기(5분) a > b ) and 현주기 a > b 이면 매도 ##### 지표[2] ( 타주기(15분) dir == 1 or 타주기(5분) dor == 1 ) and 현주기 ▲ 이면 매수 ( 타주기(15분) dir == -1 or 타주기(5분) dir == -1 ) and 현주기 ▼ 이면 매도 //수식도움부탁드립니다. /////////지표[1] input : lengthh(22),k(true),gain(0.7); var : Price(0),hma(0),hma3(0),a(0),b(0),clr(0); var : kf1(0),dk1(0),smooth1(0),velo1(0),x1(0),g1(0); var : kf2(0),dk2(0),smooth2(0),velo2(0),x2(0),g2(0); price = (h+l)/2; hma = wma((2 * wma(price, lengthh / 2)) - wma(price, lengthh), round(sqrt(lengthh),0)); hma3= wma(wma(c, (lengthh/2)/3)*3 - wma(c, (lengthh/2)/2) - wma(c, (lengthh/2)), (lengthh/2)); x1 = hma; g1 = gain; kf1 = 0.0; dk1 = x1 - iff(isnan(kf1[1]) == False,kf1[1], x1); smooth1 = iff(isnan(kf1[1]) == False,kf1[1], x1)+dk1*sqrt(g1*2); velo1 = 0.0; velo1 = iff(isnan(velo1[1]) == False,velo1,0) + (g1*dk1); kf1 = smooth1+velo1; x2 = hma3; g2 = gain; kf2 = 0.0; dk2 = x2 - iff(isnan(kf2[1]) == False,kf2[1], x2); smooth2 = iff(isnan(kf2[1]) == False,kf2[1], x2)+dk2*sqrt(g2*2); velo2 = 0.0; velo2 = iff(isnan(velo2[1]) == False,velo2,0) + (g2*dk2); kf2 = smooth2+velo2; a = iff(k == true, kf1 , hma); b = iff(k == true, kf2 , hma3); clr = iff(b > a , red , lime); Plot1(kf1,"a",clr); Plot2(kf2,"b",clr); ////////// ////////지표[2] input : length(2),mult(2),useClose(true),크기(25); var : ATrv(0),longStop(0),longStopprev(0),shortStop(0),shortStopPrev(0); var : dir(1),longcolor(plum),shortcolor(lightblue),tx(0); atrv = mult * atr(length); longStop = IFf(useClose , highest(close, length) , highest(h,length)) - atrv; longStopPrev = longStop[1]; longStop = iff(close[1] > longStopPrev , max(longStop, longStopPrev) , longStop); shortStop = IFf(useClose , lowest(close, length) , lowest(L,length)) + atrv; shortStopPrev = shortStop[1]; shortStop = iff(close[1] < shortStopPrev , min(shortStop, shortStopPrev) , shortStop); dir = iff(close > shortStopPrev , 1 ,iff( close < longStopPrev , -1 , dir)); IF dir == 1 Then { plot1(longStop,"Long Stop",longColor); NoPlot(2); } Else { NoPlot(1); plot2(shortStop,"Short Stop",shortColor); } if dir == 1 and dir[1] == -1 Then { tx = Text_New(sDate,sTime,longStop,"▲"); Text_SetStyle(tx,2,0); Text_SetSize(tx, 크기); Text_SetColor(tx,longcolor); } if dir == -1 and dir[1] == 1 Then { tx = Text_New(sDate,sTime,shortStop,"▼"); Text_SetStyle(tx,2,1); Text_SetSize(tx, 크기); Text_SetColor(tx,shortcolor); } ////////////// 수고하세요