Rss & SiteMap

金字塔客服中心 - 专业程序化交易软件提供商 http://www.weistock.com/bbs/

专业程序化软件提供商
共4 条记录, 每页显示 10 条, 页签: [1]
[浏览完整版]

标题:求个资金平仓模块

1楼
wdbbs 发表于:2013/11/20 10:05:30
比如100万,亏10万全部平仓或1000万亏个20万强平。后台下单,高手写个吧
2楼
jinzhe 发表于:2013/11/20 10:50:45

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线是否有亏损超过10万,超过就平仓

 

1000万资金亏20万的同理,只要改第二句里面的100万和10万

[此贴子已经被作者于2013/11/20 10:50:52编辑过]
3楼
wdbbs 发表于:2013/11/20 11:16:17
这个太复杂了,这样行不
if taconut2(6,'')<910000 and tholding2<>0 then begin
ttell(1,0,'');
tshortell(1,0,'');
end
if taconut2(6,'')<910000 and tholding2=0 then exit;

4楼
jinzhe 发表于:2013/11/20 11:19:46

也行,这个看自己的需求

共4 条记录, 每页显示 10 条, 页签: [1]


Powered By Dvbbs Version 8.3.0
Processed in 0.03125 s, 3 queries.