|
請問有高手可以把以下程式碼轉為Amibroker afl嗎?感激不進...
Inputs:VL(20);
vars: intrabarpersist TUVol(0), intrabarpersist TDVol(0),
intrabarpersist TUpTicks(0), intrabarpersist TDownTicks(0),
intrabarpersist TPreTime_s(0), intrabarpersist TTime_s(0),
TColor(0);
if LastBarOnChart_s then begin
TPreTime_s = TTime_s;
TTime_s = BarNumber;
if TPreTime_s <>TTime_s then begin
TUVol = 0;
TDVol = 0;
end;
//==============================
if UpTicks-TUpTicks >= VL then TUVol =TUVol+ UpTicks-TUpTicks ;
if DownTicks-TDownTicks >= VL then TDVol =TDVol +DownTicks-TDownTicks ;
if TUVol>TDVol then TColor = red else TColor = green;
TUpTicks = UpTicks;
TDownTicks = DownTicks; |
|