i-highlow_channel_htf

Download script
Author: Copyright © 2014, Nikolay Kositsin
Price Data Components
3 Views
0 Downloads
0 Favorites
i-highlow_channel_htf
ÿþ/�/�+�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�+� �
�
�/�/�|� � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � �i�-�H�i�g�h�L�o�w�_�C�h�a�n�n�e�l�_�H�T�F�.�m�q�5� �|� �
�
�/�/�|� � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � �C�o�p�y�r�i�g�h�t� �©� �2�0�1�4�,� �N�i�k�o�l�a�y� �K�o�s�i�t�s�i�n� �|� �
�
�/�/�|� � � � � � � � � � � � � � � � � � � � � � � � � � � � � � �K�h�a�b�a�r�o�v�s�k�,� � � �f�a�r�r�i�a�@�m�a�i�l�.�r�e�d�c�o�m�.�r�u� �|� �
�
�/�/�+�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�+� �
�
�#�p�r�o�p�e�r�t�y� �c�o�p�y�r�i�g�h�t� �"�C�o�p�y�r�i�g�h�t� �©� �2�0�1�4�,� �N�i�k�o�l�a�y� �K�o�s�i�t�s�i�n�"�
�
�#�p�r�o�p�e�r�t�y� �l�i�n�k� �"�f�a�r�r�i�a�@�m�a�i�l�.�r�e�d�c�o�m�.�r�u�"�
�
�/�/�-�-�-� �i�n�d�i�c�a�t�o�r� �v�e�r�s�i�o�n�
�
�#�p�r�o�p�e�r�t�y� �v�e�r�s�i�o�n� � � �"�1�.�6�0�"�
�
�#�p�r�o�p�e�r�t�y� �d�e�s�c�r�i�p�t�i�o�n� �"�i�-�H�i�g�h�L�o�w�_�C�h�a�n�n�e�l� �w�i�t�h� �t�h�e� �t�i�m�e�f�r�a�m�e� �s�e�l�e�c�t�i�o�n� �o�p�t�i�o�n� �a�v�a�i�l�a�b�l�e� �i�n� �i�n�p�u�t� �p�a�r�a�m�e�t�e�r�s�"�
�
�/�/�-�-�-� �d�r�a�w�i�n�g� �t�h�e� �i�n�d�i�c�a�t�o�r� �i�n� �t�h�e� �m�a�i�n� �w�i�n�d�o�w�
�
�#�p�r�o�p�e�r�t�y� �i�n�d�i�c�a�t�o�r�_�c�h�a�r�t�_�w�i�n�d�o�w�
�
�/�/�-�-�-� �n�u�m�b�e�r� �o�f� �i�n�d�i�c�a�t�o�r� �b�u�f�f�e�r�s� �3�
�
�#�p�r�o�p�e�r�t�y� �i�n�d�i�c�a�t�o�r�_�b�u�f�f�e�r�s� �3� �
�
�/�/�-�-�-� �t�h�r�e�e� �p�l�o�t�s� �a�r�e� �u�s�e�d�
�
�#�p�r�o�p�e�r�t�y� �i�n�d�i�c�a�t�o�r�_�p�l�o�t�s� � � �3�
�
�/�/�+�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�+�
�
�/�/�|� �d�e�c�l�a�r�a�t�i�o�n� �o�f� �c�o�n�s�t�a�n�t�s� � � � � � � � � � � � � � � � � � � � � �|�
�
�/�/�+�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�+�
�
�#�d�e�f�i�n�e� �R�E�S�E�T� �0� � � � � � � � � � � � � � � � � � � � � � � � � � � � � �/�/� �A� �c�o�n�s�t�a�n�t� �f�o�r� �r�e�t�u�r�n�i�n�g� �t�h�e� �i�n�d�i�c�a�t�o�r� �r�e�c�a�l�c�u�l�a�t�i�o�n� �c�o�m�m�a�n�d� �t�o� �t�h�e� �t�e�r�m�i�n�a�l�
�
�#�d�e�f�i�n�e� �I�N�D�I�C�A�T�O�R�_�N�A�M�E� �"�i�-�H�i�g�h�L�o�w�_�C�h�a�n�n�e�l�"� � �/�/� �A� �c�o�n�s�t�a�n�t� �f�o�r� �t�h�e� �i�n�d�i�c�a�t�o�r� �n�a�m�e�
�
�#�d�e�f�i�n�e� �S�I�Z�E� �3� � � � � � � � � � � � � � � � � � � � � � � � � � � � � � �/�/� �A� �c�o�n�s�t�a�n�t� �f�o�r� �t�h�e� �n�u�m�b�e�r� �o�f� �c�a�l�l�s� �o�f� �t�h�e� �C�o�u�n�t�I�n�d�i�c�a�t�o�r� �f�u�n�c�t�i�o�n� �i�n� �t�h�e� �c�o�d�e�
�
�/�/�+�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�+� �
�
�/�/�|� �I�n�d�i�c�a�t�o�r� �1� �d�r�a�w�i�n�g� �p�a�r�a�m�e�t�e�r�s� � � � � � � � � � � � � � � �|�
�
�/�/�+�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�+�
�
�/�/�-�-�-� �a� �l�i�n�e� �i�s� �u�s�e�d� �f�o�r� �t�h�e� �i�n�d�i�c�a�t�o�r�
�
�#�p�r�o�p�e�r�t�y� �i�n�d�i�c�a�t�o�r�_�t�y�p�e�1� � � �D�R�A�W�_�L�I�N�E�
�
�/�/�-�-�-� �d�i�s�p�l�a�y�i�n�g� �t�h�e� �i�n�d�i�c�a�t�o�r� �l�a�b�e�l�
�
�#�p�r�o�p�e�r�t�y� �i�n�d�i�c�a�t�o�r�_�l�a�b�e�l�1� � �"�i�-�H�i�g�h�L�o�w� �M�i�d�d�l�e�"�
�
�/�/�-�-�-� �t�h�e� �c�o�l�o�r� �o�f� �t�h�e� �i�n�d�i�c�a�t�o�r�
�
�#�p�r�o�p�e�r�t�y� �i�n�d�i�c�a�t�o�r�_�c�o�l�o�r�1� �c�l�r�S�l�a�t�e�G�r�a�y�
�
�/�/�-�-�-� �I�n�d�i�c�a�t�o�r� �l�i�n�e� �i�s� �a� �s�o�l�i�d� �o�n�e�
�
�#�p�r�o�p�e�r�t�y� �i�n�d�i�c�a�t�o�r�_�s�t�y�l�e�1� � �S�T�Y�L�E�_�S�O�L�I�D�
�
�/�/�-�-�-� �i�n�d�i�c�a�t�o�r� �l�i�n�e� �w�i�d�t�h� �i�s� �2�
�
�#�p�r�o�p�e�r�t�y� �i�n�d�i�c�a�t�o�r�_�w�i�d�t�h�1� � �2�
�
�/�/�+�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�+� �
�
�/�/�|� �I�n�d�i�c�a�t�o�r� �2� �d�r�a�w�i�n�g� �p�a�r�a�m�e�t�e�r�s� � � � � � � � � � � � � � � �|�
�
�/�/�+�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�+�
�
�/�/�-�-�-� �a� �l�i�n�e� �i�s� �u�s�e�d� �f�o�r� �t�h�e� �i�n�d�i�c�a�t�o�r�
�
�#�p�r�o�p�e�r�t�y� �i�n�d�i�c�a�t�o�r�_�t�y�p�e�2� � � �D�R�A�W�_�L�I�N�E�
�
�/�/�-�-�-� �d�i�s�p�l�a�y�i�n�g� �t�h�e� �i�n�d�i�c�a�t�o�r� �l�a�b�e�l�
�
�#�p�r�o�p�e�r�t�y� �i�n�d�i�c�a�t�o�r�_�l�a�b�e�l�2� � �"�i�-�H�i�g�h�L�o�w� �U�p�p�e�r�"�
�
�/�/�-�-�-� �c�o�l�o�r�s� �u�s�e�d� �f�o�r� �t�h�e� �i�n�d�i�c�a�t�o�r� �l�i�n�e�
�
�#�p�r�o�p�e�r�t�y� �i�n�d�i�c�a�t�o�r�_�c�o�l�o�r�2� �c�l�r�D�o�d�g�e�r�B�l�u�e�
�
�/�/�-�-�-� �I�n�d�i�c�a�t�o�r� �l�i�n�e� �i�s� �a� �s�o�l�i�d� �o�n�e�
�
�#�p�r�o�p�e�r�t�y� �i�n�d�i�c�a�t�o�r�_�s�t�y�l�e�2� � �S�T�Y�L�E�_�S�O�L�I�D�
�
�/�/�-�-�-� �i�n�d�i�c�a�t�o�r� �l�i�n�e� �w�i�d�t�h� �i�s� �2�
�
�#�p�r�o�p�e�r�t�y� �i�n�d�i�c�a�t�o�r�_�w�i�d�t�h�2� � �2�
�
�/�/�+�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�+� �
�
�/�/�|� �I�n�d�i�c�a�t�o�r� �3� �d�r�a�w�i�n�g� �p�a�r�a�m�e�t�e�r�s� � � � � � � � � � � � � � � �|�
�
�/�/�+�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�+�
�
�/�/�-�-�-� �a� �l�i�n�e� �i�s� �u�s�e�d� �f�o�r� �t�h�e� �i�n�d�i�c�a�t�o�r�
�
�#�p�r�o�p�e�r�t�y� �i�n�d�i�c�a�t�o�r�_�t�y�p�e�3� � � �D�R�A�W�_�L�I�N�E�
�
�/�/�-�-�-� �d�i�s�p�l�a�y�i�n�g� �t�h�e� �i�n�d�i�c�a�t�o�r� �l�a�b�e�l�
�
�#�p�r�o�p�e�r�t�y� �i�n�d�i�c�a�t�o�r�_�l�a�b�e�l�3� � �"�i�-�H�i�g�h�L�o�w� �L�o�w�e�r�"�
�
�/�/�-�-�-� �c�o�l�o�r�s� �u�s�e�d� �f�o�r� �t�h�e� �i�n�d�i�c�a�t�o�r� �l�i�n�e�
�
�#�p�r�o�p�e�r�t�y� �i�n�d�i�c�a�t�o�r�_�c�o�l�o�r�3� �c�l�r�M�a�g�e�n�t�a�
�
�/�/�-�-�-� �I�n�d�i�c�a�t�o�r� �l�i�n�e� �i�s� �a� �s�o�l�i�d� �o�n�e�
�
�#�p�r�o�p�e�r�t�y� �i�n�d�i�c�a�t�o�r�_�s�t�y�l�e�3� � �S�T�Y�L�E�_�S�O�L�I�D�
�
�/�/�-�-�-� �i�n�d�i�c�a�t�o�r� �l�i�n�e� �w�i�d�t�h� �i�s� �2�
�
�#�p�r�o�p�e�r�t�y� �i�n�d�i�c�a�t�o�r�_�w�i�d�t�h�3� � �2�
�
�/�/�+�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�+� �
�
�/�/�|� �I�n�d�i�c�a�t�o�r� �i�n�p�u�t� �p�a�r�a�m�e�t�e�r�s� � � � � � � � � � � � � � � � � � � �|�
�
�/�/�+�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�+�
�
�i�n�p�u�t� �E�N�U�M�_�T�I�M�E�F�R�A�M�E�S� �T�i�m�e�F�r�a�m�e�=�P�E�R�I�O�D�_�H�4�;� � �/�/� �I�n�d�i�c�a�t�o�r� �c�h�a�r�t� �p�e�r�i�o�d� �
�
�i�n�p�u�t� �u�i�n�t� �p�e�r�i�o�d�=�2�0�;� � � � � � � � � � � � � � � � � � � � � � � �/�/� �T�h�e� �n�u�m�b�e�r� �o�f� �c�a�n�d�l�e�s�t�i�c�k�s� �f�o�r� �d�e�t�e�r�m�i�n�i�n�g� �e�x�t�r�e�m�u�m�
�
�i�n�p�u�t� �u�i�n�t� �F�i�l�t�e�r�=�5�0�;� � � � � � � � � � � � � � � � � � � � � � � �/�/� �W�i�d�t�h� �o�f� �t�h�e� �o�f�f�s�e�t� �f�r�o�m� �t�h�e� �c�a�n�d�l�e�s�t�i�c�k� �i�n� �p�o�i�n�t�s�
�
�i�n�p�u�t� �i�n�t� �S�h�i�f�t�=�0�;� � � � � � � � � � � � � � � � � � � � � � � � � � �/�/� �H�o�r�i�z�o�n�t�a�l� �s�h�i�f�t� �o�f� �t�h�e� �i�n�d�i�c�a�t�o�r� �i�n� �b�a�r�s�
�
�/�/�+�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�+� �
�
�/�/�-�-�-� �d�e�c�l�a�r�a�t�i�o�n� �o�f� �d�y�n�a�m�i�c� �a�r�r�a�y�s� �t�h�a�t� �w�i�l�l� �b�e� �u�s�e�d� �a�s� �i�n�d�i�c�a�t�o�r� �b�u�f�f�e�r�s�
�
�d�o�u�b�l�e� �I�n�d�1�B�u�f�f�e�r�[�]�;�
�
�d�o�u�b�l�e� �I�n�d�2�B�u�f�f�e�r�[�]�;�
�
�d�o�u�b�l�e� �I�n�d�3�B�u�f�f�e�r�[�]�;�
�
�/�/�-�-�-� �d�e�c�l�a�r�a�t�i�o�n� �o�f� �i�n�t�e�g�e�r� �v�a�r�i�a�b�l�e�s� �f�o�r� �t�h�e� �s�t�a�r�t� �o�f� �d�a�t�a� �c�a�l�c�u�l�a�t�i�o�n�
�
�i�n�t� �m�i�n�_�r�a�t�e�s�_�t�o�t�a�l�;�
�
�/�/�-�-�-� �d�e�c�l�a�r�a�t�i�o�n� �o�f� �i�n�t�e�g�e�r� �v�a�r�i�a�b�l�e�s� �f�o�r� �t�h�e� �i�n�d�i�c�a�t�o�r�s� �h�a�n�d�l�e�s�
�
�i�n�t� �I�n�d�_�H�a�n�d�l�e�;�
�
�/�/�+�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�+�
�
�/�/�|� �G�e�t�t�i�n�g� �a� �t�i�m�e�f�r�a�m�e� �a�s� �a� �s�t�r�i�n�g� � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � �|�
�
�/�/�+�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�+�
�
�s�t�r�i�n�g� �G�e�t�S�t�r�i�n�g�T�i�m�e�f�r�a�m�e�(�E�N�U�M�_�T�I�M�E�F�R�A�M�E�S� �t�i�m�e�f�r�a�m�e�)�
�
� � �{�r�e�t�u�r�n�(�S�t�r�i�n�g�S�u�b�s�t�r�(�E�n�u�m�T�o�S�t�r�i�n�g�(�t�i�m�e�f�r�a�m�e�)�,�7�,�-�1�)�)�;�}�
�
�/�/�+�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�+� � � � �
�
�/�/�|� �C�u�s�t�o�m� �i�n�d�i�c�a�t�o�r� �i�n�i�t�i�a�l�i�z�a�t�i�o�n� �f�u�n�c�t�i�o�n� � � � � � � � � � � � � � � � � � � � � � � � � �|� �
�
�/�/�+�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�+� � �
�
�i�n�t� �O�n�I�n�i�t�(�)�
�
� � �{�
�
�/�/�-�-�-� �c�h�e�c�k�i�n�g� �c�o�r�r�e�c�t�n�e�s�s� �o�f� �t�h�e� �c�h�a�r�t� �p�e�r�i�o�d�s�
�
� � � �i�f�(�!�T�i�m�e�F�r�a�m�e�s�C�h�e�c�k�(�I�N�D�I�C�A�T�O�R�_�N�A�M�E�,�T�i�m�e�F�r�a�m�e�)�)� �r�e�t�u�r�n�(�I�N�I�T�_�F�A�I�L�E�D�)�;�
�
�/�/�-�-�-� �i�n�i�t�i�a�l�i�z�a�t�i�o�n� �o�f� �v�a�r�i�a�b�l�e�s� �
�
� � � �m�i�n�_�r�a�t�e�s�_�t�o�t�a�l�=�2�;�
�
�/�/�-�-�-� �g�e�t�t�i�n�g� �t�h�e� �h�a�n�d�l�e� �o�f� �t�h�e� �i�-�H�i�g�h�L�o�w�_�C�h�a�n�n�e�l� �i�n�d�i�c�a�t�o�r� �
�
� � � �I�n�d�_�H�a�n�d�l�e�=�i�C�u�s�t�o�m�(�S�y�m�b�o�l�(�)�,�T�i�m�e�F�r�a�m�e�,�"�i�-�H�i�g�h�L�o�w�"�,�p�e�r�i�o�d�,�F�i�l�t�e�r�,�0�)�;�
�
� � � �i�f�(�I�n�d�_�H�a�n�d�l�e�=�=�I�N�V�A�L�I�D�_�H�A�N�D�L�E�)�
�
� � � � � �{�
�
� � � � � � �P�r�i�n�t�(�"� �F�a�i�l�e�d� �t�o� �g�e�t� �t�h�e� �h�a�n�d�l�e� �o�f� �t�h�e� �i�-�H�i�g�h�L�o�w�_�C�h�a�n�n�e�l� �i�n�d�i�c�a�t�o�r�"�)�;�
�
� � � � � � �r�e�t�u�r�n�(�I�N�I�T�_�F�A�I�L�E�D�)�;�
�
� � � � � �}�
�
�/�/�-�-�-� �I�n�i�t�i�a�l�i�z�e� �i�n�d�i�c�a�t�o�r� �b�u�f�f�e�r�s�
�
� � � �I�n�d�I�n�i�t�(�0�,�I�n�d�1�B�u�f�f�e�r�,�0�.�0�,�m�i�n�_�r�a�t�e�s�_�t�o�t�a�l�,�S�h�i�f�t�)�;�
�
� � � �I�n�d�I�n�i�t�(�1�,�I�n�d�2�B�u�f�f�e�r�,�0�.�0�,�m�i�n�_�r�a�t�e�s�_�t�o�t�a�l�,�S�h�i�f�t�)�;�
�
� � � �I�n�d�I�n�i�t�(�2�,�I�n�d�3�B�u�f�f�e�r�,�0�.�0�,�m�i�n�_�r�a�t�e�s�_�t�o�t�a�l�,�S�h�i�f�t�)�;�
�
�/�/�-�-�-� �c�r�e�a�t�i�o�n� �o�f� �t�h�e� �n�a�m�e� �t�o� �b�e� �d�i�s�p�l�a�y�e�d� �i�n� �a� �s�e�p�a�r�a�t�e� �s�u�b�-�w�i�n�d�o�w� �a�n�d� �i�n� �a� �p�o�p� �u�p� �h�e�l�p�
�
� � � �s�t�r�i�n�g� �s�h�o�r�t�n�a�m�e�;�
�
� � � �S�t�r�i�n�g�C�o�n�c�a�t�e�n�a�t�e�(�s�h�o�r�t�n�a�m�e�,�I�N�D�I�C�A�T�O�R�_�N�A�M�E�,�"�(�"�,�G�e�t�S�t�r�i�n�g�T�i�m�e�f�r�a�m�e�(�T�i�m�e�F�r�a�m�e�)�,�"�,� �"�,�F�i�l�t�e�r�,�"�)�"�)�;�
�
�/�/�-�-�-�
�
� � � �I�n�d�i�c�a�t�o�r�S�e�t�S�t�r�i�n�g�(�I�N�D�I�C�A�T�O�R�_�S�H�O�R�T�N�A�M�E�,�s�h�o�r�t�n�a�m�e�)�;�
�
�/�/�-�-�-� �d�e�t�e�r�m�i�n�i�n�g� �t�h�e� �a�c�c�u�r�a�c�y� �o�f� �t�h�e� �i�n�d�i�c�a�t�o�r� �v�a�l�u�e�s�
�
� � � �I�n�d�i�c�a�t�o�r�S�e�t�I�n�t�e�g�e�r�(�I�N�D�I�C�A�T�O�R�_�D�I�G�I�T�S�,�_�D�i�g�i�t�s�)�;�
�
�/�/�-�-�-� �i�n�i�t�i�a�l�i�z�a�t�i�o�n� �e�n�d�
�
� � � �r�e�t�u�r�n�(�I�N�I�T�_�S�U�C�C�E�E�D�E�D�)�;�
�
� � �}�
�
�/�/�+�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�+� � �
�
�/�/�|� �C�u�s�t�o�m� �i�t�e�r�a�t�i�o�n� �f�u�n�c�t�i�o�n� � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � �|� �
�
�/�/�+�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�+� � �
�
�i�n�t� �O�n�C�a�l�c�u�l�a�t�e�(�c�o�n�s�t� �i�n�t� �r�a�t�e�s�_�t�o�t�a�l�,� � � � �/�/� �n�u�m�b�e�r� �o�f� �b�a�r�s� �i�n� �h�i�s�t�o�r�y� �a�t� �t�h�e� �c�u�r�r�e�n�t� �t�i�c�k�
�
� � � � � � � � � � � � � � � � �c�o�n�s�t� �i�n�t� �p�r�e�v�_�c�a�l�c�u�l�a�t�e�d�,�/�/� �a�m�o�u�n�t� �o�f� �h�i�s�t�o�r�y� �i�n� �b�a�r�s� �a�t� �t�h�e� �p�r�e�v�i�o�u�s� �t�i�c�k�
�
� � � � � � � � � � � � � � � � �c�o�n�s�t� �d�a�t�e�t�i�m�e� �&�t�i�m�e�[�]�,�
�
� � � � � � � � � � � � � � � � �c�o�n�s�t� �d�o�u�b�l�e� �&�o�p�e�n�[�]�,�
�
� � � � � � � � � � � � � � � � �c�o�n�s�t� �d�o�u�b�l�e� �&�h�i�g�h�[�]�,�
�
� � � � � � � � � � � � � � � � �c�o�n�s�t� �d�o�u�b�l�e� �&�l�o�w�[�]�,�
�
� � � � � � � � � � � � � � � � �c�o�n�s�t� �d�o�u�b�l�e� �&�c�l�o�s�e�[�]�,�
�
� � � � � � � � � � � � � � � � �c�o�n�s�t� �l�o�n�g� �&�t�i�c�k�_�v�o�l�u�m�e�[�]�,�
�
� � � � � � � � � � � � � � � � �c�o�n�s�t� �l�o�n�g� �&�v�o�l�u�m�e�[�]�,�
�
� � � � � � � � � � � � � � � � �c�o�n�s�t� �i�n�t� �&�s�p�r�e�a�d�[�]�)�
�
� � �{�
�
�/�/�-�-�-� �c�h�e�c�k�i�n�g� �i�f� �t�h�e� �n�u�m�b�e�r� �o�f� �b�a�r�s� �i�s� �e�n�o�u�g�h� �f�o�r� �t�h�e� �c�a�l�c�u�l�a�t�i�o�n�
�
� � � �i�f�(�r�a�t�e�s�_�t�o�t�a�l�<�m�i�n�_�r�a�t�e�s�_�t�o�t�a�l�)� �r�e�t�u�r�n�(�R�E�S�E�T�)�;�
�
� � � �i�f�(�B�a�r�s�C�a�l�c�u�l�a�t�e�d�(�I�n�d�_�H�a�n�d�l�e�)�<�B�a�r�s�(�S�y�m�b�o�l�(�)�,�T�i�m�e�F�r�a�m�e�)�)� �r�e�t�u�r�n�(�p�r�e�v�_�c�a�l�c�u�l�a�t�e�d�)�;�
�
�/�/�-�-�-� �a�p�p�l�y� �t�i�m�e�s�e�r�i�e�s� �i�n�d�e�x�i�n�g� �t�o� �a�r�r�a�y� �e�l�e�m�e�n�t�s� � �
�
� � � �A�r�r�a�y�S�e�t�A�s�S�e�r�i�e�s�(�t�i�m�e�,�t�r�u�e�)�;�
�
�/�/�-�-�-�
�
� � � �i�f�(�!�C�o�u�n�t�I�n�d�i�c�a�t�o�r�(�0�,�N�U�L�L�,�T�i�m�e�F�r�a�m�e�,�I�n�d�_�H�a�n�d�l�e�,�0�,�I�n�d�1�B�u�f�f�e�r�,�t�i�m�e�,�r�a�t�e�s�_�t�o�t�a�l�,�p�r�e�v�_�c�a�l�c�u�l�a�t�e�d�,�m�i�n�_�r�a�t�e�s�_�t�o�t�a�l�)�)� �r�e�t�u�r�n�(�R�E�S�E�T�)�;�
�
� � � �i�f�(�!�C�o�u�n�t�I�n�d�i�c�a�t�o�r�(�1�,�N�U�L�L�,�T�i�m�e�F�r�a�m�e�,�I�n�d�_�H�a�n�d�l�e�,�1�,�I�n�d�2�B�u�f�f�e�r�,�t�i�m�e�,�r�a�t�e�s�_�t�o�t�a�l�,�p�r�e�v�_�c�a�l�c�u�l�a�t�e�d�,�m�i�n�_�r�a�t�e�s�_�t�o�t�a�l�)�)� �r�e�t�u�r�n�(�R�E�S�E�T�)�;�
�
� � � �i�f�(�!�C�o�u�n�t�I�n�d�i�c�a�t�o�r�(�2�,�N�U�L�L�,�T�i�m�e�F�r�a�m�e�,�I�n�d�_�H�a�n�d�l�e�,�2�,�I�n�d�3�B�u�f�f�e�r�,�t�i�m�e�,�r�a�t�e�s�_�t�o�t�a�l�,�p�r�e�v�_�c�a�l�c�u�l�a�t�e�d�,�m�i�n�_�r�a�t�e�s�_�t�o�t�a�l�)�)� �r�e�t�u�r�n�(�R�E�S�E�T�)�;�
�
�/�/�-�-�-� � � � � �
�
� � � �r�e�t�u�r�n�(�r�a�t�e�s�_�t�o�t�a�l�)�;�
�
� � �}�
�
�/�/�+�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�+�
�
�/�/�|� �I�n�d�i�c�a�t�o�r� �b�u�f�f�e�r� �i�n�i�t�i�a�l�i�z�a�t�i�o�n� � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � �|�
�
�/�/�+�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�+� � � � �
�
�v�o�i�d� �I�n�d�I�n�i�t�(�i�n�t� �N�u�m�b�e�r�,�d�o�u�b�l�e� �&�B�u�f�f�e�r�[�]�,�d�o�u�b�l�e� �E�m�p�t�y�_�V�a�l�u�e�,�i�n�t� �D�r�a�w�_�B�e�g�i�n�,�i�n�t� �n�S�h�i�f�t�)�
�
� � �{�
�
�/�/�-�-�-� �s�e�t� �d�y�n�a�m�i�c� �a�r�r�a�y� �a�s� �a�n� �i�n�d�i�c�a�t�o�r� �b�u�f�f�e�r�
�
� � � �S�e�t�I�n�d�e�x�B�u�f�f�e�r�(�N�u�m�b�e�r�,�B�u�f�f�e�r�,�I�N�D�I�C�A�T�O�R�_�D�A�T�A�)�;�
�
�/�/�-�-�-� �s�h�i�f�t�i�n�g� �t�h�e� �s�t�a�r�t� �o�f� �d�r�a�w�i�n�g� �o�f� �t�h�e� �i�n�d�i�c�a�t�o�r�
�
� � � �P�l�o�t�I�n�d�e�x�S�e�t�I�n�t�e�g�e�r�(�N�u�m�b�e�r�,�P�L�O�T�_�D�R�A�W�_�B�E�G�I�N�,�D�r�a�w�_�B�e�g�i�n�)�;�
�
�/�/�-�-�-� �s�e�t�t�i�n�g� �t�h�e� �i�n�d�i�c�a�t�o�r� �v�a�l�u�e�s� �t�h�a�t� �w�o�n�'�t� �b�e� �v�i�s�i�b�l�e� �o�n� �a� �c�h�a�r�t�
�
� � � �P�l�o�t�I�n�d�e�x�S�e�t�D�o�u�b�l�e�(�N�u�m�b�e�r�,�P�L�O�T�_�E�M�P�T�Y�_�V�A�L�U�E�,�E�m�p�t�y�_�V�a�l�u�e�)�;�
�
�/�/�-�-�-� �s�h�i�f�t�i�n�g� �t�h�e� �i�n�d�i�c�a�t�o�r� �2� �h�o�r�i�z�o�n�t�a�l�l�y� �b�y� �S�h�i�f�t�
�
� � � �P�l�o�t�I�n�d�e�x�S�e�t�I�n�t�e�g�e�r�(�N�u�m�b�e�r�,�P�L�O�T�_�S�H�I�F�T�,�n�S�h�i�f�t�)�;�
�
�/�/�-�-�-� �i�n�d�e�x�i�n�g� �e�l�e�m�e�n�t�s� �i�n� �t�h�e� �b�u�f�f�e�r� �a�s� �i�n� �t�i�m�e�s�e�r�i�e�s�
�
� � � �A�r�r�a�y�S�e�t�A�s�S�e�r�i�e�s�(�B�u�f�f�e�r�,�t�r�u�e�)�;�
�
� � �}�
�
�/�/�+�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�+�
�
�/�/�|� �C�o�u�n�t�I�n�d�i�c�a�t�o�r� � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � �|�
�
�/�/�+�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�+�
�
�b�o�o�l� �C�o�u�n�t�I�n�d�i�c�a�t�o�r�(�u�i�n�t� � � � � �N�u�m�b�,� � � � � � � � � � � � �/�/� �T�h�e� �n�u�m�b�e�r� �o�f� �t�h�e� �C�o�u�n�t�L�i�n�e� �f�u�n�c�t�i�o�n� �i�n� �t�h�e� �l�i�s�t� �i�n� �t�h�e� �i�n�d�i�c�a�t�o�r� �c�o�d�e� �(�s�t�a�r�t�i�n�g� �n�u�m�b�e�r� �-� �0�)�
�
� � � � � � � � � � � � � � � � � � � � �s�t�r�i�n�g� � � �S�y�m�b�,� � � � � � � � � � � � �/�/� �C�h�a�r�t� �s�y�m�b�o�l�
�
� � � � � � � � � � � � � � � � � � � � �E�N�U�M�_�T�I�M�E�F�R�A�M�E�S� �T�F�r�a�m�e�,� � � �/�/� �C�h�a�r�t� �p�e�r�i�o�d�
�
� � � � � � � � � � � � � � � � � � � � �i�n�t� � � � � � �I�n�d�H�a�n�d�l�e�,� � � � � � � �/�/� �T�h�e� �h�a�n�d�l�e� �o�f� �t�h�e� �p�r�o�c�e�s�s�e�d� �i�n�d�i�c�a�t�o�r�
�
� � � � � � � � � � � � � � � � � � � � �u�i�n�t� � � � � �B�u�f�f�N�u�m�b�,� � � � � � � � �/�/� �T�h�e� �n�u�m�b�e�r� �o�f� �t�h�e� �b�u�f�f�e�r� �o�f� �t�h�e� �p�r�o�c�e�s�s�e�d� �i�n�d�i�c�a�t�o�r�
�
� � � � � � � � � � � � � � � � � � � � �d�o�u�b�l�e�&� � �I�n�d�B�u�f�[�]�,� � � � � � � � �/�/� �r�e�c�e�i�v�i�n�g� �b�u�f�f�e�r� �o�f� �t�h�e� �i�n�d�i�c�a�t�o�r�
�
� � � � � � � � � � � � � � � � � � � � �c�o�n�s�t� �d�a�t�e�t�i�m�e�&� �i�T�i�m�e�[�]�,� � �/�/� �T�i�m�e�s�e�r�i�e�s� �o�f� �t�i�m�e�
�
� � � � � � � � � � � � � � � � � � � � �c�o�n�s�t� �i�n�t� �R�a�t�e�s�_�T�o�t�a�l�,� � � � �/�/� �a�m�o�u�n�t� �o�f� �h�i�s�t�o�r�y� �i�n� �b�a�r�s� �o�n� �t�h�e� �c�u�r�r�e�n�t� �t�i�c�k�
�
� � � � � � � � � � � � � � � � � � � � �c�o�n�s�t� �i�n�t� �P�r�e�v�_�C�a�l�c�u�l�a�t�e�d�,�/�/� �a�m�o�u�n�t� �o�f� �h�i�s�t�o�r�y� �i�n� �b�a�r�s� �a�t� �t�h�e� �p�r�e�v�i�o�u�s� �t�i�c�k�
�
� � � � � � � � � � � � � � � � � � � � �c�o�n�s�t� �i�n�t� �M�i�n�_�R�a�t�e�s�_�T�o�t�a�l�)�/�/� �m�i�n�i�m�u�m� �a�m�o�u�n�t� �o�f� �h�i�s�t�o�r�y� �i�n� �b�a�r�s� �f�o�r� �c�a�l�c�u�l�a�t�i�o�n�
�
� � �{�
�
� � � �s�t�a�t�i�c� �i�n�t� �L�a�s�t�C�o�u�n�t�B�a�r�[�S�I�Z�E�]�;�
�
� � � �d�a�t�e�t�i�m�e� �I�n�d�T�i�m�e�[�1�]�;�
�
� � � �i�n�t� �l�i�m�i�t�;�
�
�/�/�-�-�-� �c�a�l�c�u�l�a�t�i�o�n�s� �o�f� �t�h�e� �n�e�c�e�s�s�a�r�y� �a�m�o�u�n�t� �o�f� �d�a�t�a� �t�o� �b�e� �c�o�p�i�e�d�
�
�/�/�-�-�-� �a�n�d� �t�h�e� �'�l�i�m�i�t�'� �s�t�a�r�t�i�n�g� �i�n�d�e�x� �f�o�r� �t�h�e� �b�a�r�s� �r�e�c�a�l�c�u�l�a�t�i�o�n� �l�o�o�p�
�
� � � �i�f�(�P�r�e�v�_�C�a�l�c�u�l�a�t�e�d�>�R�a�t�e�s�_�T�o�t�a�l� �|�|� �P�r�e�v�_�C�a�l�c�u�l�a�t�e�d�<�=�0�)�/�/� �c�h�e�c�k�i�n�g� �f�o�r� �t�h�e� �f�i�r�s�t� �s�t�a�r�t� �o�f� �t�h�e� �i�n�d�i�c�a�t�o�r� �c�a�l�c�u�l�a�t�i�o�n�
�
� � � � � �{�
�
� � � � � � �l�i�m�i�t�=�R�a�t�e�s�_�T�o�t�a�l�-�M�i�n�_�R�a�t�e�s�_�T�o�t�a�l�-�1�;� �/�/� �s�t�a�r�t�i�n�g� �i�n�d�e�x� �f�o�r� �c�a�l�c�u�l�a�t�i�o�n� �o�f� �a�l�l� �b�a�r�s�
�
� � � � � � �L�a�s�t�C�o�u�n�t�B�a�r�[�N�u�m�b�]�=�l�i�m�i�t�;�
�
� � � � � �}�
�
� � � �e�l�s�e� �l�i�m�i�t�=�L�a�s�t�C�o�u�n�t�B�a�r�[�N�u�m�b�]�+�R�a�t�e�s�_�T�o�t�a�l�-�P�r�e�v�_�C�a�l�c�u�l�a�t�e�d�;� �/�/� �S�t�a�r�t�i�n�g� �i�n�d�e�x� �f�o�r� �c�a�l�c�u�l�a�t�i�o�n� �o�f� �n�e�w� �b�a�r�s� �
�
�/�/�-�-�-� �m�a�i�n� �i�n�d�i�c�a�t�o�r� �c�a�l�c�u�l�a�t�i�o�n� �l�o�o�p�
�
� � � �f�o�r�(�i�n�t� �b�a�r�=�l�i�m�i�t�;� �b�a�r�>�=�0� �&�&� �!�I�s�S�t�o�p�p�e�d�(�)�;� �b�a�r�-�-�)�
�
� � � � � �{�
�
� � � � � � �/�/�-�-�-�-� �r�e�s�e�t� �t�h�e� �c�o�n�t�e�n�t�s� �o�f� �t�h�e� �i�n�d�i�c�a�t�o�r� �b�u�f�f�e�r�s� �f�o�r� �c�a�l�c�u�l�a�t�i�o�n�
�
� � � � � � �I�n�d�B�u�f�[�b�a�r�]�=�0�.�0�;�
�
� � � � � � �/�/�-�-�-� �Ao�p�y� �n�e�w� �d�a�t�a� �t�o� �t�h�e� �I�n�d�T�i�m�e� �a�r�r�a�y�
�
� � � � � � �i�f�(�C�o�p�y�T�i�m�e�(�S�y�m�b�o�l�(�)�,�T�F�r�a�m�e�,�i�T�i�m�e�[�b�a�r�]�,�1�,�I�n�d�T�i�m�e�)�<�=�0�)� �r�e�t�u�r�n�(�R�E�S�E�T�)�;�
�
� � � � � � �i�f�(�i�T�i�m�e�[�b�a�r�]�>�=�I�n�d�T�i�m�e�[�0�]� �&�&� �i�T�i�m�e�[�b�a�r�+�1�]�<�I�n�d�T�i�m�e�[�0�]�)�
�
� � � � � � � � �{�
�
� � � � � � � � � �L�a�s�t�C�o�u�n�t�B�a�r�[�N�u�m�b�]�=�b�a�r�;�
�
� � � � � � � � � �d�o�u�b�l�e� �A�r�r�[�1�]�;�
�
� � � � � � � � � �/�/�-�-�-� �Ao�p�y� �n�e�w� �d�a�t�a� �t�o� �t�h�e� �A�r�r� �a�r�r�a�y�
�
� � � � � � � � � �i�f�(�C�o�p�y�B�u�f�f�e�r�(�I�n�d�H�a�n�d�l�e�,�B�u�f�f�N�u�m�b�,�i�T�i�m�e�[�b�a�r�]�,�1�,�A�r�r�)�<�=�0�)� �r�e�t�u�r�n�(�R�E�S�E�T�)�;�
�
� � � � � � � � � �I�n�d�B�u�f�[�b�a�r�]�=�A�r�r�[�0�]�;�
�
� � � � � � � � �}�
�
� � � � � � �e�l�s�e� �I�n�d�B�u�f�[�b�a�r�]�=�I�n�d�B�u�f�[�b�a�r�+�1�]�;�
�
� � � � � �}�
�
�/�/�-�-�-� � � � � �
�
� � � �r�e�t�u�r�n�(�t�r�u�e�)�;�
�
� � �}�
�
�/�/�+�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�+�
�
�/�/�|� �T�i�m�e�F�r�a�m�e�s�C�h�e�c�k�(�)� � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � �|�
�
�/�/�+�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�+� � � � �
�
�b�o�o�l� �T�i�m�e�F�r�a�m�e�s�C�h�e�c�k�(�s�t�r�i�n�g� �I�n�d�N�a�m�e�,�E�N�U�M�_�T�I�M�E�F�R�A�M�E�S� �T�F�r�a�m�e�)�
�
� � �{�
�
�/�/�-�-�-� �c�h�e�c�k�i�n�g� �c�o�r�r�e�c�t�n�e�s�s� �o�f� �t�h�e� �c�h�a�r�t� �p�e�r�i�o�d�s�
�
� � � �i�f�(�T�F�r�a�m�e�<�P�e�r�i�o�d�(�)� �&�&� �T�F�r�a�m�e�!�=�P�E�R�I�O�D�_�C�U�R�R�E�N�T�)�
�
� � � � � �{�
�
� � � � � � �P�r�i�n�t�(�"�C�h�a�r�t� �p�e�r�i�o�d� �f�o�r� �t�h�e� �"�+�I�n�d�N�a�m�e�+�"� �i�n�d�i�c�a�t�o�r� �c�a�n�n�o�t� �b�e� �l�e�s�s� �t�h�a�n� �t�h�e� �p�e�r�i�o�d� �o�f� �t�h�e� �c�u�r�r�e�n�t� �c�h�a�r�t�!�"�)�;�
�
� � � � � � �P�r�i�n�t� �(�"�Y�o�u� �m�u�s�t� �c�h�a�n�g�e� �t�h�e� �i�n�d�i�c�a�t�o�r� �i�n�p�u�t� �p�a�r�a�m�e�t�e�r�s�!�"�)�;�
�
� � � � � � �r�e�t�u�r�n�(�R�E�S�E�T�)�;�
�
� � � � � �}�
�
�/�/�-�-�-�
�
� � � �r�e�t�u�r�n�(�t�r�u�e�)�;�
�
� � �}�
�
�/�/�+�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�+�
�
�

Comments