Rss & SiteMap

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

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

标题:日内模型AA

1楼
jzt666 发表于:2019/9/4 15:39:17

老师:收盘价上穿日线开盘价做多,100跳止盈,30跳止损反手做空,100跳止盈,30跳反手做多,100跳止盈,30跳反手做空;一天多空各做两单,收盘前清仓

2楼
FireScript 发表于:2019/9/4 16:19:26
 VARIABLE:ct1:=0,ct2:=0;//全局变量用来限制交易次数
dayclose:CALLSTOCK('',vtCLOSE,6,0);
jc:cross(c,DAYCLOSE);

if jc and holding=0 and ct1<=1 then
begin
buy(jc and holding=0 and CT1<=1,1,market);
ct1:=ct1+1;
end

dyzy:c-ENTERPRICE>=100*MINDIFF;
dtzs:ENTERPRICE-c>=30*MINDIFF;

sell(dyzy and holding>0,holding,market);
if dtzs and holding>0 then
begin
sell(dtzs and holding>0,holding,market);    
buyshort(holding=0  and ct2<=1,1,market);
ct2:=ct2+1;
end



ktzy:=ENTERPRICE-c>=100*MINDIFF;//空头止盈
ktzs:=c-ENTERPRICE>=30*MINDIFF;

sellshort(ktzy and holding<0,holding,market);
if ktzs and holding<0 then
begin
sellshort(ktzs and holding<0,holding,market);    
buy(holding=0 and ct1<=1,1,market);
ct1:=ct1+1;
end


if time=CLOSETIME(0) then //收盘K重置全局变量  2点全平仓  这个收盘时间自行调整下。
begin
ct1:=0;
ct2:=0;
sellshort(holding<0,holding,market);
sell(holding>0,holding,market);
end

自行调整下收盘那个时间,如果是国内期货就不用改了。
共2 条记录, 每页显示 10 条, 页签: [1]


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