커뮤니티

문의 드립니다

프로필 이미지
푸른
2022-10-07 12:02:44
1029
글번호 162801
답변완료

첨부 이미지

일봉매매에서 수식어 부탁드립니다 전일대비 0.00% 매수 0.50% 청산 그 이후 0.6% 매수 1.00% 청산 익절100 손절50 ---------------------- 전일대비 0.51% 매도 -0.80% 청산 그 이후 -1.00% 매수 -0.50% 청산 익절100 손절50 -------------------------------------------------- 1. input : 익절틱수(160),손절틱수(100); if NextBarSdate != sDate Then { if NextBarOpen > C Then { Buy("b",AtStop,NextBarOpen+PriceScale*10); Sell("s",AtStop,NextBarOpen-PriceScale*10); } if NextBarOpen < C Then { ExitLong("bx",AtStop,NextBarOpen-PriceScale*10); ExitShort("sx",AtStop,NextBarOpen+PriceScale*10); } } if MarketPosition == 1 Then Sell("ss",AtStop,EntryPrice-10); if MarketPosition == -1 Then Buy("ss1",AtStop,EntryPrice+10); SetStopProfittarget(PriceScale*익절틱수,PointStop); SetStopLoss(PriceScale*손절틱수,PointStop); if NextBarSdate != sDate Then { if NextBarOpen > C Then { Buy("b2",AtStop,NextBarOpen+PriceScale*10); Sell("s2",AtStop,NextBarOpen-PriceScale*10); } if NextBarOpen < C Then { ExitLong("bx2",AtStop,NextBarOpen-PriceScale*10); ExitShort ("sx2",AtStop,NextBarOpen+PriceScale*10); } } if MarketPosition == 1 Then Sell("sss",AtStop,EntryPrice-10); if MarketPosition == -1 Then Buy("sss1",AtStop,EntryPrice+10); SetStopProfittarget(PriceScale*익절틱수,PointStop); SetStopLoss(PriceScale*손절틱수,PointStop); if NextBarSdate != sDate Then { if NextBarOpen < C Then { Buy("b8",AtStop,NextBarOpen+PriceScale*10); Sell("s8",AtStop,NextBarOpen-PriceScale*10); } if NextBarOpen > C Then { ExitLong("bx8",AtStop,NextBarOpen-PriceScale*10); ExitShort("sx8",AtStop,NextBarOpen+PriceScale*10); } } if MarketPosition == 1 Then Sell("bb",AtStop,EntryPrice-10); if MarketPosition == -1 Then Buy("bb1",AtStop,EntryPrice+10); SetStopProfittarget(PriceScale*익절틱수,PointStop); SetStopLoss(PriceScale*손절틱수,PointStop); if NextBarSdate != sDate Then { if NextBarOpen < C Then { Buy("b9",AtStop,NextBarOpen+PriceScale*10); Sell("s9",AtStop,NextBarOpen-PriceScale*10); } if NextBarOpen > C Then { ExitLong("bx9",AtStop,NextBarOpen-PriceScale*10); ExitShort("sx9",AtStop,NextBarOpen+PriceScale*10); } } if MarketPosition == 1 Then Sell("bbb",AtStop,EntryPrice-10); if MarketPosition == -1 Then Buy("bbb1",AtStop,EntryPrice+10); SetStopProfittarget(PriceScale*익절틱수,PointStop); SetStopLoss(PriceScale*손절틱수,PointStop); 2. input : 익절틱수(180),손절틱수(100); if NextBarSdate != sDate Then { if NextBarOpen > C Then { Buy("b",AtStop,NextBarOpen+PriceScale*10); Sell("s",AtStop,NextBarOpen-PriceScale*10); } if NextBarOpen > C Then { ExitLong("bx",AtStop,NextBarOpen-PriceScale*10); ExitShort("sx",AtStop,NextBarOpen+PriceScale*10); } } if MarketPosition > 1 Then Sell("ss",AtStop,EntryPrice-30); if MarketPosition < -1 Then Buy("ss1",AtStop,EntryPrice+30); if NextBarSdate != sDate Then { if NextBarOpen < C Then { Buy("b1",AtStop,NextBarOpen+PriceScale*10); Sell("s1",AtStop,NextBarOpen-PriceScale*10); } if NextBarOpen < C Then { ExitLong("b1x",AtStop,NextBarOpen-PriceScale*10); ExitShort("s1x",AtStop,NextBarOpen+PriceScale*10); } } if MarketPosition > 1 Then Sell("sss",AtStop,EntryPrice-30); if MarketPosition < -1 Then Buy("sss1",AtStop,EntryPrice+30); SetStopProfittarget(PriceScale*익절틱수,PointStop); SetStopLoss(PriceScale*손절틱수,PointStop); ------------------------------- 위 1, 2번은 ==, < > 의 스위칭기호가 포함된 수식어 입니다. 그래프의 체결내용은 아침에 매도후 매도청산 그리고 매수로 나옵니다. 잔고현황에는 계약수가 없는데 스위칭기호중 ==, < > 중 하나를 잘못 선택한 경우인지 아니면 다른 선택이 있는지 문의 드립니다. 그리고 게시판 질답에 일봉 당일청산은 불가 하다고 글들이 있어서 다른방법 또한 있는지요.
시스템
답변 3
프로필 이미지

