커뮤니티
수고하십니다.
2005-06-18 14:55:31
1239
글번호 7618
매번 답변주셔서 감사합니다
아래의 출력을 상하 폭을 정해서 그 안에있는 값만 출력할수가 있을까요...
예 (현재가+3포인트< 출력값>현재가-3포인트) 로 조건을...
현재가+3포인트 아래에 출력값이 있고 현재가-3포인트 위에 출력값이 있는
모든 값을 출력하도록
input: hl(3),n(130);;//n값은 임의의 값
var =:p1(1),p2(2)..........p9(9);
var = v1(0),v2(0)..........v9(0);
v1=n+p1;
v2=n+p2;
v3=n+p3;
v4=n+p4;
v5=n+p5;
v6=n+p6;
v7=n+p7;
v8=n+p8;
v9=n+p9;
if dayclose(0)+hl<v1>dayclose(0)+hl then
plot1(v1);
if dayclose(0)+hl<v2>dayclose(0)-hl then
plot2(v2);
if dayclose(0)+hl<v3>dayclose(0)+hl then
plot3(v3);
if dayclose(0)+hl<v4>dayclose(0)+hl then
plot1(v4);
if dayclose(0)+hl<v5>dayclose(0)+hl then
plot2(v5);
if dayclose(0)+hl<v6>dayclose(0)+hl then
plot3(v6);
if dayclose(0)+hl<v7>dayclose(0)+hl then
plot1(v7);
if dayclose(0)+hl<v8>dayclose(0)+hl then
plot2(v8);
if dayclose(0)+hl<v9>dayclose(0)+hl then
plot3(v9);
이렇게 했드니 챠트가 화면 위로 붙어버리네요 뭐가 잘못된건지?
감사합니다.
답변 1
예스스탁 예스스탁 답변
2005-06-20 09:58:03
안녕하세요
예스스탁입니다.
문법에서 관계연산자는 두 값사이의 비교만 가능합니다.
세가지 이상을 비교시에는 and 로 연결해 주셔야 합니다.
dayclose(0)+hl < v1 > dayclose(0)+hl (X)
dayclose(0)+hl < v1 and v1 > dayclose(0)+hl (O)
식을 수정했습니다.
예를 들어 v1값이 dayclose(0)+hl보다는 작고
dayclose(0)-hl 보다는 클때 지표를 출력합니다.
if dayclose(0)+hl > v1 and v1 > dayclose(0)-hl then
plot1(v1);
if dayclose(0)+hl > v2 and v2 > dayclose(0)-hl then
plot2(v2);
if dayclose(0)+hl > v3 and v3 > dayclose(0)-hl then
plot3(v3);
if dayclose(0)+hl > v4 and v4 > dayclose(0)-hl then
plot1(v4);
if dayclose(0)+hl > v5 and v5 > dayclose(0)-hl then
plot2(v5);
if dayclose(0)+hl > v6 and v6 > dayclose(0)-hl then
plot3(v6);
if dayclose(0)+hl > v7 and v7 > dayclose(0)-hl then
plot1(v7);
if dayclose(0)+hl > v8 and v8 > dayclose(0)-hl then
plot2(v8);
if dayclose(0)+hl > v9 and v9 > dayclose(0)-hl then
plot3(v9);
즐거운 하루되세요
> HH_pump413 님이 쓴 글입니다.
> 제목 : 수고하십니다.
> 매번 답변주셔서 감사합니다
아래의 출력을 상하 폭을 정해서 그 안에있는 값만 출력할수가 있을까요...
예 (현재가+3포인트< 출력값>현재가-3포인트) 로 조건을...
현재가+3포인트 아래에 출력값이 있고 현재가-3포인트 위에 출력값이 있는
모든 값을 출력하도록
input: hl(3),n(130);;//n값은 임의의 값
var =:p1(1),p2(2)..........p9(9);
var = v1(0),v2(0)..........v9(0);
v1=n+p1;
v2=n+p2;
v3=n+p3;
v4=n+p4;
v5=n+p5;
v6=n+p6;
v7=n+p7;
v8=n+p8;
v9=n+p9;
if dayclose(0)+hl<v1>dayclose(0)+hl then
plot1(v1);
if dayclose(0)+hl<v2>dayclose(0)-hl then
plot2(v2);
if dayclose(0)+hl<v3>dayclose(0)+hl then
plot3(v3);
if dayclose(0)+hl<v4>dayclose(0)+hl then
plot1(v4);
if dayclose(0)+hl<v5>dayclose(0)+hl then
plot2(v5);
if dayclose(0)+hl<v6>dayclose(0)+hl then
plot3(v6);
if dayclose(0)+hl<v7>dayclose(0)+hl then
plot1(v7);
if dayclose(0)+hl<v8>dayclose(0)+hl then
plot2(v8);
if dayclose(0)+hl<v9>dayclose(0)+hl then
plot3(v9);
이렇게 했드니 챠트가 화면 위로 붙어버리네요 뭐가 잘못된건지?
감사합니다.
다음글
이전글