커뮤니티

문의합니다..^^*

프로필 이미지
서민순
2026-06-28 10:53:03
422
글번호 232594
답변완료

더운데 항상 수고가 많으십니다...

아래 시스템 매매 수식 시작일 설정을 변수로 지정해서 작성했는데 안되서 문의합니다...

변수지정 잘 지정이 될수 있도록 수정 부탁드립니다..


input : 시작일(20260102);

var : Tcond(False);



if Bdate != Bdate[1] Then

tcond = False;


input: b1(20),p1(50);

var : var1(0);


//다음봉 시가가 20봉최고가 이상

if sDate >= 시작일 and Tcond == true and NextBarOpen >= highest(high, b1) Then


//다음봉시가기준 50이평값 계산

var1 = (NextBarOpen+AccumN(C,P1-1))/P1;

if NextBarOpen > var1 Then

buy("b1", atstop, highest(high, b1));


Else //다음봉 시가가 20봉최고가 미만이면

{

//50봉최고값 도달 기준 20이평값

var1 = (highest(high, b1)+AccumN(C,P1-1))/P1;

if sDate >= 시작일 and Tcond == true and highest(high, b1) > var1 Then

buy("b2", atstop, highest(high, b1));



ExitLong("s", atstop, lowest(low,b1));


}

시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2026-06-29 15:07:15

안녕하세요 예스스탁입니다. input : 시작일(20260102); var : Tcond(False); input: b1(20),p1(50); var : var1(0); if NextBarSdate >= 시작일 Then tcond = False; if Tcond == true Then { //다음봉 시가가 20봉최고가 이상 if NextBarOpen >= highest(high, b1) Then //다음봉시가기준 50이평값 계산 var1 = (NextBarOpen+AccumN(C,P1-1))/P1; if NextBarOpen > var1 Then buy("b1", atstop, highest(high, b1)); Else //다음봉 시가가 20봉최고가 미만이면 { //50봉최고값 도달 기준 20이평값 var1 = (highest(high, b1)+AccumN(C,P1-1))/P1; if sDate >= 시작일 and Tcond == true and highest(high, b1) > var1 Then buy("b2", atstop, highest(high, b1)); ExitLong("s", atstop, lowest(low,b1)); } } 즐거운 하루되세요