分享

菲阿里四价

 hqsc88 2013-06-10
//策略:菲阿里四价
//周期:日内
//类别:趋势突破

昨天高点、昨天低点、昨日收盘价、今天开盘价,可并称为菲阿里四价。它由日本期货冠军菲阿里实盘采用的主要突破交易参照系。

主要特点:

日内交易策略,收盘平仓;

菲阿里四价指昨日高点、昨日低点、昨日收盘、今日开盘;

上轨=昨日高点;

下轨=昨日低点;

用法:

当价格突破上轨,买入开仓;

当价格跌穿下轨,卖出开仓。



//策略:菲阿里四价
//周期:日内
//类别:趋势突破

//修订时间:2012.11.1
//Designed By Rogarz


//原版

//准备中间变量
input:ss(1,1,100,1);
昨高:=callstock(stklabel,vthigh,6,-1);//昨高
昨低:=callstock(stklabel,vtlow,6,-1);//昨低
昨收:=callstock(stklabel,vtclose,6,-1);//昨收
上轨:昨高;
下轨:昨低;
手数:=ss;
//条件
开多条件:=c>上轨;
开空条件:=c<下轨;
//交易系统
if time>090000 and time<145000then begin
开多:buy(开多条件 and holding=0,手数,market);
开空:buyshort(开空条件 and holding=0,手数,market);
end

if time>=145000 then BEGIN
    收盘平多:sell(1,手数,market);
    收盘平空:sellshort(1,手数,market);


end



################################################################################################

//策略:菲阿里四价
//周期:日内
//类别:趋势突破
//原版+止损+交易测试限制

//修订时间:2012.11.1
//Designed By Rogarz



//准备中间变量
input:ss(1,1,100,1),n1(10,1,100,1),n2(10,1,100,1)n3(4,2,100,1);
variable:交易次数:=0;//为了便于统计 开平1次后 交易次数为2
昨高:=callstock(stklabel,vthigh,6,-1);//昨高
昨低:=callstock(stklabel,vtlow,6,-1);//昨低
昨收:=callstock(stklabel,vtclose,6,-1);//昨收
上轨:昨高;
下轨:昨低;
手数:=ss;
//条件
开多条件:=c>上轨;
开空条件:=c<下轨;
多头止损条件:=c<enterprice-N1*mindiff and time<145500;
空头止损条件:=c>enterprice+n2*mindiff and time<145500;
//交易系统
if (time>090000 and time<145000 and 交易次数<=n3) and  (开多条件 or 开空条件) and holding=0 then begin

开多:buy(开多条件 and holding=0,手数,market);
开空:buyshort(开空条件 and holding=0,手数,market);
交易次数:=交易次数+1;
end
//止损
if 多头止损条件 and holding>0 then begin
多头止损:sell(1,手数,market);
交易次数:=交易次数+1;
end
if 空头止损条件 and holding<0 then BEGIN
空头止损:sellshort(1,手数,market);
交易次数:=交易次数+1;
end


if time>=145000 then BEGIN
    收盘平多:sell(1,手数,market);
    收盘平空:sellshort(1,手数,market);
    交易次数:=0;


end

    本站是提供个人知识管理的网络存储空间,所有内容均由用户发布,不代表本站观点。请注意甄别内容中的联系方式、诱导购买等信息,谨防诈骗。如发现有害或侵权内容,请点击一键举报。
    转藏 分享 献花(0

    0条评论

    发表

    请遵守用户 评论公约

    类似文章 更多