커뮤니티

수식 부탁드립니다

프로필 이미지
푸른
2021-11-04 06:57:18
777
글번호 153337
답변완료

첨부 이미지

input : StartTime(233000),EndTime(030000); var : 전환선(0),기준선(0),선행스팬1(0),선행스팬2(0); var : Tcond(false); if sDate != sDate[1] then SetStopEndofday(Endtime); if (sdate != sdate[1] and stime >= EndTime) or (sdate == sdate[1] and stime >= EndTime and stime[1] < EndTime) Then Tcond = False; if (sdate != sdate[1] and stime >= StartTime) or (sdate == sdate[1] and stime >= StartTime and stime[1] < StartTime) Then { Tcond = true; SetStopEndofday(0); } var : entry(0); if bdate != bdate[1] Then entry = 0; if (MarketPosition != 0 and MarketPosition != MarketPosition[1]) or (MarketPosition == MarketPosition[1] and TotalTrades > TotalTrades[1]) Then entry = entry+1; if MarketPosition <= 0 and entry < 1 Then buy("b",atlimit,dayhigh-PriceScale*20); if MarketPosition == 1 Then exitlong("bx",atlimit,lowest(L,BarsSinceEntry)+PriceScale*20); if MarketPosition >= 0 and entry < 1 Then sell("s",atlimit,daylow+PriceScale*30); if MarketPosition == -1 Then ExitShort("sx",atlimit,Highest(H,BarsSinceEntry)-PriceScale*30); --------------------------- 위 시스템의 매매신호는 당일 고저가대비 매수,매도의 청산 수식 입니다. 수정할것은 당일 고저가대비 매수,매도의 신호에서 청산은 그 진입신호에서 틱폭의 숫자만큼 청산이 되도록 부탁드립니다 늘 감사합니다
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2021-11-04 11:36:41

안녕하세요 예스스탁입니다. input : StartTime(233000),EndTime(030000); var : 전환선(0),기준선(0),선행스팬1(0),선행스팬2(0); var : Tcond(false); if sDate != sDate[1] then SetStopEndofday(Endtime); if (sdate != sdate[1] and stime >= EndTime) or (sdate == sdate[1] and stime >= EndTime and stime[1] < EndTime) Then Tcond = False; if (sdate != sdate[1] and stime >= StartTime) or (sdate == sdate[1] and stime >= StartTime and stime[1] < StartTime) Then { Tcond = true; SetStopEndofday(0); } var : entry(0); if bdate != bdate[1] Then entry = 0; if (MarketPosition != 0 and MarketPosition != MarketPosition[1]) or (MarketPosition == MarketPosition[1] and TotalTrades > TotalTrades[1]) Then entry = entry+1; if MarketPosition <= 0 and entry < 1 Then buy("b",atlimit,dayhigh-PriceScale*20); if MarketPosition == 1 Then exitlong("bx",atlimit,EntryPrice+PriceScale*20); if MarketPosition >= 0 and entry < 1 Then sell("s",atlimit,daylow+PriceScale*30); if MarketPosition == -1 Then ExitShort("sx",atlimit,EntryPrice-PriceScale*30); 즐거운 하루되세요 > 푸른 님이 쓴 글입니다. > 제목 : 수식 부탁드립니다 > input : StartTime(233000),EndTime(030000); var : 전환선(0),기준선(0),선행스팬1(0),선행스팬2(0); var : Tcond(false); if sDate != sDate[1] then SetStopEndofday(Endtime); if (sdate != sdate[1] and stime >= EndTime) or (sdate == sdate[1] and stime >= EndTime and stime[1] < EndTime) Then Tcond = False; if (sdate != sdate[1] and stime >= StartTime) or (sdate == sdate[1] and stime >= StartTime and stime[1] < StartTime) Then { Tcond = true; SetStopEndofday(0); } var : entry(0); if bdate != bdate[1] Then entry = 0; if (MarketPosition != 0 and MarketPosition != MarketPosition[1]) or (MarketPosition == MarketPosition[1] and TotalTrades > TotalTrades[1]) Then entry = entry+1; if MarketPosition <= 0 and entry < 1 Then buy("b",atlimit,dayhigh-PriceScale*20); if MarketPosition == 1 Then exitlong("bx",atlimit,lowest(L,BarsSinceEntry)+PriceScale*20); if MarketPosition >= 0 and entry < 1 Then sell("s",atlimit,daylow+PriceScale*30); if MarketPosition == -1 Then ExitShort("sx",atlimit,Highest(H,BarsSinceEntry)-PriceScale*30); --------------------------- 위 시스템의 매매신호는 당일 고저가대비 매수,매도의 청산 수식 입니다. 수정할것은 당일 고저가대비 매수,매도의 신호에서 청산은 그 진입신호에서 틱폭의 숫자만큼 청산이 되도록 부탁드립니다 늘 감사합니다