예스스탁 예스스탁 답변

2022-10-07 16:44:24

안녕하세요 예스스탁입니다. 1 input : 익절틱수(100),손절틱수(50); var : DD(0),Year(0),V1(0),V2(0),V3(0),V4(0),summer(False); var : ST(0),ET(0),entry(0); if sDate != sDate[1] Then { DD = DayOfWeek(Sdate); Year = Floor(Sdate/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 sDate != sDate[1] 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("b11",AtStop,C); Else Buy("b11.",AtLimit,C); ExitLong("bx1",AtLimit,C*1.005); Buy("b2",AtStop,C*1.0065); ExitLong("bx2",AtLimit,C*1.01); } Else { if DayOpen < DayClose(1) and DayHigh < DayClose(1) Then Buy("b12",AtStop,DayClose(1)); if DayOpen > DayClose(1) and DayLow > DayClose(1) Then Buy("b12.",AtStop,DayClose(1)); if DayHigh <= DayClose(1)*1.006 Then Buy("b2.",AtStop,DayClose(1)*1.006); if DayHigh < DayClose(1)*1.005 Then ExitLong("bx1.",AtLimit,DayClose(1)*1.005); if DayHigh < DayClose(1)*1.01 Then ExitLong("bx2.",AtLimit,DayClose(1)*1.01); } } SetStopProfittarget(PriceScale*익절틱수,PointStop); SetStopLoss(PriceScale*손절틱수,PointStop); 2 input : 익절틱수(100),손절틱수(50); var : DD(0),Year(0),V1(0),V2(0),V3(0),V4(0),summer(False); var : ST(0),ET(0),entry(0); if sDate != sDate[1] Then { DD = DayOfWeek(Sdate); Year = Floor(Sdate/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 sDate != sDate[1] 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); } Sell("s11",AtLimit,C*1.0051); ExitShort("sx1",AtLimit,C*0.992); Buy("b11",AtLimit,C*0.99); ExitLong("bx1",AtLimit,C*0.995); } Else { if h < DayClose(1)*1.0051 Then Sell("s12",AtLimit,DayClose(1)*1.0051); if l > DayClose(1)*0.99 Then Buy("b12",AtLimit,DayClose(1)*0.99); if l > DayClose(1)*0.992 Then ExitShort("sx2",AtLimit,DayClose(1)*0.992); if h < DayClose(1)*0.995 Then ExitLong("bx2",AtLimit,DayClose(1)*0.995); } } SetStopProfittarget(PriceScale*익절틱수,PointStop); SetStopLoss(PriceScale*손절틱수,PointStop); 즐거운 하루되세요 > 푸른 님이 쓴 글입니다. > 제목 : 문의 드립니다 > 일봉매매에서 수식어 부탁드립니다 전일대비 0.00% 매수 0.50% 청산 그 이후 0.6% 매수 1.00% 청산 익절100 손절50 ---------------------- 전일대비 0.51% 매도 -0.80% 청산 그 이후 -1.00% 매수 -0.50% 청산 익절100 손절50 -------------------------------------------------- 1. input : 익절틱수(160),손절틱수(100); if NextBarSdate != sDate Then { if NextBarOpen > C Then { Buy("b",AtStop,NextBarOpen+PriceScale*10); Sell("s",AtStop,NextBarOpen-PriceScale*10); } if NextBarOpen < C Then { ExitLong("bx",AtStop,NextBarOpen-PriceScale*10); ExitShort("sx",AtStop,NextBarOpen+PriceScale*10); } } if MarketPosition == 1 Then Sell("ss",AtStop,EntryPrice-10); if MarketPosition == -1 Then Buy("ss1",AtStop,EntryPrice+10); SetStopProfittarget(PriceScale*익절틱수,PointStop); SetStopLoss(PriceScale*손절틱수,PointStop); if NextBarSdate != sDate Then { if NextBarOpen > C Then { Buy("b2",AtStop,NextBarOpen+PriceScale*10); Sell("s2",AtStop,NextBarOpen-PriceScale*10); } if NextBarOpen < C Then { ExitLong("bx2",AtStop,NextBarOpen-PriceScale*10); ExitShort ("sx2",AtStop,NextBarOpen+PriceScale*10); } } if MarketPosition == 1 Then Sell("sss",AtStop,EntryPrice-10); if MarketPosition == -1 Then Buy("sss1",AtStop,EntryPrice+10); SetStopProfittarget(PriceScale*익절틱수,PointStop); SetStopLoss(PriceScale*손절틱수,PointStop); if NextBarSdate != sDate Then { if NextBarOpen < C Then { Buy("b8",AtStop,NextBarOpen+PriceScale*10); Sell("s8",AtStop,NextBarOpen-PriceScale*10); } if NextBarOpen > C Then { ExitLong("bx8",AtStop,NextBarOpen-PriceScale*10); ExitShort("sx8",AtStop,NextBarOpen+PriceScale*10); } } if MarketPosition == 1 Then Sell("bb",AtStop,EntryPrice-10); if MarketPosition == -1 Then Buy("bb1",AtStop,EntryPrice+10); SetStopProfittarget(PriceScale*익절틱수,PointStop); SetStopLoss(PriceScale*손절틱수,PointStop); if NextBarSdate != sDate Then { if NextBarOpen < C Then { Buy("b9",AtStop,NextBarOpen+PriceScale*10); Sell("s9",AtStop,NextBarOpen-PriceScale*10); } if NextBarOpen > C Then { ExitLong("bx9",AtStop,NextBarOpen-PriceScale*10); ExitShort("sx9",AtStop,NextBarOpen+PriceScale*10); } } if MarketPosition == 1 Then Sell("bbb",AtStop,EntryPrice-10); if MarketPosition == -1 Then Buy("bbb1",AtStop,EntryPrice+10); SetStopProfittarget(PriceScale*익절틱수,PointStop); SetStopLoss(PriceScale*손절틱수,PointStop); 2. input : 익절틱수(180),손절틱수(100); if NextBarSdate != sDate Then { if NextBarOpen > C Then { Buy("b",AtStop,NextBarOpen+PriceScale*10); Sell("s",AtStop,NextBarOpen-PriceScale*10); } if NextBarOpen > C Then { ExitLong("bx",AtStop,NextBarOpen-PriceScale*10); ExitShort("sx",AtStop,NextBarOpen+PriceScale*10); } } if MarketPosition > 1 Then Sell("ss",AtStop,EntryPrice-30); if MarketPosition < -1 Then Buy("ss1",AtStop,EntryPrice+30); if NextBarSdate != sDate Then { if NextBarOpen < C Then { Buy("b1",AtStop,NextBarOpen+PriceScale*10); Sell("s1",AtStop,NextBarOpen-PriceScale*10); } if NextBarOpen < C Then { ExitLong("b1x",AtStop,NextBarOpen-PriceScale*10); ExitShort("s1x",AtStop,NextBarOpen+PriceScale*10); } } if MarketPosition > 1 Then Sell("sss",AtStop,EntryPrice-30); if MarketPosition < -1 Then Buy("sss1",AtStop,EntryPrice+30); SetStopProfittarget(PriceScale*익절틱수,PointStop); SetStopLoss(PriceScale*손절틱수,PointStop); ------------------------------- 위 1, 2번은 ==, < > 의 스위칭기호가 포함된 수식어 입니다. 그래프의 체결내용은 아침에 매도후 매도청산 그리고 매수로 나옵니다. 잔고현황에는 계약수가 없는데 스위칭기호중 ==, < > 중 하나를 잘못 선택한 경우인지 아니면 다른 선택이 있는지 문의 드립니다. 그리고 게시판 질답에 일봉 당일청산은 불가 하다고 글들이 있어서 다른방법 또한 있는지요.
프로필 이미지

