커뮤니티

부탁드립니다

프로필 이미지
당일선물
2022-10-27 13:25:57
1152
글번호 163325
답변완료
수고하십니다. 타주기(15)분 macd osc > 0 and 타주기(15)분 rsi(14) > 50 and 타주기(15)분 stoK > 50 일 때 (타주기아닌 현재 분설정) stoK 가 stoD를 상향돌파할때 매수 를 시스템식으로 부탁드립니다. ============ 스토캐스틱RSI 지표수식은 79310 번 글과 작성해주신 수식을 활용하면 될 듯합니다. 감사합니다
시스템
답변 2
프로필 이미지

예스스탁 예스스탁 답변

2022-10-28 10:27:13

안녕하세요 예스스탁입니다. input : 타주기분(15),short(12),long(26),sig(9), RSILength(14); var : Sto1(10),Sto2(5),Sto3(5); var : Period1(10),Period2(5),Period3(5); var : S1(0),D1(0),TM(0),EP1(0),EP2(0),EP3(0),MACDO(0); var : TF(0),xma1(0),xma2(0),idx(0),Prexma1(0),Prexma2(0),MACDV(0),MACDS(0),PreMACDS(0); var : SigSum(0),count2(0),RSIsig(0),cnt(0); Var : Counter(0), DownAmt(0), UpAmt(0), UpSum(0), DownSum(0), UpAvg(0), DownAvg(0); var : PreUpAvg(0), preDownAvg(0),RSIV(0); var : Hv(0), LV(0), FK(0), SK(0), SD(0); var : sEp1(0), sEP2(0), JISU(0), DINDEX(0), PreSK(0), PreSD(0); var : stok(0),stod(0); Array : C1[100](0),HH[100](0),LL[100](0); Ep1 = 2/(short+1); Ep2 = 2/(long+1); Ep3 = 2/(sig+1); sEp1 = 2/(sto2+1); sEp2 = 2/(sto3+1); stok = StochasticsK(Period1,Period2); stod = Stochasticsd(Period1,Period2,Period3); if Bdate != Bdate[1] Then { S1 = TimeToMinutes(stime); D1 = sdate; } if D1 > 0 then { if sdate == D1 Then TM = TimeToMinutes(stime)-S1; Else TM = TimeToMinutes(stime)+1440-S1; TF = TM%타주기분; if Bdate != Bdate[1] or (Bdate == Bdate[1] and 타주기분 > 1 and TF < TF[1]) or (Bdate == Bdate[1] and 타주기분 > 1 and TM >= TM[1]+타주기분) or (Bdate == Bdate[1] and 타주기분 == 1 and TM > TM[1]) Then { HH[0] = H; LL[0] = L; for cnt = 1 to 99 { C1[cnt] = C1[cnt-1][1]; HH[cnt] = HH[cnt-1][1]; LL[cnt] = LL[cnt-1][1]; } Prexma1 = xma1[1]; Prexma2 = xma2[1]; PreMACDS = MACDS[1]; PreUpAvg = UpAvg[1]; preDownAvg = DownAvg[1]; idx = idx + 1; } if H > HH[0] Then HH[0] = H; if L < LL[0] Then LL[0] = L; C1[0] = C; if idx <= 1 then { xma1 = C; xma2 = C; MACDV = xma1-xma2; MACDS = MACDV; MACDO = MACDV-MACDS; } else{ xma1 = C * EP1 + Prexma1 * (1-EP1); xma2 = C * EP2 + Prexma2 * (1-EP2); MACDV = xma1-xma2; MACDS = MACDV * EP3 + PreMACDS * (1-EP3); MACDO = MACDV-MACDS; } If idx == RSILength+2 Then { UpSum = 0; DownSum = 0; For Counter = 0 To RSILength - 1 { UpAmt = C1[Counter] - C1[Counter+1]; If UpAmt >= 0 Then DownAmt = 0; Else { DownAmt = -UpAmt; UpAmt = 0; } UpSum = UpSum + UpAmt; DownSum = DownSum + DownAmt; } UpAvg = UpSum / RSILength; DownAvg = DownSum / RSILength; } If idx > RSILength+2 Then { UpAmt = C1[0] - C1[1]; If UpAmt >= 0 Then DownAmt = 0; Else { DownAmt = -UpAmt; UpAmt = 0; } UpAvg = (PreUpAvg * (RSILength - 1) + UpAmt) / RSILength; DownAvg = (preDownAvg * (RSILength - 1) + DownAmt) / RSILength; } If UpAvg + DownAvg <> 0 Then RSIv = 100 * UpAvg / (UpAvg + DownAvg); Else RSIv = 0; if HH[sto1-1] > 0 and LL[sto1-1] > 0 then { if bdate != bdate[1] or (Bdate == Bdate[1] and TF < TF[1]) or stime == 154500 Then{ DINDEX = DINDEX+1; PreSK = SK[1]; PreSD = SD[1]; } Hv = HH[0]; LV = LL[0]; for cnt = 0 to sto1-1 { if HH[cnt] > Hv then Hv = HH[cnt]; if LL[cnt] < LV then LV = LL[cnt]; } FK = (C-LV)/(HV-LV)*100; if DINDEX <= 1 then { SK = FK; SD = SK; } else { SK = FK * EP1 + PreSK * (1-EP1); SD = SK * EP2 + PreSD * (1-EP2); } } if macdo > 0 and rsiv > 50 and SK > 50 and CrossUp(stok,stod) Then Buy(); } 즐거운 하루되세요 > 당일선물 님이 쓴 글입니다. > 제목 : 부탁드립니다 > 수고하십니다. 타주기(15)분 macd osc > 0 and 타주기(15)분 rsi(14) > 50 and 타주기(15)분 stoK > 50 일 때 (타주기아닌 현재 분설정) stoK 가 stoD를 상향돌파할때 매수 를 시스템식으로 부탁드립니다. ============ 스토캐스틱RSI 지표수식은 79310 번 글과 작성해주신 수식을 활용하면 될 듯합니다. 감사합니다
프로필 이미지

당일선물

2022-10-28 12:45:55

감사합니다. 작성해주신 수식중 스토캐스틱RSI의 값이 "79310 번 글과 작성해주신 수식"의 값과 다릅니다. 수정부탁드립니다 타주스스토캐스틱RSI 와 현 설정챠트 스토캐스틱RSI 모두 (14,3,3) 변수 동일합니다. 사용자함수로 StoRsi StoK StoD 를 작성해두었으니 참고 바랍니다. ///////////// input : RSIPeriod(NumericSimple),Period(NumericSimple),K(NumericSimple),D(NumericSimple); var : RSIV(0); RSIv = RSI(RSIPeriod); StoRsi = (RSIv- lowest(RSIv,Period)) / ( highest(RSIv,Period)-lowest(RSIv,Period) ) *100 ; /////////// input : RSIPeriod(NumericSimple),Period(NumericSimple),K(NumericSimple),D(NumericSimple); var : RSIV(0),StoRsi(0); RSIv = RSI(RSIPeriod); StoRsi = (RSIv- lowest(RSIv,Period)) / ( highest(RSIv,Period)-lowest(RSIv,Period) ) *100 ; StoK = ma(StoRsi,K); ////////////// input : RSIPeriod(NumericSimple),Period(NumericSimple),K(NumericSimple),D(NumericSimple); var : RSIV(0),StoRsi(0),StoK(0); RSIv = RSI(RSIPeriod); StoRsi = (RSIv- lowest(RSIv,Period)) / ( highest(RSIv,Period)-lowest(RSIv,Period) ) *100 ; StoK = ma(StoRsi,K); StoD = ma(StoK,D); ////////////////// =========== > 예스스탁 님이 쓴 글입니다. > 제목 : Re : 부탁드립니다 > 안녕하세요 예스스탁입니다. input : 타주기분(15),short(12),long(26),sig(9), RSILength(14); var : Sto1(10),Sto2(5),Sto3(5); var : Period1(10),Period2(5),Period3(5); var : S1(0),D1(0),TM(0),EP1(0),EP2(0),EP3(0),MACDO(0); var : TF(0),xma1(0),xma2(0),idx(0),Prexma1(0),Prexma2(0),MACDV(0),MACDS(0),PreMACDS(0); var : SigSum(0),count2(0),RSIsig(0),cnt(0); Var : Counter(0), DownAmt(0), UpAmt(0), UpSum(0), DownSum(0), UpAvg(0), DownAvg(0); var : PreUpAvg(0), preDownAvg(0),RSIV(0); var : Hv(0), LV(0), FK(0), SK(0), SD(0); var : sEp1(0), sEP2(0), JISU(0), DINDEX(0), PreSK(0), PreSD(0); var : stok(0),stod(0); Array : C1[100](0),HH[100](0),LL[100](0); Ep1 = 2/(short+1); Ep2 = 2/(long+1); Ep3 = 2/(sig+1); sEp1 = 2/(sto2+1); sEp2 = 2/(sto3+1); stok = StochasticsK(Period1,Period2); stod = Stochasticsd(Period1,Period2,Period3); if Bdate != Bdate[1] Then { S1 = TimeToMinutes(stime); D1 = sdate; } if D1 > 0 then { if sdate == D1 Then TM = TimeToMinutes(stime)-S1; Else TM = TimeToMinutes(stime)+1440-S1; TF = TM%타주기분; if Bdate != Bdate[1] or (Bdate == Bdate[1] and 타주기분 > 1 and TF < TF[1]) or (Bdate == Bdate[1] and 타주기분 > 1 and TM >= TM[1]+타주기분) or (Bdate == Bdate[1] and 타주기분 == 1 and TM > TM[1]) Then { HH[0] = H; LL[0] = L; for cnt = 1 to 99 { C1[cnt] = C1[cnt-1][1]; HH[cnt] = HH[cnt-1][1]; LL[cnt] = LL[cnt-1][1]; } Prexma1 = xma1[1]; Prexma2 = xma2[1]; PreMACDS = MACDS[1]; PreUpAvg = UpAvg[1]; preDownAvg = DownAvg[1]; idx = idx + 1; } if H > HH[0] Then HH[0] = H; if L < LL[0] Then LL[0] = L; C1[0] = C; if idx <= 1 then { xma1 = C; xma2 = C; MACDV = xma1-xma2; MACDS = MACDV; MACDO = MACDV-MACDS; } else{ xma1 = C * EP1 + Prexma1 * (1-EP1); xma2 = C * EP2 + Prexma2 * (1-EP2); MACDV = xma1-xma2; MACDS = MACDV * EP3 + PreMACDS * (1-EP3); MACDO = MACDV-MACDS; } If idx == RSILength+2 Then { UpSum = 0; DownSum = 0; For Counter = 0 To RSILength - 1 { UpAmt = C1[Counter] - C1[Counter+1]; If UpAmt >= 0 Then DownAmt = 0; Else { DownAmt = -UpAmt; UpAmt = 0; } UpSum = UpSum + UpAmt; DownSum = DownSum + DownAmt; } UpAvg = UpSum / RSILength; DownAvg = DownSum / RSILength; } If idx > RSILength+2 Then { UpAmt = C1[0] - C1[1]; If UpAmt >= 0 Then DownAmt = 0; Else { DownAmt = -UpAmt; UpAmt = 0; } UpAvg = (PreUpAvg * (RSILength - 1) + UpAmt) / RSILength; DownAvg = (preDownAvg * (RSILength - 1) + DownAmt) / RSILength; } If UpAvg + DownAvg <> 0 Then RSIv = 100 * UpAvg / (UpAvg + DownAvg); Else RSIv = 0; if HH[sto1-1] > 0 and LL[sto1-1] > 0 then { if bdate != bdate[1] or (Bdate == Bdate[1] and TF < TF[1]) or stime == 154500 Then{ DINDEX = DINDEX+1; PreSK = SK[1]; PreSD = SD[1]; } Hv = HH[0]; LV = LL[0]; for cnt = 0 to sto1-1 { if HH[cnt] > Hv then Hv = HH[cnt]; if LL[cnt] < LV then LV = LL[cnt]; } FK = (C-LV)/(HV-LV)*100; if DINDEX <= 1 then { SK = FK; SD = SK; } else { SK = FK * EP1 + PreSK * (1-EP1); SD = SK * EP2 + PreSD * (1-EP2); } } if macdo > 0 and rsiv > 50 and SK > 50 and CrossUp(stok,stod) Then Buy(); } 즐거운 하루되세요 > 당일선물 님이 쓴 글입니다. > 제목 : 부탁드립니다 > 수고하십니다. 타주기(15)분 macd osc > 0 and 타주기(15)분 rsi(14) > 50 and 타주기(15)분 stoK > 50 일 때 (타주기아닌 현재 분설정) stoK 가 stoD를 상향돌파할때 매수 를 시스템식으로 부탁드립니다. ============ 스토캐스틱RSI 지표수식은 79310 번 글과 작성해주신 수식을 활용하면 될 듯합니다. 감사합니다