커뮤니티

문의 드립니다.

프로필 이미지
푸른
2022-10-19 06:12:12
1161
글번호 163094
답변완료
input : 익절틱수(200),손절틱수(30); var : DD(0),Year(0),V1(0),V2(0),V3(0),V4(0),summer(False); var : ST(0),ET(0),entry(0); if NextBarSdate != sDate Then { DD = DayOfWeek(NextBarSdate); Year = Floor(NextBarSdate/10000); V1 = (10000 * Year) + (100 * 3) + 1; V2 = 15 - dayofweek(v1); v3 = (10000 * Year) + (100 * 11) + 1; v4 = 8 - dayofweek(v3); Summer = Sdate > (10000 * Year) + (100 * 3) + v2 and Sdate < (10000 * Year) + (100 * 11) + v4; if summer == true Then { ST = 70000; ET = 55000; } Else { ST = 80000; ET = 65000; } } if Year > 0 Then { IF ET > ST Then SetStopEndofday(ET); Else { if NextBarSdate != sDate Then SetStopEndofday(ET); } if ((NextBarSdate != sDate and NextBarStime >= ST) or (NextBarSdate == sDate and NextBarStime >= ST and sTime < ST)) Then { if ET < ST Then SetStopEndofday(0); if NextBarOpen != c Then { Buy("b",AtStop,NextBarOpen+PriceScale*10); Sell("s",AtStop,NextBarOpen-PriceScale*10); } } Else { if h < DayOpen+PriceScale*10 Then Buy("b1",AtStop,DayOpen+PriceScale*10); if l > DayOpen-PriceScale*10 Then Sell("s1",AtStop,DayOpen-PriceScale*10); } } if NextBarOpen != c Then { Buy("bb",AtStop,NextBarOpen+PriceScale*10); Sell("ss",AtStop,NextBarOpen-PriceScale*10); } Else { if h < DayOpen+PriceScale*10 Then Buy("b11",AtStop,DayOpen+PriceScale*10); if l > DayOpen-PriceScale*10 Then Sell("s11",AtStop,DayOpen-PriceScale*10); } if NextBarOpen != c Then { Buy("bbb",AtStop,NextBarOpen+PriceScale*10); Sell("sbb",AtStop,NextBarOpen-PriceScale*10); } Else { if h < DayOpen+PriceScale*10 Then Buy("b111",AtStop,DayOpen+PriceScale*10); if l > DayOpen-PriceScale*10 Then Sell("s111",AtStop,DayOpen-PriceScale*10); } if NextBarOpen != c Then { Buy("bbbb",AtStop,NextBarOpen+PriceScale*10); Sell("bbbs",AtStop,NextBarOpen-PriceScale*10); } Else { if h < DayOpen+PriceScale*10 Then Buy("b1111",AtStop,DayOpen+PriceScale*10); if l > DayOpen-PriceScale*10 Then Sell("s1111",AtStop,DayOpen-PriceScale*10); } SetStopProfittarget(PriceScale*익절틱수,PointStop); SetStopLoss(PriceScale*손절틱수,PointStop); ---------------------- 위 수식어에 60분선 위(바이 > 40틱 청산),아래(셀 > 40틱 청산) 60분선 골든 데드시 손절후 반대 포지션 진입 청산의 수식어로 변경을 부탁드립니다.
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2022-10-19 14:03:14

