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


金字塔客服中心 - 专业程序化交易软件提供商金字塔软件公式模型编写问题提交 → 帮忙改写文华代码,谢谢

   

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


  共有3058人关注过本帖树形打印复制链接

主题:帮忙改写文华代码,谢谢

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


加好友 发短信
等级:超级版主 帖子:14496 积分:0 威望:0 精华:0 注册:2017/7/4 13:40:18
  发帖心情 Post By:2021/2/22 9:54:10    Post IP:58.246.57.26[显示全部帖子]

 把交易的部分换下试下。


if C>(MAH*1.002) and MAH>REF(MAH,1) and C>HH and C<MA22*1.08 then buy(holding=0,k,market);
if C<(MAL*0.998) and MAL<REF(MAL,1) and C<LL and C>MA22*0.92 then buyshort(holding=0,k,market);

if C<REF(LLV(C,10),ENTERBARS+2)-2*ATR then sell(1,holding,market);//开仓K线前10个周期收盘价的最低价-2*ATR止损;
if C>REF(HHV(C,10),ENTERBARS+2)+2*ATR then sellshort(1,holding,market);//开仓K线前10个周期收盘价的最高价+2*ATR止损
if C>llv(l,ENTERBARS+1)*1.055 then sellshort(1,holding,market);//固定回撤平空单
if C<hhv(h,ENTERBARS+1)*0.945 then sell(1,holding,market);//固定回撤平多单

if GGLLL>HLGLP then
begin
sell(1,holding,market);
sellshort(1,holding,market);
end



if C<ENTERPRICE-3*ATR then sell(1,holding,market);
if C>ENTERPRICE+3*ATR then sellshort(1,holding,market);
if CROSS(MA22,MA11) or C<MAL then sell(1,holding,market);
if CROSS(MA11,MA22)or C>MAH then  sellshort(1,holding,market);
//MID<REF(MID,60),SP(BKVOL);
//MID>REF(MID,60),BP(SKVOL);

if hhv(h,ENTERBARS+1)>MA22*1.08 and C<hhv(h,ENTERBARS+1)-3*ATR then  sell(1,holding,market);
if llv(l,ENTERBARS+1)<MA22*0.92 and C>llv(l,ENTERBARS+1)+3*ATR then  sellshort(1,holding,market);
if hhv(h,ENTERBARS+1)>MAC*1.08 and C< hhv(h,ENTERBARS+1)-6*ATR then sell(1,holding,market);
if llv(l,ENTERBARS+1)<MAC*0.92 and C>llv(l,ENTERBARS+1)+6*ATR then  sellshort(1,holding,market);

if COUNT(ATR>MATR*1.7,10)>=3 and C<LV(C,30) then sell(1,holding,market);
if COUNT(ATR>MATR*1.7,10)>=3 and C>HV(C,30) then sellshort(1,holding,market);
if hhv(h,ENTERBARS+1)- ENTERPRICE>C/70 and  (C-ENTERPRICE)/(hhv(h,ENTERBARS+1)-ENTERPRICE)<=0.2 then sell(1,holding,market);
if ENTERPRICE-llv(l,ENTERBARS+1)>C/70 and (ENTERPRICE-C)/(ENTERPRICE-llv(l,ENTERBARS+1))<=0.2 then sellshort(1,holding,market);
//CLOSEKLINE(2,10);


CLOSEKLINE  这个我们无法实现。没办法做这个信号复核的。


命数如织,当如磐石。
 回到顶部
帅哥哟,离线,有人找我吗?
FireScript
  2楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:超级版主 帖子:14496 积分:0 威望:0 精华:0 注册:2017/7/4 13:40:18
  发帖心情 Post By:2021/2/22 9:58:32    Post IP:58.246.57.26[显示全部帖子]

“MAH:A03;//自己编写填入”这个是参数还是只是未完成的部分?
 最好能补全下,这样我改好了能简单测试下。


命数如织,当如磐石。
 回到顶部