커뮤니티

문의 드립니다

프로필 이미지
푸른
2023-10-20 22:06:34
915
글번호 173272
답변완료
1. input : StartTime(150000),EndTime(60000); input : 익절틱수(120),손절틱수(40); var : Tcond(False),entry(0); Variables: Mom(0); Var : N1(0),dayPl(0),당일수익(400),당일손실(100),Xcond(false); IF Endtime > starttime Then SetStopEndofday(Endtime); Else { if sDate != sDate[1] Then SetStopEndofday(Endtime); } 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 (sdate != sdate[1] and stime >= EndTime) or (sdate == sdate[1] and stime >= EndTime and stime[1] < EndTime) Then { Tcond = False; } if Tcond == true Then { if L ==lowest(L,2) and highest(H,2) >= lowest(L,2)+PriceScale*1 Then { Buy("b",AtLimit,L+abs(min(c,o)-l)*0.3); } if MarketPosition == 1 and BarsSinceEntry == 5 Then ExitShort(); if H == highest(H,2) and lowest(L,2) <= highest(H,2)+PriceScale*1 Then { Sell("s",AtLimit,H-abs(max(c,o)-h)*0.3); } if MarketPosition == -1 and BarsSinceEntry == 5 Then ExitLong(); } SetStopProfittarget(PriceScale*익절틱수,PointStop); SetStopLoss(PriceScale*손절틱수,PointStop); 2. input : StartTime(150000),EndTime(50000); input : 익절틱수(800),손절틱수(50); var : Tcond(False),entry(0); Variables: Mom(0); Var : N1(0),dayPl(0),당일수익(400),당일손실(100),Xcond(false); IF Endtime > starttime Then SetStopEndofday(Endtime); Else { if sDate != sDate[1] Then SetStopEndofday(Endtime); } 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 (sdate != sdate[1] and stime >= EndTime) or (sdate == sdate[1] and stime >= EndTime and stime[1] < EndTime) Then { Tcond = False; } if Tcond == true Then { if L ==lowest(L,2) and highest(H,2) >= lowest(L,2)+PriceScale*1 Then { Buy("b",AtStop,(highest(H,2)+lowest(L,2))/2); } if MarketPosition == 1 and BarsSinceEntry == 8 Then ExitShort(); } if H == highest(H,2) and lowest(L,2) <= highest(H,2)+PriceScale*1 Then { Sell("s",AtStop,(lowest(L,2)+highest(H,2))/2); } if MarketPosition == -1 and BarsSinceEntry == 8 Then ExitLong(); SetStopProfittarget(PriceScale*익절틱수,PointStop); SetStopLoss(PriceScale*손절틱수,PointStop); 1,2번 수식어를 하나로 부탁드립니다. 1번의 매매시간은 15시부터 21시까지이며 익절과 손절은 위 내용과 동일합니다. 2번의 매매시간은 21시부터 익일 5시까지이고 익절과 손절은 위 내용과 동일합니다. 미리 감사드립니다.
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2023-10-23 09:20:09