안녕하세요 예스스탁입니다. input : 익절틱수(200),손절틱수(40),P(60); var : DD(0),Year(0),V1(0),V2(0),V3(0),V4(0),summer(False); var : ST(0),ET(0),entry(0); var : mav(0); mav = ma(C,P); if NextBarSdate != sDate Then { DD = DayOfWeek(NextBarSdate); Year = Floor(NextBarSdate/10000); V1 = (10000 * Year) + (100 * 3) + 1; V2 = 15 - dayofweek(v1); v3 = (10000 * Year) + (100 * 11) + 1; v4 = 8 - dayofweek(v3); Summer = Sdate > (10000 * Year) + (100 * 3) + v2 and Sdate < (10000 * Year) + (100 * 11) + v4; if summer == true Then { ST = 70000; ET = 55000; } Else { ST = 80000; ET = 65000; } } Condition1 = MarketPosition == 0 and MarketPosition(1) == 1 and IsExitName("StopLoss",1) == true; Condition2 = MarketPosition == 0 and MarketPosition(1) == -1 and IsExitName("StopLoss",1) == true; if Year > 0 Then { IF ET > ST Then SetStopEndofday(ET); Else { if NextBarSdate != sDate Then SetStopEndofday(ET); } if ((NextBarSdate != sDate and NextBarStime >= ST) or (NextBarSdate == sDate and NextBarStime >= ST and sTime < ST)) Then { if ET < ST Then SetStopEndofday(0); if NextBarOpen != c Then { if c > mav and Condition1 == False Then Buy("b",AtStop,NextBarOpen+PriceScale*10); if c < mav and Condition2 == False Then Sell("s",AtStop,NextBarOpen-PriceScale*10); } } Else { if h < DayOpen+PriceScale*10 and c > mav and Condition1 == False Then Buy("b1",AtStop,DayOpen+PriceScale*10); if l > DayOpen-PriceScale*10 and c < mav and Condition2 == False Then Sell("s1",AtStop,DayOpen-PriceScale*10); } } if NextBarOpen != c Then { if c > mav and Condition1 == False Then Buy("bb",AtStop,NextBarOpen+PriceScale*10); if c < mav and Condition2 == False Then Sell("ss",AtStop,NextBarOpen-PriceScale*10); } Else { if h < DayOpen+PriceScale*10 and c > mav and Condition1 == False Then Buy("b11",AtStop,DayOpen+PriceScale*10); if l > DayOpen-PriceScale*10 and c > mav and Condition2 == False Then Sell("s11",AtStop,DayOpen-PriceScale*10); } if NextBarOpen != c Then { if c > mav and Condition1 == False Then Buy("bbb",AtStop,NextBarOpen+PriceScale*10); if c < mav and Condition2 == False Then Sell("sbb",AtStop,NextBarOpen-PriceScale*10); } Else { if h < DayOpen+PriceScale*10 and c > mav and Condition1 == False Then Buy("b111",AtStop,DayOpen+PriceScale*10); if l > DayOpen-PriceScale*10 and c < mav and Condition2 == False Then Sell("s111",AtStop,DayOpen-PriceScale*10); } if NextBarOpen != c Then { if c > mav and Condition1 == False Then Buy("bbbb",AtStop,NextBarOpen+PriceScale*10); if c < mav and Condition2 == False Then Sell("bbbs",AtStop,NextBarOpen-PriceScale*10); } Else { if h < DayOpen+PriceScale*10 and c > mav and Condition1 == False Then Buy("b1111",AtStop,DayOpen+PriceScale*10); if l > DayOpen-PriceScale*10 and c < mav and Condition2 == False Then Sell("s1111",AtStop,DayOpen-PriceScale*10); } SetStopProfittarget(PriceScale*익절틱수,PointStop); SetStopLoss(PriceScale*손절틱수,PointStop); 즐거운 하루되세요 > 푸른 님이 쓴 글입니다. > 제목 : 문의 드립니다. > input : 익절틱수(200),손절틱수(30); var : DD(0),Year(0),V1(0),V2(0),V3(0),V4(0),summer(False); var : ST(0),ET(0),entry(0); if NextBarSdate != sDate Then { DD = DayOfWeek(NextBarSdate); Year = Floor(NextBarSdate/10000); V1 = (10000 * Year) + (100 * 3) + 1; V2 = 15 - dayofweek(v1); v3 = (10000 * Year) + (100 * 11) + 1; v4 = 8 - dayofweek(v3); Summer = Sdate > (10000 * Year) + (100 * 3) + v2 and Sdate < (10000 * Year) + (100 * 11) + v4; if summer == true Then { ST = 70000; ET = 55000; } Else { ST = 80000; ET = 65000; } } if Year > 0 Then { IF ET > ST Then SetStopEndofday(ET); Else { if NextBarSdate != sDate Then SetStopEndofday(ET); } if ((NextBarSdate != sDate and NextBarStime >= ST) or (NextBarSdate == sDate and NextBarStime >= ST and sTime < ST)) Then { if ET < ST Then SetStopEndofday(0); if NextBarOpen != c Then { Buy("b",AtStop,NextBarOpen+PriceScale*10); Sell("s",AtStop,NextBarOpen-PriceScale*10); } } Else { if h < DayOpen+PriceScale*10 Then Buy("b1",AtStop,DayOpen+PriceScale*10); if l > DayOpen-PriceScale*10 Then Sell("s1",AtStop,DayOpen-PriceScale*10); } } if NextBarOpen != c Then { Buy("bb",AtStop,NextBarOpen+PriceScale*10); Sell("ss",AtStop,NextBarOpen-PriceScale*10); } Else { if h < DayOpen+PriceScale*10 Then Buy("b11",AtStop,DayOpen+PriceScale*10); if l > DayOpen-PriceScale*10 Then Sell("s11",AtStop,DayOpen-PriceScale*10); } if NextBarOpen != c Then { Buy("bbb",AtStop,NextBarOpen+PriceScale*10); Sell("sbb",AtStop,NextBarOpen-PriceScale*10); } Else { if h < DayOpen+PriceScale*10 Then Buy("b111",AtStop,DayOpen+PriceScale*10); if l > DayOpen-PriceScale*10 Then Sell("s111",AtStop,DayOpen-PriceScale*10); } if NextBarOpen != c Then { Buy("bbbb",AtStop,NextBarOpen+PriceScale*10); Sell("bbbs",AtStop,NextBarOpen-PriceScale*10); } Else { if h < DayOpen+PriceScale*10 Then Buy("b1111",AtStop,DayOpen+PriceScale*10); if l > DayOpen-PriceScale*10 Then Sell("s1111",AtStop,DayOpen-PriceScale*10); } SetStopProfittarget(PriceScale*익절틱수,PointStop); SetStopLoss(PriceScale*손절틱수,PointStop); ---------------------- 위 수식어에 60분선 위(바이 > 40틱 청산),아래(셀 > 40틱 청산) 60분선 골든 데드시 손절후 반대 포지션 진입 청산의 수식어로 변경을 부탁드립니다.