커뮤니티

문의

프로필 이미지
구다이전설
2013-07-30 09:24:36
146
글번호 65905
답변완료
아래 식은 5분봉으로 진행하고 있는데 여기에 일봉 20일선이 상승할때만 진입을 하고 싶은데 뭘 추가 해야 하나요 Input : period(15), sigPeriod(30),p(100),sp(1.5); Var : value(0), sig(0),osc(0) ; value =ema(bids,period)-ema(asks,period); sig = ema(value,sigPeriod); osc = value-sig; SetStopLoss( sp,PointStop); var1 = round(osc,3); if crossup(var1,-p) then buy("b", OnClose,def,1); if MarketPosition == 1 then { if crossdown( var1, p) then ExitLong("B1",atlimit,c,"",1,1); }
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2013-07-30 16:43:40

안녕하세요 예스스탁입니다. Input : period(15), sigPeriod(30),p(100),sp(1.5); Var : value(0), sig(0),osc(0) ; input : dayP1(20); var : sumV(0), maV(0),presumV(0), premaV(0), count(0); sumV = 0; presumV = 0; for count = 0 to dayP1-1 { sumV = sumV+DayClose(count); presumV = presumV+DayClose(count+1); } maV = sumV / dayP1;#일봉이평 당일 premav = presumV / dayP1;#일봉이평 전일 value =ema(bids,period)-ema(asks,period); sig = ema(value,sigPeriod); osc = value-sig; SetStopLoss( sp,PointStop); var1 = round(osc,3); if crossup(var1,-p) and mav > premav then buy("b", OnClose,def,1); if MarketPosition == 1 then { if crossdown( var1, p) then ExitLong("B1",atlimit,c,"",1,1); } 즐거운 하루되세요 > 구다이전설 님이 쓴 글입니다. > 제목 : 문의 > 아래 식은 5분봉으로 진행하고 있는데 여기에 일봉 20일선이 상승할때만 진입을 하고 싶은데 뭘 추가 해야 하나요 Input : period(15), sigPeriod(30),p(100),sp(1.5); Var : value(0), sig(0),osc(0) ; value =ema(bids,period)-ema(asks,period); sig = ema(value,sigPeriod); osc = value-sig; SetStopLoss( sp,PointStop); var1 = round(osc,3); if crossup(var1,-p) then buy("b", OnClose,def,1); if MarketPosition == 1 then { if crossdown( var1, p) then ExitLong("B1",atlimit,c,"",1,1); }