Rss & SiteMap

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

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

标题:麻烦老师写一下!

1楼
安公子 发表于:2017/3/13 15:28:31
开多:价格〉20日线,
每次投入20%的可用资金,出现连续信号,不再买入。
止盈:与开仓价相比利润率达到5%,
止损:与开仓价相比亏损率达到2%,

开空同理。

麻烦了!!
2楼
安公子 发表于:2017/3/13 15:31:02
这个写出来,是图表,还是程序?可以在标准版上自动交易吗
3楼
jinzhe 发表于:2017/3/13 15:37:47
开多:价格〉20日线,
每次投入20%的可用资金,出现连续信号,不再买入。
止盈:与开仓价相比利润率达到5%,
止损:与开仓价相比亏损率达到2%,

开空同理。
 

 

图表交易,标准版即可,代码如下:

ma20:=ma(c,20);

if c>ma20 and holding=0 then buy(1,20%,market),pertrader;

if (c-enterprice)/enterprice>=0.05 then sell(1,0,market);

if (enterprice-c)/enterprice>=0.02 then sell(1,0,market);

 

if c<ma20 and holding=0 then buyshort(1,20%,market),pertrader;

if (enterprice-c)/enterprice>=0.05 then sellshort(1,0,market);

if (c-enterprice)/enterprice>=0.02 then sellshort(1,0,market);

4楼
安公子 发表于:2017/3/13 15:40:20
先谢过
共4 条记录, 每页显示 10 条, 页签: [1]


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