开拓者带未来的突破性交易策略-开拓者公式 -程序化交易(grahamobil.com) - 365bet送体验金
您现在的位置:程序化交易>> 期货公式>> 交易开拓者(TB)>> 开拓者公式>>正文内容

365bet送体验金



Params
    Numeric length(5);
    Numeric hands(1);
    Numeric Stop_win(2000);
    Numeric Stop_loss(1000);
     Numeric n(-2);
Vars
        Numeric myhigh;
        Numeric mylow;
        Numeric MyEntryPrice;
        Numeric MyExitPrice;
Begin
      
      if(time>=0.1455)
      {
        if(MarketPosition==1)
                        sell(0,open);
                if(MarketPosition==-1)
                                {
                        buytocover(0,open);
                                              
        }
        }
                               
       myhigh = Highest(High[1],length);
        mylow = Lowest(Low[1],length);
              PlotNumeric("myhigh",myhigh);
              PlotNumeric("mylow",mylow);
        if (High>myhigh and MarketPosition<>1 and open<=myhigh and time>=0.0901 && time <0.1455)
        {
                Buy(hands,myhigh+n*MinMove*pricescale);
        }//程序化交易 www.grahamobil.com
        if ( MarketPosition<>1 and open>myhigh and time>=0.0901 && time <0.1455)
        {
         Buy(hands,open);
        }
        if (Low<mylow and MarketPosition<>-1 and open>=mylow and time>=0.0901 && time <0.1455)
        {
                SellShort(hands,mylow-n*MinMove*pricescale);
        }
        if (  MarketPosition<>-1 and open<mylow and time>=0.0901 && time <0.1455)
        {
                SellShort(hands,open);
        }
          MyEntryPrice = AvgEntryPrice;
        
          If(MarketPosition==1) // 有多仓的情况
    {
        If(High >= MyEntryPrice + Stop_win)   // 止赢条件表达式
        {
            MyExitPrice = MyEntryPrice + Stop_win;
            If(Open > MyExitPrice) MyExitPrice = Open;      // 如果该Bar开盘价有跳空触发,则用开盘价代替
            Sell(0,MyExitPrice);
        }else if(Low <= MyEntryPrice - Stop_loss)// 止损条件表达式
        {
            MyExitPrice = MyEntryPrice - Stop_loss;
            If(Open < MyExitPrice) MyExitPrice = Open;      // 如果该Bar开盘价有跳空触发,则用开盘价代替
            Sell(0,MyExitPrice);
        } //www.chengxuhuajiaoyi.com
    }else if(MarketPosition==-1) // 有空仓的情况
    {
        If(Low <= MyEntryPrice - Stop_win)    // 止赢条件表达式
        {
            MyExitPrice = MyEntryPrice - Stop_win;
            If(Open < MyExitPrice) MyExitPrice = Open;      // 如果该Bar开盘价有跳空触发,则用开盘价代替
            BuyToCover(0,MyExitPrice);
        }else if(High >= MyEntryPrice + Stop_loss)// 止损条件表达式
        {
            MyExitPrice = MyEntryPrice + Stop_loss;
            If(Open > MyExitPrice) MyExitPrice = Open;      // 如果该Bar开盘价有跳空触发,则用开盘价代替
            BuyToCover(0,MyExitPrice);
        }
    }


End
 

 

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

可联系技术人员 QQ: 262069696  点击在线交流进行 有偿 编写!不贵!点击查看价格!

 


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

相关文章

    没有相关内容