커뮤니티

문의 드립니다

프로필 이미지
푸른
2025-02-06 08:56:14
307
글번호 187839
답변완료
1. 해외선물 매매입니다. 전일 하락폭의 50%를 당일 내려갔을때 매수후 +150%에 청산되는 수식어 부탁드립니다. 매매시간은 08시 익일 06시입니다. 2. 아래a,b 별도의 수식어를 하나의 시스템에서 적용하고자 합니다. a. Inputs: VtyPercent(0.10),ATRperiod(5); input : StartTime(80000),EndTime(60000); var : Tcond(false); 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; IF Endtime <= starttime Then { SetStopEndofday(0); } } If MarketPosition() <> 1 Then Buy ("Vty_LE", AtStop, Close + (VtyPercent * ATR(ATRperiod))); If MarketPosition() <> -1 Then ExitLong ("Vty_SE)", AtStop, Close - (VtyPercent * ATR(ATRperiod))); ----------------------------------- b. Inputs: VtyPercent(0.10),ATRperiod(5); input : StartTime(80000),EndTime(60000); var : Tcond(false); 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; IF Endtime <= starttime Then { SetStopEndofday(0); } } If MarketPosition() <> 1 Then ExitShort("Vty_LE", AtStop, Close + (VtyPercent * ATR(ATRperiod))); If MarketPosition() <> -1 Then sell ("Vty_SE)", AtStop, Close - (VtyPercent * ATR(ATRperiod)));
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2025-02-06 11:00:42

안녕하세요 예스스탁입니다. 1 input : StartTime(080000),EndTime(060000); var : Tcond(False); 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; IF Endtime <= starttime Then { SetStopEndofday(0); } } if Tcond == true Then { if DayLow > DayOpen-(DayHigh(1)-DayLow(1))*0.5 Then Buy("b",AtStop,DayOpen-(DayHigh(1)-DayLow(1))*0.5); if MarketPosition == 1 Then ExitLong("bx",AtLimit,EntryPrice+(DayHigh(1)-DayLow(1))*1.5); } 2 Inputs: VtyPercent(0.10),ATRperiod(5); input : StartTime(80000),EndTime(60000); var : Tcond(false); 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; IF Endtime <= starttime Then { SetStopEndofday(0); } } If MarketPosition() <> 1 Then Buy ("LE", AtStop, Close + (VtyPercent * ATR(ATRperiod))); If MarketPosition() <> -1 Then sell ("SE", AtStop, Close - (VtyPercent * ATR(ATRperiod))); 즐거운 하루되세요 > 푸른 님이 쓴 글입니다. > 제목 : 문의 드립니다 > 1. 해외선물 매매입니다. 전일 하락폭의 50%를 당일 내려갔을때 매수후 +150%에 청산되는 수식어 부탁드립니다. 매매시간은 08시 익일 06시입니다. 2. 아래a,b 별도의 수식어를 하나의 시스템에서 적용하고자 합니다. a. Inputs: VtyPercent(0.10),ATRperiod(5); input : StartTime(80000),EndTime(60000); var : Tcond(false); 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; IF Endtime <= starttime Then { SetStopEndofday(0); } } If MarketPosition() <> 1 Then Buy ("Vty_LE", AtStop, Close + (VtyPercent * ATR(ATRperiod))); If MarketPosition() <> -1 Then ExitLong ("Vty_SE)", AtStop, Close - (VtyPercent * ATR(ATRperiod))); ----------------------------------- b. Inputs: VtyPercent(0.10),ATRperiod(5); input : StartTime(80000),EndTime(60000); var : Tcond(false); 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; IF Endtime <= starttime Then { SetStopEndofday(0); } } If MarketPosition() <> 1 Then ExitShort("Vty_LE", AtStop, Close + (VtyPercent * ATR(ATRperiod))); If MarketPosition() <> -1 Then sell ("Vty_SE)", AtStop, Close - (VtyPercent * ATR(ATRperiod)));