푸른

2022-10-07 17:03:28

> 예스스탁 님이 쓴 글입니다. > 제목 : Re : 문의 드립니다 > 안녕하세요 예스스탁입니다. 1 input : 익절틱수(100),손절틱수(50); var : DD(0),Year(0),V1(0),V2(0),V3(0),V4(0),summer(False); var : ST(0),ET(0),entry(0); if sDate != sDate[1] Then { DD = DayOfWeek(Sdate); Year = Floor(Sdate/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 sDate != sDate[1] 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("b11",AtStop,C); Else Buy("b11.",AtLimit,C); ExitLong("bx1",AtLimit,C*1.005); Buy("b2",AtStop,C*1.0065); ExitLong("bx2",AtLimit,C*1.01); } Else { if DayOpen < DayClose(1) and DayHigh < DayClose(1) Then Buy("b12",AtStop,DayClose(1)); if DayOpen > DayClose(1) and DayLow > DayClose(1) Then Buy("b12.",AtStop,DayClose(1)); if DayHigh <= DayClose(1)*1.006 Then Buy("b2.",AtStop,DayClose(1)*1.006); if DayHigh < DayClose(1)*1.005 Then ExitLong("bx1.",AtLimit,DayClose(1)*1.005); if DayHigh < DayClose(1)*1.01 Then ExitLong("bx2.",AtLimit,DayClose(1)*1.01); } } SetStopProfittarget(PriceScale*익절틱수,PointStop); SetStopLoss(PriceScale*손절틱수,PointStop); 2 input : 익절틱수(100),손절틱수(50); var : DD(0),Year(0),V1(0),V2(0),V3(0),V4(0),summer(False); var : ST(0),ET(0),entry(0); if sDate != sDate[1] Then { DD = DayOfWeek(Sdate); Year = Floor(Sdate/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 sDate != sDate[1] 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); } Sell("s11",AtLimit,C*1.0051); ExitShort("sx1",AtLimit,C*0.992); Buy("b11",AtLimit,C*0.99); ExitLong("bx1",AtLimit,C*0.995); } Else { if h < DayClose(1)*1.0051 Then Sell("s12",AtLimit,DayClose(1)*1.0051); if l > DayClose(1)*0.99 Then Buy("b12",AtLimit,DayClose(1)*0.99); if l > DayClose(1)*0.992 Then ExitShort("sx2",AtLimit,DayClose(1)*0.992); if h < DayClose(1)*0.995 Then ExitLong("bx2",AtLimit,DayClose(1)*0.995); } } SetStopProfittarget(PriceScale*익절틱수,PointStop); SetStopLoss(PriceScale*손절틱수,PointStop); 즐거운 하루되세요 > 푸른 님이 쓴 글입니다. > 제목 : 문의 드립니다 > 일봉매매에서 수식어 부탁드립니다 전일대비 0.00% 매수 0.50% 청산 그 이후 0.6% 매수 1.00% 청산 익절100 손절50 ---------------------- 전일대비 0.51% 매도 -0.80% 청산 그 이후 -1.00% 매수 -0.50% 청산 익절100 손절50 -------------------------------------------------- 1. input : 익절틱수(160),손절틱수(100); if NextBarSdate != sDate Then { if NextBarOpen > C Then { Buy("b",AtStop,NextBarOpen+PriceScale*10); Sell("s",AtStop,NextBarOpen-PriceScale*10); } if NextBarOpen < C Then { ExitLong("bx",AtStop,NextBarOpen-PriceScale*10); ExitShort("sx",AtStop,NextBarOpen+PriceScale*10); } } if MarketPosition == 1 Then Sell("ss",AtStop,EntryPrice-10); if MarketPosition == -1 Then Buy("ss1",AtStop,EntryPrice+10); SetStopProfittarget(PriceScale*익절틱수,PointStop); SetStopLoss(PriceScale*손절틱수,PointStop); if NextBarSdate != sDate Then { if NextBarOpen > C Then { Buy("b2",AtStop,NextBarOpen+PriceScale*10); Sell("s2",AtStop,NextBarOpen-PriceScale*10); } if NextBarOpen < C Then { ExitLong("bx2",AtStop,NextBarOpen-PriceScale*10); ExitShort ("sx2",AtStop,NextBarOpen+PriceScale*10); } } if MarketPosition == 1 Then Sell("sss",AtStop,EntryPrice-10); if MarketPosition == -1 Then Buy("sss1",AtStop,EntryPrice+10); SetStopProfittarget(PriceScale*익절틱수,PointStop); SetStopLoss(PriceScale*손절틱수,PointStop); if NextBarSdate != sDate Then { if NextBarOpen < C Then { Buy("b8",AtStop,NextBarOpen+PriceScale*10); Sell("s8",AtStop,NextBarOpen-PriceScale*10); } if NextBarOpen > C Then { ExitLong("bx8",AtStop,NextBarOpen-PriceScale*10); ExitShort("sx8",AtStop,NextBarOpen+PriceScale*10); } } if MarketPosition == 1 Then Sell("bb",AtStop,EntryPrice-10); if MarketPosition == -1 Then Buy("bb1",AtStop,EntryPrice+10); SetStopProfittarget(PriceScale*익절틱수,PointStop); SetStopLoss(PriceScale*손절틱수,PointStop); if NextBarSdate != sDate Then { if NextBarOpen < C Then { Buy("b9",AtStop,NextBarOpen+PriceScale*10); Sell("s9",AtStop,NextBarOpen-PriceScale*10); } if NextBarOpen > C Then { ExitLong("bx9",AtStop,NextBarOpen-PriceScale*10); ExitShort("sx9",AtStop,NextBarOpen+PriceScale*10); } } if MarketPosition == 1 Then Sell("bbb",AtStop,EntryPrice-10); if MarketPosition == -1 Then Buy("bbb1",AtStop,EntryPrice+10); SetStopProfittarget(PriceScale*익절틱수,PointStop); SetStopLoss(PriceScale*손절틱수,PointStop); 2. input : 익절틱수(180),손절틱수(100); if NextBarSdate != sDate Then { if NextBarOpen > C Then { Buy("b",AtStop,NextBarOpen+PriceScale*10); Sell("s",AtStop,NextBarOpen-PriceScale*10); } if NextBarOpen > C Then { ExitLong("bx",AtStop,NextBarOpen-PriceScale*10); ExitShort("sx",AtStop,NextBarOpen+PriceScale*10); } } if MarketPosition > 1 Then Sell("ss",AtStop,EntryPrice-30); if MarketPosition < -1 Then Buy("ss1",AtStop,EntryPrice+30); if NextBarSdate != sDate Then { if NextBarOpen < C Then { Buy("b1",AtStop,NextBarOpen+PriceScale*10); Sell("s1",AtStop,NextBarOpen-PriceScale*10); } if NextBarOpen < C Then { ExitLong("b1x",AtStop,NextBarOpen-PriceScale*10); ExitShort("s1x",AtStop,NextBarOpen+PriceScale*10); } } if MarketPosition > 1 Then Sell("sss",AtStop,EntryPrice-30); if MarketPosition < -1 Then Buy("sss1",AtStop,EntryPrice+30); SetStopProfittarget(PriceScale*익절틱수,PointStop); SetStopLoss(PriceScale*손절틱수,PointStop); ------------------------------- 위 1, 2번은 ==, < > 의 스위칭기호가 포함된 수식어 입니다. 그래프의 체결내용은 아침에 매도후 매도청산 그리고 매수로 나옵니다. 잔고현황에는 계약수가 없는데 스위칭기호중 ==, < > 중 하나를 잘못 선택한 경우인지 아니면 다른 선택이 있는지 문의 드립니다. 그리고 게시판 질답에 일봉 당일청산은 불가 하다고 글들이 있어서 다른방법 또한 있는지요. ------------------- input : 익절틱수(180),손절틱수(100); if NextBarSdate != sDate Then { if NextBarOpen > C Then { Buy("b",AtStop,NextBarOpen+PriceScale*10); Sell("s",AtStop,NextBarOpen-PriceScale*10); } if NextBarOpen > C Then { ExitLong("bx",AtStop,NextBarOpen-PriceScale*10); ExitShort("sx",AtStop,NextBarOpen+PriceScale*10); } } if MarketPosition > 1 Then Sell("ss",AtStop,EntryPrice-30); if MarketPosition < -1 Then Buy("ss1",AtStop,EntryPrice+30); if NextBarSdate != sDate Then { if NextBarOpen < C Then { Buy("b1",AtStop,NextBarOpen+PriceScale*10); Sell("s1",AtStop,NextBarOpen-PriceScale*10); } if NextBarOpen < C Then { ExitLong("b1x",AtStop,NextBarOpen-PriceScale*10); ExitShort("s1x",AtStop,NextBarOpen+PriceScale*10); } } if MarketPosition > 1 Then Sell("sss",AtStop,EntryPrice-30); if MarketPosition < -1 Then Buy("sss1",AtStop,EntryPrice+30); SetStopProfittarget(PriceScale*익절틱수,PointStop); SetStopLoss(PriceScale*손절틱수,PointStop); 시간설정에 분봉신호를 정확히 확인했습니다. 위의 수식어를 분봉매매로 전환을 다시 한번더 부탁드립니다. 미리 감사드립니다.
프로필 이미지

