input:Length(20, "天數"), UpperBand(2, "上"), LowerBand(2, "下");
variable:up(0),down(0),mid(0),bbandwidth(0);
bbandwidth = bollingerbandwidth(Close, Length, UpperBand, LowerBand);
up = bollingerband(getfield("Close", "60"), Length, UpperBand);
mid = average(getfield("Close", "60"), Length);
down = bollingerband(getfield("Close", "60"), Length, -1 * LowerBand);
bbandwidth = 100 * (up - down) / mid;
VALUE1 = UP;
VALUE2 = GetFIELD("估計量");
VALUE3 = (CLOSE-OPEN) / OPEN;
If CLOSE cross Over VALUE1 //收盤價大於布林上軌
AND CLOSE[1] < VALUE1[1] //前一根 K棒小於布林上軌
AND VALUE2 > AVERAGE(VOLUME[1],25)*2 //成交量變大
AND VALUE3 <= 0.06 //漲幅<=6%
AND VOLUME[1] > 300 //前一根 K棒成交量>300
AND CLOSE > OPEN //紅棒
AND bbandwidth[1] > 4 //前一根 K棒布林帶寬>4%
AND bbandwidth[1] < 8 //前一根 K棒布林帶寬<8%
AND CLOSE > 30
AND CLOSE < 300

THEN RET = 1;想請問我有寫條件前一根K棒要>300張,而帆宣60分K上一根只有165張,請問該如何調整呢謝謝
1 評論