|
inputs:VL(20) ;
vars : intrabarpersist TUpVol(0),intrabarpersist TDVol(0),
intrabarpersist TUpTicks(0),intrabarpersist TDownTicks(0),
intrabarpersist TPreTime_s(0),intrabarpersist TTime_s(0), intrabarpersist TTimes_s(0), intrabarpersist TUVol(0),
TColor(0);
if LastBarOnChart_s then begin
TPreTime_s=TTime_s;
TTimes_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;
end;
Plot1(TUVol-TDVol,"",TColor);
謝謝了新手真的不是很懂 |
|