커뮤니티

문의 드립니다.

프로필 이미지
jesten77
2021-11-24 15:03:11
746
글번호 153895
답변완료
항상 감사드립니다. 수식 작성 부탁드립니다. 매수 매도 1번, 2번에 대해 각각 수식 부탁드립니다. 2번에서는 ⓵과 ⓶ 부분을 수식내에 구분해서 부탁드립니다. 거래시간 : 오전 9시~ 익일 새벽 6시 익절틱수 : N, 손절틱수 : N 매수 : 1. 삼각가중 5일 이평과 20일 이평이 골든 크로스 2. 삼각가중 5일 이평과 20일 이평이 골든 크로스 + 앞 캔들의 고가를 돌파한 캔들의 ⓵종가 매수(양봉에만 진입), 또는 ⓶돌파시 즉시 매수. 순서는 관계없이 두가지 조건 만족하면 됩니다. 청산 1 – 5일 이평과 20일 이평이 데드 크로스 날 때, ⓵청산 종료 하는 것과 ⓶스위칭 하는 수식으로 구분해서 부탁드립니다. 청산 2 – N틱 지정 청산. 매도 : 1. 삼각가중 5일 이평과 20일 이평이 데드 크로스 2. 삼각가중 5일 이평과 20일 이평이 데드 크로스 + 앞 캔들의 저가를 돌파한 캔들의 ⓵종가 매도(음봉에만 진입), 또는 ⓶돌파시 즉시 매도. 순서는 관계없이 두가지 조건 만족하면 됩니다. 청산 1 – 5일 이평과 20일 이평이 골든 크로스 날 때, ⓵청산 종료 하는 것과 ⓶스위칭 하는 수식으로 구분해서 부탁드립니다. 청산 2 – N틱 지정 청산.
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2021-11-25 11:15:40

