커뮤니티

부탁 드립니다.

프로필 이미지
yes
2016-06-15 21:12:24
110
글번호 99110
답변완료
다음 수식에서 plot1(v,"거래량",RED); value1 = V; 부분을 함수명-> aa로 만들어 실행 해본 결과 정상이 아닙니다. 무엇이 잘못 되었는지요? 미리 감사 드립니다. 수식) var : idx(0); if Bdate != Bdate[1] Then idx = 0; if Bdate == Bdate[1] Then idx = idx+1; value1 = idx%4; value2 = idx%7; if Bdate != Bdate[1] or (bdate == bdate[1] and value1 < value1[1]) Then{ var1 = O; var11 = C; } if Bdate != Bdate[1] or (bdate == bdate[1] and value2 < value2[1]) Then{ var2 = O; var22 = C; } if ((c > O) or (C == O and C >= C[1])) and ((c > var1) or (C == var1 and C >= var11)) and ((c > var2) or (C == var2 and C >= var22)) Then{ plot1(v,"거래량",RED); value1 = V; } else if ((c < O) or (C == O and C < C[1])) and ((c < var1) or (C == var1 and C < var11)) and ((c < var2) or (C == var2 and C < var22)) Then{ plot1(v,"거래량",blue); value2 = V; } else{ plot1(-v,"거래량",BLACK); } var55 = value1-value2; var66 = ma(var55,20); plot2(var55); plot3(var66); 함수화) 함수명:aa 실행식->plot1(aa); 함수식) var : idx(0); if Bdate != Bdate[1] Then idx = 0; if Bdate == Bdate[1] Then idx = idx+1; value1 = idx%4; value2 = idx%7; if Bdate != Bdate[1] or (bdate == bdate[1] and value1 < value1[1]) Then{ var1 = O; var11 = C; } if Bdate != Bdate[1] or (bdate == bdate[1] and value2 < value2[1]) Then{ var2 = O; var22 = C; } if ((c > O) or (C == O and C >= C[1])) and ((c > var1) or (C == var1 and C >= var11)) and ((c > var2) or (C == var2 and C >= var22)) Then{ //plot1(v,"거래량",RED); value1= v; aa= ma(value1,10); } //else if ((c < O) or (C == O and C < C[1])) and // ((c < var1) or (C == var1 and C < var11)) and // ((c < var2) or (C == var2 and C < var22)) Then{ //plot1(v,"거래량",blue); // value2 = V; //} //else{ // plot1(-v,"거래량",BLACK); //} //var55 = value1-value2; //var66 = ma(var55,20); //plot2(var55); //plot3(var66);
지표
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2016-06-16 11:40:32

안녕하세요 예스스탁입니다. 해당식 조건이 만족할때만 값이 리턴이 됩니다. 조건이 만족하지 않을 때도 리턴값을 지정해 주셔야 합니다. var : idx(0); if Bdate != Bdate[1] Then idx = 0; if Bdate == Bdate[1] Then idx = idx+1; value1 = idx%4; value2 = idx%7; if Bdate != Bdate[1] or (bdate == bdate[1] and value1 < value1[1]) Then{ var1 = O; var11 = C; } if Bdate != Bdate[1] or (bdate == bdate[1] and value2 < value2[1]) Then{ var2 = O; var22 = C; } if ((c > O) or (C == O and C >= C[1])) and ((c > var1) or (C == var1 and C >= var11)) and ((c > var2) or (C == var2 and C >= var22)) Then{ //plot1(v,"거래량",RED); value1= v; aa= ma(value1,10); } Else aa = 0; 즐거운 하루되세요 > yes 님이 쓴 글입니다. > 제목 : 부탁 드립니다. > 다음 수식에서 plot1(v,"거래량",RED); value1 = V; 부분을 함수명-> aa로 만들어 실행 해본 결과 정상이 아닙니다. 무엇이 잘못 되었는지요? 미리 감사 드립니다. 수식) var : idx(0); if Bdate != Bdate[1] Then idx = 0; if Bdate == Bdate[1] Then idx = idx+1; value1 = idx%4; value2 = idx%7; if Bdate != Bdate[1] or (bdate == bdate[1] and value1 < value1[1]) Then{ var1 = O; var11 = C; } if Bdate != Bdate[1] or (bdate == bdate[1] and value2 < value2[1]) Then{ var2 = O; var22 = C; } if ((c > O) or (C == O and C >= C[1])) and ((c > var1) or (C == var1 and C >= var11)) and ((c > var2) or (C == var2 and C >= var22)) Then{ plot1(v,"거래량",RED); value1 = V; } else if ((c < O) or (C == O and C < C[1])) and ((c < var1) or (C == var1 and C < var11)) and ((c < var2) or (C == var2 and C < var22)) Then{ plot1(v,"거래량",blue); value2 = V; } else{ plot1(-v,"거래량",BLACK); } var55 = value1-value2; var66 = ma(var55,20); plot2(var55); plot3(var66); 함수화) 함수명:aa 실행식->plot1(aa); 함수식) var : idx(0); if Bdate != Bdate[1] Then idx = 0; if Bdate == Bdate[1] Then idx = idx+1; value1 = idx%4; value2 = idx%7; if Bdate != Bdate[1] or (bdate == bdate[1] and value1 < value1[1]) Then{ var1 = O; var11 = C; } if Bdate != Bdate[1] or (bdate == bdate[1] and value2 < value2[1]) Then{ var2 = O; var22 = C; } if ((c > O) or (C == O and C >= C[1])) and ((c > var1) or (C == var1 and C >= var11)) and ((c > var2) or (C == var2 and C >= var22)) Then{ //plot1(v,"거래량",RED); value1= v; aa= ma(value1,10); } //else if ((c < O) or (C == O and C < C[1])) and // ((c < var1) or (C == var1 and C < var11)) and // ((c < var2) or (C == var2 and C < var22)) Then{ //plot1(v,"거래량",blue); // value2 = V; //} //else{ // plot1(-v,"거래량",BLACK); //} //var55 = value1-value2; //var66 = ma(var55,20); //plot2(var55); //plot3(var66);