커뮤니티

59775 질문관련 재문의

프로필 이미지
당일선물
2018-10-26 10:22:59
210
글번호 123081
답변완료

첨부 이미지

작성해주신 수식에 감사드리며, 제가 원래 희망하는 매매전략을 그림으로 첨부하오니 참고하시어 수식을 수정부탁드립니다. 완성봉으로 기준선을 돌파(붕괴) 확인 후 돌파(붕괴)된 기준선에서 매수(매도) 진입하고 [진입시점에 macdosc,rsiv,ema 조건 만족시] 완성봉으로 진입기준선을 붕괴(돌파)할 경우 손절, 실시간으로 진입기준선 대비 한칸위 기준선 도달시 매수청산, 한칸아래 도달시 매도청산입니다.
시스템
답변 3
프로필 이미지

예스스탁 예스스탁 답변

2018-10-26 17:34:05

안녕하세요 예스스탁입니다. 식을 수정했습니다. 의도와 다른 내용있으시면 다시 글 올려주시기 바랍니다. input : short(12),long(26),sig(9); input : RSIPeriod(14); input : maPeriod(10); input : N(5); Var : Pivot(0),cnt(0); var : macdosc(0),RSIV(0),emav(0),mid(0); var : BuyPrice(0),BXPrice(0),Bidx(0),SellPrice(0),SXPrice(0),Sidx(0); Array : P[11](0); Pivot = (DayHigh(1)+DayLow(1)+DayClose(1))/3; P[10] = DayHigh(1)+4*(Pivot-DayLow(1)); #R5 P[9] = DayHigh(1)+3*(Pivot-DayLow(1)); #R4 P[8] = DayHigh(1)+2*(Pivot-DayLow(1)); #R3 P[7] = Pivot+DayHigh(1)-DayLow(1); #R2 P[6] = 2*Pivot-DayLow(1); #R1 P[5] = Pivot; #Pivot P[4] = 2*Pivot-DayHigh(1); #S1 P[3] = Pivot-DayHigh(1)+DayLow(1); #S2 P[2] = DayLow(1) - 2*(DayHigh(1)-Pivot);#S3 P[1] = DayLow(1) - 3*(DayHigh(1)-Pivot);#S4 P[0] = DayLow(1) - 4*(DayHigh(1)-Pivot);#S5 macdosc = MACD_OSC(short,long,sig); RSIV = RSI(RSIPeriod); emav = ema(C,maPeriod); mid = (DayHigh(1)+DayLow(1)+DayClose(1))/3; if macdosc > 0 and RSIv > 50 and C > emav and C > mid Then { for cnt = 0 to 9 { if P[cnt+1] > C and C > P[cnt] Then { Bidx = index; BuyPrice = P[cnt]; BxPrice = P[cnt+1]; } } } if macdosc < 0 and RSIv < 50 and C < emav and C < mid Then { for cnt = 0 to 9 { if P[cnt+1] > C and C > P[cnt] Then { Sidx = index; SellPrice = P[cnt+1]; SxPrice = P[cnt]; } } } if MarketPosition <= 0 and Bidx > 0 and index >= Bidx and index <= Bidx+n then { buy("b",AtLimit,BuyPrice); } if MarketPosition == 1 Then { ExitLong("bx",Atlimit,BxPrice[BarsSinceEntry+1]); } if MarketPosition >= 0 and Sidx > 0 and index >= Sidx and index <= Sidx+n then { Sell("s",AtLimit,SellPrice); } if MarketPosition == -1 Then { ExitShort("sx",Atlimit,SxPrice[BarsSinceEntry+1]); } 즐거운 하루되세요 > 당일선물 님이 쓴 글입니다. > 제목 : 59775 질문관련 재문의 > 작성해주신 수식에 감사드리며, 제가 원래 희망하는 매매전략을 그림으로 첨부하오니 참고하시어 수식을 수정부탁드립니다. 완성봉으로 기준선을 돌파(붕괴) 확인 후 돌파(붕괴)된 기준선에서 매수(매도) 진입하고 [진입시점에 macdosc,rsiv,ema 조건 만족시] 완성봉으로 진입기준선을 붕괴(돌파)할 경우 손절, 실시간으로 진입기준선 대비 한칸위 기준선 도달시 매수청산, 한칸아래 도달시 매도청산입니다.
프로필 이미지

당일선물

