为啥策略加RSI代码就显示变了
策略代码加入RSI部分,结果图层显示就变成下图一样,k线缩到上面去了,请问这个何解?//Range[0:DataSourceSize() - 1] If(1==1) { If(CurrentBar <= Length - 1) { NetChgAvg = ( Close - Close[Length] ) / Length ; TotChgAvg = Average( Abs( Close - Close[1] ), Length ) ; }Else { SF = 1/Length; Change = Close - Close[1] ; NetChgAvg = NetChgAvg[1] + SF * ( Change - NetChgAvg[1] ) ; TotChgAvg = TotChgAvg[1] + SF * ( Abs( Change ) - TotChgAvg[1] ) ; } If( TotChgAvg <> 0 ) { ChgRatio = NetChgAvg / TotChgAvg; }else { ChgRatio = 0 ; } RSIValue = 50 * ( ChgRatio + 1 ); PlotNumeric("RSI",RSIValue); PlotNumeric("超买",OverBought); PlotNumeric("超卖",OverSold); Commentary("LINE280-RSI,超买,超卖=" + Text(RSIValue) + "," + Text(OverBought) + "," + Text(OverSold)); }