I have an indicator that draws an arrow up/down when price crosses a BB and stochastic is above/below a certain number. For the most part, it works great. I have noticed however, that an arrow is not plotted on the current bar if the previous bar crosses a band, but the stochastic is not above/below a certain number. I understand that the previous bar does not meet all of my conditions, be the next bar (current bar) does. Is there a way to correct this problem do I can get an arrow EACH time the conditions are met? Here is my current logic:
if (IsFirstTickOfBar)
priorValueLow3 = Bollinger1.Lower[0];
if ((Stochastics1.K[0] < NumberLow)
&& (Bollinger1.Lower[0] <= priorValueLow3 && (CrossBelow(Low, Bollinger1.Lower, 1))))
{
Draw.ArrowUp(this, @"GreenArrowUp"+CurrentBar, false, 0, (Low[0] + (-2 * TickSize)) , Brushes.Lime);
}
if (Bollinger1.Lower[0] <= priorValueLow3)
{
priorValueLow3 = Bollinger1.Lower[0];
}
Chris
Comment