커뮤니티

문의드립니다.

프로필 이미지
판사
2020-12-08 12:45:58
763
글번호 144525
답변완료
안녕하세요. 아래전략에서 시간 설정 변수 입력 할 수 있도록 부탁드립니다. 1. 시작: 140000 2. 종료: 170000 3. 오후시작: 181000 4. 오후종료: 210000 INPUT : LENGTH(10); VAR : upv(0), dnv(0); input : StartTime(80000),EndTime(060000); var : Tcond(false); if (sdate != sdate[1] and stime >= 210000) or (sdate == sdate[1] and stime >= 210000 and stime[1] < 210000) Then { Tcond = False; if MarketPosition == 1 Then ExitLong(); if MarketPosition == -1 Then ExitLong(); } if (sdate != sdate[1] and stime >= 170000) or (sdate == sdate[1] and stime >= 170000 and stime[1] < 170000) Then { Tcond = False; if MarketPosition == 1 Then ExitLong(); if MarketPosition == -1 Then ExitLong(); } if (sdate != sdate[1] and stime >= 144000) or (sdate == sdate[1] and stime >= 144000 and stime[1] < 144000) Then { Tcond = true; } if (sdate != sdate[1] and stime >= 181800) or (sdate == sdate[1] and stime >= 181800 and stime[1] < 181800) Then { Tcond = true; } upv = HIGHEST(HIGH, LENGTH); dnv = LOWEST(LOW, LENGTH); if tcond == true Then { if MarketPosition <= 0 and L > dnv Then Buy("b",AtLimit,dnv); if MarketPosition == 1 Then ExitLong("bx",AtStop,upv); }
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2020-12-08 16:53:17

안녕하세요 예스스탁입니다. 1 상단선 터치시 매수포지션 청산인데 신호타입이 반대로 되어 있어 수정했습니다. 2 수정한 식입니다. INPUT : LENGTH(10); input : StartTime1(140000),EndTime1(170000); input : StartTime2(181000),EndTime2(210000); VAR : upv(0), dnv(0); var : Tcond(false); if (NextBarSdate != sdate and NextBarStime >= EndTime1) or (NextBarSdate == sdate and NextBarStime >= EndTime1 and stime < EndTime1) Then { Tcond = False; if MarketPosition == 1 Then ExitLong(); if MarketPosition == -1 Then ExitShort(); } if (NextBarSdate != sdate and NextBarStime >= EndTime2) or (NextBarSdate == sdate and NextBarStime >= EndTime2 and stime < EndTime2) Then { Tcond = False; if MarketPosition == 1 Then ExitLong(); if MarketPosition == -1 Then ExitShort(); } if (NextBarSdate != sdate and NextBarStime >= StartTime1) or (NextBarSdate == sdate and NextBarStime >= StartTime1 and stime < StartTime1) Then { Tcond = true; } if (NextBarSdate != sdate and NextBarStime >= StartTime2) or (NextBarSdate == sdate and NextBarStime >= StartTime2 and stime < StartTime2) Then { Tcond = true; } upv = HIGHEST(HIGH, LENGTH); dnv = LOWEST(LOW, LENGTH); if tcond == true Then { if MarketPosition <= 0 and L > dnv Then Buy("b",AtLimit,dnv); if MarketPosition == 1 Then ExitLong("bx",AtLimit,upv); } 즐거운 하루되세요 > 판사 님이 쓴 글입니다. > 제목 : 문의드립니다. > 안녕하세요. 아래전략에서 시간 설정 변수 입력 할 수 있도록 부탁드립니다. 1. 시작: 140000 2. 종료: 170000 3. 오후시작: 181000 4. 오후종료: 210000 INPUT : LENGTH(10); VAR : upv(0), dnv(0); input : StartTime(80000),EndTime(060000); var : Tcond(false); if (sdate != sdate[1] and stime >= 210000) or (sdate == sdate[1] and stime >= 210000 and stime[1] < 210000) Then { Tcond = False; if MarketPosition == 1 Then ExitLong(); if MarketPosition == -1 Then ExitLong(); } if (sdate != sdate[1] and stime >= 170000) or (sdate == sdate[1] and stime >= 170000 and stime[1] < 170000) Then { Tcond = False; if MarketPosition == 1 Then ExitLong(); if MarketPosition == -1 Then ExitLong(); } if (sdate != sdate[1] and stime >= 144000) or (sdate == sdate[1] and stime >= 144000 and stime[1] < 144000) Then { Tcond = true; } if (sdate != sdate[1] and stime >= 181800) or (sdate == sdate[1] and stime >= 181800 and stime[1] < 181800) Then { Tcond = true; } upv = HIGHEST(HIGH, LENGTH); dnv = LOWEST(LOW, LENGTH); if tcond == true Then { if MarketPosition <= 0 and L > dnv Then Buy("b",AtLimit,dnv); if MarketPosition == 1 Then ExitLong("bx",AtStop,upv); }