is there someone who can help me understand these 2 lines of coding?

 

limit = rates_total-prev_calculated // so this should mean that limit equal to total number of bars - the already calculated bars by the indicator


why limit will be incremented by 1?




 
It is used to avoid calculating same candles again.. to avoid repeated bars.
 
Ahmed Hussain: It is used to avoid calculating same candles again.. to avoid repeated bars.
Needed only when returning rates_total.
          How to do your lookbacks correctly #9 - #14 & #19
Reason: