커뮤니티

한가지 부탁드립니다.

프로필 이미지
쌀사비팔
2013-09-10 09:50:22
91
글번호 67371
답변완료
아래 식에 청산을 추가해 주십시요. 감사합니다. *오늘 매수되었고, 매수가 대비 주가가 6% 상승시 다음 첫봉에 청산. *5일(일봉) 이평선 이격도 98 미만이면 다음 첫봉에 청산. ------------------------------------------------------------------ input : P(5); var : cnt(0),sum(0),sum1(0),mav(0),mav1(0),dis(0),dis1(0),daycnt(0); if date != date[1] Then Daycnt = daycnt+1; sum = 0; sum1 = 0; for cnt = 0 to P-1{ sum = sum+DayClose(cnt); sum1 = sum1+DayClose(cnt+1); } mav = sum/P; mav1 = sum1/P; dis = c/mav*100; dis1 = DayClose(1)/mav1*100; if date != date[1] Then var1 = O/mav*100; if ExitDate(1) != sdate and MarketPosition == 0 and var1 > 100 and dayhigh <= DayClose(1)*1.06 and dayopen <= DayClose(1)*1.03 and dis1 >= 103 then{ if daylow <= DayClose(1)*0.99 and daylow > DayClose(1)*0.96 and dis >= 100 and dis <= 102 Then buy("매수1"); if daylow <= DayClose(1)*0.96 and daylow > DayClose(1)*0.93 and dis >= 100 and dis <= 102.5 Then buy("매수2"); if daylow <= DayClose(1)*0.93 and daylow > DayClose(1)*0.90 and dis >= 100 and dis <= 102.75 Then buy("매수3"); if daylow <= DayClose(1)*0.90 and daylow > DayClose(1)*0.87 and dis >= 100 and dis <= 103 Then buy("매수4"); if daylow <= DayClose(1)*0.87 and dis >= 100 and dis <= 103.25 Then buy("매수5"); } if MarketPosition == 1 Then{ exitlong("Profit",Atlimit,EntryPrice*1.13); exitlong("bx1",AtStop,EntryPrice*0.865,"매수1"); exitlong("bx2",AtStop,EntryPrice*0.87,"매수2"); exitlong("bx3",AtStop,EntryPrice*0.875,"매수3"); exitlong("bx4",AtStop,EntryPrice*0.88,"매수4"); exitlong("bx5",AtStop,EntryPrice*0.885,"매수5"); if daycnt >= daycnt[BarsSinceEntry]+3 and (stime == 100000 or (stime > 100000 and stime[1] < 100000)) Then ExitLong("x"); if sdate == EntryDate and stime == 144000 and C >= EntryPrice*1.06 Then ExitLong("bxx1"); if BarsSinceEntry >= 6 and C >= C[2]*1.06 and C >= EntryPrice*1.06 Then ExitLong("bxx2"); }
시스템
답변 2
프로필 이미지

회원

2013-09-09 21:01:58

회원 님에 의해 삭제된 답변입니다.
프로필 이미지

예스스탁 예스스탁 답변

2013-09-10 10:21:38

