커뮤니티

문의 드립니다.~~~~

프로필 이미지
예스요
2026-10-06 21:26:21
70
글번호 233816
답변완료

답변 감사합니다.


아래식을 실행시켜 보니 저의 의도대로 실행이 되지 않아


다시 부탁드립니다.


아래식을 각행마다 주석 부탁 드립니다.


답변 1


예스스탁 예스스탁 답변

2026-10-06 11:20:45


안녕하세요

예스스탁입니다.


피라미딩은 모든진입신호 허용으로 설정하고 적용하시면 됩니다.



var : a틱(3),c틱(5),n틱(10),m틱(10);


if MarketPosition <= 0 and

CountIf(C<O,2) == 2 and

abs(C-H[1]) >= PriceScale*a틱 Then

Buy("b");


if MarketPosition >= 0 and

CountIf(C>O,2) == 2 and

abs(C-L[1]) >= PriceScale*a틱 Then

Sell("s");


if MarketPosition == 1 Then

{

if CountIf(C<O and abs(C-H) >= PriceScale*c틱,2) == 2 Then

Buy("bb");


ExitLong("bpx",AtLimit,AvgEntryPrice+PriceScale*n틱);

ExitLong("blx",AtLimit,LatestEntryPrice(0)-PriceScale*m틱);

}


if MarketPosition == -1 Then

{

if CountIf(C>O and abs(C-L) >= PriceScale*c틱,2) == 2 Then

Sell("ss");


ExitShort("spx",AtLimit,AvgEntryPrice-PriceScale*n틱);

ExitShort("slx",AtLimit,LatestEntryPrice(0)+PriceScale*m틱);

}


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

예스스탁 예스스탁 답변

2026-10-07 15:43:06

안녕하세요 예스스탁입니다. 손절식에 타입이 잘못되어 수정했습니다. 주석을 붙여 드립니다. var : a틱(3),c틱(5),n틱(10),m틱(10); if MarketPosition <= 0 and //무포지션이거나 매도포지션 상태일때(매수 첫진입) CountIf(C<O,2) == 2 and //2봉연속 음봉이고 abs(C-H[1]) >= PriceScale*a틱 Then #현재봉종가와 전봉고가 차이가 a틱 이상이면 매수 Buy("b"); if MarketPosition >= 0 and //무포지션이거나 매수포지션 상태일때(매도 첫진입) CountIf(C>O,2) == 2 and //2봉연속 양봉이고 abs(C-L[1]) >= PriceScale*a틱 Then #현재봉종가와 전봉저가 차이가 a틱 이상이면 매도 Sell("s"); //매수진입후 if MarketPosition == 1 Then { //종가와 고가의 차이가 c틱이상인 음봉이 2봉연속이면 추가매수 if CountIf(C<O and abs(C-H) >= PriceScale*c틱,2) == 2 Then Buy("bb"); //익절 : 평단가 대비 n틱 이상 상승하면 즉시 전체 청산 ExitLong("bpx",AtLimit,AvgEntryPrice+PriceScale*n틱); //손절 : 마지막 진입가 대비 m틱 이상 하락하면 즉시 전체 청산 ExitLong("blx",AtStop,LatestEntryPrice(0)-PriceScale*m틱); } if MarketPosition == -1 Then { //종가와 저가의 차이가 c틱이상인 양봉이 2봉연속이면 추가매수 if CountIf(C>O and abs(C-L) >= PriceScale*c틱,2) == 2 Then Sell("ss"); //익절 : 평단가 대비 n틱 이상 하락하면 즉시 전체 청산 ExitShort("spx",AtLimit,AvgEntryPrice-PriceScale*n틱); //손절 : 마지막 진입가 대비 m틱 이상 상승하면 즉시 전체 청산 ExitShort("slx",AtStop,LatestEntryPrice(0)+PriceScale*m틱); } 즐거운 하루되세요