커뮤니티

문의 드립니다

프로필 이미지
푸른
2023-01-25 06:24:09
806
글번호 165602
답변완료
input : starttime(160000),endtime(60000),n(30); var : Tcond(false),hh(0),h1(0),ll(0),l1(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; hh = h; ll = l; h1 = hh[1]; l1 = ll[1]; IF Endtime <= starttime Then { SetStopEndofday(0); } } input : 익절틱수(60),손절틱수(15); 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 NextBarOpen != C Then { Sell("s3",AtStop,NextBarOpen+PriceScale*10); } ExitShort("sx3",AtMarket); if NextBarOpen == C Then { Sell("s4",AtStop,NextBarOpen+PriceScale*10); } ExitShort("sx4",AtMarket); if NextBarOpen == C Then { Sell("s5",AtStop,NextBarOpen+PriceScale*10); } ExitShort("sx5",AtMarket); if NextBarOpen == C Then { Sell("s6",AtStop,NextBarOpen+PriceScale*10); } ExitShort("sx6",AtMarket); SetStopProfittarget(PriceScale*익절틱수,PointStop); SetStopLoss(PriceScale*손절틱수,PointStop); 위 수식어를 120분봉 매매에 사용중입니다. 익절 하나하나의 합이 300틱일때 매매정지가 가능한 수식어를 추가할 수 있는지 문의 드립니다.
시스템
답변 2
프로필 이미지

예스스탁 예스스탁 답변

2023-01-25 09:50:56

안녕하세요 예스스탁입니다. 수식은 봉미완성시에 조건체크해 신호발생여부를 제어할 수 없습니다. 봉완성기준으로 익절합이 300틱이상이면 이후 진입을 막게 됩니다. input : starttime(160000),endtime(60000),n(30),익절합(300); var : Tcond(false),hh(0),h1(0),ll(0),l1(0),sum(0),xcond(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; hh = h; ll = l; h1 = hh[1]; l1 = ll[1]; sum =0; xcond = False; IF Endtime <= starttime Then { SetStopEndofday(0); } } if TotalTrades > TotalTrades[1] Then { if IsExitName("StopProfitTarget",1) == true Then sum = sum + PositionProfit(1); if sum >= 익절합+PriceScale Then Xcond = true; } input : 익절틱수(60),손절틱수(15); if NextBarSdate != sDate Then { if NextBarOpen != C and xcond == False Then { Sell("s",AtStop,NextBarOpen+PriceScale*10); } } ExitShort("sx",AtMarket); if NextBarOpen != C and xcond == False Then { Sell("s1",AtStop,NextBarOpen+PriceScale*10); } ExitShort("sx1",AtMarket); if NextBarOpen != C and xcond == False Then { Sell("s3",AtStop,NextBarOpen+PriceScale*10); } ExitShort("sx3",AtMarket); if NextBarOpen == C and xcond == False Then { Sell("s4",AtStop,NextBarOpen+PriceScale*10); } ExitShort("sx4",AtMarket); if NextBarOpen == C and xcond == False Then { Sell("s5",AtStop,NextBarOpen+PriceScale*10); } ExitShort("sx5",AtMarket); if NextBarOpen == C and xcond == False Then { Sell("s6",AtStop,NextBarOpen+PriceScale*10); } ExitShort("sx6",AtMarket); SetStopProfittarget(PriceScale*익절틱수,PointStop); SetStopLoss(PriceScale*손절틱수,PointStop); 즐거운 하루되세요 > 푸른 님이 쓴 글입니다. > 제목 : 문의 드립니다 > input : starttime(160000),endtime(60000),n(30); var : Tcond(false),hh(0),h1(0),ll(0),l1(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; hh = h; ll = l; h1 = hh[1]; l1 = ll[1]; IF Endtime <= starttime Then { SetStopEndofday(0); } } input : 익절틱수(60),손절틱수(15); 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 NextBarOpen != C Then { Sell("s3",AtStop,NextBarOpen+PriceScale*10); } ExitShort("sx3",AtMarket); if NextBarOpen == C Then { Sell("s4",AtStop,NextBarOpen+PriceScale*10); } ExitShort("sx4",AtMarket); if NextBarOpen == C Then { Sell("s5",AtStop,NextBarOpen+PriceScale*10); } ExitShort("sx5",AtMarket); if NextBarOpen == C Then { Sell("s6",AtStop,NextBarOpen+PriceScale*10); } ExitShort("sx6",AtMarket); SetStopProfittarget(PriceScale*익절틱수,PointStop); SetStopLoss(PriceScale*손절틱수,PointStop); 위 수식어를 120분봉 매매에 사용중입니다. 익절 하나하나의 합이 300틱일때 매매정지가 가능한 수식어를 추가할 수 있는지 문의 드립니다.
프로필 이미지

