커뮤니티

문의드립니다.

프로필 이미지
종호
2023-10-13 11:20:28
943
글번호 173063
답변완료
아래수식을 나스닥 선물에 적용해서 오후 11시 부터 다음 날 아침 5시 30분까지만 매수진입이 되게 하고 싶습니다. 진입만 이렇게 시간제한을 두고요 . 창산은 24시간 다 작동하도록 부탁드립니다. var1 = ma(C,5); Var2 = ma(C,20); if MarketPosition <= 0 and CrossUp(var1,Var2) Then { buy("b",OnClose,Def,4); } if MarketPosition == 1 Then { if MaxEntries == CurrentContracts Then ExitLong("bx11",AtStop,EntryPrice+PriceScale*20,"",2,1); Else ExitLong("bx12",AtStop,EntryPrice); ExitLong("bx2",AtStop,L[BarsSinceEntry]); if crossdown(C , Var2) Then ExitLong("bx3"); }
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2023-10-13 15:32:26

안녕하세요 예스스탁입니다. input : StartTime(230000),EndTime(053000); var : Tcond(false); if (sdate != sdate[1] and stime >= StartTime) or (sdate == sdate[1] and stime >= StartTime and stime[1] < StartTime) Then { Tcond = true; } if (sdate != sdate[1] and stime >= EndTime) or (sdate == sdate[1] and stime >= EndTime and stime[1] < EndTime) Then { Tcond = False; } var1 = ma(C,5); Var2 = ma(C,20); if MarketPosition <= 0 and CrossUp(var1,Var2) and Tcond == true Then { buy("b",OnClose,Def,4); } if MarketPosition == 1 Then { if MaxEntries == CurrentContracts Then ExitLong("bx11",AtStop,EntryPrice+PriceScale*20,"",2,1); Else ExitLong("bx12",AtStop,EntryPrice); ExitLong("bx2",AtStop,L[BarsSinceEntry]); if crossdown(C , Var2) Then ExitLong("bx3"); } 즐거운 하루되세요 > 종호 님이 쓴 글입니다. > 제목 : 문의드립니다. > 아래수식을 나스닥 선물에 적용해서 오후 11시 부터 다음 날 아침 5시 30분까지만 매수진입이 되게 하고 싶습니다. 진입만 이렇게 시간제한을 두고요 . 창산은 24시간 다 작동하도록 부탁드립니다. var1 = ma(C,5); Var2 = ma(C,20); if MarketPosition <= 0 and CrossUp(var1,Var2) Then { buy("b",OnClose,Def,4); } if MarketPosition == 1 Then { if MaxEntries == CurrentContracts Then ExitLong("bx11",AtStop,EntryPrice+PriceScale*20,"",2,1); Else ExitLong("bx12",AtStop,EntryPrice); ExitLong("bx2",AtStop,L[BarsSinceEntry]); if crossdown(C , Var2) Then ExitLong("bx3"); }