안녕하세요 예스스탁입니다. 진입의 2번 내용 중 즉시는 가능하지 않습니다. 이평돌파는 봉완성으로만 체크가 가능해서 즉시 진입은 셋팅된 특정가격와 현재가와 비교해서만 가능합니다. 2개이상 조건을 체크해 즉시 진입은 가능하지 않습니다. 청산2의 n틱 지정청산은 내용을 알수 없습니다. 제외하고 작성해 드립니다. 1. 매수1, 매도1 스위칭가능 input : StartTime(90000),EndTime(060000); input : 익절틱수(50),손절틱수(50); Input : Period1(5),Period2(20); Var : TLen1(0),TLen2(0),TLen3(0),Tma1(0),Tma2(0),Tma3(0); var : Tcond(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; IF Endtime <= starttime Then { SetStopEndofday(0); } } TLen1 = Ceiling((Period1 + 1) * .5); TLen2 = Ceiling((Period2 + 1) * .5); Tma1 = ma(ma(C, TLen1), TLen1); Tma2 = ma(ma(C, TLen2), TLen2); if Tcond == true Then { if MarketPosition <= 0 and CrossUp(Tma1,Tma2) Then Buy("매수1"); if MarketPosition >= 0 and CrossDown(Tma1,Tma2) Then Sell("매도1"); } SetStopProfittarget(PriceScale*익절틱수,PointStop); SetStopLoss(PriceScale*손절틱수,PointStop); 2 매수1 매도1 스위칭불가 input : StartTime(90000),EndTime(060000); input : 익절틱수(50),손절틱수(50); Input : Period1(5),Period2(20); Var : TLen1(0),TLen2(0),TLen3(0),Tma1(0),Tma2(0),Tma3(0); var : Tcond(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; IF Endtime <= starttime Then { SetStopEndofday(0); } } TLen1 = Ceiling((Period1 + 1) * .5); TLen2 = Ceiling((Period2 + 1) * .5); Tma1 = ma(ma(C, TLen1), TLen1); Tma2 = ma(ma(C, TLen2), TLen2); if Tcond == true Then { if MarketPosition == 0 and CrossUp(Tma1,Tma2) Then Buy("매수1"); if MarketPosition == 0 and CrossDown(Tma1,Tma2) Then Sell("매도1"); if MarketPosition == 1 and CrossDown(Tma1,Tma2) Then ExitLong("bx1"); if MarketPosition == -1 and CrossUp(Tma1,Tma2) Then ExitShort("sx1"); } SetStopProfittarget(PriceScale*익절틱수,PointStop); SetStopLoss(PriceScale*손절틱수,PointStop); 3 스위칭가능 input : StartTime(90000),EndTime(060000); input : 익절틱수(50),손절틱수(50); Input : Period1(5),Period2(20); Var : TLen1(0),TLen2(0),TLen3(0),Tma1(0),Tma2(0),Tma3(0); var : Tcond(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; IF Endtime <= starttime Then { SetStopEndofday(0); } } TLen1 = Ceiling((Period1 + 1) * .5); TLen2 = Ceiling((Period2 + 1) * .5); Tma1 = ma(ma(C, TLen1), TLen1); Tma2 = ma(ma(C, TLen2), TLen2); if Tcond == true Then { if MarketPosition <= 0 and CrossUp(Tma1,Tma2) and C > O and C > H[1] Then Buy("매수2"); if MarketPosition >= 0 and CrossDown(Tma1,Tma2) and C < O and C < L[1] Then Sell("매도2"); } SetStopProfittarget(PriceScale*익절틱수,PointStop); SetStopLoss(PriceScale*손절틱수,PointStop); 4 매수2, 매도2 스위칭 불가 input : StartTime(90000),EndTime(060000); input : 익절틱수(50),손절틱수(50); Input : Period1(5),Period2(20); Var : TLen1(0),TLen2(0),TLen3(0),Tma1(0),Tma2(0),Tma3(0); var : Tcond(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; IF Endtime <= starttime Then { SetStopEndofday(0); } } TLen1 = Ceiling((Period1 + 1) * .5); TLen2 = Ceiling((Period2 + 1) * .5); Tma1 = ma(ma(C, TLen1), TLen1); Tma2 = ma(ma(C, TLen2), TLen2); if Tcond == true Then { if MarketPosition == 0 and CrossUp(Tma1,Tma2) and C > O and C > H[1] Then Buy("매수2"); if MarketPosition == 0 and CrossDown(Tma1,Tma2) and C < O and C < L[1] Then Sell("매도2"); if MarketPosition == 1 and CrossDown(Tma1,Tma2) and C < O and C < L[1] Then ExitLong("bx"); if MarketPosition == -1 and CrossUp(Tma1,Tma2) and C > O and C > H[1] Then ExitShort("sx"); } SetStopProfittarget(PriceScale*익절틱수,PointStop); SetStopLoss(PriceScale*손절틱수,PointStop); 즐거운 하루되세요 > jesten77 님이 쓴 글입니다. > 제목 : 문의 드립니다. > 항상 감사드립니다. 수식 작성 부탁드립니다. 매수 매도 1번, 2번에 대해 각각 수식 부탁드립니다. 2번에서는 &#9461;과 &#9462; 부분을 수식내에 구분해서 부탁드립니다. 거래시간 : 오전 9시~ 익일 새벽 6시 익절틱수 : N, 손절틱수 : N 매수 : 1. 삼각가중 5일 이평과 20일 이평이 골든 크로스 2. 삼각가중 5일 이평과 20일 이평이 골든 크로스 + 앞 캔들의 고가를 돌파한 캔들의 &#9461;종가 매수(양봉에만 진입), 또는 &#9462;돌파시 즉시 매수. 순서는 관계없이 두가지 조건 만족하면 됩니다. 청산 1 &#8211; 5일 이평과 20일 이평이 데드 크로스 날 때, &#9461;청산 종료 하는 것과 &#9462;스위칭 하는 수식으로 구분해서 부탁드립니다. 청산 2 &#8211; N틱 지정 청산. 매도 : 1. 삼각가중 5일 이평과 20일 이평이 데드 크로스 2. 삼각가중 5일 이평과 20일 이평이 데드 크로스 + 앞 캔들의 저가를 돌파한 캔들의 &#9461;종가 매도(음봉에만 진입), 또는 &#9462;돌파시 즉시 매도. 순서는 관계없이 두가지 조건 만족하면 됩니다. 청산 1 &#8211; 5일 이평과 20일 이평이 골든 크로스 날 때, &#9461;청산 종료 하는 것과 &#9462;스위칭 하는 수식으로 구분해서 부탁드립니다. 청산 2 &#8211; N틱 지정 청산.