Rss & SiteMap

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

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

标题:[原创]变种r-b

1楼
Q1304230834 发表于:2012/12/13 11:19:29
//本例旨在学习
//源码提供
//BY Ne
//2012-12-13
//股指5分钟

input:upperN(100,50,150,10),upN(50,30,100,10),downN(50,30,100,10),downerN(100,50,150,10);
KLineNum:=BARSLAST(day<>ref(day,1));
OpenPrice:ref(o,KLineNum);
t1:=time>=092000 and time<=144000;
//上轨:开盘价+1%
upper:OpenPrice*(1+0.01*0.01*upperN);
//中上轨:开盘价+0.5%
up:OpenPrice*(1+0.01*0.01*upN);
//中下轨:开盘价-0.5%
down:OpenPrice*(1-0.01*0.01*downN);
//下轨:开盘价-1%
downer:OpenPrice*(1-0.01*0.01*downerN);

//开多:突破上轨 or (最低价不破下轨 and 上穿中下轨;
long:=c>upper or (llv(l,KLineNum)>downer and l<down and c>down);
//平多:反向走0.5%出局
longend:=holding>0 and (enterprice-c)/enterprice>=0.5*0.01;
//开空:突破下轨 or  (最高价不丰上轨 and 下穿中上轨)
short:=c<downer or (hhv(h,KLineNum)<upper and h>up and c<up);
//平空:反向走0.5%出局
shortend:=holding<0 and (c-enterprice)/enterprice>=0.5*0.01;


if holding>0 and longend then sell(1,1,thisclose);
if holding<0 and shortend then sellshort(1,1,thisclose);

if holding=0 and t1 and long then buy(1,1,thisclose);
if holding=0 and t1 and short then buyshort(1,1,thisclose);

if time>150900 then BEGIn
sell(holding>0,holding,thisclose);
sellshort(holding<0,abs(holding),thisclose);
end
2楼
zsjwhy 发表于:2012/12/13 22:02:17
2012年表现不好
3楼
Q1304230834 发表于:2012/12/14 11:23:26
表现好的,都是用到表现不好才发出来给大家研究,没有免费的午餐。
能分发免费的面包就不错了图片点击可在新窗口打开查看
4楼
clivelong 发表于:2012/12/14 14:00:01
 不错,不错
5楼
阿迪瑞斯 发表于:2012/12/19 10:30:30
3楼说的很中肯
6楼
翻手为云 发表于:2013/1/9 22:49:58
呵呵,拜读了很多了最近在,呵呵,今天都在这里一一谢过那些大神!
共6 条记录, 每页显示 10 条, 页签: [1]


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