2018-10-27 15:13:50

해외선물의 경우 당일강제청산시간을 05:30분으로 설정하였는데, 진입신호 발생이 자정 00:00 이후에만 발생하는 오류가 있습니다. 07:00~00:00 사이에는 진입신호발생 조건에 만족한 경우에 전혀 신호가 발생되지 않습니다. 검토부탁드립니다. > 예스스탁 님이 쓴 글입니다. > 제목 : Re : 59775 질문관련 재문의 > 안녕하세요 예스스탁입니다. 식을 수정했습니다. 의도와 다른 내용있으시면 다시 글 올려주시기 바랍니다. input : short(12),long(26),sig(9); input : RSIPeriod(14); input : maPeriod(10); input : N(5); Var : Pivot(0),cnt(0); var : macdosc(0),RSIV(0),emav(0),mid(0); var : BuyPrice(0),BXPrice(0),Bidx(0),SellPrice(0),SXPrice(0),Sidx(0); Array : P[11](0); Pivot = (DayHigh(1)+DayLow(1)+DayClose(1))/3; P[10] = DayHigh(1)+4*(Pivot-DayLow(1)); #R5 P[9] = DayHigh(1)+3*(Pivot-DayLow(1)); #R4 P[8] = DayHigh(1)+2*(Pivot-DayLow(1)); #R3 P[7] = Pivot+DayHigh(1)-DayLow(1); #R2 P[6] = 2*Pivot-DayLow(1); #R1 P[5] = Pivot; #Pivot P[4] = 2*Pivot-DayHigh(1); #S1 P[3] = Pivot-DayHigh(1)+DayLow(1); #S2 P[2] = DayLow(1) - 2*(DayHigh(1)-Pivot);#S3 P[1] = DayLow(1) - 3*(DayHigh(1)-Pivot);#S4 P[0] = DayLow(1) - 4*(DayHigh(1)-Pivot);#S5 macdosc = MACD_OSC(short,long,sig); RSIV = RSI(RSIPeriod); emav = ema(C,maPeriod); mid = (DayHigh(1)+DayLow(1)+DayClose(1))/3; if macdosc > 0 and RSIv > 50 and C > emav and C > mid Then { for cnt = 0 to 9 { if P[cnt+1] > C and C > P[cnt] Then { Bidx = index; BuyPrice = P[cnt]; BxPrice = P[cnt+1]; } } } if macdosc < 0 and RSIv < 50 and C < emav and C < mid Then { for cnt = 0 to 9 { if P[cnt+1] > C and C > P[cnt] Then { Sidx = index; SellPrice = P[cnt+1]; SxPrice = P[cnt]; } } } if MarketPosition <= 0 and Bidx > 0 and index >= Bidx and index <= Bidx+n then { buy("b",AtLimit,BuyPrice); } if MarketPosition == 1 Then { ExitLong("bx",Atlimit,BxPrice[BarsSinceEntry+1]); } if MarketPosition >= 0 and Sidx > 0 and index >= Sidx and index <= Sidx+n then { Sell("s",AtLimit,SellPrice); } if MarketPosition == -1 Then { ExitShort("sx",Atlimit,SxPrice[BarsSinceEntry+1]); } 즐거운 하루되세요 > 당일선물 님이 쓴 글입니다. > 제목 : 59775 질문관련 재문의 > 작성해주신 수식에 감사드리며, 제가 원래 희망하는 매매전략을 그림으로 첨부하오니 참고하시어 수식을 수정부탁드립니다. 완성봉으로 기준선을 돌파(붕괴) 확인 후 돌파(붕괴)된 기준선에서 매수(매도) 진입하고 [진입시점에 macdosc,rsiv,ema 조건 만족시] 완성봉으로 진입기준선을 붕괴(돌파)할 경우 손절, 실시간으로 진입기준선 대비 한칸위 기준선 도달시 매수청산, 한칸아래 도달시 매도청산입니다.
프로필 이미지

예스스탁 예스스탁 답변

2018-10-29 09:23:21