안녕하세요 예스스탁입니다. input : P(5); var : cnt(0),sum(0),sum1(0),mav(0),mav1(0),dis(0),dis1(0),daycnt(0); if date != date[1] Then Daycnt = daycnt+1; sum = 0; sum1 = 0; for cnt = 0 to P-1{ sum = sum+DayClose(cnt); sum1 = sum1+DayClose(cnt+1); } mav = sum/P; mav1 = sum1/P; dis = c/mav*100; dis1 = DayClose(1)/mav1*100; if date != date[1] Then var1 = O/mav*100; if ExitDate(1) != sdate and MarketPosition == 0 and var1 > 100 and dayhigh <= DayClose(1)*1.06 and dayopen <= DayClose(1)*1.03 and dis1 >= 103 then{ if daylow <= DayClose(1)*0.99 and daylow > DayClose(1)*0.96 and dis >= 100 and dis <= 102 Then buy("매수1"); if daylow <= DayClose(1)*0.96 and daylow > DayClose(1)*0.93 and dis >= 100 and dis <= 102.5 Then buy("매수2"); if daylow <= DayClose(1)*0.93 and daylow > DayClose(1)*0.90 and dis >= 100 and dis <= 102.75 Then buy("매수3"); if daylow <= DayClose(1)*0.90 and daylow > DayClose(1)*0.87 and dis >= 100 and dis <= 103 Then buy("매수4"); if daylow <= DayClose(1)*0.87 and dis >= 100 and dis <= 103.25 Then buy("매수5"); } if MarketPosition == 1 Then{ exitlong("Profit",Atlimit,EntryPrice*1.13); exitlong("bx1",AtStop,EntryPrice*0.865,"매수1"); exitlong("bx2",AtStop,EntryPrice*0.87,"매수2"); exitlong("bx3",AtStop,EntryPrice*0.875,"매수3"); exitlong("bx4",AtStop,EntryPrice*0.88,"매수4"); exitlong("bx5",AtStop,EntryPrice*0.885,"매수5"); if daycnt >= daycnt[BarsSinceEntry]+3 and (stime == 100000 or (stime > 100000 and stime[1] < 100000)) Then ExitLong("x"); if sdate == EntryDate and stime == 144000 and C >= EntryPrice*1.06 Then ExitLong("bxx1"); if BarsSinceEntry >= 6 and C >= C[2]*1.06 and C >= EntryPrice*1.06 Then ExitLong("bxx2"); if sdate == EntryDate and C >= EntryPrice*1.06 Then ExitLong("bxx3",AtMarket); if dis <= 98 Then ExitLong("bxx4",AtMarket); } 즐거운 하루되세요 > 쌀사비팔 님이 쓴 글입니다. > 제목 : 한가지 부탁드립니다. > 아래 식에 청산을 추가해 주십시요. 감사합니다. *오늘 매수되었고, 매수가 대비 주가가 6% 상승시 다음 첫봉에 청산. *5일(일봉) 이평선 이격도 98 미만이면 다음 첫봉에 청산. ------------------------------------------------------------------ input : P(5); var : cnt(0),sum(0),sum1(0),mav(0),mav1(0),dis(0),dis1(0),daycnt(0); if date != date[1] Then Daycnt = daycnt+1; sum = 0; sum1 = 0; for cnt = 0 to P-1{ sum = sum+DayClose(cnt); sum1 = sum1+DayClose(cnt+1); } mav = sum/P; mav1 = sum1/P; dis = c/mav*100; dis1 = DayClose(1)/mav1*100; if date != date[1] Then var1 = O/mav*100; if ExitDate(1) != sdate and MarketPosition == 0 and var1 > 100 and dayhigh <= DayClose(1)*1.06 and dayopen <= DayClose(1)*1.03 and dis1 >= 103 then{ if daylow <= DayClose(1)*0.99 and daylow > DayClose(1)*0.96 and dis >= 100 and dis <= 102 Then buy("매수1"); if daylow <= DayClose(1)*0.96 and daylow > DayClose(1)*0.93 and dis >= 100 and dis <= 102.5 Then buy("매수2"); if daylow <= DayClose(1)*0.93 and daylow > DayClose(1)*0.90 and dis >= 100 and dis <= 102.75 Then buy("매수3"); if daylow <= DayClose(1)*0.90 and daylow > DayClose(1)*0.87 and dis >= 100 and dis <= 103 Then buy("매수4"); if daylow <= DayClose(1)*0.87 and dis >= 100 and dis <= 103.25 Then buy("매수5"); } if MarketPosition == 1 Then{ exitlong("Profit",Atlimit,EntryPrice*1.13); exitlong("bx1",AtStop,EntryPrice*0.865,"매수1"); exitlong("bx2",AtStop,EntryPrice*0.87,"매수2"); exitlong("bx3",AtStop,EntryPrice*0.875,"매수3"); exitlong("bx4",AtStop,EntryPrice*0.88,"매수4"); exitlong("bx5",AtStop,EntryPrice*0.885,"매수5"); if daycnt >= daycnt[BarsSinceEntry]+3 and (stime == 100000 or (stime > 100000 and stime[1] < 100000)) Then ExitLong("x"); if sdate == EntryDate and stime == 144000 and C >= EntryPrice*1.06 Then ExitLong("bxx1"); if BarsSinceEntry >= 6 and C >= C[2]*1.06 and C >= EntryPrice*1.06 Then ExitLong("bxx2"); }