开多头 止损前三根最低价,,,怎么写

Params Numeric Length(14); //参数Vars Series<Numeric> MA; Series<Numeric> lo1; Numeric lo;Events //Bar更新事件函数,参数indexs表示变化的数据源图层ID数组 OnBar(ArrayRef<Integer> indexs) { MA = Round(AverageFC(Close[1],Length),0); PlotNumeric(MA , MA ); //均线上下转折开仓 lo1=Lowest(Low[1],3); If(MarketPosition<>1 And MA[1]>MA[2] And MA[2]<=MA[3] And Close[1]>=Open[1] And Close[1]>=MA[1]) { Buy(0,Open); lo=Open- lo1; } //止损前三根 If(MarketPosition==1 And Low>=lo and BarsSinceEntry>0) { Sell(0,Open); PlotAuto(Bear Market,多止损,high,Red); }

不见有置顶按键

置顶?

建议你看置顶投稿帖