aa:tholding,linethick0;
bb:=extgbdata('quanju');
if bb>0 then
begin
buy(barpos=datacount-1,bb,thisclose);
end
kc:=TAVGENTERPRICE;
开仓价:extgbdata('qu'),linethick0;
买一价:DYNAINFO( 28),linethick0;
差价:if(bb>0,买一价-开仓价,0),linethick0;
if islastbar then extgbdataset('quanju',aa);
if islastbar then extgbdataset('qu',kc);
variable: fit=0 ;
IF 差价>fit THEN fit:=差价;
if bb<=0 then fit:=0;
高差:fit,linethick0;
fit1:if(fit>40,fit-15,0.6),linethick0;
止赢:=开仓价+fit1;
if bb>0 and 高差>2 and c<=止赢 then
begin
sell(1,0,marketr);
end
IF 差价>fit THEN fit:=差价;FIT会随差价上下浮动,不是只取最大值.(一会是个大数值,一会又减小,跟随差价变化)
[此贴子已经被作者于2013/7/16 10:36:14编辑过]
这些计算的值都是根据实际账户详情计算出来的,图表全局变量根本无法记录这样的历史变化情况