protected void BarClosesBelowIndicatorLogic(int firstBar, int prvs, double[] adIndValue, ref IndicatorComp indCompLong, ref IndicatorComp indCompShort)
{
double sigma = Sigma();
for (int bar = firstBar; bar < Bars; bar++)
{
indCompLong.Value[bar] = Close[bar] < adIndValue[bar - prvs] - sigma ? 1 : 0;
indCompShort.Value[bar] = Close[bar] > adIndValue[bar - prvs] + sigma ? 1 : 0;
}
return;
}