[问题] MC累积量设定 帮我看一下拜托

楼主: xxyyzzxyz627 (MrWUYUAN)   2016-04-25 21:34:10
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);
上面的文法 只会出现当根累积量 请问要删掉那些 才会变持续累积量呢 谢谢
作者: sonone (有容之行)   2016-04-25 22:32:00
我觉得妳有些地方写的怪怪的,第一个if...begin后面没有End。然后你是想问累积买量跟卖量吧?
作者: are2 (R2)   2016-04-26 10:06:00
归零那边一定要先拿掉

Links booklink

Contact Us: admin [ a t ] ucptt.com