#region //сжатие разжатие и вывод на экран индикатора SMA
var compresSma = sec.CompressTo(new Interval(sec.Interval * CompressSmaVremay, sec.IntervalBase));//сжимае интервал sec.IntervalBase-сек, мин, дни.\
//sec.Interval-это 2,34,5,45, мин сек час итд

var compSma1 = ctx.GetData("Sma1", new string[] { CompSma1Period.ToString() },
() =>
{
var g = Series.SMA(compresSma.ClosePrices, CompSma1Period);
return compresSma.Decompress(g);
});