settotalbar(3);
var: i(0),j(0);
var: bwlowest(0), ix(0),lowestDate(0);
if not (leftStr(Symbol,3) = "233") then return;
for i = 0 to 119
begin
value1 = BollingerBandWidth(Close[i],20,2,2);
if value1 <= bwlowest then
begin
bwlowest = value1;
lowestDate = GetField("Date");
ix = i;
end;
end;
j=0;
for i = ix-1 to 0
begin
j +=1;
if j >= 10 then
begin
Ret=1;
break;
end;
value1 = BollingerBandWidth(Close[i],20,2,2);
//if value1 / bwlowest > 2 then return;
end;
Ret = 1;
SetOutputName1("BW最低日"); OutputField1(lowestDate);
SetOutputName2("最低BW"); OutputField2(bwlowest);
|
留言列表