커뮤니티

문의 드립니다.

프로필 이미지
에리카
2021-10-18 15:01:07
1100
글번호 152953
답변완료
수고많으십니다. 아래 수식에 추가 수식 부탁드립니다. 3분봉 차트에서 오전 10시 18분봉이 음봉으로 끝나는 경우 종가에 매도, 양봉으로 끝나는 경우 종가에 매수. input : StartTime(101500),EndTime(114000); input : Length(20), D1(2); input : 익절1(30),손절1(30),청산구분시간(103000),익절2(50),손절2(30),익절연속횟수(3),손절연속횟수(2); var : Tcond(false),profit(0),loss(0); 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; profit = 0; loss = 0; } if TotalTrades > TotalTrades[1] Then { if IsExitName("bp1.",1) or IsExitName("bp2.",21) or IsExitName("bp1",1) or IsExitName("bp2",21) or IsExitName("sp1.",1) or IsExitName("sp2.",1) or IsExitName("sp1",1) or IsExitName("sp2",1) Then profit = profit+1; Else profit = 0; if IsExitName("bl1.",1) or IsExitName("bl2.",1) or IsExitName("bl1",1) or IsExitName("bl2",1) or IsExitName("sl1.",1) or IsExitName("sl2.",1) or IsExitName("sl1",1) or IsExitName("sl2",1) Then loss = loss+1; Else loss = 0; } var1 = BollBandUp(Length,D1); var2 = BollBandDown(Length,D1); if Tcond == true Then { If CrossUP(H,var1) and c > o and profit < 익절연속횟수 and loss < 손절연속횟수 then { Buy("b",OnClose,DEF,1); if sTime >= StartTime and sTime < 청산구분시간 Then { ExitLong("bp1.",AtLimit,C+PriceScale*익절1,"",1,1); ExitLong("bl1.",AtStop,C-PriceScale*손절1,"",1,1); } if sTime >= 청산구분시간 and sTime < Endtime Then { ExitLong("bp2.",AtLimit,C+PriceScale*익절2,"",1,1); ExitLong("bl2.",AtStop,C-PriceScale*손절2,"",1,1); } } If CrossDown(L,Var2) and C < O and profit < 익절연속횟수 and loss < 손절연속횟수 then { Sell("s",OnClose,DEF,1); if sTime >= StartTime and sTime < 103000 Then { ExitShort("sp1.",AtLimit,C-PriceScale*익절1,"",1,1); ExitShort("sl1.",AtStop,C+PriceScale*손절1,"",1,1); } if sTime >= 103000 and sTime < Endtime Then { ExitShort("sp2.",AtLimit,C-PriceScale*익절2,"",1,1); ExitShort("sl2.",AtStop,C+PriceScale*손절2,"",1,1); } } } if MarketPosition == 1 Then { if sTime >= StartTime and sTime < 청산구분시간 Then { ExitLong("bp1",AtLimit,EntryPrice+PriceScale*익절1,"",1,1); ExitLong("bl1",AtStop,EntryPrice-PriceScale*손절1,"",1,1); } if sTime >= 청산구분시간 and sTime < Endtime Then { ExitLong("bp2",AtLimit,EntryPrice+PriceScale*익절2,"",1,1); ExitLong("bl2",AtStop,EntryPrice-PriceScale*손절2,"",1,1); } } if MarketPosition == -1 Then { if sTime >= StartTime and sTime < 103000 Then { ExitShort("sp1",AtLimit,EntryPrice-PriceScale*익절1,"",1,1); ExitShort("sl1",AtStop,EntryPrice+PriceScale*손절1,"",1,1); } if sTime >= 103000 and sTime < Endtime Then { ExitShort("sp2",AtLimit,EntryPrice-PriceScale*익절2,"",1,1); ExitShort("sl2",AtStop,EntryPrice+PriceScale*손절2,"",1,1); } } 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 { IF Endtime <= starttime Then { SetStopEndofday(0); } }
시스템
답변 2
프로필 이미지

