請問以下的警示如何改寫成只偵測第一根5分k是否合乎條件?
謝謝.......
input: Length(15); SetInputName(1, "布林通道天數");
input: BandRange(2);SetInputName(2, "上下寬度");
input: MALength(5);SetInputName(3, "MA天期");
value1 = DirectionMovement(11,value2,value3,value4);
variable: up(0), down(0), mid(0);
up = bollingerband(Close, Length, BandRange);
down = bollingerband(Close, Length, -1 * BandRange);
var: PV(1);
if CurrentBar = 1 then
PV = 1
else
begin
if V > V[1] then
PV = PV[1] + (Close - Close[1]) / Close[1]
else
PV = PV[1];
end;
if up - down = 0 then value5 = 0 else value5 = (close - down) * 100 / (up - down);
if value2 > 50 and value5 > 30 and (PV-PV[1])/PV[1] > 0.1 and getfield("量比") > 1 then ret=1;
2 評論