커뮤니티

15694 의 재질문입니다~~

프로필 이미지
노래70
2010-10-05 00:28:16
957
글번호 32645
답변완료
안녕하세요 예스스탁입니다. var : cnt(0),count(0); #당일 진입횟수 카운트 count = 0; for cnt = 0 to 10{ if sdate == EntryDate(cnt) Then count = count+1; } if dayindex==0 then { fh = H; fl = L; } #첫진입 if count == 0 and stime < 150000 Then{ if abs(DayOpen - DayClose(1)) >= 0.5and MarketPosition==0 then { sell("s1",atstop,fl-pricescale*1); buy ("b1",atstop,fh+pricescale*1); } if abs (DayOpen - DayClose(1)) < 0.5 and MarketPosition==0 then { if cond1==true then buy ("b2",atstop,fh+pricescale*1); if cond2==true Then sell("s2",atstop,fl-pricescale*1); } } #두번째 진입부터 if count >= 1 and stime < 150000 Then{ if cond1==true Then{ buy ("b3"); } if cond2==true Then{ sell ("s3"); } } SetStopLoss(0.5,PointStop); 항상 만땅수고가 많으십니다..궁금한전 다시 질문드릴께요 1) 1의 첫진입조건에 해당안되는경우는 기다렸다가 2번해당되는 조건발생시 진입이되야하 는데요~~ count >=1 이면 진입이 안될것같은데...어찌해야하나요?? 2) stime<150000 이랑 marketposition==0 이랑 빼도 상관이 없는건가요? 감사합니다
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2010-10-05 09:05:33

안녕하세요 예스스탁입니다. var : cnt(0),count(0),fh(0),fl(0),cond1(0),cond2(0),cond3(0); #당일 진입횟수 카운트 count = 0; for cnt = 0 to 10{ if sdate == EntryDate(cnt) Then count = count+1; } if dayindex==0 then { fh = H; fl = L; } #첫진입일 경우에만 발생 if count == 0 and stime < 150000 Then{ if abs(DayOpen - DayClose(1)) >= 0.5 and MarketPosition==0 then { sell("s1",atstop,fl-pricescale*1); buy ("b1",atstop,fh+pricescale*1); } if abs (DayOpen - DayClose(1)) < 0.5 and MarketPosition==0 then { if cond1==true then buy ("b2",atstop,fh+pricescale*1); if cond2==true Then sell("s2",atstop,fl-pricescale*1); } } #진입횟수에 상관없이 조건만족하면 발생 if stime < 150000 Then{ if cond1==true Then{ buy ("b3"); } if cond2==true Then{ sell ("s3"); } } SetStopLoss(0.5,PointStop); 위와 같이 작성하시면 1번은 첫번째에만 신호가 나오고 2번은 모든 경우에 발생할 수 있습니다. 즉 당일 첫번째진입은 1번 혹은 2번으로 먼저 만족한 조건으로 발생합니다. stime < 150000은 삭제하지 않으셔야 합니다. atstop은 그 타입의 특성상 현재봉에서 조건만족하면 다음봉에서 신호가 발생하는데 당일 마지막봉에 조건만족하면 다음봉의 시세를 감시하여 신호가 발생하여 다음날 첫봉에 신호가 발생할 수 있습니다. 그부분을 제한한 식입니다. 즐거운 하루되세요 > 노래70 님이 쓴 글입니다. > 제목 : 15694 의 재질문입니다~~ > 안녕하세요 예스스탁입니다. var : cnt(0),count(0); #당일 진입횟수 카운트 count = 0; for cnt = 0 to 10{ if sdate == EntryDate(cnt) Then count = count+1; } if dayindex==0 then { fh = H; fl = L; } #첫진입 if count == 0 and stime < 150000 Then{ if abs(DayOpen - DayClose(1)) >= 0.5and MarketPosition==0 then { sell("s1",atstop,fl-pricescale*1); buy ("b1",atstop,fh+pricescale*1); } if abs (DayOpen - DayClose(1)) < 0.5 and MarketPosition==0 then { if cond1==true then buy ("b2",atstop,fh+pricescale*1); if cond2==true Then sell("s2",atstop,fl-pricescale*1); } } #두번째 진입부터 if count >= 1 and stime < 150000 Then{ if cond1==true Then{ buy ("b3"); } if cond2==true Then{ sell ("s3"); } } SetStopLoss(0.5,PointStop); 항상 만땅수고가 많으십니다..궁금한전 다시 질문드릴께요 1) 1의 첫진입조건에 해당안되는경우는 기다렸다가 2번해당되는 조건발생시 진입이되야하 는데요~~ count >=1 이면 진입이 안될것같은데...어찌해야하나요?? 2) stime<150000 이랑 marketposition==0 이랑 빼도 상관이 없는건가요? 감사합니다