我做了個(gè)加倉的公式,測(cè)試期貨時(shí)正常,我想測(cè)試股票時(shí)遇到了問題。
源碼如下
if c>h+0.1
then begin
buy(holding=0,50%,thisclose);
end
if c>h+1.1
then begin
buy(c>0,0,thisclose);
end
if c>h+1.1
then begin
buy(c>0,0,thisclose);
end
這個(gè)會(huì)把錢全部用掉,如果這個(gè)條件二次達(dá)成,那么就會(huì)造成沒有足夠的資金開倉