커뮤니티

매매회수제한

프로필 이미지
유가이드
2011-08-24 23:38:06
602
글번호 42202
답변완료
아래의 식에 매매회수를 5회로 제한하는 식을 추가하여 주시기바랍니다 >CloseD(1)) and stime < 150000 Then buy("b1",AtStop,dayopen*(1+n/100)); if data2(OpenD(0)<CloseD(1)) and stime < 150000 and data2(c>=CloseD(1)+PriceScale*5) Then buy("b2");
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2011-08-25 13:48:24

안녕하세요 예스스탁입니다. 아래와 같이 당일 진입을 세는 계산식을 작성한 후에 if문안에 count < 5라고 조건을 추가하시면당일 5번까지만 신호가 발생합니다. 올리신 b1매수식이 일부 내용이 생략되어 있으므로 해당 if문 안을 수정하시기 바랍니다. var : cnt(0),count(0); count = 0; for cnt = 0 to 20{ if EntryDate(cnt) == sdate Then count = count+1; } if count < 5 and CloseD(1)) and stime < 150000 Then buy("b1",AtStop,dayopen*(1+n/100)); if count < 5 and data2(OpenD(0)<CloseD(1)) and stime < 150000 and data2(c>=CloseD(1)+PriceScale*5) Then buy("b2"); 즐거운 하루되세요 > 유가이드 님이 쓴 글입니다. > 제목 : 매매회수제한 > 아래의 식에 매매회수를 5회로 제한하는 식을 추가하여 주시기바랍니다 >CloseD(1)) and stime < 150000 Then buy("b1",AtStop,dayopen*(1+n/100)); if data2(OpenD(0)<CloseD(1)) and stime < 150000 and data2(c>=CloseD(1)+PriceScale*5) Then buy("b2");