Rss & SiteMap

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

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

标题:变化仓位交易代码编写

1楼
qq代人发帖 发表于:2014/7/25 14:04:29

变化仓位交易代码编写

谁帮我写一个股票的买卖变动仓位指标啊
20日均线之上参与买卖,收盘价格大于5日线和20日线上持仓60%仓位,收盘价格低于5日线且大于20日线,持有30%仓位,收盘价格低于20日线空仓!

2楼
pyd 发表于:2014/7/25 14:22:44

ma5:ma(c,5);
ma20:ma(c,20);
if c>ma20 and c>ma5 and holding=0 THEN
buy(1,60%,market);

if c<ma5 and c>ma20 and holding=0 THEN
buy(1,30%,market);
if c<ma20 and holding>0 then
sell(1,holding,market);

[此贴子已经被作者于2014/7/26 19:37:32编辑过]
共2 条记录, 每页显示 10 条, 页签: [1]


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