커뮤니티

부탁드립니다

프로필 이미지
CSI300
2012-05-16 18:30:02
332
글번호 51068
답변완료
초보라 수식작성 부탁드립니다 수고해주세요.. 시초가+최근3일 변동폭*0.5% , 시초가-최근3일변동폭*0.5%를상하채널로하여 crossup(c,상단채널) 매수,crossdown(c,하단채널) 매도 장중 청산시(손절,익절) 한봉경과뒤 조건만족하면 진입 3일 ,0.5%를 최적화할수잇도록 외부변수로처리해주세요.. 매수진입필터링: 단,중,장기이평이 역배열이 아님 매도진입필터링: 단,중,장기이평이 정배열 아님 감사합니다
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2012-05-17 09:55:22

안녕하세요 예스스탁입니다. input : N(3),P(0.5),Short(5),mid(20),long(60); var : cnt(0),sum(0),mar(0),entry(0); sum = 0; for cnt = 1 to N{ sum = sum+(dayhigh(cnt)-daylow(cnt)); } sum = 0; mar = sum/N; Entry = 0; for cnt = 0 to 5 { if sdate == EntryDate(cnt) then entry = entry+1; } Condition1 = ma(c,Short) > ma(C,mid) and ma(c,mid) > ma(c,long); Condition2 = ma(c,Short) < ma(C,mid) and ma(c,mid) < ma(c,long); if entry == 0 and dayindex > 0 and MarketPosition == 0 Then{ if Condition2 == false and crossup(C,dayopen+mar*(P/100)) Then buy(); if Condition1 == true and crossup(C,dayopen-mar*(P/100)) Then sell(); } if entry > 0 and dayindex > 0 and MarketPosition == 0 and BarsSinceExit(1) >= 1 Then{ if Condition2 == false and crossup(C,dayopen+mar*(P/100)) Then buy(); if Condition1 == true and crossup(C,dayopen-mar*(P/100)) Then sell(); } 즐거운 하루되세요 > CSI300 님이 쓴 글입니다. > 제목 : 부탁드립니다 > 초보라 수식작성 부탁드립니다 수고해주세요.. 시초가+최근3일 변동폭*0.5% , 시초가-최근3일변동폭*0.5%를상하채널로하여 crossup(c,상단채널) 매수,crossdown(c,하단채널) 매도 장중 청산시(손절,익절) 한봉경과뒤 조건만족하면 진입 3일 ,0.5%를 최적화할수잇도록 외부변수로처리해주세요.. 매수진입필터링: 단,중,장기이평이 역배열이 아님 매도진입필터링: 단,중,장기이평이 정배열 아님 감사합니다