커뮤니티

한가지 더 추가 부탁드립니다~

프로필 이미지
회원
2008-09-23 17:46:08
847
글번호 17187
답변완료
밑에 수식이 시가에 매수진입 이 들어가는걸로 되어있는데요 다른 조건은 그대로되 현재가 <= 시가*0.99 /현재가가 오늘 시가보다 1% 떨어지면/ 그 가격에 매수진입 들어가게 바꿔주세요 c <= dayopen()*0.99 일거라 생각해서 넣어봤는데 안되네요 ^^; 부탁합니다~ 감사합니다~~ input : P(6),startdate(20080124); var : sum(0),mav(0),cnt(0),BuyP(0),count(0); sum = 0; for cnt = 0 to P-1{ sum = sum+dayclose(cnt); } mav = sum/P; if sdate >= startdate and dayindex() == 0 and dayopen() < mav*0.953 and dayclose(1)*1.05 > dayopen() and dayopen() > dayclose(1)*0.97 and count < 1 Then{ buy("매수"); buyP = C; count = 1; } if MarketPosition() == 1 and C <= Buyp*0.94 Then{ buy("추가매수"); BuyP = C; } if MarketPosition() == 1 and C >= mav*0.99 Then{ exitlong("청산"); count = 0; }
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2008-09-23 18:05:30

안녕하세요 예스스탁입니다. input : P(6),startdate(20080124); var : sum(0),mav(0),cnt(0),BuyP(0),count(0); sum = 0; for cnt = 0 to P-1{ sum = sum+dayclose(cnt); } mav = sum/P; if sdate >= startdate and // dayindex() == 0 and dayopen() < mav*0.953 and dayclose(1)*1.05 > dayopen() and dayopen() > dayclose(1)*0.97 and count < 1 Then{ buy("매수",AtLimit,dayopen()*0.99); } var99 = MarketPosition(); if var99 == 1 Then{ if var99[1] == 0 Then{ buyP = EntryPrice(); count = 1; } if C <= Buyp*0.94 Then{ buy("추가매수"); BuyP = C; } } if var99 == 0 Then count = 0; if MarketPosition() == 1 and C >= mav*0.99 Then{ exitlong("청산"); } 시세가 당일시가0.99 이하일때만 발생할 수 있도록했습니다. buy("매수",AtLimit,dayopen()*0.99); 다만 이부분은 dayindex() == 0 이란 조건에 의해 당일 두번째 봉에서만 진입이 일어나며 두번째봉의 시세중에 당일시가*0.99 이하의 시세가 없으면 진입하지 않습니다. dayindex() == 0 빼서 신호를 확인하시기 바랍니다. 진입할수도 있고 안할수도 있으므로 count값 누적수식도 변경되었습니다. 즐거운 하루되세요 > 부상전에탭치자 님이 쓴 글입니다. > 제목 : 한가지 더 추가 부탁드립니다~ > 밑에 수식이 시가에 매수진입 이 들어가는걸로 되어있는데요 다른 조건은 그대로되 현재가 <= 시가*0.99 /현재가가 오늘 시가보다 1% 떨어지면/ 그 가격에 매수진입 들어가게 바꿔주세요 c <= dayopen()*0.99 일거라 생각해서 넣어봤는데 안되네요 ^^; 부탁합니다~ 감사합니다~~ input : P(6),startdate(20080124); var : sum(0),mav(0),cnt(0),BuyP(0),count(0); sum = 0; for cnt = 0 to P-1{ sum = sum+dayclose(cnt); } mav = sum/P; if sdate >= startdate and dayindex() == 0 and dayopen() < mav*0.953 and dayclose(1)*1.05 > dayopen() and dayopen() > dayclose(1)*0.97 and count < 1 Then{ buy("매수"); buyP = C; count = 1; } if MarketPosition() == 1 and C <= Buyp*0.94 Then{ buy("추가매수"); BuyP = C; } if MarketPosition() == 1 and C >= mav*0.99 Then{ exitlong("청산"); count = 0; }