커뮤니티

문의드립니다.

프로필 이미지
예스매니아
2014-03-27 16:06:01
146
글번호 73896
답변완료
아래 2가지 지표를 Data2(C)에 적용할 수 있게 해주시면 감사드립니다. 꾸벅 1. input : Period(2); var : LL(0),HH(0),cnt(0); Var: fomular0(0),fomular1(0); Array : CC[100](0); if date != date[1] Then{ for cnt = 1 to 99{ CC[cnt] = CC[cnt-1][1]; } } CC[0] = C; if CC[Period-1] > 0 Then{ LL = CC[0]; HH = CC[0]; for cnt = 0 to Period-1{ if CC[cnt] > HH Then HH = CC[cnt]; if CC[cnt] < LL Then LL = CC[cnt]; } fomular0 = max(CC[0]-LL,0); fomular1 = max(HH-CC[0],0); Plot1( fomular0, "GB"); Plot2( fomular1, "GS"); 2. input : Ntime(60),Period(20); var : LL(0),HH(0),cnt(0),TM(0),TF(0); Var: fomular0(0),fomular1(0); Array : CC[100](0); if date != date[1] Then TM = TimeToMinutes(stime); TF = (TimeToMinutes(stime)-TM)%Ntime; if dayindex == 0 or (TF < TF[1] and stime > stime[1]) then{ for cnt = 1 to 99{ CC[cnt] = CC[cnt-1][1]; } } CC[0] = C; if CC[Period-1] > 0 Then{ LL = CC[0]; HH = CC[0]; for cnt = 0 to Period-1{ if CC[cnt] > HH Then HH = CC[cnt]; if CC[cnt] < LL Then LL = CC[cnt]; } fomular0 = max(CC[0]-LL,0); fomular1 = max(HH-CC[0],0); Plot1( fomular0, "GB"); Plot2( fomular1, "GS"); PlotBaseLine1(1,"기준선"); }
지표
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2014-03-27 17:24:31

안녕하세요 예스스탁입니다. 1. input : Period(2); var : LL(0,data2),HH(0,data2),cnt(0,data2); Var: fomular0(0,data2),fomular1(0,data2); Array : CC[100](0,data2); if data2(date != date[1]) Then{ for cnt = 1 to 99{ CC[cnt] = CC[cnt-1][1]; } } CC[0] = data2(C); if CC[Period-1] > 0 Then{ LL = CC[0]; HH = CC[0]; for cnt = 0 to Period-1{ if CC[cnt] > HH Then HH = CC[cnt]; if CC[cnt] < LL Then LL = CC[cnt]; } fomular0 = max(CC[0]-LL,0); fomular1 = max(HH-CC[0],0); Plot1( fomular0, "GB"); Plot2( fomular1, "GS"); } 2. input : Ntime(60),Period(20); var : LL(0,data2),HH(0,data2),cnt(0,data2),TM(0,data2),TF(0,data2); Var: fomular0(0,data2),fomular1(0,data2); Array : CC[100](0,data2); if data2(date != date[1]) Then TM = data2(TimeToMinutes(stime)); TF = data2((TimeToMinutes(stime)-TM)%Ntime); if data2(dayindex == 0 or (TF < TF[1] and stime > stime[1])) then{ for cnt = 1 to 99{ CC[cnt] = CC[cnt-1][1]; } } CC[0] = data2(C); if CC[Period-1] > 0 Then{ LL = CC[0]; HH = CC[0]; for cnt = 0 to Period-1{ if CC[cnt] > HH Then HH = CC[cnt]; if CC[cnt] < LL Then LL = CC[cnt]; } fomular0 = max(CC[0]-LL,0); fomular1 = max(HH-CC[0],0); Plot1( fomular0, "GB"); Plot2( fomular1, "GS"); PlotBaseLine1(1,"기준선"); } 즐거운 하루되세요 > 예스매니아 님이 쓴 글입니다. > 제목 : 문의드립니다. > 아래 2가지 지표를 Data2(C)에 적용할 수 있게 해주시면 감사드립니다. 꾸벅 1. input : Period(2); var : LL(0),HH(0),cnt(0); Var: fomular0(0),fomular1(0); Array : CC[100](0); if date != date[1] Then{ for cnt = 1 to 99{ CC[cnt] = CC[cnt-1][1]; } } CC[0] = C; if CC[Period-1] > 0 Then{ LL = CC[0]; HH = CC[0]; for cnt = 0 to Period-1{ if CC[cnt] > HH Then HH = CC[cnt]; if CC[cnt] < LL Then LL = CC[cnt]; } fomular0 = max(CC[0]-LL,0); fomular1 = max(HH-CC[0],0); Plot1( fomular0, "GB"); Plot2( fomular1, "GS"); 2. input : Ntime(60),Period(20); var : LL(0),HH(0),cnt(0),TM(0),TF(0); Var: fomular0(0),fomular1(0); Array : CC[100](0); if date != date[1] Then TM = TimeToMinutes(stime); TF = (TimeToMinutes(stime)-TM)%Ntime; if dayindex == 0 or (TF < TF[1] and stime > stime[1]) then{ for cnt = 1 to 99{ CC[cnt] = CC[cnt-1][1]; } } CC[0] = C; if CC[Period-1] > 0 Then{ LL = CC[0]; HH = CC[0]; for cnt = 0 to Period-1{ if CC[cnt] > HH Then HH = CC[cnt]; if CC[cnt] < LL Then LL = CC[cnt]; } fomular0 = max(CC[0]-LL,0); fomular1 = max(HH-CC[0],0); Plot1( fomular0, "GB"); Plot2( fomular1, "GS"); PlotBaseLine1(1,"기준선"); }