請問一下大神,如果我想寫出布林寬帶,"連續3天"都在某個百分比內的話,我要如何改寫下列的語法呢,因為下面的寫法只會是只有當期的寬帶計算,謝謝大神解惑
input:leng1(20,"計算天期");
input:width(1.5,"帶寬%");
variable:up1(0),down1(0),mid1(0),bbandwidth(0);
up1 = bollingerband(Close[1], 20, 2);
down1 = bollingerband(Close[1], Leng1, -2 );
mid1 = (up1 + down1) / 2;
bbandwidth = 100 * (up1 - down1) / mid1;
if bbandwidth <width then ret=1;
3 評論