안녕하세요 예스스탁입니다. 강제청산 중 당일청산은 청산후 당일은 진입을 막는 기능이 있습니다. 그러므로 5시 30분이후부터 자정까지는 진입을 하지 않습니다. 새벽에 청산을 하는 경우에는 설정창에서 설정하지 않고 아래와 같이 수식에서 처리해 주셔야 합니다. 아래 내용을 수식 하단에 추가해 주시면 됩니다. #새로운 영업일이 시작되면 #해제 if bdate != bdate[1] Then SetStopEndofday(0); #밤 0시에 지정한 시간으로 셋팅 if sdate != sdate[1] Then SetStopEndofday(053000); 즐거운 하루되세요 > 당일선물 님이 쓴 글입니다. > 제목 : Re : Re : 시뮬레이션 해 보니, > 해외선물의 경우 당일강제청산시간을 05:30분으로 설정하였는데, 진입신호 발생이 자정 00:00 이후에만 발생하는 오류가 있습니다. 07:00~00:00 사이에는 진입신호발생 조건에 만족한 경우에 전혀 신호가 발생되지 않습니다. 검토부탁드립니다. > 예스스탁 님이 쓴 글입니다. > 제목 : Re : 59775 질문관련 재문의 > 안녕하세요 예스스탁입니다. 식을 수정했습니다. 의도와 다른 내용있으시면 다시 글 올려주시기 바랍니다. input : short(12),long(26),sig(9); input : RSIPeriod(14); input : maPeriod(10); input : N(5); Var : Pivot(0),cnt(0); var : macdosc(0),RSIV(0),emav(0),mid(0); var : BuyPrice(0),BXPrice(0),Bidx(0),SellPrice(0),SXPrice(0),Sidx(0); Array : P[11](0); Pivot = (DayHigh(1)+DayLow(1)+DayClose(1))/3; P[10] = DayHigh(1)+4*(Pivot-DayLow(1)); #R5 P[9] = DayHigh(1)+3*(Pivot-DayLow(1)); #R4 P[8] = DayHigh(1)+2*(Pivot-DayLow(1)); #R3 P[7] = Pivot+DayHigh(1)-DayLow(1); #R2 P[6] = 2*Pivot-DayLow(1); #R1 P[5] = Pivot; #Pivot P[4] = 2*Pivot-DayHigh(1); #S1 P[3] = Pivot-DayHigh(1)+DayLow(1); #S2 P[2] = DayLow(1) - 2*(DayHigh(1)-Pivot);#S3 P[1] = DayLow(1) - 3*(DayHigh(1)-Pivot);#S4 P[0] = DayLow(1) - 4*(DayHigh(1)-Pivot);#S5 macdosc = MACD_OSC(short,long,sig); RSIV = RSI(RSIPeriod); emav = ema(C,maPeriod); mid = (DayHigh(1)+DayLow(1)+DayClose(1))/3; if macdosc > 0 and RSIv > 50 and C > emav and C > mid Then { for cnt = 0 to 9 { if P[cnt+1] > C and C > P[cnt] Then { Bidx = index; BuyPrice = P[cnt]; BxPrice = P[cnt+1]; } } } if macdosc < 0 and RSIv < 50 and C < emav and C < mid Then { for cnt = 0 to 9 { if P[cnt+1] > C and C > P[cnt] Then { Sidx = index; SellPrice = P[cnt+1]; SxPrice = P[cnt]; } } } if MarketPosition <= 0 and Bidx > 0 and index >= Bidx and index <= Bidx+n then { buy("b",AtLimit,BuyPrice); } if MarketPosition == 1 Then { ExitLong("bx",Atlimit,BxPrice[BarsSinceEntry+1]); } if MarketPosition >= 0 and Sidx > 0 and index >= Sidx and index <= Sidx+n then { Sell("s",AtLimit,SellPrice); } if MarketPosition == -1 Then { ExitShort("sx",Atlimit,SxPrice[BarsSinceEntry+1]); } 즐거운 하루되세요 > 당일선물 님이 쓴 글입니다. > 제목 : 59775 질문관련 재문의 > 작성해주신 수식에 감사드리며, 제가 원래 희망하는 매매전략을 그림으로 첨부하오니 참고하시어 수식을 수정부탁드립니다. 완성봉으로 기준선을 돌파(붕괴) 확인 후 돌파(붕괴)된 기준선에서 매수(매도) 진입하고 [진입시점에 macdosc,rsiv,ema 조건 만족시] 완성봉으로 진입기준선을 붕괴(돌파)할 경우 손절, 실시간으로 진입기준선 대비 한칸위 기준선 도달시 매수청산, 한칸아래 도달시 매도청산입니다.