求個(gè)資金平倉(cāng)模塊
作者:金字塔 來(lái)源:cxh99.com 發(fā)布時(shí)間:2014年10月06日
- 咨詢(xún)內(nèi)容:
比如100萬(wàn),虧10萬(wàn)全部平倉(cāng)或1000萬(wàn)虧個(gè)20萬(wàn)強(qiáng)平。后臺(tái)下單,高手寫(xiě)個(gè)吧
- 金字塔客服:
if date<>ref(date,1) then extgbdataset('asset',tasset);
if todaybar>1 and extgbdata('asset')<=1000000 and extgbdata('asset')-tasset>100000 then tsell(1,0,mkt);//用全局變量記錄每天開(kāi)市時(shí)的資金,然后判斷當(dāng)前k線是否有虧損超過(guò)10萬(wàn),超過(guò)就平倉(cāng)
1000萬(wàn)資金虧20萬(wàn)的同理,只要改第二句里面的100萬(wàn)和10萬(wàn)
[此貼子已經(jīng)被作者于2013/11/20 10:50:52編輯過(guò)]
- 用戶(hù)回復(fù):
這個(gè)太復(fù)雜了,這樣行不if taconut2(6,'')<910000 and tholding2<>0 then beginttell(1,0,'');tshortell(1,0,'');endif taconut2(6,'')<910000 and tholding2=0 then exit;
- 網(wǎng)友回復(fù):
也行,這個(gè)看自己的需求