您现在的位置:程序化交易>> 期货公式>> (MC)multicharts>> MC知识>>正文内容

期货期权交流k线形态策略 [MC]

  • 咨询内容: 看到这个帖子,分享一下

    原文请见:
    http://www.zenotrade.com/

    我们假设,相似的k线形态导致相似的价格变化,例如下图所示:


    在国外的一个博客(davenewberg.com/Trading/)中找到了一个叫3-4 BAR PATTERN TRADES的策略,就是利用最近的几根k线来进行交易。

    这个策略的思想非常好,可以很好地捕捉日内价格形态暗示的交易机会。在实际使用时,需要把止损止盈以及点差参数根据标的商品的属性进行设置。我把它在股指期货和一些商品上进行了测试,策略经过一些修正和加工后盈利能力非常不错,甚至可以实盘。

    这里就把原版策略分享给大家,抛砖引玉,为大家提供一点思路。
    从原版策略给的默认参数大小来看,应该是做外汇的策略,easy language源码如下:

    ///////////////////////////////// TRADE VARIABLES //////////////////////////////////
    Var: TradeType (0), MultiX (true);{Multiple exits can be turned on here or below in "MultiExits"}
    Var: Series3Low(0), Series4Low(0), Series5Low(0); //declare variablesTradeType=1;

    //////// SET TradeType 1-9 including 7.2 Here /////////////////
    Series3Low = Lowest (Low, 3);
    Series4Low = Lowest (Low, 4);
    Series5Low = Lowest (Low, 4); //define variables

    ////////////////////////////// TRADE ENTRIES //////////////////////////////
    If TradeType=1 and H[3]>H[2] and C[2]<C[1] and L[1]>L[2] and H[1]>H[2] and H[0]>H[3] thenBuy ("T1Long") Next Bar at H[3]+ .0001 stop;  // 如果换成国内期货,0.0001可以改成1个最小变动价位

    If TradeType=1 and MarketPosition = 1 then begin; SetStopContract; SetPercentTrailing (.002, -.002); end;//(floor amount, stop)

    If TradeType=2and H[3]>H[2] and C[2]<C[1] and L[2]<L[3] and O[1]<C[2] and C[1]>C[2] and L[1]<L[2]Then Buy Next Bar at H[2]+ .0001 stop;

    If TradeType=3and H[3]>H[2] and C[2]<C[3] and O[1]>C[2] and H[1]>H[3] and H[0]>H[1]Then Buy Next Bar at H[1]+ .0001 stop;

    If TradeType=4 //long and H[3]>H[2] and H[2]>H[1] and L[3]<L[2] and L[2]<L[1]Then Buy Next Bar at H[3]+.0001 stop;

    If TradeType=5 //short and H[3]>H[2] and H[2]>H[1] and L[3]<L[2] and L[2]<L[1]Then sell short next bar at L[3]-.0001 stop;

    If TradeType=6 and H[3]>h[2] and C[2]<C[3] and O[1]>C[2] and H[1]>H[3]Then Buy Next Bar at H[1]+ .0001 stop;

    If TradeType=7 and L[4]<L[5] and L[3]<L[4] and H[5]>H[4] and H[4]>H[3]and H[2]<H[3] and H[1]<h[3] and L[2]>L[3] and L[1]>L[3] //and a series of 2 small inside barsThen Sell Short Next Bar at H[1]- .001 stop;

    If TradeType=7.2 and L[5]<L[6] and L[4]<L[5] and H[6]>H[5] and H[5]>H[4]and H[3]<H[4] and H[2]<H[4] and H[1]<h[4] and L[3]>L[4] and L[2]>L[4] and L[1]>L[4] //and a series of 3 small inside barsThen Sell Short Next Bar at H[1]- .001 stop;

    If TradeType=8 and H[4]<H[3] and C[3]>C[2] and C[2]<C[3] and O[1]<C[2] and C[1]>C[2]Then Buy Next Bar at H[3]+ .001 stop;

    If TradeType=9 and H[3]<H[4] and C[3]>C[4] and H[2]>H[3] and C[2]<C[3] and L[1]<L[3] and C[1]>C[3]Then Buy next bar at H[2]+.0001 stop;



















     

  • MC技术部: 感谢分享, 帮您排版了一下

 

有思路,想编写各种指标公式,程序化交易模型,选股公式,预警公式的朋友

可联系技术人员 QQ: 511411198  点击这里给我发消息进行 有偿 编写!不贵!点击查看价格!


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

相关文章

    没有相关内容