커뮤니티

수식 부탁드립니다

프로필 이미지
푸른
2021-12-10 07:52:55
799
글번호 154355
답변완료
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*35); if MarketPosition == 1 Then exitlong("bx",atlimit,lowest(L,BarsSinceEntry)+PriceScale*30); if MarketPosition >= 0 and entry < 1 Then sell("s",atlimit,daylow+PriceScale*100); if MarketPosition == -1 Then ExitShort("sx",atlimit,Highest(H,BarsSinceEntry)-PriceScale*120); if sdate != sdate[1] Then SetStopEndofday(04000); if bdate != bdate[1] Then SetStopEndofday(0); --------------------------------- 위 수식어에 추가 입니다. 매매시간 : 오전 10시부터 익일 04시 손 절 : 20틱
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2021-12-10 10:44:04

안녕하세여 예스스탁입니다. input : StartTime(100000),EndTime(040000); var : Tcond(false); var : entry(0); IF Endtime > starttime Then SetStopEndofday(Endtime); Else { 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; entry = 0; IF Endtime <= starttime Then { SetStopEndofday(0); } } if Tcond == true Then { 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*35); if MarketPosition == 1 Then exitlong("bx",atlimit,lowest(L,BarsSinceEntry)+PriceScale*30); if MarketPosition >= 0 and entry < 1 Then sell("s",atlimit,daylow+PriceScale*100); if MarketPosition == -1 Then ExitShort("sx",atlimit,Highest(H,BarsSinceEntry)-PriceScale*120); } 즐거운 하루되세요 > 푸른 님이 쓴 글입니다. > 제목 : 수식 부탁드립니다 > 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*35); if MarketPosition == 1 Then exitlong("bx",atlimit,lowest(L,BarsSinceEntry)+PriceScale*30); if MarketPosition >= 0 and entry < 1 Then sell("s",atlimit,daylow+PriceScale*100); if MarketPosition == -1 Then ExitShort("sx",atlimit,Highest(H,BarsSinceEntry)-PriceScale*120); if sdate != sdate[1] Then SetStopEndofday(04000); if bdate != bdate[1] Then SetStopEndofday(0); --------------------------------- 위 수식어에 추가 입니다. 매매시간 : 오전 10시부터 익일 04시 손 절 : 20틱