커뮤니티

부탁드립니다

프로필 이미지
묘선낭자
2013-10-28 18:02:02
128
글번호 68939
답변완료
1. 하루가 시작되면 Index를 초기화 data1에서 ma(c,n1)[1]<ma(C,n1)[2] and ma(C,n1)>ma(C,n1)[1]이면 var1=Index; ma(c,n1)[1]>ma(C,n1)[2] and ma(C,n1]<ma(C,n1)[1]이면 var2=Index; data2에서 crossup(H,ma(C,n2)이면 var3=Index; crossdown(L,ma(C,n3)이면 var4=Index; var1>var2 and var3>var4이면 매수 var1<var2 and var3<var4이면 매도 setstopendofday(151500); 이것을 식으로 어떻게 나타내야 완벽한가요? 2. data2의 그래프 위에도 그것의 지표(이동평균)를 나타낼 수 있는지요? 있다면 방법을 가르쳐주시기 바랍니다. 3. data1과 data2의 그래프를 한 그래프 위에서 겹쳐볼 수 있는지요? 부탁드립니다.
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2013-10-29 15:12:12

안녕하세요 예스스탁입니다. 1. input : n1(10),n2(20),n3(0); var : idx1(0,data1),idx2(0,data1),idx3(0,data2),idx4(0,data2); if data1(date != date[1]) Then{ idx1 = -1; idx2 = -1; } if data2(date != date[1]) Then{ idx3 = -1; idx4 = -1; } if data1(ma(c,n1)[1]<ma(C,n1)[2] and ma(C,n1)>ma(C,n1)[1]) Then idx1 = Index; if data1(ma(c,n1)[1]>ma(C,n1)[2] and ma(C,n1)<ma(C,n1)[1]) Then idx2 = Index; if data2(crossup(H,ma(C,n2))) then idx3 = Index; if data2(crossdown(L,ma(C,n3))) then idx4=Index; if idx1>idx2 and idx3>idx4 and idx1 > -1 and idx2 > -1 and idx3 > -1 and idx4 > -1 Then buy(); if idx1<idx2 and idx3<idx4 and idx1 > -1 and idx2 > -1 and idx3 > -1 and idx4 > -1 Then sell(); setstopendofday(151500); 2. input : P1(5),P2(20),P3(60); var : mav1(0,data2),mav2(0,data2),mav3(0,data2); mav1 = data2(ma(c,P1)); mav2 = data2(ma(c,P2)); mav3 = data2(ma(c,P3)); plot1(mav1); plot2(mav2); plot3(mav3); 3. 같이 작성하셔도 됩니다. 서로 Y축에서 차이가 나는 지표들은 따로 작성하셔야 합니다. 아래식은 주종목과 참조데이터(data2)의 이평을 같이 그리는 식입니다. input : P1(5),P2(20),P3(60); var : mav11(0,data2),mav12(0,data2),mav13(0,data2); var : mav21(0,data2),mav22(0,data2),mav23(0,data2); mav11 = data2(ma(c,P1)); mav12 = data2(ma(c,P2)); mav13 = data2(ma(c,P3)); mav21 = data2(ma(c,P1)); mav22 = data2(ma(c,P2)); mav23 = data2(ma(c,P3)); plot1(mav11); plot2(mav12); plot3(mav13); plot4(mav21); plot5(mav22); plot6(mav23); 즐거운 하루되세요 > 묘선낭자 님이 쓴 글입니다. > 제목 : 부탁드립니다 > 1. 하루가 시작되면 Index를 초기화 data1에서 ma(c,n1)[1]<ma(C,n1)[2] and ma(C,n1)>ma(C,n1)[1]이면 var1=Index; ma(c,n1)[1]>ma(C,n1)[2] and ma(C,n1]<ma(C,n1)[1]이면 var2=Index; data2에서 crossup(H,ma(C,n2)이면 var3=Index; crossdown(L,ma(C,n3)이면 var4=Index; var1>var2 and var3>var4이면 매수 var1<var2 and var3<var4이면 매도 setstopendofday(151500); 이것을 식으로 어떻게 나타내야 완벽한가요? 2. data2의 그래프 위에도 그것의 지표(이동평균)를 나타낼 수 있는지요? 있다면 방법을 가르쳐주시기 바랍니다. 3. data1과 data2의 그래프를 한 그래프 위에서 겹쳐볼 수 있는지요? 부탁드립니다.