# 【分享】-逐棒分析多空强弱指示器

Tags:

```\$.getClosezhubang = function(rds){
var arrclose = [];
var arropen = [];
var arrhigh = [];
var arrlow = [];
var arrzhubang = [];

for(var i in rds){
arrclose[i] = rds[i].Close;
arropen[i] = rds[i].Open;
arrhigh[i] = rds[i].High;
arrlow[i] = rds[i].Low;

if(i>1){

if(arrclose[i] >= arrhigh[i-1]){

if(arrclose[i] >= (arrhigh[i]-(arrhigh[i]-arrlow[i])/3) && arrclose[i] >= arropen[i]){
arrzhubang[i] = arrclose[i]*1.09;
}else if(arrclose[i] >= (arrhigh[i]-(arrhigh[i]-arrlow[i])/3) && arrclose[i] < arropen[i]){
arrzhubang[i] = arrclose[i]*1.08;
}else if(arrclose[i] > (arrlow[i]+(arrhigh[i]-arrlow[i])/3) && arrclose[i] < (arrhigh[i]-(arrhigh[i]-arrlow[i])/3) && arrclose[i] >= arropen[i]){
arrzhubang[i] = arrclose[i]*1.07;
}else if(arrclose[i] > (arrlow[i]+(arrhigh[i]-arrlow[i])/3) && arrclose[i] < (arrhigh[i]-(arrhigh[i]-arrlow[i])/3) && arrclose[i] < arropen[i]){
arrzhubang[i] = arrclose[i]*1.06;
}else if(arrclose[i] <= (arrlow[i]+(arrhigh[i]-arrlow[i])/3) && arrclose[i] >= arropen[i]){
arrzhubang[i] = arrclose[i]*1.05;
}else if(arrclose[i] <= (arrlow[i]+(arrhigh[i]-arrlow[i])/3) && arrclose[i] < arropen[i]){
arrzhubang[i] = arrclose[i]*1.04;
}

}
else if(arrclose[i] < arrhigh[i-1] && arrclose[i] > arrlow[i-1]){

if(arrclose[i] >= (arrhigh[i]-(arrhigh[i]-arrlow[i])/3) && arrclose[i] >= arropen[i]){
arrzhubang[i] = arrclose[i]*1.03;
}else if(arrclose[i] >= (arrhigh[i]-(arrhigh[i]-arrlow[i])/3) && arrclose[i] < arropen[i]){
arrzhubang[i] = arrclose[i]*1.02;
}else if(arrclose[i] > (arrlow[i]+(arrhigh[i]-arrlow[i])/3) && arrclose[i] < (arrhigh[i]-(arrhigh[i]-arrlow[i])/3) && arrclose[i] >= arropen[i]){
arrzhubang[i] = arrclose[i]*1.01;
}else if(arrclose[i] > (arrlow[i]+(arrhigh[i]-arrlow[i])/3) && arrclose[i] < (arrhigh[i]-(arrhigh[i]-arrlow[i])/3) && arrclose[i] < arropen[i]){
arrzhubang[i] = arrclose[i]*0.99;
}else if(arrclose[i] <= (arrlow[i]+(arrhigh[i]-arrlow[i])/3) && arrclose[i] >= arropen[i]){
arrzhubang[i] = arrclose[i]*0.98;
}else if(arrclose[i] <= (arrlow[i]+(arrhigh[i]-arrlow[i])/3) && arrclose[i] < arropen[i]){
arrzhubang[i] = arrclose[i]*0.97;
}

}
else if(arrclose[i] <= arrlow[i-1]){

if(arrclose[i] >= (arrhigh[i]-(arrhigh[i]-arrlow[i])/3) && arrclose[i] >= arropen[i]){
arrzhubang[i] = arrclose[i]*0.96;
}else if(arrclose[i] >= (arrhigh[i]-(arrhigh[i]-arrlow[i])/3) && arrclose[i] < arropen[i]){
arrzhubang[i] = arrclose[i]*0.95;
}else if(arrclose[i] > (arrlow[i]+(arrhigh[i]-arrlow[i])/3) && arrclose[i] < (arrhigh[i]-(arrhigh[i]-arrlow[i])/3) && arrclose[i] >= arropen[i]){
arrzhubang[i] = arrclose[i]*0.94;
}else if(arrclose[i] > (arrlow[i]+(arrhigh[i]-arrlow[i])/3) && arrclose[i] < (arrhigh[i]-(arrhigh[i]-arrlow[i])/3) && arrclose[i] < arropen[i]){
arrzhubang[i] = arrclose[i]*0.93;
}else if(arrclose[i] <= (arrlow[i]+(arrhigh[i]-arrlow[i])/3) && arrclose[i] >= arropen[i]){
arrzhubang[i] = arrclose[i]*0.92;
}else if(arrclose[i] <= (arrlow[i]+(arrhigh[i]-arrlow[i])/3) && arrclose[i] < arropen[i]){
arrzhubang[i] = arrclose[i]*0.91;
}

}

}else{
arrzhubang[i] = arrclose[i];
}

}
return arrzhubang;
}
```

More

wuhuoyan 这个怎么用呢？