程式碼長這樣~但是像萬海這樣有符合我的想返但沒有跳出警示,想請教一下我的程式碼該如何做修改謝謝 ~
input:Length(20, "天數"), UpperBand(2, "上"), LowerBand(2, "下"),BBW(80,"5");
variable:up1(0),down1(0),mid1(0),bbandwidth(0);
bbandwidth = bollingerbandwidth(Close, Length, UpperBand, LowerBand);
settotalbar(3);
Value1 = GetQuote("估計量"); //量比公式為:估計量 / 五日均量
value2 = average(getfield("Volume", "D")[1], 25);
VALUE3 = BOLLIngerBand(C,20,2);
condition1 = value2 > 250;
condition2 = value1 / value2 > 1.5;
up1 = bollingerband(Close, Length, 1);
down1 = bollingerband(Close, Length, -1 );
mid1 = (up1 + down1) / 2;
IF close cross Above bollingerband(Close, Length, UpperBand)
AND C[1] < VAlue3[1] //前一根K棒 < 布林上軌
AND CLOSE > OPen //紅棒
AND CLOSE > 20
AND bbandwidth >= BBW
then ret=1;


5 評論