[求助][原創(chuàng)]條件達(dá)到清倉離場(chǎng)如何編寫?謝謝
作者:金字塔 來源:cxh99.com 發(fā)布時(shí)間:2015年04月15日
- 咨詢內(nèi)容:
求助] Post By:2013/12/25 13:22:07 [只看該作者]
圖表交易:
當(dāng)日平倉盈虧損達(dá)到8000元 ,或者 手中還有倉位 平倉盈虧+浮動(dòng)盈虧>8000元 ==則清倉離場(chǎng)當(dāng)日不再下單
如何編寫? 萬分感謝
- 金字塔客服:
用IE發(fā)帖,不要用其他瀏覽器比如360瀏覽器,會(huì)造成我們看不到帖
- 用戶回復(fù):
條件達(dá)到清倉離場(chǎng)如何編寫?謝謝
圖表交易:
{當(dāng)日平倉盈虧損達(dá)>8000元 ,或者 手中還有倉位 平倉盈虧+浮動(dòng)盈虧>8000元} ==則清倉離場(chǎng)當(dāng)日不再下單
如何編寫? 萬分感謝
- 網(wǎng)友回復(fù):
variable:n=0;
if date<>ref(date,1) then n:=0;
if 開倉條件 and n=0 then 下單語句;//這里是在原有的下單條件下,加上n=0 的判斷
if (asset-ref(asset,todaybar)<=-8000 and holding=0) or (holding<>0 and asset-ref(asset,todaybar)>8000) then begin
平多語句;
平空語句;
end
寫入對(duì)應(yīng)的下單語句,平倉語句即可
[此貼子已經(jīng)被作者于2013/12/26 9:00:48編輯過]