커뮤니티

시스템식

프로필 이미지
별이777
2011-12-29 15:36:49
439
글번호 46154
답변완료
현재는 매수든 매도든, 하루에 먼저되는쪽 한번만 진입가능한데, 이후에는 매수/매도 하루에 각 한번씩만 진입가능하도록 수정요청드립니다. if stime <= 150000 Then if MarketPosition == 0 and date <> EntryDate(1) then { if crossup(c,dayopen). Then buy(); if CrossDown(c,dayopen) then sell(); } If marketposition<>0 Then { exitlong("청산1",Atstop,highest(high,barsSinceEntry+1)-atr(20)*atrmult); exitshort("청산2",Atstop,lowest(low,barsSinceEntry+1)+atr(20)*atrmult); }
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2011-12-29 17:15:57

안녕하세요 예스스탁입니다. input : atrmult(2.5); var : b(0),S(0),cnt(0); b = 0; s = 0; for cnt = 0 to 10{ if sdate == EntryDate(cnt) Then{ if MarketPosition(cnt) == 1 Then b = b+1; if MarketPosition(cnt) == -1 Then s = s+1; } } if stime <= 150000 Then{ if b < 1 and crossup(c,dayopen) Then buy(); if S < 1 and CrossDown(c,dayopen) then sell(); } If marketposition<>0 Then { exitlong("청산1",Atstop,highest(high,barsSinceEntry+1)-atr(20)*atrmult); exitshort("청산2",Atstop,lowest(low,barsSinceEntry+1)+atr(20)*atrmult); } 즐거운 하루되세요 > 별이777 님이 쓴 글입니다. > 제목 : 시스템식 > 현재는 매수든 매도든, 하루에 먼저되는쪽 한번만 진입가능한데, 이후에는 매수/매도 하루에 각 한번씩만 진입가능하도록 수정요청드립니다. if stime <= 150000 Then if MarketPosition == 0 and date <> EntryDate(1) then { if crossup(c,dayopen). Then buy(); if CrossDown(c,dayopen) then sell(); } If marketposition<>0 Then { exitlong("청산1",Atstop,highest(high,barsSinceEntry+1)-atr(20)*atrmult); exitshort("청산2",Atstop,lowest(low,barsSinceEntry+1)+atr(20)*atrmult); }