Percentage of bullish candles

 
Hello guys I'm writing an oscillator that calculates the percentage of bull candles for a certain period, but I noticed that it draws the line up to a certain point, someone is kind enough to help me? Thank you
Files:
UPvsDW.mq4  6 kb