예스스탁 예스스탁 답변

2022-10-07 18:19:26

안녕하세요 예스스탁입니다. 1 if MarketPosition > 1 Then Sell("sss",AtStop,EntryPrice-30); if MarketPosition < -1 Then Buy("sss1",AtStop,EntryPrice+30); 올리신 수식에서 위 내용은 조건상 발생을 하지 않는 식입낟. MarketPosition은 포지션을 나타내는 함수로 1,0,-1만 가지게 됩니다. 1보다 크거나, -1보다 작은 값은 없어 해당내용으로는 신호 발생이 없습니다. 2 시초기 기준 +10틱에 매수진입, 시초가-10틱에 매도진입을 하고 스위칭 되거나 익절 혹은 손절하게 됩니다. input : 익절틱수(180),손절틱수(100); var : DD(0),Year(0),V1(0),V2(0),V3(0),V4(0),summer(False); var : ST(0),ET(0),entry(0); if sDate != sDate[1] Then { DD = DayOfWeek(Sdate); Year = Floor(Sdate/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 sDate != sDate[1] Then SetStopEndofday(ET); } if ((NextBarSdate != sDate and NextBarStime >= ST) or (NextBarSdate == sDate and NextBarStime >= ST and sTime < ST)) Then { 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); } } SetStopProfittarget(PriceScale*익절틱수,PointStop); SetStopLoss(PriceScale*손절틱수,PointStop); 즐거운 하루되세요 > 푸른 님이 쓴 글입니다. > 제목 : Re : Re : 문의 드립니다 > > 예스스탁 님이 쓴 글입니다. > 제목 : Re : 문의 드립니다 > 안녕하세요 예스스탁입니다. 1 input : 익절틱수(100),손절틱수(50); var : DD(0),Year(0),V1(0),V2(0),V3(0),V4(0),summer(False); var : ST(0),ET(0),entry(0); if sDate != sDate[1] Then { DD = DayOfWeek(Sdate); Year = Floor(Sdate/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 sDate != sDate[1] 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("b11",AtStop,C); Else Buy("b11.",AtLimit,C); ExitLong("bx1",AtLimit,C*1.005); Buy("b2",AtStop,C*1.0065); ExitLong("bx2",AtLimit,C*1.01); } Else { if DayOpen < DayClose(1) and DayHigh < DayClose(1) Then Buy("b12",AtStop,DayClose(1)); if DayOpen > DayClose(1) and DayLow > DayClose(1) Then Buy("b12.",AtStop,DayClose(1)); if DayHigh <= DayClose(1)*1.006 Then Buy("b2.",AtStop,DayClose(1)*1.006); if DayHigh < DayClose(1)*1.005 Then ExitLong("bx1.",AtLimit,DayClose(1)*1.005); if DayHigh < DayClose(1)*1.01 Then ExitLong("bx2.",AtLimit,DayClose(1)*1.01); } } SetStopProfittarget(PriceScale*익절틱수,PointStop); SetStopLoss(PriceScale*손절틱수,PointStop); 2 input : 익절틱수(100),손절틱수(50); var : DD(0),Year(0),V1(0),V2(0),V3(0),V4(0),summer(False); var : ST(0),ET(0),entry(0); if sDate != sDate[1] Then { DD = DayOfWeek(Sdate); Year = Floor(Sdate/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 sDate != sDate[1] 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); } Sell("s11",AtLimit,C*1.0051); ExitShort("sx1",AtLimit,C*0.992); Buy("b11",AtLimit,C*0.99); ExitLong("bx1",AtLimit,C*0.995); } Else { if h < DayClose(1)*1.0051 Then Sell("s12",AtLimit,DayClose(1)*1.0051); if l > DayClose(1)*0.99 Then Buy("b12",AtLimit,DayClose(1)*0.99); if l > DayClose(1)*0.992 Then ExitShort("sx2",AtLimit,DayClose(1)*0.992); if h < DayClose(1)*0.995 Then ExitLong("bx2",AtLimit,DayClose(1)*0.995); } } SetStopProfittarget(PriceScale*익절틱수,PointStop); SetStopLoss(PriceScale*손절틱수,PointStop); 즐거운 하루되세요 > 푸른 님이 쓴 글입니다. > 제목 : 문의 드립니다 > 일봉매매에서 수식어 부탁드립니다 전일대비 0.00% 매수 0.50% 청산 그 이후 0.6% 매수 1.00% 청산 익절100 손절50 ---------------------- 전일대비 0.51% 매도 -0.80% 청산 그 이후 -1.00% 매수 -0.50% 청산 익절100 손절50 -------------------------------------------------- 1. input : 익절틱수(160),손절틱수(100); if NextBarSdate != sDate Then { if NextBarOpen > C Then { Buy("b",AtStop,NextBarOpen+PriceScale*10); Sell("s",AtStop,NextBarOpen-PriceScale*10); } if NextBarOpen < C Then { ExitLong("bx",AtStop,NextBarOpen-PriceScale*10); ExitShort("sx",AtStop,NextBarOpen+PriceScale*10); } } if MarketPosition == 1 Then Sell("ss",AtStop,EntryPrice-10); if MarketPosition == -1 Then Buy("ss1",AtStop,EntryPrice+10); SetStopProfittarget(PriceScale*익절틱수,PointStop); SetStopLoss(PriceScale*손절틱수,PointStop); if NextBarSdate != sDate Then { if NextBarOpen > C Then { Buy("b2",AtStop,NextBarOpen+PriceScale*10); Sell("s2",AtStop,NextBarOpen-PriceScale*10); } if NextBarOpen < C Then { ExitLong("bx2",AtStop,NextBarOpen-PriceScale*10); ExitShort ("sx2",AtStop,NextBarOpen+PriceScale*10); } } if MarketPosition == 1 Then Sell("sss",AtStop,EntryPrice-10); if MarketPosition == -1 Then Buy("sss1",AtStop,EntryPrice+10); SetStopProfittarget(PriceScale*익절틱수,PointStop); SetStopLoss(PriceScale*손절틱수,PointStop); if NextBarSdate != sDate Then { if NextBarOpen < C Then { Buy("b8",AtStop,NextBarOpen+PriceScale*10); Sell("s8",AtStop,NextBarOpen-PriceScale*10); } if NextBarOpen > C Then { ExitLong("bx8",AtStop,NextBarOpen-PriceScale*10); ExitShort("sx8",AtStop,NextBarOpen+PriceScale*10); } } if MarketPosition == 1 Then Sell("bb",AtStop,EntryPrice-10); if MarketPosition == -1 Then Buy("bb1",AtStop,EntryPrice+10); SetStopProfittarget(PriceScale*익절틱수,PointStop); SetStopLoss(PriceScale*손절틱수,PointStop); if NextBarSdate != sDate Then { if NextBarOpen < C Then { Buy("b9",AtStop,NextBarOpen+PriceScale*10); Sell("s9",AtStop,NextBarOpen-PriceScale*10); } if NextBarOpen > C Then { ExitLong("bx9",AtStop,NextBarOpen-PriceScale*10); ExitShort("sx9",AtStop,NextBarOpen+PriceScale*10); } } if MarketPosition == 1 Then Sell("bbb",AtStop,EntryPrice-10); if MarketPosition == -1 Then Buy("bbb1",AtStop,EntryPrice+10); SetStopProfittarget(PriceScale*익절틱수,PointStop); SetStopLoss(PriceScale*손절틱수,PointStop); 2. input : 익절틱수(180),손절틱수(100); if NextBarSdate != sDate Then { if NextBarOpen > C Then { Buy("b",AtStop,NextBarOpen+PriceScale*10); Sell("s",AtStop,NextBarOpen-PriceScale*10); } if NextBarOpen > C Then { ExitLong("bx",AtStop,NextBarOpen-PriceScale*10); ExitShort("sx",AtStop,NextBarOpen+PriceScale*10); } } if MarketPosition > 1 Then Sell("ss",AtStop,EntryPrice-30); if MarketPosition < -1 Then Buy("ss1",AtStop,EntryPrice+30); if NextBarSdate != sDate Then { if NextBarOpen < C Then { Buy("b1",AtStop,NextBarOpen+PriceScale*10); Sell("s1",AtStop,NextBarOpen-PriceScale*10); } if NextBarOpen < C Then { ExitLong("b1x",AtStop,NextBarOpen-PriceScale*10); ExitShort("s1x",AtStop,NextBarOpen+PriceScale*10); } } if MarketPosition > 1 Then Sell("sss",AtStop,EntryPrice-30); if MarketPosition < -1 Then Buy("sss1",AtStop,EntryPrice+30); SetStopProfittarget(PriceScale*익절틱수,PointStop); SetStopLoss(PriceScale*손절틱수,PointStop); ------------------------------- 위 1, 2번은 ==, < > 의 스위칭기호가 포함된 수식어 입니다. 그래프의 체결내용은 아침에 매도후 매도청산 그리고 매수로 나옵니다. 잔고현황에는 계약수가 없는데 스위칭기호중 ==, < > 중 하나를 잘못 선택한 경우인지 아니면 다른 선택이 있는지 문의 드립니다. 그리고 게시판 질답에 일봉 당일청산은 불가 하다고 글들이 있어서 다른방법 또한 있는지요. ------------------- input : 익절틱수(180),손절틱수(100); if NextBarSdate != sDate Then { if NextBarOpen > C Then { Buy("b",AtStop,NextBarOpen+PriceScale*10); Sell("s",AtStop,NextBarOpen-PriceScale*10); } if NextBarOpen > C Then { ExitLong("bx",AtStop,NextBarOpen-PriceScale*10); ExitShort("sx",AtStop,NextBarOpen+PriceScale*10); } } if MarketPosition > 1 Then Sell("ss",AtStop,EntryPrice-30); if MarketPosition < -1 Then Buy("ss1",AtStop,EntryPrice+30); if NextBarSdate != sDate Then { if NextBarOpen < C Then { Buy("b1",AtStop,NextBarOpen+PriceScale*10); Sell("s1",AtStop,NextBarOpen-PriceScale*10); } if NextBarOpen < C Then { ExitLong("b1x",AtStop,NextBarOpen-PriceScale*10); ExitShort("s1x",AtStop,NextBarOpen+PriceScale*10); } } if MarketPosition > 1 Then Sell("sss",AtStop,EntryPrice-30); if MarketPosition < -1 Then Buy("sss1",AtStop,EntryPrice+30); SetStopProfittarget(PriceScale*익절틱수,PointStop); SetStopLoss(PriceScale*손절틱수,PointStop); 시간설정에 분봉신호를 정확히 확인했습니다. 위의 수식어를 분봉매매로 전환을 다시 한번더 부탁드립니다. 미리 감사드립니다.