커뮤니티

진입횟수제한

프로필 이미지
리베로송
2014-12-22 17:55:47
183
글번호 81563
답변완료
수고하십니다... 하루에 매수,매도 각 한번씩 진입하는 식을 만들고 있는데 아래 조건에서 당일에 매수진입후 청산 다시 매도진입후 청산이후 다시 매수 진입 시그널이 나오는데요 어디서 잘못된걸까요.... 해외선물쪽 생각하고 있습니다. 아 그리고 entriestoday 함수는 없어진건가요 ?? Inputs: n(1); var : dh(0),buycount(0),sellcount(0); if stime == 30000 or (stime > 30000 and stime[1] < 30000) Then{ BuyCount = 0; SellCount = 0; } if MarketPosition != 1 and MarketPosition != MarketPosition[1] then BuyCount = BuyCount+1; if MarketPosition != -1 and MarketPosition != MarketPosition[1] then SELLCount = SELLCount+1; if buycount<n and stime>ent and stime<elt and MarketPosition(0)==0 AND MARKETPOSITION(1)<>1 then buy("b",atstop,dh+db) ; if sellcount<n and stime>ent and stime<elt and MarketPosition(0)==0 AND MARKETPOSITION(1)<>-1 then sell("s",atstop,dl-db);
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2014-12-23 11:01:05

안녕하세요 예스스탁입니다. 1. 동일봉에서 진입과 청산이 발생하는 내용이 있으신거 같습니다. 카운트 하는 조건을 변경하였습니다. Inputs: n(1); var : dh(0),buycount(0),sellcount(0); if stime == 30000 or (stime > 30000 and stime[1] < 30000) Then{ BuyCount = 0; SellCount = 0; } if barssinceexit(1) == 0 and marketposition(1) == 1 then BuyCount = BuyCount+1; if barssinceexit(1) == 0 and marketposition(1) == -1 then SELLCount = SELLCount+1; if buycount < n and stime > ent and stime < elt and MarketPosition(0)==0 AND MARKETPOSITION(1)<>1 then buy("b",atstop,dh+db) ; if sellcount < n and stime > ent and stime < elt and MarketPosition(0)==0 AND MARKETPOSITION(1)<>-1 then sell("s",atstop,dl-db); 2 entriestoday함수는 기본으로 제공되지 않는 함수입니다. 해당 함수는 사용자분이 따로 작성해서 사용하던 함수이고 0시를 기준으로 카운트를 하므로 해외선물과는 맞지 않습니다. 즐거운 하루되세요 > 리베로송 님이 쓴 글입니다. > 제목 : 진입횟수제한 > 수고하십니다... 하루에 매수,매도 각 한번씩 진입하는 식을 만들고 있는데 아래 조건에서 당일에 매수진입후 청산 다시 매도진입후 청산이후 다시 매수 진입 시그널이 나오는데요 어디서 잘못된걸까요.... 해외선물쪽 생각하고 있습니다. 아 그리고 entriestoday 함수는 없어진건가요 ?? Inputs: n(1); var : dh(0),buycount(0),sellcount(0); if stime == 30000 or (stime > 30000 and stime[1] < 30000) Then{ BuyCount = 0; SellCount = 0; } if MarketPosition != 1 and MarketPosition != MarketPosition[1] then BuyCount = BuyCount+1; if MarketPosition != -1 and MarketPosition != MarketPosition[1] then SELLCount = SELLCount+1; if buycount<n and stime>ent and stime<elt and MarketPosition(0)==0 AND MARKETPOSITION(1)<>1 then buy("b",atstop,dh+db) ; if sellcount<n and stime>ent and stime<elt and MarketPosition(0)==0 AND MARKETPOSITION(1)<>-1 then sell("s",atstop,dl-db);