안녕하세요 예스스탁입니다. input : StartTime(150000),MidTime(210000),EndTime(50000); input : 익절틱수1(120),손절틱수1(40); input : 익절틱수2(800),손절틱수2(50); var : T(0),entry(0); Variables: Mom(0); Var : N1(0),dayPl(0),당일수익(400),당일손실(100),Xcond(false); IF Endtime > starttime Then SetStopEndofday(Endtime); Else { if sDate != sDate[1] Then SetStopEndofday(Endtime); } if (sdate != sdate[1] and stime >= StartTime) or (sdate == sdate[1] and stime >= StartTime and stime[1] < StartTime) Then { T = 1; IF Endtime <= starttime Then { SetStopEndofday(0); } } if (sdate != sdate[1] and stime >= MidTime) or (sdate == sdate[1] and stime >= MidTime and stime[1] < MidTime) Then { T = 2; if MarketPosition == 1 Then ExitLong("bx"); if MarketPosition == -1 Then ExitShort("sx"); } if (sdate != sdate[1] and stime >= EndTime) or (sdate == sdate[1] and stime >= EndTime and stime[1] < EndTime) Then { T = 0; } if T == 1 Then { if L ==lowest(L,2) and highest(H,2) >= lowest(L,2)+PriceScale*1 Then { Buy("b1",AtLimit,L+abs(min(c,o)-l)*0.3); } if MarketPosition == 1 and BarsSinceEntry == 5 Then ExitShort(); if H == highest(H,2) and lowest(L,2) <= highest(H,2)+PriceScale*1 Then { Sell("s1",AtLimit,H-abs(max(c,o)-h)*0.3); } if MarketPosition == -1 and BarsSinceEntry == 5 Then ExitLong(); SetStopProfittarget(PriceScale*익절틱수1,PointStop); SetStopLoss(PriceScale*손절틱수1,PointStop); } Else if T == 2 Then { if L ==lowest(L,2) and highest(H,2) >= lowest(L,2)+PriceScale*1 Then { Buy("b2",AtStop,(highest(H,2)+lowest(L,2))/2); } if MarketPosition == 1 and BarsSinceEntry == 8 Then ExitShort(); if H == highest(H,2) and lowest(L,2) <= highest(H,2)+PriceScale*1 Then { Sell("s2",AtStop,(lowest(L,2)+highest(H,2))/2); } if MarketPosition == -1 and BarsSinceEntry == 8 Then ExitLong(); SetStopProfittarget(PriceScale*익절틱수2,PointStop); SetStopLoss(PriceScale*손절틱수2,PointStop); } Else { SetStopProfittarget(0); SetStopLoss(0); } 즐거운 하루되세요 > 푸른 님이 쓴 글입니다. > 제목 : 문의 드립니다 > 1. input : StartTime(150000),EndTime(60000); input : 익절틱수(120),손절틱수(40); var : Tcond(False),entry(0); Variables: Mom(0); Var : N1(0),dayPl(0),당일수익(400),당일손실(100),Xcond(false); IF Endtime > starttime Then SetStopEndofday(Endtime); Else { if sDate != sDate[1] Then SetStopEndofday(Endtime); } 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 (sdate != sdate[1] and stime >= EndTime) or (sdate == sdate[1] and stime >= EndTime and stime[1] < EndTime) Then { Tcond = False; } if Tcond == true Then { if L ==lowest(L,2) and highest(H,2) >= lowest(L,2)+PriceScale*1 Then { Buy("b",AtLimit,L+abs(min(c,o)-l)*0.3); } if MarketPosition == 1 and BarsSinceEntry == 5 Then ExitShort(); if H == highest(H,2) and lowest(L,2) <= highest(H,2)+PriceScale*1 Then { Sell("s",AtLimit,H-abs(max(c,o)-h)*0.3); } if MarketPosition == -1 and BarsSinceEntry == 5 Then ExitLong(); } SetStopProfittarget(PriceScale*익절틱수,PointStop); SetStopLoss(PriceScale*손절틱수,PointStop); 2. input : StartTime(150000),EndTime(50000); input : 익절틱수(800),손절틱수(50); var : Tcond(False),entry(0); Variables: Mom(0); Var : N1(0),dayPl(0),당일수익(400),당일손실(100),Xcond(false); IF Endtime > starttime Then SetStopEndofday(Endtime); Else { if sDate != sDate[1] Then SetStopEndofday(Endtime); } 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 (sdate != sdate[1] and stime >= EndTime) or (sdate == sdate[1] and stime >= EndTime and stime[1] < EndTime) Then { Tcond = False; } if Tcond == true Then { if L ==lowest(L,2) and highest(H,2) >= lowest(L,2)+PriceScale*1 Then { Buy("b",AtStop,(highest(H,2)+lowest(L,2))/2); } if MarketPosition == 1 and BarsSinceEntry == 8 Then ExitShort(); } if H == highest(H,2) and lowest(L,2) <= highest(H,2)+PriceScale*1 Then { Sell("s",AtStop,(lowest(L,2)+highest(H,2))/2); } if MarketPosition == -1 and BarsSinceEntry == 8 Then ExitLong(); SetStopProfittarget(PriceScale*익절틱수,PointStop); SetStopLoss(PriceScale*손절틱수,PointStop); 1,2번 수식어를 하나로 부탁드립니다. 1번의 매매시간은 15시부터 21시까지이며 익절과 손절은 위 내용과 동일합니다. 2번의 매매시간은 21시부터 익일 5시까지이고 익절과 손절은 위 내용과 동일합니다. 미리 감사드립니다.