커뮤니티

시스템횽아 질문이 있습니다

프로필 이미지
생선가시
2016-04-06 17:31:22
121
글번호 96900
답변완료
밑에 식이 &#54973;아 도움받아서 제가 수정한 식인데요. ( 52주 최고가에서 35%하락하고, 저가에서 9%상승하면 매수 ) 여기 var에서 HH, Hi, LL, Li가 의미하는게 뭔지 모르겠어요.. 도와주세요 ㅠ input : N(52); var : cnt(0),HH(0),Hi(0),LL(0),Li(0),Entry(0); Array : WeekH[100](0),WeekL[100](0); if DayOfWeek(sdate) < DayOfWeek(sdate[1]) Then{ WeekH[0] = H; WeekL[0] = L; for cnt = 1 to 99{ WeekH[cnt] = WeekH[cnt-1][1]; WeekL[cnt] = WeekL[cnt-1][1]; } } if H > WeekH[0] Then WeekH[0] = H; if L < WeekL[0] Then WeekL[0] = L; if WeekH[N] > 0 and WeekL[N] > 0 Then{ HH = WeekH[0]; Hi = 0; for cnt = 0 to N{ if WeeKH[cnt] > HH Then{ HH = WeekH[cnt]; HI = cnt; } } //=================================================================================== #52주 최고가 이후 최저가 LL = WeekL[0]; for cnt = 0 to Hi{ if WeekL[cnt] < LL Then LL = WeekL[cnt]; } if C <= HH*0.65 and C >= LL*1.09 and C > Then buy("매수"); if MarketPosition == 1 and C <= highest(H,BarsSinceEntry)*0.87 Then exitlong("매도"); //===================================================================================== if MarketPosition == 1 and C <= EntryPrice*0.95 Then ExitLong("손절"); }
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2016-04-06 18:42:45

안녕하세요 예스스탁입니다. 1. HH는 52주 최고가가 저장되는 변수입니다. Hi는 52주 최고가가 몇주전인지 인덱스가 저장되는 변수입니다. LL은 최고가 발생이후의 최저가가 저장됩니다. Li는 변수선언은 되어 있지만 수식에서 사용은 되지 않은 변수입니다. 선언에서 제외하셔도 됩니다. 2 현재식은 종가가 52주 최고가 대비 35% 이하이고 최고가이후 최저가대비 9% 이상만 되면 조건에 충족됩니다. 진입식의 C >= LL*1.09를 crossup(c,LL*1.09)로 변경하면 돌파시점만 매수조건이 충족됩니다. input : N(52); var : cnt(0),HH(0),Hi(0),LL(0),Li(0),Entry(0); Array : WeekH[100](0),WeekL[100](0); if DayOfWeek(sdate) < DayOfWeek(sdate[1]) Then{ WeekH[0] = H; WeekL[0] = L; for cnt = 1 to 99{ WeekH[cnt] = WeekH[cnt-1][1]; WeekL[cnt] = WeekL[cnt-1][1]; } } if H > WeekH[0] Then WeekH[0] = H; if L < WeekL[0] Then WeekL[0] = L; if WeekH[N] > 0 and WeekL[N] > 0 Then{ HH = WeekH[0]; Hi = 0; for cnt = 0 to N{ if WeeKH[cnt] > HH Then{ HH = WeekH[cnt]; HI = cnt; } } //=================================================================================== #52주 최고가 이후 최저가 LL = WeekL[0]; for cnt = 0 to Hi{ if WeekL[cnt] < LL Then LL = WeekL[cnt]; } if C <= HH*0.65 and C >= LL*1.09 Then buy("매수"); if MarketPosition == 1 and C <= highest(H,BarsSinceEntry)*0.87 Then exitlong("매도"); //===================================================================================== if MarketPosition == 1 and C <= EntryPrice*0.95 Then ExitLong("손절"); } 3. 최고가에서 35% 하락이 현재 종가와 비교가 아니라 최고가 이후의 최저가가 35% 이상 하락했다라는 의미이면 매수조건식에서 C <= HH*0.65가 아닌 LL <= HH*0.65로 수정하시면 됩니다. input : N(52); var : cnt(0),HH(0),Hi(0),LL(0),Li(0),Entry(0); Array : WeekH[100](0),WeekL[100](0); if DayOfWeek(sdate) < DayOfWeek(sdate[1]) Then{ WeekH[0] = H; WeekL[0] = L; for cnt = 1 to 99{ WeekH[cnt] = WeekH[cnt-1][1]; WeekL[cnt] = WeekL[cnt-1][1]; } } if H > WeekH[0] Then WeekH[0] = H; if L < WeekL[0] Then WeekL[0] = L; if WeekH[N] > 0 and WeekL[N] > 0 Then{ HH = WeekH[0]; Hi = 0; for cnt = 0 to N{ if WeeKH[cnt] > HH Then{ HH = WeekH[cnt]; HI = cnt; } } //=================================================================================== #52주 최고가 이후 최저가 LL = WeekL[0]; for cnt = 0 to Hi{ if WeekL[cnt] < LL Then LL = WeekL[cnt]; } if LL <= HH*0.65 and C >= LL*1.09 Then buy("매수"); if MarketPosition == 1 and C <= highest(H,BarsSinceEntry)*0.87 Then exitlong("매도"); //===================================================================================== if MarketPosition == 1 and C <= EntryPrice*0.95 Then ExitLong("손절"); } 즐거운 하루되세요 > 생선가시 님이 쓴 글입니다. > 제목 : 시스템&#54973;아 질문이 있습니다 > 밑에 식이 &#54973;아 도움받아서 제가 수정한 식인데요. ( 52주 최고가에서 35%하락하고, 저가에서 9%상승하면 매수 ) 여기 var에서 HH, Hi, LL, Li가 의미하는게 뭔지 모르겠어요.. 도와주세요 ㅠ input : N(52); var : cnt(0),HH(0),Hi(0),LL(0),Li(0),Entry(0); Array : WeekH[100](0),WeekL[100](0); if DayOfWeek(sdate) < DayOfWeek(sdate[1]) Then{ WeekH[0] = H; WeekL[0] = L; for cnt = 1 to 99{ WeekH[cnt] = WeekH[cnt-1][1]; WeekL[cnt] = WeekL[cnt-1][1]; } } if H > WeekH[0] Then WeekH[0] = H; if L < WeekL[0] Then WeekL[0] = L; if WeekH[N] > 0 and WeekL[N] > 0 Then{ HH = WeekH[0]; Hi = 0; for cnt = 0 to N{ if WeeKH[cnt] > HH Then{ HH = WeekH[cnt]; HI = cnt; } } //=================================================================================== #52주 최고가 이후 최저가 LL = WeekL[0]; for cnt = 0 to Hi{ if WeekL[cnt] < LL Then LL = WeekL[cnt]; } if C <= HH*0.65 and C >= LL*1.09 and C > Then buy("매수"); if MarketPosition == 1 and C <= highest(H,BarsSinceEntry)*0.87 Then exitlong("매도"); //===================================================================================== if MarketPosition == 1 and C <= EntryPrice*0.95 Then ExitLong("손절"); }