예스스탁 예스스탁 답변

2021-10-18 16:29:38

안녕하세요 예스스탁입니다. input : StartTime(101500),EndTime(114000); input : Length(20), D1(2); input : 익절1(30),손절1(30),청산구분시간(103000),익절2(50),손절2(30),익절연속횟수(3),손절연속횟수(2); var : Tcond(false),profit(0),loss(0); 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; profit = 0; loss = 0; if C > O Then Buy("b1"); if C < O Then Sell("s1"); } if TotalTrades > TotalTrades[1] Then { if IsExitName("bp1.",1) or IsExitName("bp2.",21) or IsExitName("bp1",1) or IsExitName("bp2",21) or IsExitName("sp1.",1) or IsExitName("sp2.",1) or IsExitName("sp1",1) or IsExitName("sp2",1) Then profit = profit+1; Else profit = 0; if IsExitName("bl1.",1) or IsExitName("bl2.",1) or IsExitName("bl1",1) or IsExitName("bl2",1) or IsExitName("sl1.",1) or IsExitName("sl2.",1) or IsExitName("sl1",1) or IsExitName("sl2",1) Then loss = loss+1; Else loss = 0; } var1 = BollBandUp(Length,D1); var2 = BollBandDown(Length,D1); if Tcond == true Then { If CrossUP(H,var1) and c > o and profit < 익절연속횟수 and loss < 손절연속횟수 then { Buy("b",OnClose,DEF,1); if sTime >= StartTime and sTime < 청산구분시간 Then { ExitLong("bp1.",AtLimit,C+PriceScale*익절1,"",1,1); ExitLong("bl1.",AtStop,C-PriceScale*손절1,"",1,1); } if sTime >= 청산구분시간 and sTime < Endtime Then { ExitLong("bp2.",AtLimit,C+PriceScale*익절2,"",1,1); ExitLong("bl2.",AtStop,C-PriceScale*손절2,"",1,1); } } If CrossDown(L,Var2) and C < O and profit < 익절연속횟수 and loss < 손절연속횟수 then { Sell("s",OnClose,DEF,1); if sTime >= StartTime and sTime < 103000 Then { ExitShort("sp1.",AtLimit,C-PriceScale*익절1,"",1,1); ExitShort("sl1.",AtStop,C+PriceScale*손절1,"",1,1); } if sTime >= 103000 and sTime < Endtime Then { ExitShort("sp2.",AtLimit,C-PriceScale*익절2,"",1,1); ExitShort("sl2.",AtStop,C+PriceScale*손절2,"",1,1); } } } if MarketPosition == 1 Then { if sTime >= StartTime and sTime < 청산구분시간 Then { ExitLong("bp1",AtLimit,EntryPrice+PriceScale*익절1,"",1,1); ExitLong("bl1",AtStop,EntryPrice-PriceScale*손절1,"",1,1); } if sTime >= 청산구분시간 and sTime < Endtime Then { ExitLong("bp2",AtLimit,EntryPrice+PriceScale*익절2,"",1,1); ExitLong("bl2",AtStop,EntryPrice-PriceScale*손절2,"",1,1); } } if MarketPosition == -1 Then { if sTime >= StartTime and sTime < 103000 Then { ExitShort("sp1",AtLimit,EntryPrice-PriceScale*익절1,"",1,1); ExitShort("sl1",AtStop,EntryPrice+PriceScale*손절1,"",1,1); } if sTime >= 103000 and sTime < Endtime Then { ExitShort("sp2",AtLimit,EntryPrice-PriceScale*익절2,"",1,1); ExitShort("sl2",AtStop,EntryPrice+PriceScale*손절2,"",1,1); } } 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 { IF Endtime <= starttime Then { SetStopEndofday(0); } } 즐거운 하루되세요 > 에리카 님이 쓴 글입니다. > 제목 : 문의 드립니다. > 수고많으십니다. 아래 수식에 추가 수식 부탁드립니다. 3분봉 차트에서 오전 10시 18분봉이 음봉으로 끝나는 경우 종가에 매도, 양봉으로 끝나는 경우 종가에 매수. input : StartTime(101500),EndTime(114000); input : Length(20), D1(2); input : 익절1(30),손절1(30),청산구분시간(103000),익절2(50),손절2(30),익절연속횟수(3),손절연속횟수(2); var : Tcond(false),profit(0),loss(0); 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; profit = 0; loss = 0; } if TotalTrades > TotalTrades[1] Then { if IsExitName("bp1.",1) or IsExitName("bp2.",21) or IsExitName("bp1",1) or IsExitName("bp2",21) or IsExitName("sp1.",1) or IsExitName("sp2.",1) or IsExitName("sp1",1) or IsExitName("sp2",1) Then profit = profit+1; Else profit = 0; if IsExitName("bl1.",1) or IsExitName("bl2.",1) or IsExitName("bl1",1) or IsExitName("bl2",1) or IsExitName("sl1.",1) or IsExitName("sl2.",1) or IsExitName("sl1",1) or IsExitName("sl2",1) Then loss = loss+1; Else loss = 0; } var1 = BollBandUp(Length,D1); var2 = BollBandDown(Length,D1); if Tcond == true Then { If CrossUP(H,var1) and c > o and profit < 익절연속횟수 and loss < 손절연속횟수 then { Buy("b",OnClose,DEF,1); if sTime >= StartTime and sTime < 청산구분시간 Then { ExitLong("bp1.",AtLimit,C+PriceScale*익절1,"",1,1); ExitLong("bl1.",AtStop,C-PriceScale*손절1,"",1,1); } if sTime >= 청산구분시간 and sTime < Endtime Then { ExitLong("bp2.",AtLimit,C+PriceScale*익절2,"",1,1); ExitLong("bl2.",AtStop,C-PriceScale*손절2,"",1,1); } } If CrossDown(L,Var2) and C < O and profit < 익절연속횟수 and loss < 손절연속횟수 then { Sell("s",OnClose,DEF,1); if sTime >= StartTime and sTime < 103000 Then { ExitShort("sp1.",AtLimit,C-PriceScale*익절1,"",1,1); ExitShort("sl1.",AtStop,C+PriceScale*손절1,"",1,1); } if sTime >= 103000 and sTime < Endtime Then { ExitShort("sp2.",AtLimit,C-PriceScale*익절2,"",1,1); ExitShort("sl2.",AtStop,C+PriceScale*손절2,"",1,1); } } } if MarketPosition == 1 Then { if sTime >= StartTime and sTime < 청산구분시간 Then { ExitLong("bp1",AtLimit,EntryPrice+PriceScale*익절1,"",1,1); ExitLong("bl1",AtStop,EntryPrice-PriceScale*손절1,"",1,1); } if sTime >= 청산구분시간 and sTime < Endtime Then { ExitLong("bp2",AtLimit,EntryPrice+PriceScale*익절2,"",1,1); ExitLong("bl2",AtStop,EntryPrice-PriceScale*손절2,"",1,1); } } if MarketPosition == -1 Then { if sTime >= StartTime and sTime < 103000 Then { ExitShort("sp1",AtLimit,EntryPrice-PriceScale*익절1,"",1,1); ExitShort("sl1",AtStop,EntryPrice+PriceScale*손절1,"",1,1); } if sTime >= 103000 and sTime < Endtime Then { ExitShort("sp2",AtLimit,EntryPrice-PriceScale*익절2,"",1,1); ExitShort("sl2",AtStop,EntryPrice+PriceScale*손절2,"",1,1); } } 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 { IF Endtime <= starttime Then { SetStopEndofday(0); } }
프로필 이미지

