커뮤니티

표시가 이상합니다.

프로필 이미지
파파
2015-10-10 03:16:44
124
글번호 91100
답변완료
수식에서 뭐가 문제인지 모르겠어요... 1. 외부변수로 배열크기 조정이 가능한가요> 2. A_mid의 plot3 값이 이상한데요...각 봉의 중심값을 나타내고 싶습니다. Input : Period1(20), Period2(60), Period3(120); Var : count(0), mid(0); Arrays : A_high[20](0), A_mid[20](0), A_low[20](0), B_high[60](0), B_mid[60](0), B_low[60](0), C_high[120](0), C_mid[120](0), C_low[120](0); If DayIndex == 0 Then { A_high[0] = H; For count = 1 to Period1-1 { A_high[count] = A_high[count-1]; } A_low[0] = L; For count = 1 to Period1-1 { A_low[count] = A_low[count-1]; } } mid = A_low[0] + (A_high[0]-A_low[0])/2; A_mid[0] = mid; For count = 1 to Period1-1 { A_mid[count] = A_mid[count-1]; } If H <> A_high[0] Then A_high[0] = H; Plot1(A_high[0]); If L <> A_low[0] Then A_low[0] = L; Plot2(A_low[0]); A_mid[0] = mid; Plot3(A_mid[0]);
지표
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2015-10-12 17:51:01

안녕하세요 예스스탁입니다. 작성하신 식이 어떤 내용의 식인지 모호합니다 당일최고가와 최저가와 중간값을 계산해서 저장하신 내용이면 아래와 같이 수정하시면 됩니다. Input : Period1(20), Period2(60), Period3(120); Var : count(0), mid(0); Arrays : A_high[20](0), A_mid[20](0), A_low[20](0), B_high[60](0), B_mid[60](0), B_low[60](0), C_high[120](0), C_mid[120](0), C_low[120](0); If DayIndex == 0 Then { A_high[0] = H; A_low[0] = L; A_mid[0] = A_low[0] + (A_high[0]-A_low[0])/2; For count = 1 to Period1-1 { A_high[count] = A_high[count-1][1]; A_low[count] = A_low[count-1][1]; A_mid[count] = A_mid[count-1]; } } If H > A_high[0] Then A_high[0] = H; If L < A_low[0] Then A_low[0] = L; Plot1(A_high[0]); Plot2(A_low[0]); Plot3(A_mid[0]); 즐거운 하루되세요 > 파파 님이 쓴 글입니다. > 제목 : 표시가 이상합니다. > 수식에서 뭐가 문제인지 모르겠어요... 1. 외부변수로 배열크기 조정이 가능한가요> 2. A_mid의 plot3 값이 이상한데요...각 봉의 중심값을 나타내고 싶습니다. Input : Period1(20), Period2(60), Period3(120); Var : count(0), mid(0); Arrays : A_high[20](0), A_mid[20](0), A_low[20](0), B_high[60](0), B_mid[60](0), B_low[60](0), C_high[120](0), C_mid[120](0), C_low[120](0); If DayIndex == 0 Then { A_high[0] = H; For count = 1 to Period1-1 { A_high[count] = A_high[count-1]; } A_low[0] = L; For count = 1 to Period1-1 { A_low[count] = A_low[count-1]; } } mid = A_low[0] + (A_high[0]-A_low[0])/2; A_mid[0] = mid; For count = 1 to Period1-1 { A_mid[count] = A_mid[count-1]; } If H <> A_high[0] Then A_high[0] = H; Plot1(A_high[0]); If L <> A_low[0] Then A_low[0] = L; Plot2(A_low[0]); A_mid[0] = mid; Plot3(A_mid[0]);