커뮤니티

문의 드립니다

프로필 이미지
푸른
2024-03-21 08:44:48
799
글번호 177738
답변완료
input : starttime(60000),endtime(0000),n(10); var : Tcond(false),hh(0),h1(0),ll(0),l1(0); IF Endtime > starttime Then SetStopEndofday(Endtime); Else { if sDate != sDate[1]and Tcond == true 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; hh = h; ll = l; h1 = hh[1]; l1 = ll[1]; IF Endtime <= starttime Then { SetStopEndofday(0); } } input : 익절틱수(0),손절틱수(0); if NextBarSdate != sDate Then { if NextBarOpen != C Then { Buy("b",AtStop,NextBarOpen+PriceScale*10); } } ExitLong("bx",AtMarket); if NextBarOpen != C Then { Buy("b1",AtStop,NextBarOpen+PriceScale*10); } ExitLong("bx1",AtMarket); if NextBarSdate != sDate Then { if NextBarOpen != C Then { Sell("s",AtStop,NextBarOpen-PriceScale*10); } } ExitShort("sx",AtMarket); if NextBarOpen != C Then { Sell("s1",AtStop,NextBarOpen-PriceScale*10); } ExitShort("sx1",AtMarket); if NextBarSdate == sDate Then { if NextBarOpen == C Then { Buy("b2",AtStop,NextBarOpen+PriceScale*10); } } ExitLong("bx2",AtMarket); if NextBarOpen == C Then { Buy("b3",AtStop,NextBarOpen+PriceScale*10); } ExitLong("bx3",AtMarket); if NextBarSdate == sDate Then { if NextBarOpen == C Then { Sell("s2",AtStop,NextBarOpen-PriceScale*10); } } ExitShort("sx2",AtMarket); if NextBarOpen == C Then { Sell("s3",AtStop,NextBarOpen-PriceScale*10); } ExitShort("sx3",AtMarket); ------- 위 수식어를 아래 변경된 2가지로 부탁 드립니다. - 아래 - 1. 캔들 다음 시가가 같거나 다를때 매수는 시가에서 -50틱에서 매수후 봉의 완성에 청산 매도는 시가에서 +50틱에서 매도후 봉의 완성에 청산이 각각 2회의 수식어 2. 캔들 다음 시가가 같거나 다를때 매수는 시가에서 -50틱에서 매수후 봉의 완성에 청산 매도는 시가에서 +50틱에서 매도후 봉의 완성에 청산이 무한대의 수식어
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2024-03-21 11:03:21

안녕하세요 예스스탁입니다. 1 input : starttime(60000),endtime(0000); var : Tcond(false); IF Endtime > starttime Then SetStopEndofday(Endtime); Else { if sDate != sDate[1]and Tcond == true 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); } } input : 익절틱수(0),손절틱수(0); if tcond == true Then { Buy("b",AtLimit,NextBarOpen-PriceScale*50); Sell("s",AtLimit,NextBarOpen+PriceScale*50); ExitLong("bx"); ExitShort("sx"); } 2 랭귀지에서 하나의 buy,sell은 한봉에 한번만 발생합니다. 그러므로 여러번 발생하려면 기존에 올려주신 내용과 같이 같은 내용으로 buy,sell이 많이 있어야 합니다. 5개까지만 작성해 드립니다. input : starttime(60000),endtime(0000); var : Tcond(false); IF Endtime > starttime Then SetStopEndofday(Endtime); Else { if sDate != sDate[1]and Tcond == true 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); } } input : 익절틱수(0),손절틱수(0); if tcond == true Then { Buy("b1",AtLimit,NextBarOpen-PriceScale*50); Sell("s1",AtLimit,NextBarOpen+PriceScale*50); Buy("b2",AtLimit,NextBarOpen-PriceScale*50); Sell("s2",AtLimit,NextBarOpen+PriceScale*50); Buy("b3",AtLimit,NextBarOpen-PriceScale*50); Sell("s3",AtLimit,NextBarOpen+PriceScale*50); Buy("b4",AtLimit,NextBarOpen-PriceScale*50); Sell("s4",AtLimit,NextBarOpen+PriceScale*50); Buy("b5",AtLimit,NextBarOpen-PriceScale*50); Sell("s5",AtLimit,NextBarOpen+PriceScale*50); ExitLong("bx"); ExitShort("sx"); } 즐거운 하루되세요 > 푸른 님이 쓴 글입니다. > 제목 : 문의 드립니다 > input : starttime(60000),endtime(0000),n(10); var : Tcond(false),hh(0),h1(0),ll(0),l1(0); IF Endtime > starttime Then SetStopEndofday(Endtime); Else { if sDate != sDate[1]and Tcond == true 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; hh = h; ll = l; h1 = hh[1]; l1 = ll[1]; IF Endtime <= starttime Then { SetStopEndofday(0); } } input : 익절틱수(0),손절틱수(0); if NextBarSdate != sDate Then { if NextBarOpen != C Then { Buy("b",AtStop,NextBarOpen+PriceScale*10); } } ExitLong("bx",AtMarket); if NextBarOpen != C Then { Buy("b1",AtStop,NextBarOpen+PriceScale*10); } ExitLong("bx1",AtMarket); if NextBarSdate != sDate Then { if NextBarOpen != C Then { Sell("s",AtStop,NextBarOpen-PriceScale*10); } } ExitShort("sx",AtMarket); if NextBarOpen != C Then { Sell("s1",AtStop,NextBarOpen-PriceScale*10); } ExitShort("sx1",AtMarket); if NextBarSdate == sDate Then { if NextBarOpen == C Then { Buy("b2",AtStop,NextBarOpen+PriceScale*10); } } ExitLong("bx2",AtMarket); if NextBarOpen == C Then { Buy("b3",AtStop,NextBarOpen+PriceScale*10); } ExitLong("bx3",AtMarket); if NextBarSdate == sDate Then { if NextBarOpen == C Then { Sell("s2",AtStop,NextBarOpen-PriceScale*10); } } ExitShort("sx2",AtMarket); if NextBarOpen == C Then { Sell("s3",AtStop,NextBarOpen-PriceScale*10); } ExitShort("sx3",AtMarket); ------- 위 수식어를 아래 변경된 2가지로 부탁 드립니다. - 아래 - 1. 캔들 다음 시가가 같거나 다를때 매수는 시가에서 -50틱에서 매수후 봉의 완성에 청산 매도는 시가에서 +50틱에서 매도후 봉의 완성에 청산이 각각 2회의 수식어 2. 캔들 다음 시가가 같거나 다를때 매수는 시가에서 -50틱에서 매수후 봉의 완성에 청산 매도는 시가에서 +50틱에서 매도후 봉의 완성에 청산이 무한대의 수식어