IList<double> Calc( IList<double> close ) {
var WmaSlow = TradeHelper.WMA( сlose, WmaSlowPeriod );
var WmaFast = TradeHelper.WMA( сlose, WmaFastPeriod );
var Gist = TradeHelper.Subtract( WmaFast, WmaSlow );
var SmaSignal = Series.SMA( Gist );
return SmaSignal;
}
public ISecurity Execute( ISecurity sec ) {
ISecurity tf = sec.CompressTo( new Interval( tfPeriod, DataIntervals.MINUTE ) ); //tfPeriod - оптим.параметр;
var signals = tf.Decompress( Calc( tf.ClosePrices ));
...
}