-- 作者:z7c9
-- 发布时间:2011/3/13 11:57:53
--
//手续费 commission:=0.001; //印花税 stamptax:=0.001; //过户费 transferfee:=0.001; {期货} //固定手续费(zn/al/fu/au/rb/a/b/m/c/y/l/v/p/cf/ro/sr/ta/er/ws/wt) //做多 costprice:=trimprice(enterprice+2*commission/multiplier)+mindiff; //做空 costprice:=trimprice(enterprice-2*commission/multiplier)-mindiff; //百分比手续费(cu/ru/wr/rb) //做多 costprice:=trimprice(enterprice*(1+commission)/(1-commission))+mindiff; //做空 costprice:=trimprice(enterprice*(1-commission)/(1+commission))-mindiff; {股票} //上海A股 costprice:=trimprice((enterprice*(1+commission)+2*transferfee)/(1-commission-stamptax))+mindiff; //深圳A股 costprice:=trimprice((enterprice*(1+commission))/(1-commission-stamptax))+mindiff; {ETF} costprice:=trimprice(enterprice*(1+commission)/(1-commission))+mindiff; {权证} costprice:=trimprice(enterprice*(1+commission)/(1-commission))+mindiff;
[此贴子已经被作者于2011-3-13 12:37:54编辑过]
|