當(dāng)平倉(cāng)時(shí)當(dāng)日總贏利超過20點(diǎn)不再開倉(cāng)如何編寫?
作者:金字塔 來源:cxh99.com 發(fā)布時(shí)間:2016年06月25日
- 咨詢內(nèi)容:
請(qǐng)教:我用軟件自帶的完振交易系統(tǒng).運(yùn)用于股指日內(nèi)圖表交易.
當(dāng)平倉(cāng)時(shí)當(dāng)日總贏利超過20點(diǎn)不再開倉(cāng)如何編寫,如何補(bǔ)充進(jìn)原自帶交易系統(tǒng)?
- 金字塔客服:
VARIABLE:a=0,n=0;
if date<>ref(date,1) THEN
a:=ASSET;
if 開倉(cāng)條件 and n=0 and holding=0 THEN
buy(1,1,market);
if 平倉(cāng)條件 and holding>0 then
sell(1,1,market);
yingdain:=(asset-a)/MULTIPLIER;
if yingdain>=20 then
n:=1;