Rss & SiteMap

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

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

标题:[原创]落影模型——波段股指

1楼
luoying 发表于:2010/9/19 8:57:47

测试 4月28——9月18 股指连续 1手股指  投入20万  10%保证金   手续费 单边 0.01%   赢利41.42%  适用周期 日内3分钟

 

注:模型供新人学习,若拿来投机或投资,盈亏自负,和本人蛋关系没有!!!

 

 

input:P(26,20,100,8);
input:S(12,5,40,4);

input:B1(26,5,300,30);
input:B2(2,0.1,10,1);

input:N2(10,1,120,12);
input:N3(20,1,200,20);
input:N4(60,1,200,20);

ma2:ma(c,n2);
ma3:ma(c,n3);
ma4:ma(c,n4);

MID := MA(CLOSE,B1);
UPPER:= MID + B2*STD(CLOSE,B1);
LOWER:= MID - B2*STD(CLOSE,B1),colorred;

diff := EMA(CLOSE,S) - EMA(CLOSE,P);

variable:vmin = 090000;//用于隔夜高开或低开时间差

if (abs(o-ref(c,1))>=20*MINDIFF AND time>090000 and time<090400) then vmin := 091500;

//开多仓条件:
BOPEON1:=c>upper and diff>0 and c>o and c>ma4 AND HOLDING=0 AND time>vmin AND time<150000;

//平多仓条件:
BLIQCON:=holding>0 and cross(ma3,ma2);

//开空仓条件:
SOPCON1:=c<lower and diff<0 and c<o and c<ma4 AND HOLDING=0 AND time>vmin AND time<150000;

//平空仓条件:
SLIQCON:=holding<0 and cross(ma2,ma3);


buy(BOPEON1,1,market);
sell(BLIQCON,holding,market);
buyshort(SOPCON1,1,market);
sellshort(SLIQCON,holding,market);

//收盘前平仓
sell(time>151000 and holding>0,holding,market);
sellshort(time>151000 and holding<0,holding,market);

可用现金:CASH(0),LINETHICK0;
持仓:HOLDING,LINETHICK0;
资产:ASSET,LINETHICK0;


 

[此贴子已经被作者于2010-9-19 9:04:38编辑过]
2楼
董小球 发表于:2010/9/19 10:42:04
非常感谢蛋炒饭先生
3楼
lxjdz988 发表于:2010/9/19 11:01:27
 支持
4楼
nhzj2168 发表于:2010/9/22 15:19:14
支持
5楼
yongqitang 发表于:2010/10/9 10:49:59
非常感谢
共5 条记录, 每页显示 10 条, 页签: [1]


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