var compressed = source.CompressTo(new Interval(Compress_time, DataIntervals.MINUTE));
IList<double> cStop_S = ctx.GetData("cStop_S", new string[] {Stop_S .ToString(),Compress_time.ToString()},
delegate { return Series.Highest(compressed.HighPrices, Stop_S); });
IList<double> cStop_L = ctx.GetData("cStop_L", new[] {Stop_L .ToString(),Compress_time.ToString() },
delegate { return Series.Lowest(compressed.LowPrices, Stop_L); });
var DStop_L = compressed.Decompress(cStop_L, DecompressMethodWithDef.Default);
var DStop_S = compressed.Decompress(cStop_S, DecompressMethodWithDef.Default);
Exit_Short = DStop_S[bar];
Exit_Long = DStop_L[bar];
else
{
LongPos.CloseAtStop(bar+1,Exit_Long, "Stop_Long");
}
// Здесь идет другой блок видения короткой позиции а не два else подряд
else
{
ShortPos.CloseAtStop(bar+1,Exit_Short,"Stop_Short_2");
}