Forex_Strategy_Builder.Indicator.BarOpensAboveIndicatorLogic C# (CSharp) Метод

BarOpensAboveIndicatorLogic() защищенный Метод

Returns signals for the logic rule "The bar opens above the Indicator"
protected BarOpensAboveIndicatorLogic ( int firstBar, int prvs, double adIndValue, IndicatorComp &indCompLong, IndicatorComp &indCompShort ) : void
firstBar int
prvs int
adIndValue double
indCompLong IndicatorComp
indCompShort IndicatorComp
Результат void
        protected void BarOpensAboveIndicatorLogic(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]  = Open[bar] > adIndValue[bar - prvs] + sigma ? 1 : 0;
                indCompShort.Value[bar] = Open[bar] < adIndValue[bar - prvs] - sigma ? 1 : 0;
            }

            return;
        }