Optimize calculations

Tell MT5 to run calculations from the start if this is the first time runing the code. however, if the code is already running calculate only for the last bar. This section can be coded in many different ways, and it is important that you check the outputs of the indicator. Specifically if the Buffer is being used from right to left or from left to right. By default the array is read from left to right: the latest value is in the latest cell or that cell to the right.