求個(gè)資金平倉模塊
作者:金字塔 來源:cxh99.com 發(fā)布時(shí)間:2014年10月06日
- 咨詢內(nèi)容:
比如100萬,虧10萬全部平倉或1000萬虧個(gè)20萬強(qiáng)平。后臺(tái)下單,高手寫個(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);//用全局變量記錄每天開市時(shí)的資金,然后判斷當(dāng)前k線是否有虧損超過10萬,超過就平倉
1000萬資金虧20萬的同理,只要改第二句里面的100萬和10萬
[此貼子已經(jīng)被作者于2013/11/20 10:50:52編輯過]
- 用戶回復(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è)看自己的需求