protected BarOpensBelowIndicatorLogic ( int firstBar, int prvs, double adIndValue, |
||
firstBar | int | |
prvs | int | |
adIndValue | double | |
indCompLong | ||
indCompShort | ||
return | void |
protected void BarOpensBelowIndicatorLogic(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;
}