에리카

2021-10-18 19:25:26

3분봉 차트에서 오전 10시 18분봉이 음봉으로 끝나는 경우 종가에 매도, 양봉으로 끝나는 경우 종가에 매수. 이거 10시 30분 전 거래는 30틱 익절인데, 수식이 그렇게 된게 맞나요? 50틱 익절로 되어 있지 않나해서요. 확인부탁드립니다~~ > 예스스탁 님이 쓴 글입니다. > 제목 : Re : 문의 드립니다. > 안녕하세요 예스스탁입니다. input : StartTime(101500),EndTime(114000); input : Length(20), D1(2); input : 익절1(30),손절1(30),청산구분시간(103000),익절2(50),손절2(30),익절연속횟수(3),손절연속횟수(2); var : Tcond(false),profit(0),loss(0); 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; profit = 0; loss = 0; if C > O Then Buy("b1"); if C < O Then Sell("s1"); } if TotalTrades > TotalTrades[1] Then { if IsExitName("bp1.",1) or IsExitName("bp2.",21) or IsExitName("bp1",1) or IsExitName("bp2",21) or IsExitName("sp1.",1) or IsExitName("sp2.",1) or IsExitName("sp1",1) or IsExitName("sp2",1) Then profit = profit+1; Else profit = 0; if IsExitName("bl1.",1) or IsExitName("bl2.",1) or IsExitName("bl1",1) or IsExitName("bl2",1) or IsExitName("sl1.",1) or IsExitName("sl2.",1) or IsExitName("sl1",1) or IsExitName("sl2",1) Then loss = loss+1; Else loss = 0; } var1 = BollBandUp(Length,D1); var2 = BollBandDown(Length,D1); if Tcond == true Then { If CrossUP(H,var1) and c > o and profit < 익절연속횟수 and loss < 손절연속횟수 then { Buy("b",OnClose,DEF,1); if sTime >= StartTime and sTime < 청산구분시간 Then { ExitLong("bp1.",AtLimit,C+PriceScale*익절1,"",1,1); ExitLong("bl1.",AtStop,C-PriceScale*손절1,"",1,1); } if sTime >= 청산구분시간 and sTime < Endtime Then { ExitLong("bp2.",AtLimit,C+PriceScale*익절2,"",1,1); ExitLong("bl2.",AtStop,C-PriceScale*손절2,"",1,1); } } If CrossDown(L,Var2) and C < O and profit < 익절연속횟수 and loss < 손절연속횟수 then { Sell("s",OnClose,DEF,1); if sTime >= StartTime and sTime < 103000 Then { ExitShort("sp1.",AtLimit,C-PriceScale*익절1,"",1,1); ExitShort("sl1.",AtStop,C+PriceScale*손절1,"",1,1); } if sTime >= 103000 and sTime < Endtime Then { ExitShort("sp2.",AtLimit,C-PriceScale*익절2,"",1,1); ExitShort("sl2.",AtStop,C+PriceScale*손절2,"",1,1); } } } if MarketPosition == 1 Then { if sTime >= StartTime and sTime < 청산구분시간 Then { ExitLong("bp1",AtLimit,EntryPrice+PriceScale*익절1,"",1,1); ExitLong("bl1",AtStop,EntryPrice-PriceScale*손절1,"",1,1); } if sTime >= 청산구분시간 and sTime < Endtime Then { ExitLong("bp2",AtLimit,EntryPrice+PriceScale*익절2,"",1,1); ExitLong("bl2",AtStop,EntryPrice-PriceScale*손절2,"",1,1); } } if MarketPosition == -1 Then { if sTime >= StartTime and sTime < 103000 Then { ExitShort("sp1",AtLimit,EntryPrice-PriceScale*익절1,"",1,1); ExitShort("sl1",AtStop,EntryPrice+PriceScale*손절1,"",1,1); } if sTime >= 103000 and sTime < Endtime Then { ExitShort("sp2",AtLimit,EntryPrice-PriceScale*익절2,"",1,1); ExitShort("sl2",AtStop,EntryPrice+PriceScale*손절2,"",1,1); } } 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 { IF Endtime <= starttime Then { SetStopEndofday(0); } } 즐거운 하루되세요 > 에리카 님이 쓴 글입니다. > 제목 : 문의 드립니다. > 수고많으십니다. 아래 수식에 추가 수식 부탁드립니다. 3분봉 차트에서 오전 10시 18분봉이 음봉으로 끝나는 경우 종가에 매도, 양봉으로 끝나는 경우 종가에 매수. input : StartTime(101500),EndTime(114000); input : Length(20), D1(2); input : 익절1(30),손절1(30),청산구분시간(103000),익절2(50),손절2(30),익절연속횟수(3),손절연속횟수(2); var : Tcond(false),profit(0),loss(0); 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; profit = 0; loss = 0; } if TotalTrades > TotalTrades[1] Then { if IsExitName("bp1.",1) or IsExitName("bp2.",21) or IsExitName("bp1",1) or IsExitName("bp2",21) or IsExitName("sp1.",1) or IsExitName("sp2.",1) or IsExitName("sp1",1) or IsExitName("sp2",1) Then profit = profit+1; Else profit = 0; if IsExitName("bl1.",1) or IsExitName("bl2.",1) or IsExitName("bl1",1) or IsExitName("bl2",1) or IsExitName("sl1.",1) or IsExitName("sl2.",1) or IsExitName("sl1",1) or IsExitName("sl2",1) Then loss = loss+1; Else loss = 0; } var1 = BollBandUp(Length,D1); var2 = BollBandDown(Length,D1); if Tcond == true Then { If CrossUP(H,var1) and c > o and profit < 익절연속횟수 and loss < 손절연속횟수 then { Buy("b",OnClose,DEF,1); if sTime >= StartTime and sTime < 청산구분시간 Then { ExitLong("bp1.",AtLimit,C+PriceScale*익절1,"",1,1); ExitLong("bl1.",AtStop,C-PriceScale*손절1,"",1,1); } if sTime >= 청산구분시간 and sTime < Endtime Then { ExitLong("bp2.",AtLimit,C+PriceScale*익절2,"",1,1); ExitLong("bl2.",AtStop,C-PriceScale*손절2,"",1,1); } } If CrossDown(L,Var2) and C < O and profit < 익절연속횟수 and loss < 손절연속횟수 then { Sell("s",OnClose,DEF,1); if sTime >= StartTime and sTime < 103000 Then { ExitShort("sp1.",AtLimit,C-PriceScale*익절1,"",1,1); ExitShort("sl1.",AtStop,C+PriceScale*손절1,"",1,1); } if sTime >= 103000 and sTime < Endtime Then { ExitShort("sp2.",AtLimit,C-PriceScale*익절2,"",1,1); ExitShort("sl2.",AtStop,C+PriceScale*손절2,"",1,1); } } } if MarketPosition == 1 Then { if sTime >= StartTime and sTime < 청산구분시간 Then { ExitLong("bp1",AtLimit,EntryPrice+PriceScale*익절1,"",1,1); ExitLong("bl1",AtStop,EntryPrice-PriceScale*손절1,"",1,1); } if sTime >= 청산구분시간 and sTime < Endtime Then { ExitLong("bp2",AtLimit,EntryPrice+PriceScale*익절2,"",1,1); ExitLong("bl2",AtStop,EntryPrice-PriceScale*손절2,"",1,1); } } if MarketPosition == -1 Then { if sTime >= StartTime and sTime < 103000 Then { ExitShort("sp1",AtLimit,EntryPrice-PriceScale*익절1,"",1,1); ExitShort("sl1",AtStop,EntryPrice+PriceScale*손절1,"",1,1); } if sTime >= 103000 and sTime < Endtime Then { ExitShort("sp2",AtLimit,EntryPrice-PriceScale*익절2,"",1,1); ExitShort("sl2",AtStop,EntryPrice+PriceScale*손절2,"",1,1); } } 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 { IF Endtime <= starttime Then { SetStopEndofday(0); } }