title: I am trying to workout how I sum up all the open / closes on a given day of both bull and bear candles
body: <p>Hi I am trying to amend some code to enable me to be able to sum up the total bull and total bear candle sizes as the day has gone on however I am having no luck with the below code</p>
  <p>The 11th line is coming back with the following issue</p>
  <p>Variable 'bullish' was declared with 'series int' type. Cannot assign it expression of type 'series float'.</p>
  <pre><code>htfopen = request.security(syminfo.tickerid, &quot;D&quot;, open[barstate.isrealtime ? 1 : 0])[barstate.isrealtime ? 0 : 1]
  
  var bullish  = 0
  var bearish  = 0
  
  if ta.change(htfopen)
      bullish  := 0
      bearish  := 0
  
  if session.ismarket and bullish
      bullish += open-close
  if session.ismarket and bearish
      bearish += close- open
  
  plot((bullish/2),color=color.lime, linewidth=2)
  plot((bearish/2),color=color.red, linewidth=2)
  </code></pre>