커뮤니티

여러 시스템식

프로필 이미지
행복충전
2011-08-17 17:30:20
725
글번호 41982
답변완료
https://www.yesstock.com/SystemTrading/Example/board/view.asp?db=board100044&num=223&pageno=1&startpage=1&Site=&L_Code=14&M_Code=6 아래 ★표의 cnt가 꼭 필요한가요? if marketposition() == 0 then{ if cnt < 1 and CrossUp(slowK, slowD) then{ // ★ buy("매수1"); cnt = 1; // ★ } if IsExitName("청산1",1) and CrossUp(macdV, macdS) then buy("매수2"); if IsExitName("청산2",1) and CrossUp(ma1, ma2) then buy("매수3"); } //매수청산식 if IsEntryName("매수1") and CrossDown(slowK, slowD) then exitlong("청산1"); if IsEntryName("매수2") and CrossDown(macdV, macdS) then exitlong("청산2"); if IsEntryName("매수3") and CrossDown(ma1, ma2) then{ exitlong("청산3"); cnt = 0; // ★ }
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2011-08-18 09:18:29

안녕하세요 예스스탁입니다. 해당식은 매수1 --> 매수2 --> 매수3 --> 매수1 --> 매수2 --> 매수3 --> ~~~ 으로 항상 순차적으로 진입이 발생하게 하기 위해서 cnt가 있는 것입니다. cnt가 없으면 매수1이 매수2나 매수3이 청산된 후에 나올수 있습니다. 즐거운 하루되세요 > 행복충전 님이 쓴 글입니다. > 제목 : 여러 시스템식 > https://www.yesstock.com/SystemTrading/Example/board/view.asp?db=board100044&num=223&pageno=1&startpage=1&Site=&L_Code=14&M_Code=6 아래 ★표의 cnt가 꼭 필요한가요? if marketposition() == 0 then{ if cnt < 1 and CrossUp(slowK, slowD) then{ // ★ buy("매수1"); cnt = 1; // ★ } if IsExitName("청산1",1) and CrossUp(macdV, macdS) then buy("매수2"); if IsExitName("청산2",1) and CrossUp(ma1, ma2) then buy("매수3"); } //매수청산식 if IsEntryName("매수1") and CrossDown(slowK, slowD) then exitlong("청산1"); if IsEntryName("매수2") and CrossDown(macdV, macdS) then exitlong("청산2"); if IsEntryName("매수3") and CrossDown(ma1, ma2) then{ exitlong("청산3"); cnt = 0; // ★ }