Rss & SiteMap

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

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

标题:[原创]

1楼
苦麻菜真好吃 发表于:2016/5/18 10:00:46
老师帮忙写个策略:


1、取上一交易日5分钟的ATR
2、判断上一日的是收阴还是收阳
3、若上一交易日日线收阳线、则以今天的开盘价做多单,亏损2*ATR止损,停止今天的交易
                                                                       若没有被止损、则收盘平仓。

4、若上一交易日日线收阴、则以今天开盘价开空单,亏损2*ATR止损,停止今天的交易。
                                                                 若没有被止损、则收盘平仓。


谢谢!
2楼
jinzhe 发表于:2016/5/18 10:04:29
交易周期是什么周期?
3楼
苦麻菜真好吃 发表于:2016/5/18 10:07:21
5分钟

4楼
jinzhe 发表于:2016/5/18 10:13:57

variable:bj=0;
m:=14;
TR1 : MAX(MAX((HIGH-LOW),ABS(REF(CLOSE,1)-HIGH)),ABS(REF(CLOSE,1)-LOW));
ATR : MA(TR1,m);

atr_day1:=ref(atr,todaybar);
c1:=callstock(stklabel,vtclose,6,-1);
o1:=callstock(stklabel,vtopen,6,-1);
if todaybar=1 and c1>=o1 and holding=0 and bj=0 then begin
 buy(holding=0,1,limitr,open);
 bj:=1;
end


if todaybar=1 and c1<o1 and holding=0 and bj=0 then begin
 buyshort(holding=0,1,limitr,open);
 bj:=1;
end

if holding>0 and c<=enterprice-2*atr then begin
 sell(1,0,marketr);
end

if holding<0 and c>=enterprice+2*atr then begin
 sellshort(1,0,marketr);
end


if time=closetime(0) then begin
 sell(1,0,marketr);
 sellshort(1,0,marketr);
 bj:=0;
end

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


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