分时图日内均线求法?
Params //此处添加参数 Numeric loss (50); Vars //此处添加变量 Series<Numeric> my_h ; Series<Numeric> my_l ; Series<Numeric> p_my_h ; Series<Numeric> p_my_l ; Series<Numeric>trade_count (0); Series<Numeric>my_exitprice ; Events//在新bar的第一次执行之前调用一次,参数为新bar的图层数组 OnBar(ArrayRef<Integer> indexs) { //日内的最高最低 my_h = highest( h[1], NthCon(tradingdate<>tradingdate [1],1)); my_l = lowest( l[1], NthCon(tradingdate>tradingdate[1],1));// PlotAuto (\" my _ h \", my _ h );//给定时间赋值 if (time ==0.2200){ p_my_h = my_h ; p_my_l = my_l ; trade_count =1;} PlotAuto (\"p_my_h\",p_my_h); PlotAuto (\"p_my_l\",p_my_l); bool time_1= time>0.22 or time<0.1455;// if ( h>=p_my_h and MarketPosition<=0 and time_1 and trade_count==1){ buy(1,max(open,p_my_h)); trade_count=0; my_exitprice = p_my_l ;} if (l<=p_my_l and MarketPosition >=0 and time_1 and trade_count ==1){ sellshort (1,p_my_l); trade_count =0; my_exitprice = p_my_h ;} //////// if ( MarketPosition >0 and BarsSinceEntry >1){ if ( my_exitprice < l[1]-loss ){ my_exitprice = l[1]- loss ;} else if (L<=my_exitprice ){ sell (0, my_exitprice );} if ( MarketPosition <0 and BarsSinceEntry >1) { if ( my_exitprice > h[1]+ loss ){ my_exitprice = h[1]+ loss ; } else if ( h>=my_exitprice ){ BuyToCover (0, my_exitprice );}////// if ( time ==0.1455 and MarketPosition >0){ sell (0, open ); BuyToCover (0, open );}// my _ h = highest ( h ,20);}}}各位老师我想做个日内均线策略,但没有参考模板王凯明老师视频里日内策略把my_h = highest( h[1], NthCon(tradingdate<>tradingdate [1],1));改成my_h = AverageFC( close[1], NthCon(tradingdate<>tradingdate [1],1));这样就成了计算开盘后均线值?