커뮤니티

문의

프로필 이미지
송아지
2009-01-22 13:11:17
621
글번호 19724
답변완료
안녕하세요 로직작성중 잘 안되는것이 있어서요. 아래식의 의도는 ========== 1.1분봉을 사용해서 가격이 저가에서 가격이 10%이상에서 20%미난 상승한경우 양봉 출현시마다 10계약씩 매수하려고하는 겁니다. 2.1분봉을 사용해서 가격이 저가에서 가격이 20%이상에서 30%미난 상승한경우 양봉 출현시마다 10계약씩 매수하려고하는 겁니다. 3.양봉마다 10개씩 분할매수가 안되고 있습니다. 될수 있도록 수정 부탁드립니다. ============== VAR : count(0),bcond1(0); if date != date[1] Then{ count = 0; Bcond1 = 0; } if MarketPosition() == 0 and MarketPosition()[1] != 0 Then{ count = count+1; Bcond1 = 0; } #1.진입 if Count < 1 Then { If bcond1 == 0 and MarketPosition() == 0 and stime >= 090000 and stime < 143000 and c>daylow*1.1 and c<daylow*1.2 and c>o then { Buy("a1",OnClose,def,10); Bcond1 = 1; } If bcond1 == 1 and MarketPosition() == 1 and stime >= 090000 and stime < 143000 and c>daylow*1.2 and c<daylow*1.3 and c>o then { Buy("a2",OnClose,def,10); Bcond1 = 2; } } #2.청산 var : value(0); var15 = date - int(date/100)*100; var16 = DayOfWeek(date); if var15 >= 8 and var15 <= 14 and var16 == 4 then value = 1; else value = 0; if value == 1 then{ SetStopEndofday(144500); } Else { SetStopEndofday(150300); }
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2009-01-23 09:17:53

안녕하세요 예스스탁입니다. input : N(10); VAR : count(0),bcond1(0); var : value(0); var15 = date - int(date/100)*100; var16 = DayOfWeek(date); if var15 >= 8 and var15 <= 14 and var16 == 4 then value = 1; else value = 0; #1.진입 If CurrentEntries < N and stime >= 090000 and stime < 143000 and c>daylow*1.1 and c<daylow*1.3 and c>o then { Buy("a1",OnClose,def,10); } #2.청산 if value == 1 then{ SetStopEndofday(144500); } Else { SetStopEndofday(150300); } 1번과 2번을 합해 10~30% 사이에서 양봉출현시 마다 진입하며 CurrentEntries는 피라미딩시 누적횟수입니다. 누적횟수는 N회로 조절하시면 됩니다. 시스템 트레이딩 설정창 피라미딩 탭에서 모든 진입신호 허용으로 설정하시기 바랍니다. 즐거운 명절 되시길 바랍니다. > 송아지 님이 쓴 글입니다. > 제목 : 문의 > 안녕하세요 로직작성중 잘 안되는것이 있어서요. 아래식의 의도는 ========== 1.1분봉을 사용해서 가격이 저가에서 가격이 10%이상에서 20%미난 상승한경우 양봉 출현시마다 10계약씩 매수하려고하는 겁니다. 2.1분봉을 사용해서 가격이 저가에서 가격이 20%이상에서 30%미난 상승한경우 양봉 출현시마다 10계약씩 매수하려고하는 겁니다. 3.양봉마다 10개씩 분할매수가 안되고 있습니다. 될수 있도록 수정 부탁드립니다. ============== VAR : count(0),bcond1(0); if date != date[1] Then{ count = 0; Bcond1 = 0; } if MarketPosition() == 0 and MarketPosition()[1] != 0 Then{ count = count+1; Bcond1 = 0; } #1.진입 if Count < 1 Then { If bcond1 == 0 and MarketPosition() == 0 and stime >= 090000 and stime < 143000 and c>daylow*1.1 and c<daylow*1.2 and c>o then { Buy("a1",OnClose,def,10); Bcond1 = 1; } If bcond1 == 1 and MarketPosition() == 1 and stime >= 090000 and stime < 143000 and c>daylow*1.2 and c<daylow*1.3 and c>o then { Buy("a2",OnClose,def,10); Bcond1 = 2; } } #2.청산 var : value(0); var15 = date - int(date/100)*100; var16 = DayOfWeek(date); if var15 >= 8 and var15 <= 14 and var16 == 4 then value = 1; else value = 0; if value == 1 then{ SetStopEndofday(144500); } Else { SetStopEndofday(150300); }