AD19825290 发表于 2020-6-21 22:15:41

请老师完善下时间

请老师帮忙修改下时间日内模型,上午9.01到14.58平仓,晚上21.01到0.58平仓if(time>=0.1458)
      {
        if(MarketPosition==1)
                        sell(0,open);
                if(MarketPosition==-1)
                                {
                        buytocover(0,open);
                                             
        }
        }
                              
       myhigh = Highest(High,length);
        mylow = Lowest(Low,length);
              PlotNumeric("myhigh",myhigh);
              PlotNumeric("mylow",mylow);
        if (High>myhigh and MarketPosition<>1 and open<=myhigh and time>=0.0901 && time <0.1458)
        {
                Buy(hands,myhigh+n*MinMove*pricescale);
        }
        if ( MarketPosition<>1 and open>myhigh and time>=0.0901 && time <0.1458)
        {
         Buy(hands,open);
        }
        if (Low<mylow and MarketPosition<>-1 and open>=mylow and time>=0.0901 && time <0.1458)
        {
                SellShort(hands,mylow-n*MinMove*pricescale);
        }
        if (  MarketPosition<>-1 and open<mylow and time>=0.0901 && time <0.1458)
页: [1]
查看完整版本: 请老师完善下时间