푸른

2023-02-05 13:43:38

input : starttime(203000),endtime(63000),n(30); var : Tcond(false),hh(0),h1(0),ll(0),l1(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; 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*5); } } ExitLong("bx",AtMarket); if NextBarOpen != C Then { Buy("b1",AtStop,NextBarOpen+PriceScale*5); } ExitLong("bx1",AtMarket); if NextBarOpen != C Then { Buy("b2",AtStop,NextBarOpen+PriceScale*5); } ExitLong("bx2",AtMarket); if NextBarOpen != C Then { Buy("b3",AtStop,NextBarOpen+PriceScale*5); } ExitLong("bx3",AtMarket); if NextBarOpen != C Then { Buy("b4",AtStop,NextBarOpen+PriceScale*5); } ExitLong("bx4",AtMarket); if NextBarOpen != C Then { Buy("b5",AtStop,NextBarOpen+PriceScale*5); } ExitLong("bx5",AtMarket); if NextBarOpen == C Then { Buy("b6",AtStop,NextBarOpen+PriceScale*5); } ExitLong("bx6",AtMarket); if NextBarOpen == C Then { Buy("b7",AtStop,NextBarOpen+PriceScale*5); } ExitLong("bx7",AtMarket); if NextBarOpen == C Then { Buy("b8",AtStop,NextBarOpen+PriceScale*5); } ExitLong("bx8",AtMarket); if NextBarOpen == C Then { Buy("b9",AtStop,NextBarOpen+PriceScale*5); } ExitLong("bx9",AtMarket); if NextBarOpen == C Then { Buy("b10",AtStop,NextBarOpen+PriceScale*5); } ExitLong("bx10",AtMarket); if NextBarOpen == C Then { Buy("b11",AtStop,NextBarOpen+PriceScale*5); } ExitLong("bx11",AtMarket); if NextBarSdate != sDate Then { if NextBarOpen != C Then { Sell("s",AtStop,NextBarOpen-PriceScale*5); } } ExitShort("sx",AtMarket); if NextBarOpen != C Then { Sell("s1",AtStop,NextBarOpen-PriceScale*5); } ExitShort("sx1",AtMarket); if NextBarOpen != C Then { Sell("s2",AtStop,NextBarOpen-PriceScale*5); } ExitShort("sx2",AtMarket); if NextBarOpen != C Then { Sell("s3",AtStop,NextBarOpen-PriceScale*5); } ExitShort("sx3",AtMarket); if NextBarOpen != C Then { Sell("s4",AtStop,NextBarOpen-PriceScale*5); } ExitShort("sx4",AtMarket); if NextBarOpen != C Then { Sell("s5",AtStop,NextBarOpen-PriceScale*5); } ExitShort("sx5",AtMarket); if NextBarOpen == C Then { Sell("s6",AtStop,NextBarOpen-PriceScale*5); } ExitShort("sx6",AtMarket); if NextBarOpen == C Then { Sell("s7",AtStop,NextBarOpen-PriceScale*5); } ExitShort("sx7",AtMarket); if NextBarOpen == C Then { Sell("s8",AtStop,NextBarOpen-PriceScale*5); } ExitShort("sx8",AtMarket); if NextBarOpen == C Then { Sell("s9",AtStop,NextBarOpen-PriceScale*5); } ExitShort("sx9",AtMarket); if NextBarOpen == C Then { Sell("s10",AtStop,NextBarOpen-PriceScale*5); } ExitShort("sx10",AtMarket); if NextBarOpen == C Then { Sell("s11",AtStop,NextBarOpen-PriceScale*5); } ExitShort("sx11",AtMarket); if NextBarSdate != sDate Then { if NextBarOpen != C Then { Buy("b12",AtStop,NextBarOpen+PriceScale*5); } } ExitLong("bx12",AtMarket); if NextBarOpen != C Then { Buy("b13",AtStop,NextBarOpen+PriceScale*5); } ExitLong("bx13",AtMarket); if NextBarOpen != C Then { Buy("b14",AtStop,NextBarOpen+PriceScale*5); } ExitLong("bx14",AtMarket); if NextBarOpen != C Then { Buy("b15",AtStop,NextBarOpen+PriceScale*5); } ExitLong("bx15",AtMarket); if NextBarOpen != C Then { Buy("b16",AtStop,NextBarOpen+PriceScale*5); } ExitLong("bx16",AtMarket); if NextBarOpen != C Then { Buy("b17",AtStop,NextBarOpen+PriceScale*5); } ExitLong("bx17",AtMarket); if NextBarOpen == C Then { Buy("b18",AtStop,NextBarOpen+PriceScale*5); } ExitLong("bx18",AtMarket); if NextBarOpen == C Then { Buy("b19",AtStop,NextBarOpen+PriceScale*5); } ExitLong("bx19",AtMarket); if NextBarOpen == C Then { Buy("b20",AtStop,NextBarOpen+PriceScale*5); } ExitLong("bx20",AtMarket); if NextBarOpen == C Then { Buy("b21",AtStop,NextBarOpen+PriceScale*5); } ExitLong("bx21",AtMarket); if NextBarOpen == C Then { Buy("b22",AtStop,NextBarOpen+PriceScale*5); } ExitLong("bx22",AtMarket); if NextBarOpen == C Then { Buy("b23",AtStop,NextBarOpen+PriceScale*5); } ExitLong("bx23",AtMarket); if NextBarSdate != sDate Then { if NextBarOpen != C Then { Sell("s12",AtStop,NextBarOpen-PriceScale*5); } } ExitShort("sx12",AtMarket); if NextBarOpen != C Then { Sell("s13",AtStop,NextBarOpen-PriceScale*5); } ExitShort("sx13",AtMarket); if NextBarOpen != C Then { Sell("s14",AtStop,NextBarOpen-PriceScale*5); } ExitShort("sx14",AtMarket); if NextBarOpen != C Then { Sell("s15",AtStop,NextBarOpen-PriceScale*5); } ExitShort("sx15",AtMarket); if NextBarOpen != C Then { Sell("s16",AtStop,NextBarOpen-PriceScale*5); } ExitShort("sx16",AtMarket); if NextBarOpen != C Then { Sell("s17",AtStop,NextBarOpen-PriceScale*5); } ExitShort("sx17",AtMarket); if NextBarOpen == C Then { Sell("s18",AtStop,NextBarOpen-PriceScale*5); } ExitShort("sx18",AtMarket); if NextBarOpen == C Then { Sell("s19",AtStop,NextBarOpen-PriceScale*5); } ExitShort("sx19",AtMarket); if NextBarOpen == C Then { Sell("s20",AtStop,NextBarOpen-PriceScale*5); } ExitShort("sx20",AtMarket); if NextBarOpen == C Then { Sell("s21",AtStop,NextBarOpen-PriceScale*5); } ExitShort("sx21",AtMarket); if NextBarOpen == C Then { Sell("s22",AtStop,NextBarOpen-PriceScale*5); } ExitShort("sx22",AtMarket); if NextBarOpen == C Then { Sell("s23",AtStop,NextBarOpen-PriceScale*5); } ExitShort("sx23",AtMarket); if NextBarSdate != sDate Then { if NextBarOpen != C Then { Buy("b24",AtStop,NextBarOpen+PriceScale*5); } } ExitLong("bx24",AtMarket); if NextBarOpen != C Then { Buy("b25",AtStop,NextBarOpen+PriceScale*5); } ExitLong("bx25",AtMarket); if NextBarOpen != C Then { Buy("b26",AtStop,NextBarOpen+PriceScale*5); } ExitLong("bx26",AtMarket); if NextBarOpen != C Then { Buy("b27",AtStop,NextBarOpen+PriceScale*5); } ExitLong("bx27",AtMarket); if NextBarOpen != C Then { Buy("b28",AtStop,NextBarOpen+PriceScale*5); } ExitLong("bx28",AtMarket); if NextBarOpen != C Then { Buy("b29",AtStop,NextBarOpen+PriceScale*5); } ExitLong("bx29",AtMarket); if NextBarOpen == C Then { Buy("b30",AtStop,NextBarOpen+PriceScale*5); } ExitLong("bx30",AtMarket); if NextBarOpen == C Then { Buy("b31",AtStop,NextBarOpen+PriceScale*5); } ExitLong("bx31",AtMarket); if NextBarOpen == C Then { Buy("b32",AtStop,NextBarOpen+PriceScale*5); } ExitLong("bx32",AtMarket); if NextBarOpen == C Then { Buy("b33",AtStop,NextBarOpen+PriceScale*5); } ExitLong("bx33",AtMarket); if NextBarOpen == C Then { Buy("b34",AtStop,NextBarOpen+PriceScale*5); } ExitLong("bx34",AtMarket); if NextBarOpen == C Then { Buy("b35",AtStop,NextBarOpen+PriceScale*5); } ExitLong("bx35",AtMarket); if NextBarSdate != sDate Then { if NextBarOpen != C Then { Sell("s24",AtStop,NextBarOpen-PriceScale*5); } } ExitShort("sx24",AtMarket); if NextBarOpen != C Then { Sell("s25",AtStop,NextBarOpen-PriceScale*5); } ExitShort("sx25",AtMarket); if NextBarOpen != C Then { Sell("s26",AtStop,NextBarOpen-PriceScale*5); } ExitShort("sx26",AtMarket); if NextBarOpen != C Then { Sell("s27",AtStop,NextBarOpen-PriceScale*5); } ExitShort("sx27",AtMarket); if NextBarOpen != C Then { Sell("s28",AtStop,NextBarOpen-PriceScale*5); } ExitShort("sx28",AtMarket); if NextBarOpen != C Then { Sell("s29",AtStop,NextBarOpen-PriceScale*5); } ExitShort("sx29",AtMarket); if NextBarOpen == C Then { Sell("s30",AtStop,NextBarOpen-PriceScale*5); } ExitShort("sx30",AtMarket); if NextBarOpen == C Then { Sell("s31",AtStop,NextBarOpen-PriceScale*5); } ExitShort("sx31",AtMarket); if NextBarOpen == C Then { Sell("s32",AtStop,NextBarOpen-PriceScale*5); } ExitShort("sx32",AtMarket); if NextBarOpen == C Then { Sell("s33",AtStop,NextBarOpen-PriceScale*5); } ExitShort("sx33",AtMarket); if NextBarOpen == C Then { Sell("s34",AtStop,NextBarOpen-PriceScale*5); } ExitShort("sx34",AtMarket); if NextBarOpen == C Then { Sell("s35",AtStop,NextBarOpen-PriceScale*5); } ExitShort("sx35",AtMarket); SetStopProfittarget(PriceScale*익절틱수,PointStop); SetStopLoss(PriceScale*손절틱수,PointStop); ---------------------------------------------------------------------------- > 예스스탁 님이 쓴 글입니다. > 제목 : Re : 문의 드립니다 > 안녕하세요 예스스탁입니다. 수식은 봉미완성시에 조건체크해 신호발생여부를 제어할 수 없습니다. 봉완성기준으로 익절합이 300틱이상이면 이후 진입을 막게 됩니다. input : starttime(160000),endtime(60000),n(30),익절합(300); var : Tcond(false),hh(0),h1(0),ll(0),l1(0),sum(0),xcond(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; hh = h; ll = l; h1 = hh[1]; l1 = ll[1]; sum =0; xcond = False; IF Endtime <= starttime Then { SetStopEndofday(0); } } if TotalTrades > TotalTrades[1] Then { if IsExitName("StopProfitTarget",1) == true Then sum = sum + PositionProfit(1); if sum >= 익절합+PriceScale Then Xcond = true; } input : 익절틱수(60),손절틱수(15); if NextBarSdate != sDate Then { if NextBarOpen != C and xcond == False Then { Sell("s",AtStop,NextBarOpen+PriceScale*10); } } ExitShort("sx",AtMarket); if NextBarOpen != C and xcond == False Then { Sell("s1",AtStop,NextBarOpen+PriceScale*10); } ExitShort("sx1",AtMarket); if NextBarOpen != C and xcond == False Then { Sell("s3",AtStop,NextBarOpen+PriceScale*10); } ExitShort("sx3",AtMarket); if NextBarOpen == C and xcond == False Then { Sell("s4",AtStop,NextBarOpen+PriceScale*10); } ExitShort("sx4",AtMarket); if NextBarOpen == C and xcond == False Then { Sell("s5",AtStop,NextBarOpen+PriceScale*10); } ExitShort("sx5",AtMarket); if NextBarOpen == C and xcond == False Then { Sell("s6",AtStop,NextBarOpen+PriceScale*10); } ExitShort("sx6",AtMarket); SetStopProfittarget(PriceScale*익절틱수,PointStop); SetStopLoss(PriceScale*손절틱수,PointStop); 즐거운 하루되세요 > 푸른 님이 쓴 글입니다. > 제목 : 문의 드립니다 > input : starttime(160000),endtime(60000),n(30); var : Tcond(false),hh(0),h1(0),ll(0),l1(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; hh = h; ll = l; h1 = hh[1]; l1 = ll[1]; IF Endtime <= starttime Then { SetStopEndofday(0); } } input : 익절틱수(60),손절틱수(15); 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 NextBarOpen != C Then { Sell("s3",AtStop,NextBarOpen+PriceScale*10); } ExitShort("sx3",AtMarket); if NextBarOpen == C Then { Sell("s4",AtStop,NextBarOpen+PriceScale*10); } ExitShort("sx4",AtMarket); if NextBarOpen == C Then { Sell("s5",AtStop,NextBarOpen+PriceScale*10); } ExitShort("sx5",AtMarket); if NextBarOpen == C Then { Sell("s6",AtStop,NextBarOpen+PriceScale*10); } ExitShort("sx6",AtMarket); SetStopProfittarget(PriceScale*익절틱수,PointStop); SetStopLoss(PriceScale*손절틱수,PointStop); 위 수식어를 120분봉 매매에 사용중입니다. 익절 하나하나의 합이 300틱일때 매매정지가 가능한 수식어를 추가할 수 있는지 문의 드립니다.