커뮤니티

재문의 드립니다

프로필 이미지
부활
2023-07-07 09:47:51
715
글번호 170411
답변완료
아래 수식은 전에 문의 드렸던 월, 주봉 중앙선 구하기 수식인데 일봉과 주봉차트에 월봉 중앙선은 표시되지만 주봉 중앙선은 표시가 안됩니다. 그래서 1. 주봉 개수별 중앙선을 주봉, 일봉, 분봉에 적용가능한 수식을 알려주세요 2. 월봉 개수별 중앙선도 주봉, 일봉, 분봉에 적용가능한 수식을 알려주세요 input : n(3); var : cnt(0),whv(0),wlv(0),mhv(0),mlv(0); Array : wo[50](0),wh[50](0),wl[50](0),Wc[50](0); Array : mo[50](0),mh[50](0),ml[50](0),mc[50](0); if DayOfWeek(Bdate) < DayOfWeek(Bdate[1]) Then { For cnt = 49 Downto 1 { wo[cnt] = wo[cnt-1]; wh[cnt] = wh[cnt-1]; wl[cnt] = wl[cnt-1]; wc[cnt] = wc[cnt-1]; } wo[0] = o; wh[0] = h; wl[0] = l; } if wh[0] > 0 and h > wh[0] Then wh[0] = h; if wl[0] > 0 and l < wl[0] Then wl[0] = l; wc[0] = c; if bdate > Bdate[1]+30 Then { For cnt = 49 Downto 1 { mo[cnt] = mo[cnt-1]; mh[cnt] = mh[cnt-1]; ml[cnt] = ml[cnt-1]; mc[cnt] = mc[cnt-1]; } mo[0] = o; mh[0] = h; ml[0] = l; } if mh[0] > 0 and h > mh[0] Then mh[0] = h; if ml[0] > 0 and l < ml[0] Then ml[0] = l; mc[0] = c; if wh[n-1] > 0 and wl[n-1] > 0 Then { whv = 0; wlv = 0; For cnt = 0 to n-1 { if whv == 0 or (whv > 0 and wh[cnt] > whv) Then whv = wh[cnt]; if wlv == 0 or (wlv > 0 and wl[cnt] < wlv) Then wlv = wl[cnt]; } Plot1((whv+wlv)/2); } if mh[n-1] > 0 and ml[n-1] > 0 Then { mhv = 0; mlv = 0; For cnt = 0 to n-1 { if mhv == 0 or (mhv > 0 and mh[cnt] > mhv) Then mhv = mh[cnt]; if mlv == 0 or (mlv > 0 and ml[cnt] < mlv) Then mlv = ml[cnt]; } Plot2((mhv+mlv)/2); }
지표
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2023-07-07 14:13:29

안녕하세요 예스스탁입니다. 해당식 적용해 보았지만 주봉선이 표시되고 있습니다. 주봉과 월봉을 각각 따라 분리해 드립니다. 1 input : n(3); var : cnt(0),whv(0),wlv(0); Array : wo[50](0),wh[50](0),wl[50](0),Wc[50](0); if DayOfWeek(Bdate) < DayOfWeek(Bdate[1]) Then { For cnt = 49 Downto 1 { wo[cnt] = wo[cnt-1]; wh[cnt] = wh[cnt-1]; wl[cnt] = wl[cnt-1]; wc[cnt] = wc[cnt-1]; } wo[0] = o; wh[0] = h; wl[0] = l; } if wh[0] > 0 and h > wh[0] Then wh[0] = h; if wl[0] > 0 and l < wl[0] Then wl[0] = l; wc[0] = c; if wh[n-1] > 0 and wl[n-1] > 0 Then { whv = 0; wlv = 0; For cnt = 0 to n-1 { if whv == 0 or (whv > 0 and wh[cnt] > whv) Then whv = wh[cnt]; if wlv == 0 or (wlv > 0 and wl[cnt] < wlv) Then wlv = wl[cnt]; } Plot1((whv+wlv)/2); } 2 input : n(3); var : cnt(0),mhv(0),mlv(0); Array : mo[50](0),mh[50](0),ml[50](0),mc[50](0); if bdate > Bdate[1]+30 Then { For cnt = 49 Downto 1 { mo[cnt] = mo[cnt-1]; mh[cnt] = mh[cnt-1]; ml[cnt] = ml[cnt-1]; mc[cnt] = mc[cnt-1]; } mo[0] = o; mh[0] = h; ml[0] = l; } if mh[0] > 0 and h > mh[0] Then mh[0] = h; if ml[0] > 0 and l < ml[0] Then ml[0] = l; mc[0] = c; if mh[n-1] > 0 and ml[n-1] > 0 Then { mhv = 0; mlv = 0; For cnt = 0 to n-1 { if mhv == 0 or (mhv > 0 and mh[cnt] > mhv) Then mhv = mh[cnt]; if mlv == 0 or (mlv > 0 and ml[cnt] < mlv) Then mlv = ml[cnt]; } Plot1((mhv+mlv)/2); } 즐거운 하루되세요 > 부활 님이 쓴 글입니다. > 제목 : 재문의 드립니다 > 아래 수식은 전에 문의 드렸던 월, 주봉 중앙선 구하기 수식인데 일봉과 주봉차트에 월봉 중앙선은 표시되지만 주봉 중앙선은 표시가 안됩니다. 그래서 1. 주봉 개수별 중앙선을 주봉, 일봉, 분봉에 적용가능한 수식을 알려주세요 2. 월봉 개수별 중앙선도 주봉, 일봉, 분봉에 적용가능한 수식을 알려주세요 input : n(3); var : cnt(0),whv(0),wlv(0),mhv(0),mlv(0); Array : wo[50](0),wh[50](0),wl[50](0),Wc[50](0); Array : mo[50](0),mh[50](0),ml[50](0),mc[50](0); if DayOfWeek(Bdate) < DayOfWeek(Bdate[1]) Then { For cnt = 49 Downto 1 { wo[cnt] = wo[cnt-1]; wh[cnt] = wh[cnt-1]; wl[cnt] = wl[cnt-1]; wc[cnt] = wc[cnt-1]; } wo[0] = o; wh[0] = h; wl[0] = l; } if wh[0] > 0 and h > wh[0] Then wh[0] = h; if wl[0] > 0 and l < wl[0] Then wl[0] = l; wc[0] = c; if bdate > Bdate[1]+30 Then { For cnt = 49 Downto 1 { mo[cnt] = mo[cnt-1]; mh[cnt] = mh[cnt-1]; ml[cnt] = ml[cnt-1]; mc[cnt] = mc[cnt-1]; } mo[0] = o; mh[0] = h; ml[0] = l; } if mh[0] > 0 and h > mh[0] Then mh[0] = h; if ml[0] > 0 and l < ml[0] Then ml[0] = l; mc[0] = c; if wh[n-1] > 0 and wl[n-1] > 0 Then { whv = 0; wlv = 0; For cnt = 0 to n-1 { if whv == 0 or (whv > 0 and wh[cnt] > whv) Then whv = wh[cnt]; if wlv == 0 or (wlv > 0 and wl[cnt] < wlv) Then wlv = wl[cnt]; } Plot1((whv+wlv)/2); } if mh[n-1] > 0 and ml[n-1] > 0 Then { mhv = 0; mlv = 0; For cnt = 0 to n-1 { if mhv == 0 or (mhv > 0 and mh[cnt] > mhv) Then mhv = mh[cnt]; if mlv == 0 or (mlv > 0 and ml[cnt] < mlv) Then mlv = ml[cnt]; } Plot2((mhv+mlv)/2); }