您现在的位置:程序化交易>> 期货公式>> 金字塔等>> 金字塔知识>>正文内容

[求助]请问文华此模型如何改写成金字塔能用的 [金字塔]

  • 咨询内容: 如题,请老师帮忙看下,谢谢。

    N1:=6;

    N2:=21;

    N3:=25;

    TR := MAX(MAX((HIGH-LOW),ABS(REF(CLOSE,1)-HIGH)),ABS(REF(CLOSE,1)-LOW));

    ATR := EMA(TR,N1);

    EF:=(HHV(CLOSE,N2)-LLV(CLOSE,N2))/SUM(ABS(CLOSE-REF(CLOSE,1)),N2);

    RSV:=(CLOSE-LLV(LOW,10))/(HHV(HIGH,10)-LLV(LOW,10))*100;

    BACKGROUNDSTYLE(1);

    K:=SMA(RSV,30,1);

    D:=SMA(K,30,1);

    J:=3*K-2*D;

    TR>MAX(ATR*(1.5-(EF-0.5)*(N3/10)),ATR)&&HIGH>REF(HIGH,1)&&CLOSE>OPEN&&TIME>0905&&TIME<1455,BPK;

    TR>MAX(ATR*(1.5-(EF-0.5)*(N3/10)),ATR)&&LOW<REF(LOW,1)&&CLOSE<OPEN&&TIME>0905&&TIME<1455,SPK;

    EXIST(J<10,5)&&J<D&&COUNT(J>REF(J,1),1)=1,BP;

    EXIST(J>90,5)&&J>D&&COUNT(J<REF(J,1),1)=1,SP;

    TIME>1455,BP;

    TIME>1455,SP;

    AUTOFILTER;

     

  • 金字塔客服:  N1:=6;

    N2:=21;

    N3:=25;

    TRx := MAX(MAX((HIGH-LOW),ABS(REF(CLOSE,1)-HIGH)),ABS(REF(CLOSE,1)-LOW));
    ATR := EMA(TRx,N1);

    EF:=(HHV(CLOSE,N2)-LLV(CLOSE,N2))/SUM(ABS(CLOSE-REF(CLOSE,1)),N2);

    RSV:=(CLOSE-LLV(LOW,10))/(HHV(HIGH,10)-LLV(LOW,10))*100;



    K:=SMA(RSV,30,1);

    D:=SMA(K,30,1);

    J:=3*K-2*D;

    if TR>MAX(ATR*(1.5-(EF-0.5)*(N3/10)),ATR) and HIGH>REF(HIGH,1) and CLOSE>OPEN and TIME>130500 and TIME<185500 then
    begin
    sellshort(holding<0,holding,market);
    buy(holding=0,1,market);    
    end


    if TR>MAX(ATR*(1.5-(EF-0.5)*(N3/10)),ATR) and LOW<REF(LOW,1) and CLOSE<OPEN and TIME>130500 and TIME<185500 then
    begin
    sell(holding>0,holding,market);
    buyshort(holding=0,1,market);    
    end


    sellshort(EXIST(J<10,5) and J<D and COUNT(J>REF(J,1),1)=1 and holding<0,holding,market);
    sell(EXIST(J>90,5) and  J>D and COUNT(J<REF(J,1),1)=1,holding,market);

    if time>=185500 then
    begin
    sell(holding>0,holding,MARKET);
    sellshort(holding<0,holding,market);    
    end



    替换部分函数的使用方式即可。

     

     来源:程序化久久网( WWW.CXH99.COM )

  • 用户回复: 谢谢您,我来好好学习下

 

有思路,想编写各种指标公式,交易模型,选股公式,还原公式的朋友

可联系技术人员 QQ: 262069696  点击在线交流或微信号:cxh99cxh99  进行 有偿收费 编写!

怎么收费,代编流程等详情请点击阅读!

(注:由于人数限制,QQ或微信请选择方便的一个联系我们就行,加好友时请简单备注下您的需求,否则无法通过。谢谢您!)


【字体: 】【打印文章】【查看评论

相关文章

    没有相关内容