欢迎使用金字塔普通技术服务论坛,您可以在相关区域发表技术支持贴。
我司技术服务人员将优先处理 VIP客服论坛 服务贴,普通区问题处理速度慢,请耐心等待。谢谢您对我们的支持与理解。


金字塔客服中心 - 专业程序化交易软件提供商金字塔软件公式模型编写问题提交 → 这个图表程序化要怎么改成后台程序化

   

欢迎使用金字塔普通技术服务论坛,您可以在相关区域发表技术支持贴。
我司技术服务人员将优先处理 VIP客服论坛 服务贴,普通区问题处理速度慢,请耐心等待。谢谢您对我们的支持与理解。    


  共有2963人关注过本帖平板打印复制链接

主题:这个图表程序化要怎么改成后台程序化

帅哥哟,离线,有人找我吗?
jinzhe
  1楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:罗宾汉 帖子:46311 积分:50819 威望:0 精华:2 注册:2011/3/23 8:50:25
  发帖心情 Post By:2016/11/9 16:47:03    Post IP:180.169.30.6[只看该作者]

input:shakeRate(1,0.3,20,2);  

orderNum:=ROUNDS(ASSET/200/c,0); 

begintime:=(time>010300 and time<031000) or (time>130300 and time<184000);
endtime:=(time>032950 and time<033000) or (time>185950 and time<190000);

globalVARIABLE:cond:='none';   
globalVARIABLE:pbxGoldPlus:='false';
globalVARIABLE:pbxDeadPlus:='false';
globalVARIABLE:pbxCond:='none';
globalVARIABLE:pbxCondPre:='none';
globalVARIABLE:outPrice:=0;

ma10:=ma(c,150);
last2h:=hhv(h,30);
last2l:=llv(l,30);

 

DIFF:=STKINDI('','MACD.DIFF',0,3);
DEA:=STKINDI('','MACD.DEA',0,3);

 

D1:STKINDI('','PBX.D1',0,3);
D2:STKINDI('','PBX.D2',0,3);
Z1:STKINDI('','PBX.Z1',0,3);
Z2:STKINDI('','PBX.Z2',0,3);
C1:STKINDI('','PBX.C1',0,3);
C2:STKINDI('','PBX.C2',0,3);

pbxGoldPlus:='false';
pbxDeadPlus:='false';


 

TR1:=STKINDI('','ATR.TR1',0,3);
ATR:=STKINDI('','ATR.ATR',0,3);

if tbuyHOLDING(0)>0 and h>outPrice then outPrice:=h;
if tsellHOLDING(0)>0 and l<outPrice then outPrice:=l;

macdGoldPlus:=CROSS(DIFF,DEA);
macdDeadPlus:=CROSS(DEA,DIFF);

//多头仓位平仓 
if tbuyHOLDING(0)>0 and (macdDeadPlus or pbxDeadPlus='true' or endtime or c<ma10 or c<outPrice-2*ATR) then begin
    tSELL(1,0,mkT); 
end

//空头仓位平仓
if tsellHOLDING(0)>0 and (macdGoldPlus or pbxGoldPlus='true' or endtime or c>ma10 or c>outPrice+2*ATR) then begin
    tSELLSHORT(1,0,mkt);
end

//开多

if tbuyHOLDING(0)=0 and ((DIFF>DEA and pbxGoldPlus='true') or (macdGoldPlus='true' and pbxC))
   and begintime and (c-last2l)*100/last2l<shakeRate then begin
    tBUY(1,orderNum,mkt);

end

//开空 

if tsellHOLDING(0)=0 and ((DIFF<DEA and pbxDeadPlus='true') or (macdDeadPlus='true' and pbxC))
   and begintime and (last2h-c)*100/last2h<shakeRate then begin   
    tBUYSHORT(1,orderNum,mkt);

end

pbxCondPre:=pbxCond;



金字塔—专业程序化交易量化投资平台

客户服务部

----------------------------------------------------------- 欢迎您参加我公司的技术培训,具体培训需求请发邮件到service@weistock.com

您的宝贵建议或者投诉,请发往邮箱:weiwei@weistock.com

 回到顶部
总数 24 1 2 3 下一页