i have a "count if" statement, the confirmation of which instructs nt to count the candles backwards from [0]. However, the statement proves true in clusters due to the sequential nature.
How might I only draw text with regards to the most recent occurence in the group? Please see attached.
thanks,
David
if(CountIf(() => Close[0] < Close[4], 9) == 9)
{
Draw.Text(this, Convert.ToString(CurrentBars[0]) + @" cdCount_9", "9", 0, (Low[0] + (-4 * TickSize)), Brushes.Lime);
Draw.Text(this, Convert.ToString(CurrentBars[0]) + @" cdCount_8", "8", 1, (Low[0] + (-4 * TickSize)), Brushes.Lime);
Draw.Text(this, Convert.ToString(CurrentBars[0]) + @" cdCount_7", "7", 2, (Low[0] + (-4 * TickSize)), Brushes.Lime);
Draw.Text(this, Convert.ToString(CurrentBars[0]) + @" cdCount_6", "6", 3, (Low[0] + (-4 * TickSize)), Brushes.Lime);
Draw.Text(this, Convert.ToString(CurrentBars[0]) + @" cdCount_5", "5", 4, (Low[0] + (-4 * TickSize)), Brushes.Lime);
Draw.Text(this, Convert.ToString(CurrentBars[0]) + @" cdCount_4", "4", 5, (Low[0] + (-4 * TickSize)), Brushes.Lime);
Draw.Text(this, Convert.ToString(CurrentBars[0]) + @" cdCount_3", "3", 6, (Low[0] + (-4 * TickSize)), Brushes.Lime);
Draw.Text(this, Convert.ToString(CurrentBars[0]) + @" cdCount_2", "2", 7, (Low[0] + (-4 * TickSize)), Brushes.Lime);
Draw.Text(this, Convert.ToString(CurrentBars[0]) + @" cdCount_1", "1", 8, (Low[0] + (-4 * TickSize)), Brushes.Lime);
}​
Comment