Pending OHLC Breaking Max Min 2

Download script
Author: Copyright © 2020, Vladimir Karputov
Price Data Components
Series array that contains tick volumes of each bar
Orders Execution
Checks for the total of open orders
Miscellaneous
It issuies visual alerts to the screen
2 Views
0 Downloads
0 Favorites
Pending OHLC Breaking Max Min 2
ÿþ/�/�+�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�+�
�
�/�/�|� � � � � � � � � � � � � � � � � � � � � � � � � � � � � � �P�e�n�d�i�n�g� �O�H�L�C� �B�r�e�a�k�i�n�g� �M�a�x� �M�i�n� �2�.�m�q�5� �|�
�
�/�/�|� � � � � � � � � � � � � � � � � � � � � � � � � � � � � � �C�o�p�y�r�i�g�h�t� �©� �2�0�2�0�,� �V�l�a�d�i�m�i�r� �K�a�r�p�u�t�o�v� �|�
�
�/�/�|� � � � � � � � � � � � � � � � � � � � � �h�t�t�p�s�:�/�/�w�w�w�.�m�q�l�5�.�c�o�m�/�r�u�/�m�a�r�k�e�t�/�p�r�o�d�u�c�t�/�4�3�5�1�6� �|�
�
�/�/�+�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�+�
�
�#�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�2�0�,� �V�l�a�d�i�m�i�r� �K�a�r�p�u�t�o�v�"�
�
�#�p�r�o�p�e�r�t�y� �l�i�n�k� � � � � � �"�h�t�t�p�s�:�/�/�w�w�w�.�m�q�l�5�.�c�o�m�/�r�u�/�m�a�r�k�e�t�/�p�r�o�d�u�c�t�/�4�3�5�1�6�"�
�
�#�p�r�o�p�e�r�t�y� �v�e�r�s�i�o�n� � � �"�2�.�0�0�1�"�
�
�/�*�
�
� � � �b�a�r�a�b�a�s�h�k�a�k�v�n� �T�r�a�d�i�n�g� �e�n�g�i�n�e� �3�.�1�1�4�
�
�*�/�
�
�#�i�n�c�l�u�d�e� �<�T�r�a�d�e�\�P�o�s�i�t�i�o�n�I�n�f�o�.�m�q�h�>�
�
�#�i�n�c�l�u�d�e� �<�T�r�a�d�e�\�T�r�a�d�e�.�m�q�h�>�
�
�#�i�n�c�l�u�d�e� �<�T�r�a�d�e�\�S�y�m�b�o�l�I�n�f�o�.�m�q�h�>�
�
�#�i�n�c�l�u�d�e� �<�T�r�a�d�e�\�A�c�c�o�u�n�t�I�n�f�o�.�m�q�h�>�
�
�#�i�n�c�l�u�d�e� �<�T�r�a�d�e�\�D�e�a�l�I�n�f�o�.�m�q�h�>�
�
�#�i�n�c�l�u�d�e� �<�T�r�a�d�e�\�O�r�d�e�r�I�n�f�o�.�m�q�h�>�
�
�#�i�n�c�l�u�d�e� �<�E�x�p�e�r�t�\�M�o�n�e�y�\�M�o�n�e�y�F�i�x�e�d�M�a�r�g�i�n�.�m�q�h�>�
�
�/�/�-�-�-�
�
�C�P�o�s�i�t�i�o�n�I�n�f�o� � �m�_�p�o�s�i�t�i�o�n�;� � � � � � � � � � � � � � � � � � � �/�/� �o�b�j�e�c�t� �o�f� �C�P�o�s�i�t�i�o�n�I�n�f�o� �c�l�a�s�s�
�
�C�T�r�a�d�e� � � � � � � � � �m�_�t�r�a�d�e�;� � � � � � � � � � � � � � � � � � � � � � �/�/� �o�b�j�e�c�t� �o�f� �C�T�r�a�d�e� �c�l�a�s�s�
�
�C�S�y�m�b�o�l�I�n�f�o� � � � �m�_�s�y�m�b�o�l�;� � � � � � � � � � � � � � � � � � � � � �/�/� �o�b�j�e�c�t� �o�f� �C�S�y�m�b�o�l�I�n�f�o� �c�l�a�s�s�
�
�C�A�c�c�o�u�n�t�I�n�f�o� � � �m�_�a�c�c�o�u�n�t�;� � � � � � � � � � � � � � � � � � � � �/�/� �o�b�j�e�c�t� �o�f� �C�A�c�c�o�u�n�t�I�n�f�o� �c�l�a�s�s�
�
�C�D�e�a�l�I�n�f�o� � � � � � �m�_�d�e�a�l�;� � � � � � � � � � � � � � � � � � � � � � � �/�/� �o�b�j�e�c�t� �o�f� �C�D�e�a�l�I�n�f�o� �c�l�a�s�s�
�
�C�O�r�d�e�r�I�n�f�o� � � � � �m�_�o�r�d�e�r�;� � � � � � � � � � � � � � � � � � � � � � �/�/� �o�b�j�e�c�t� �o�f� �C�O�r�d�e�r�I�n�f�o� �c�l�a�s�s�
�
�C�M�o�n�e�y�F�i�x�e�d�M�a�r�g�i�n� �*�m�_�m�o�n�e�y�;� � � � � � � � � � � � � � � � � � �/�/� �o�b�j�e�c�t� �o�f� �C�M�o�n�e�y�F�i�x�e�d�M�a�r�g�i�n� �c�l�a�s�s�
�
�/�/�+�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�+�
�
�/�/�|� �E�n�u�m� �L�o�r� �o�r� �R�i�s�k� � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � �|�
�
�/�/�+�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�+�
�
�e�n�u�m� �E�N�U�M�_�L�O�T�_�O�R�_�R�I�S�K�
�
� � �{�
�
� � � �l�o�t�s�_�m�i�n�=�0�,� �/�/� �L�o�t�s� �M�i�n�
�
� � � �l�o�t�=�1�,� � � � � � �/�/� �C�o�n�s�t�a�n�t� �l�o�t�
�
� � � �r�i�s�k�=�2�,� � � � � �/�/� �R�i�s�k� �i�n� �p�e�r�c�e�n�t� �f�o�r� �a� �d�e�a�l�
�
� � �}�;�
�
�/�/�-�-�-� �i�n�p�u�t� �p�a�r�a�m�e�t�e�r�s�
�
�i�n�p�u�t� �u�s�h�o�r�t� � � �I�n�p�S�t�o�p�L�o�s�s� � � � � � � � � � �=� �1�5�;� � � � � � � � � � �/�/� �S�t�o�p� �L�o�s�s�,� �i�n� �p�i�p�s� �(�1�.�0�0�0�4�5�-�1�.�0�0�0�5�5�=�1� �p�i�p�s�)�
�
�i�n�p�u�t� �u�s�h�o�r�t� � � �I�n�p�T�a�k�e�P�r�o�f�i�t� � � � � � � � �=� �4�6�;� � � � � � � � � � �/�/� �T�a�k�e� �P�r�o�f�i�t�,� �i�n� �p�i�p�s� �(�1�.�0�0�0�4�5�-�1�.�0�0�0�5�5�=�1� �p�i�p�s�)�
�
�i�n�p�u�t� �u�s�h�o�r�t� � � �I�n�p�T�r�a�i�l�i�n�g�F�r�e�q�u�e�n�c�y� �=� �1�0�;� � � � � � � � � � �/�/� �T�r�a�i�l�i�n�g�,� �i�n� �s�e�c�o�n�d�s� �(�<� �"�1�0�"� �-�>� �o�n�l�y� �o�n� �a� �n�e�w� �b�a�r�)�
�
�i�n�p�u�t� �u�s�h�o�r�t� � � �I�n�p�T�r�a�i�l�i�n�g�S�t�o�p� � � � � � �=� �2�5�;� � � � � � � � � � �/�/� �T�r�a�i�l�i�n�g� �S�t�o�p� �(�m�i�n� �d�i�s�t�a�n�c�e� �f�r�o�m� �p�r�i�c�e� �t�o� �S�t�o�p� �L�o�s�s�,� �i�n� �p�i�p�s�
�
�i�n�p�u�t� �u�s�h�o�r�t� � � �I�n�p�T�r�a�i�l�i�n�g�S�t�e�p� � � � � � �=� �5�;� � � � � � � � � � � �/�/� �T�r�a�i�l�i�n�g� �S�t�e�p�,� �i�n� �p�i�p�s� �(�1�.�0�0�0�4�5�-�1�.�0�0�0�5�5�=�1� �p�i�p�s�)�
�
�i�n�p�u�t� �E�N�U�M�_�L�O�T�_�O�R�_�R�I�S�K� �I�n�p�L�o�t�O�r�R�i�s�k� �=� �r�i�s�k�;� � � � � � � � �/�/� �M�o�n�e�y� �m�a�n�a�g�e�m�e�n�t�:� �L�o�t� �O�R� �R�i�s�k�
�
�i�n�p�u�t� �d�o�u�b�l�e� � � �I�n�p�V�o�l�u�m�e�L�o�t�O�r�R�i�s�k� � � �=� �3�.�0�;� � � � � � � � � �/�/� �T�h�e� �v�a�l�u�e� �f�o�r� �"�M�o�n�e�y� �m�a�n�a�g�e�m�e�n�t�"�
�
�i�n�p�u�t� �u�l�o�n�g� � � � �I�n�p�D�e�v�i�a�t�i�o�n� � � � � � � � � �=� �1�0�;� � � � � � � � � � �/�/� �D�e�v�i�a�t�i�o�n�,� �i�n� �p�o�i�n�t�s� �(�1�.�0�0�0�4�5�-�1�.�0�0�0�5�5�=�1�0� �p�o�i�n�t�s�)�
�
�/�/�-�-�-�
�
�i�n�p�u�t� �u�c�h�a�r� � � � �I�n�p�L�e�f�t�B�a�r� � � � � � � � � � � �=� �1�5�;� � � � � � � � � � �/�/� �L�e�f�t� �b�a�r�
�
�i�n�p�u�t� �u�c�h�a�r� � � � �I�n�p�R�i�g�h�t�B�a�r� � � � � � � � � � �=� �2�;� � � � � � � � � � � �/�/� �R�i�g�h�t� �b�a�r�
�
�i�n�p�u�t� �u�s�h�o�r�t� � � �I�n�p�P�e�n�d�i�n�g�E�x�p�i�r�a�t�i�o�n� �=� �6�0�0�;� � � � � � � � � �/�/� �P�e�n�d�i�n�g�:� �E�x�p�i�r�a�t�i�o�n�,� �i�n� �m�i�n�u�t�e�s� �(�'�0�'� �-�>� �O�F�F�)�
�
�i�n�p�u�t� �u�s�h�o�r�t� � � �I�n�p�P�e�n�d�i�n�g�I�n�d�e�n�t� � � � � �=� �5�;� � � � � � � � � � � �/�/� �P�e�n�d�i�n�g�:� �I�n�d�e�n�t�,� �i�n� �p�i�p�s� �(�1�.�0�0�0�4�5�-�1�.�0�0�0�5�5�=�1� �p�i�p�s�)�
�
�i�n�p�u�t� �u�s�h�o�r�t� � � �I�n�p�M�a�x�S�p�r�e�a�d� � � � � � � � � �=� �1�2�;� � � � � � � � � � �/�/� �P�e�n�d�i�n�g�:� �M�a�x�i�m�u�m� �s�p�r�e�a�d�,� �i�n� �p�o�i�n�t�s� �(�1�.�0�0�0�4�5�-�1�.�0�0�0�5�5�=�1�0� �p�o�i�n�t�s�)�
�
�/�/�-�-�-�
�
�i�n�p�u�t� �b�o�o�l� � � � � �I�n�p�T�i�m�e�C�o�n�t�r�o�l� � � � � � � �=� �t�r�u�e�;� � � � � � � � �/�/� �U�s�e� �t�i�m�e� �c�o�n�t�r�o�l�
�
�i�n�p�u�t� �u�c�h�a�r� � � � �I�n�p�S�t�a�r�t�H�o�u�r� � � � � � � � � �=� �0�9�;� � � � � � � � � � �/�/� �S�t�a�r�t� �H�o�u�r�
�
�i�n�p�u�t� �u�c�h�a�r� � � � �I�n�p�S�t�a�r�t�M�i�n�u�t�e� � � � � � � �=� �5�9�;� � � � � � � � � � �/�/� �S�t�a�r�t� �M�i�n�u�t�e�
�
�i�n�p�u�t� �u�c�h�a�r� � � � �I�n�p�E�n�d�H�o�u�r� � � � � � � � � � � �=� �1�4�;� � � � � � � � � � �/�/� �E�n�d� �H�o�u�r�
�
�i�n�p�u�t� �u�c�h�a�r� � � � �I�n�p�E�n�d�M�i�n�u�t�e� � � � � � � � � �=� �5�9�;� � � � � � � � � � �/�/� �E�n�d� �M�i�n�u�t�e�
�
�/�/�-�-�-�
�
�i�n�p�u�t� �b�o�o�l� � � � � �I�n�p�P�r�i�n�t�L�o�g� � � � � � � � � � �=� �f�a�l�s�e�;� � � � � � � �/�/� �P�r�i�n�t� �l�o�g�
�
�i�n�p�u�t� �u�l�o�n�g� � � � �I�n�p�M�a�g�i�c� � � � � � � � � � � � � �=� �4�3�4�8�4�9�1�1�2�;� � � �/�/� �M�a�g�i�c� �n�u�m�b�e�r�
�
�/�/�-�-�-�
�
�d�o�u�b�l�e� � � �m�_�s�t�o�p�_�l�o�s�s� � � � � � � � � � � � � � � � �=� �0�.�0�;� � � � � � �/�/� �S�t�o�p� �L�o�s�s� � � � � � � � � � � � � � � �-�>� �d�o�u�b�l�e�
�
�d�o�u�b�l�e� � � �m�_�t�a�k�e�_�p�r�o�f�i�t� � � � � � � � � � � � � � �=� �0�.�0�;� � � � � � �/�/� �T�a�k�e� �P�r�o�f�i�t� � � � � � � � � � � � � �-�>� �d�o�u�b�l�e�
�
�d�o�u�b�l�e� � � �m�_�t�r�a�i�l�i�n�g�_�s�t�o�p� � � � � � � � � � � � �=� �0�.�0�;� � � � � � �/�/� �T�r�a�i�l�i�n�g� �S�t�o�p� � � � � � � � � � � �-�>� �d�o�u�b�l�e�
�
�d�o�u�b�l�e� � � �m�_�t�r�a�i�l�i�n�g�_�s�t�e�p� � � � � � � � � � � � �=� �0�.�0�;� � � � � � �/�/� �T�r�a�i�l�i�n�g� �S�t�e�p� � � � � � � � � � � �-�>� �d�o�u�b�l�e�
�
�d�o�u�b�l�e� � � �m�_�p�e�n�d�i�n�g�_�i�n�d�e�n�t� � � � � � � � � � � �=� �0�.�0�;� � � � � � �/�/� �P�e�n�d�i�n�g�:� �I�n�d�e�n�t� � � � � � � � � �-�>� �d�o�u�b�l�e�
�
�d�o�u�b�l�e� � � �m�_�m�a�x�_�s�p�r�e�a�d� � � � � � � � � � � � � � � �=� �0�.�0�;� � � � � � �/�/� �P�e�n�d�i�n�g�:� �M�a�x�i�m�u�m� �s�p�r�e�a�d� �-�>� �d�o�u�b�l�e�
�
�
�
�d�o�u�b�l�e� � � �m�_�a�d�j�u�s�t�e�d�_�p�o�i�n�t�;� � � � � � � � � � � � � � � � � � � � � � �/�/� �p�o�i�n�t� �v�a�l�u�e� �a�d�j�u�s�t�e�d� �f�o�r� �3� �o�r� �5� �p�o�i�n�t�s�
�
�d�a�t�e�t�i�m�e� �m�_�l�a�s�t�_�t�r�a�i�l�i�n�g� � � � � � � � � � � � �=� �0�;� � � � � � � � �/�/� �"�0�"� �-�>� �D�'�1�9�7�0�.�0�1�.�0�1� �0�0�:�0�0�'�;�
�
�d�a�t�e�t�i�m�e� �m�_�p�r�e�v�_�b�a�r�s� � � � � � � � � � � � � � � � �=� �0�;� � � � � � � � �/�/� �"�0�"� �-�>� �D�'�1�9�7�0�.�0�1�.�0�1� �0�0�:�0�0�'�;�
�
�d�a�t�e�t�i�m�e� �m�_�l�a�s�t�_�d�e�a�l�_�i�n� � � � � � � � � � � � � �=� �0�;� � � � � � � � �/�/� �"�0�"� �-�>� �D�'�1�9�7�0�.�0�1�.�0�1� �0�0�:�0�0�'�;�
�
�i�n�t� � � � � � �m�_�b�a�r�_�c�u�r�r�e�n�t� � � � � � � � � � � � � � �=� �0�;�
�
�b�o�o�l� � � � � �m�_�n�e�e�d�_�d�e�l�e�t�e�_�a�l�l� � � � � � � � � � �=� �f�a�l�s�e�;� � � � �/�/� �d�e�l�e�t�e� �a�l�l� �p�e�n�d�i�n�g� �o�r�d�e�r�
�
�b�o�o�l� � � � � �m�_�w�a�i�t�i�n�g�_�p�e�n�d�i�n�g�_�o�r�d�e�r� � � � �=� �f�a�l�s�e�;� � � � �/�/� �w�a�i�t�i�n�g� �f�o�r� �a� �p�e�n�d�i�n�g� �o�r�d�e�r�
�
�/�/�-�-�-� �*�*�*�
�
�/�/�-�-�-� � � � �a�n�d� �p�e�n�d�i�n�g� �o�r�d�e�r�s� �(�i�f� �t�h�e� �s�p�r�e�a�d� �w�a�s� �v�e�r�i�f�i�e�d�)�
�
�/�/�-�-�-� � � � �j�u�s�t� �s�h�o�o�t� �a�n�d� �z�e�r�o� �o�u�t� �t�h�e� �a�r�r�a�y�s� �o�f� �s�t�r�u�c�t�u�r�e�s�
�
�/�/�+�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�+�
�
�/�/�|� �S�t�r�u�c�t�u�r�t� �P�e�n�d�i�n�g� � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � �|�
�
�/�/�+�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�+�
�
�s�t�r�u�c�t� �S�T�R�U�C�T�_�P�E�N�D�I�N�G�
�
� � �{�
�
� � � �E�N�U�M�_�O�R�D�E�R�_�T�Y�P�E� � � �p�e�n�d�i�n�g�_�t�y�p�e�;� � � � � � � � � � � �/�/� �p�e�n�d�i�n�g� �o�r�d�e�r� �t�y�p�e�
�
� � � �d�o�u�b�l�e� � � � � � � � � � � � �v�o�l�u�m�e�;� � � � � � � � � � � � � � � � � �/�/� �p�e�n�d�i�n�g� �o�r�d�e�r� �v�o�l�u�m�e�
�
� � � �d�o�u�b�l�e� � � � � � � � � � � � �p�r�i�c�e�;� � � � � � � � � � � � � � � � � � �/�/� �p�e�n�d�i�n�g� �o�r�d�e�r� �p�r�i�c�e�
�
� � � �d�o�u�b�l�e� � � � � � � � � � � � �s�t�o�p�_�l�o�s�s�;� � � � � � � � � � � � � � �/�/� �p�e�n�d�i�n�g� �o�r�d�e�r� �s�t�o�p� �l�o�s�s�,� �i�n� �p�i�p�s� �*� �m�_�a�d�j�u�s�t�e�d�_�p�o�i�n�t� �(�i�f� �"�0�.�0�"� �-�>� �t�h�e� �m�_�s�t�o�p�_�l�o�s�s�)�
�
� � � �d�o�u�b�l�e� � � � � � � � � � � � �t�a�k�e�_�p�r�o�f�i�t�;� � � � � � � � � � � � �/�/� �p�e�n�d�i�n�g� �o�r�d�e�r� �t�a�k�e� �p�r�o�f�i�t�,� �i�n� �p�i�p�s� �*� �m�_�a�d�j�u�s�t�e�d�_�p�o�i�n�t� �(�i�f� �"�0�.�0�"� �-�>� �t�h�e� �m�_�t�a�k�e�_�p�r�o�f�i�t�)�
�
� � � �d�o�u�b�l�e� � � � � � � � � � � � �i�n�d�e�n�t�;� � � � � � � � � � � � � � � � � �/�/� �p�e�n�d�i�n�g� �i�n�d�e�n�t�,� �i�n� �p�i�p�s� �*� �m�_�a�d�j�u�s�t�e�d�_�p�o�i�n�t�
�
� � � �l�o�n�g� � � � � � � � � � � � � � �e�x�p�i�r�a�t�i�o�n�;� � � � � � � � � � � � � �/�/� �e�x�p�i�r�a�t�i�o�n� �(�e�x�t�r�a� �t�i�m�e�)�
�
� � � �/�/�-�-�-� �C�o�n�s�t�r�u�c�t�o�r�
�
� � � � � � � � � � � � � � � � � � � � � �S�T�R�U�C�T�_�P�E�N�D�I�N�G�(�)�
�
� � � � � �{�
�
� � � � � � �p�e�n�d�i�n�g�_�t�y�p�e� � � � � � � � � � � � � � � �=� �W�R�O�N�G�_�V�A�L�U�E�;�
�
� � � � � � �v�o�l�u�m�e� � � � � � � � � � � � � � � � � � � � � �=� �0�.�0�;�
�
� � � � � � �p�r�i�c�e� � � � � � � � � � � � � � � � � � � � � � �=� �0�.�0�;�
�
� � � � � � �s�t�o�p�_�l�o�s�s� � � � � � � � � � � � � � � � � � �=� �0�.�0�;�
�
� � � � � � �t�a�k�e�_�p�r�o�f�i�t� � � � � � � � � � � � � � � � �=� �0�.�0�;�
�
� � � � � � �i�n�d�e�n�t� � � � � � � � � � � � � � � � � � � � � �=� �0�.�0�;�
�
� � � � � � �e�x�p�i�r�a�t�i�o�n� � � � � � � � � � � � � � � � � �=� �0�;�
�
� � � � � �}�
�
� � �}�;�
�
�S�T�R�U�C�T�_�P�E�N�D�I�N�G� �S�P�e�n�d�i�n�g�[�]�;�
�
�/�/�+�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�+�
�
�/�/�|� �E�x�p�e�r�t� �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�(�)�
�
� � �{�
�
�/�/�-�-�-�
�
� � � �i�f�(�I�n�p�T�r�a�i�l�i�n�g�S�t�o�p�!�=�0� �&�&� �I�n�p�T�r�a�i�l�i�n�g�S�t�e�p�=�=�0�)�
�
� � � � � �{�
�
� � � � � � �s�t�r�i�n�g� �e�r�r�_�t�e�x�t�=�(�T�e�r�m�i�n�a�l�I�n�f�o�S�t�r�i�n�g�(�T�E�R�M�I�N�A�L�_�L�A�N�G�U�A�G�E�)�=�=�"�R�u�s�s�i�a�n�"�)�?�
�
� � � � � � � � � � � � � � � � � � � � � � �"�"@59;8=3 �=52>7<>65=:� �?0@0<5B@ �\�"�T�r�a�i�l�i�n�g� �S�t�e�p�\�"� �@025= �=C;N!�"�:�
�
� � � � � � � � � � � � � � � � � � � � � � �"�T�r�a�i�l�i�n�g� �i�s� �n�o�t� �p�o�s�s�i�b�l�e�:� �p�a�r�a�m�e�t�e�r� �\�"�T�r�a�i�l�i�n�g� �S�t�e�p�\�"� �i�s� �z�e�r�o�!�"�;�
�
� � � � � � �/�/�-�-�-� �w�h�e�n� �t�e�s�t�i�n�g�,� �w�e� �w�i�l�l� �o�n�l�y� �o�u�t�p�u�t� �t�o� �t�h�e� �l�o�g� �a�b�o�u�t� �i�n�c�o�r�r�e�c�t� �i�n�p�u�t� �p�a�r�a�m�e�t�e�r�s�
�
� � � � � � �i�f�(�M�Q�L�I�n�f�o�I�n�t�e�g�e�r�(�M�Q�L�_�T�E�S�T�E�R�)�)�
�
� � � � � � � � �{�
�
� � � � � � � � � �P�r�i�n�t�(�_�_�F�I�L�E�_�_�,�"� �"�,�_�_�F�U�N�C�T�I�O�N�_�_�,�"�,� �E�R�R�O�R�:� �"�,�e�r�r�_�t�e�x�t�)�;�
�
� � � � � � � � � �r�e�t�u�r�n�(�I�N�I�T�_�F�A�I�L�E�D�)�;�
�
� � � � � � � � �}�
�
� � � � � � �e�l�s�e� �/�/� �i�f� �t�h�e� �E�x�p�e�r�t� �A�d�v�i�s�o�r� �i�s� �r�u�n� �o�n� �t�h�e� �c�h�a�r�t�,� �t�e�l�l� �t�h�e� �u�s�e�r� �a�b�o�u�t� �t�h�e� �e�r�r�o�r�
�
� � � � � � � � �{�
�
� � � � � � � � � �A�l�e�r�t�(�_�_�F�I�L�E�_�_�,�"� �"�,�_�_�F�U�N�C�T�I�O�N�_�_�,�"�,� �E�R�R�O�R�:� �"�,�e�r�r�_�t�e�x�t�)�;�
�
� � � � � � � � � �r�e�t�u�r�n�(�I�N�I�T�_�P�A�R�A�M�E�T�E�R�S�_�I�N�C�O�R�R�E�C�T�)�;�
�
� � � � � � � � �}�
�
� � � � � �}�
�
�/�/�-�-�-�
�
� � � �i�f�(�!�m�_�s�y�m�b�o�l�.�N�a�m�e�(�S�y�m�b�o�l�(�)�)�)� �/�/� �s�e�t�s� �s�y�m�b�o�l� �n�a�m�e�
�
� � � � � �{�
�
� � � � � � �P�r�i�n�t�(�_�_�F�I�L�E�_�_�,�"� �"�,�_�_�F�U�N�C�T�I�O�N�_�_�,�"�,� �E�R�R�O�R�:� �C�S�y�m�b�o�l�I�n�f�o�.�N�a�m�e�"�)�;�
�
� � � � � � �r�e�t�u�r�n�(�I�N�I�T�_�F�A�I�L�E�D�)�;�
�
� � � � � �}�
�
� � � �R�e�f�r�e�s�h�R�a�t�e�s�(�)�;�
�
�/�/�-�-�-�
�
� � � �i�f�(�I�n�p�P�e�n�d�i�n�g�E�x�p�i�r�a�t�i�o�n�>�0�)�
�
� � � � � �{�
�
� � � � � � �i�n�t� �e�x�p�_�t�y�p�e�=�(�i�n�t�)�S�Y�M�B�O�L�_�E�X�P�I�R�A�T�I�O�N�_�S�P�E�C�I�F�I�E�D�;�
�
� � � � � � �i�n�t� �e�x�p�i�r�a�t�i�o�n�=�(�i�n�t�)�m�_�s�y�m�b�o�l�.�T�r�a�d�e�T�i�m�e�F�l�a�g�s�(�)�;�
�
� � � � � � �i�f�(�(�e�x�p�i�r�a�t�i�o�n�&�e�x�p�_�t�y�p�e�)�!�=�e�x�p�_�t�y�p�e�)�
�
� � � � � � � � �{�
�
� � � � � � � � � �s�t�r�i�n�g� �e�r�r�_�t�e�x�t�=�(�T�e�r�m�i�n�a�l�I�n�f�o�S�t�r�i�n�g�(�T�E�R�M�I�N�A�L�_�L�A�N�G�U�A�G�E�)�=�=�"�R�u�s�s�i�a�n�"�)�?�
�
� � � � � � � � � � � � � � � � � � � � � � � � � �"�0 �A8<2>;5 �"�+�m�_�s�y�m�b�o�l�.�N�a�m�e�(�)�+�"� �=5;L7O �7040BL �!@>: �8AB5G5=8O �4;O �>B;>65==>3> �>@45@0!�"�:�
�
� � � � � � � � � � � � � � � � � � � � � � � � � �"�O�n� �t�h�e� �s�y�m�b�o�l� �"�+�m�_�s�y�m�b�o�l�.�N�a�m�e�(�)�+�"� �y�o�u� �c�a�n� �n�o�t� �s�e�t� �t�h�e� �e�x�p�i�r�a�t�i�o�n� �d�a�t�e� �f�o�r� �a� �p�e�n�d�i�n�g� �o�r�d�e�r�!�"�;�
�
� � � � � � � � � �/�/�-�-�-� �w�h�e�n� �t�e�s�t�i�n�g�,� �w�e� �w�i�l�l� �o�n�l�y� �o�u�t�p�u�t� �t�o� �t�h�e� �l�o�g� �a�b�o�u�t� �i�n�c�o�r�r�e�c�t� �i�n�p�u�t� �p�a�r�a�m�e�t�e�r�s�
�
� � � � � � � � � �i�f�(�M�Q�L�I�n�f�o�I�n�t�e�g�e�r�(�M�Q�L�_�T�E�S�T�E�R�)�)�
�
� � � � � � � � � � � �{�
�
� � � � � � � � � � � � �P�r�i�n�t�(�_�_�F�I�L�E�_�_�,�"� �"�,�_�_�F�U�N�C�T�I�O�N�_�_�,�"�,� �E�R�R�O�R�:� �"�,�e�r�r�_�t�e�x�t�)�;�
�
� � � � � � � � � � � � �r�e�t�u�r�n�(�I�N�I�T�_�F�A�I�L�E�D�)�;�
�
� � � � � � � � � � � �}�
�
� � � � � � � � � �e�l�s�e� �/�/� �i�f� �t�h�e� �E�x�p�e�r�t� �A�d�v�i�s�o�r� �i�s� �r�u�n� �o�n� �t�h�e� �c�h�a�r�t�,� �t�e�l�l� �t�h�e� �u�s�e�r� �a�b�o�u�t� �t�h�e� �e�r�r�o�r�
�
� � � � � � � � � � � �{�
�
� � � � � � � � � � � � �A�l�e�r�t�(�_�_�F�I�L�E�_�_�,�"� �"�,�_�_�F�U�N�C�T�I�O�N�_�_�,�"�,� �E�R�R�O�R�:� �"�,�e�r�r�_�t�e�x�t�)�;�
�
� � � � � � � � � � � � �r�e�t�u�r�n�(�I�N�I�T�_�P�A�R�A�M�E�T�E�R�S�_�I�N�C�O�R�R�E�C�T�)�;�
�
� � � � � � � � � � � �}�
�
� � � � � � � � �}�
�
� � � � � �}�
�
�/�/�-�-�-�
�
� � � �m�_�t�r�a�d�e�.�S�e�t�E�x�p�e�r�t�M�a�g�i�c�N�u�m�b�e�r�(�I�n�p�M�a�g�i�c�)�;�
�
� � � �m�_�t�r�a�d�e�.�S�e�t�M�a�r�g�i�n�M�o�d�e�(�)�;�
�
� � � �m�_�t�r�a�d�e�.�S�e�t�T�y�p�e�F�i�l�l�i�n�g�B�y�S�y�m�b�o�l�(�m�_�s�y�m�b�o�l�.�N�a�m�e�(�)�)�;�
�
� � � �m�_�t�r�a�d�e�.�S�e�t�D�e�v�i�a�t�i�o�n�I�n�P�o�i�n�t�s�(�I�n�p�D�e�v�i�a�t�i�o�n�)�;�
�
�/�/�-�-�-� �t�u�n�i�n�g� �f�o�r� �3� �o�r� �5� �d�i�g�i�t�s�
�
� � � �i�n�t� �d�i�g�i�t�s�_�a�d�j�u�s�t�=�1�;�
�
� � � �i�f�(�m�_�s�y�m�b�o�l�.�D�i�g�i�t�s�(�)�=�=�3� �|�|� �m�_�s�y�m�b�o�l�.�D�i�g�i�t�s�(�)�=�=�5�)�
�
� � � � � � �d�i�g�i�t�s�_�a�d�j�u�s�t�=�1�0�;�
�
� � � �m�_�a�d�j�u�s�t�e�d�_�p�o�i�n�t�=�m�_�s�y�m�b�o�l�.�P�o�i�n�t�(�)�*�d�i�g�i�t�s�_�a�d�j�u�s�t�;�
�
�
�
� � � �m�_�s�t�o�p�_�l�o�s�s� � � � � � � � � � � � � �=� �I�n�p�S�t�o�p�L�o�s�s� � � � � � � � � � � � � � �*� �m�_�a�d�j�u�s�t�e�d�_�p�o�i�n�t�;�
�
� � � �m�_�t�a�k�e�_�p�r�o�f�i�t� � � � � � � � � � � �=� �I�n�p�T�a�k�e�P�r�o�f�i�t� � � � � � � � � � � � �*� �m�_�a�d�j�u�s�t�e�d�_�p�o�i�n�t�;�
�
� � � �m�_�t�r�a�i�l�i�n�g�_�s�t�o�p� � � � � � � � � �=� �I�n�p�T�r�a�i�l�i�n�g�S�t�o�p� � � � � � � � � � �*� �m�_�a�d�j�u�s�t�e�d�_�p�o�i�n�t�;�
�
� � � �m�_�t�r�a�i�l�i�n�g�_�s�t�e�p� � � � � � � � � �=� �I�n�p�T�r�a�i�l�i�n�g�S�t�e�p� � � � � � � � � � �*� �m�_�a�d�j�u�s�t�e�d�_�p�o�i�n�t�;�
�
� � � �m�_�p�e�n�d�i�n�g�_�i�n�d�e�n�t� � � � � � � � �=� �I�n�p�P�e�n�d�i�n�g�I�n�d�e�n�t� � � � � � � � � �*� �m�_�a�d�j�u�s�t�e�d�_�p�o�i�n�t�;�
�
� � � �m�_�m�a�x�_�s�p�r�e�a�d� � � � � � � � � � � � �=� �I�n�p�M�a�x�S�p�r�e�a�d� � � � � � � � � � � � � �*� �m�_�s�y�m�b�o�l�.�P�o�i�n�t�(�)�;�
�
�/�/�-�-�-� �c�h�e�c�k� �t�h�e� �i�n�p�u�t� �p�a�r�a�m�e�t�e�r� �"�L�o�t�s�"�
�
� � � �s�t�r�i�n�g� �e�r�r�_�t�e�x�t�=�"�"�;�
�
� � � �i�f�(�I�n�p�L�o�t�O�r�R�i�s�k�=�=�l�o�t�)�
�
� � � � � �{�
�
� � � � � � �i�f�(�!�C�h�e�c�k�V�o�l�u�m�e�V�a�l�u�e�(�I�n�p�V�o�l�u�m�e�L�o�t�O�r�R�i�s�k�,�e�r�r�_�t�e�x�t�)�)�
�
� � � � � � � � �{�
�
� � � � � � � � � �/�/�-�-�-� �w�h�e�n� �t�e�s�t�i�n�g�,� �w�e� �w�i�l�l� �o�n�l�y� �o�u�t�p�u�t� �t�o� �t�h�e� �l�o�g� �a�b�o�u�t� �i�n�c�o�r�r�e�c�t� �i�n�p�u�t� �p�a�r�a�m�e�t�e�r�s�
�
� � � � � � � � � �i�f�(�M�Q�L�I�n�f�o�I�n�t�e�g�e�r�(�M�Q�L�_�T�E�S�T�E�R�)�)�
�
� � � � � � � � � � � �{�
�
� � � � � � � � � � � � �P�r�i�n�t�(�_�_�F�I�L�E�_�_�,�"� �"�,�_�_�F�U�N�C�T�I�O�N�_�_�,�"�,� �E�R�R�O�R�:� �"�,�e�r�r�_�t�e�x�t�)�;�
�
� � � � � � � � � � � � �r�e�t�u�r�n�(�I�N�I�T�_�F�A�I�L�E�D�)�;�
�
� � � � � � � � � � � �}�
�
� � � � � � � � � �e�l�s�e� �/�/� �i�f� �t�h�e� �E�x�p�e�r�t� �A�d�v�i�s�o�r� �i�s� �r�u�n� �o�n� �t�h�e� �c�h�a�r�t�,� �t�e�l�l� �t�h�e� �u�s�e�r� �a�b�o�u�t� �t�h�e� �e�r�r�o�r�
�
� � � � � � � � � � � �{�
�
� � � � � � � � � � � � �A�l�e�r�t�(�_�_�F�I�L�E�_�_�,�"� �"�,�_�_�F�U�N�C�T�I�O�N�_�_�,�"�,� �E�R�R�O�R�:� �"�,�e�r�r�_�t�e�x�t�)�;�
�
� � � � � � � � � � � � �r�e�t�u�r�n�(�I�N�I�T�_�P�A�R�A�M�E�T�E�R�S�_�I�N�C�O�R�R�E�C�T�)�;�
�
� � � � � � � � � � � �}�
�
� � � � � � � � �}�
�
� � � � � �}�
�
� � � �e�l�s�e�
�
� � � � � � �i�f�(�I�n�p�L�o�t�O�r�R�i�s�k�=�=�r�i�s�k�)�
�
� � � � � � � � �{�
�
� � � � � � � � � �i�f�(�m�_�m�o�n�e�y�!�=�N�U�L�L�)�
�
� � � � � � � � � � � � �d�e�l�e�t�e� �m�_�m�o�n�e�y�;�
�
� � � � � � � � � �m�_�m�o�n�e�y�=�n�e�w� �C�M�o�n�e�y�F�i�x�e�d�M�a�r�g�i�n�;�
�
� � � � � � � � � �i�f�(�m�_�m�o�n�e�y�!�=�N�U�L�L�)�
�
� � � � � � � � � � � �{�
�
� � � � � � � � � � � � �i�f�(�I�n�p�V�o�l�u�m�e�L�o�t�O�r�R�i�s�k�<�1� �|�|� �I�n�p�V�o�l�u�m�e�L�o�t�O�r�R�i�s�k�>�1�0�0�)�
�
� � � � � � � � � � � � � � �{�
�
� � � � � � � � � � � � � � � �P�r�i�n�t�(�_�_�F�I�L�E�_�_�,�"� �"�,�_�_�F�U�N�C�T�I�O�N�_�_�,�"�,� �E�R�R�O�R�:� �"�)�;�
�
� � � � � � � � � � � � � � � �P�r�i�n�t�(�"�T�h�e� �v�a�l�u�e� �f�o�r� �\�"�M�o�n�e�y� �m�a�n�a�g�e�m�e�n�t�\�"� �(�"�,�D�o�u�b�l�e�T�o�S�t�r�i�n�g�(�I�n�p�V�o�l�u�m�e�L�o�t�O�r�R�i�s�k�,�2�)�,�"�)� �-�>� �i�n�v�a�l�i�d� �p�a�r�a�m�e�t�e�r�s�"�)�;�
�
� � � � � � � � � � � � � � � �P�r�i�n�t�(�"� � � �p�a�r�a�m�e�t�e�r� �m�u�s�t� �b�e� �i�n� �t�h�e� �r�a�n�g�e�:� �f�r�o�m� �1�.�0�0� �t�o� �1�0�0�.�0�0�"�)�;�
�
� � � � � � � � � � � � � � � �r�e�t�u�r�n�(�I�N�I�T�_�F�A�I�L�E�D�)�;�
�
� � � � � � � � � � � � � � �}�
�
� � � � � � � � � � � � �i�f�(�!�m�_�m�o�n�e�y�.�I�n�i�t�(�G�e�t�P�o�i�n�t�e�r�(�m�_�s�y�m�b�o�l�)�,�P�e�r�i�o�d�(�)�,�m�_�s�y�m�b�o�l�.�P�o�i�n�t�(�)�*�d�i�g�i�t�s�_�a�d�j�u�s�t�)�)�
�
� � � � � � � � � � � � � � �{�
�
� � � � � � � � � � � � � � � �P�r�i�n�t�(�_�_�F�I�L�E�_�_�,�"� �"�,�_�_�F�U�N�C�T�I�O�N�_�_�,�"�,� �E�R�R�O�R�:� �C�M�o�n�e�y�F�i�x�e�d�M�a�r�g�i�n�.�I�n�i�t�"�)�;�
�
� � � � � � � � � � � � � � � �r�e�t�u�r�n�(�I�N�I�T�_�F�A�I�L�E�D�)�;�
�
� � � � � � � � � � � � � � �}�
�
� � � � � � � � � � � � �m�_�m�o�n�e�y�.�P�e�r�c�e�n�t�(�I�n�p�V�o�l�u�m�e�L�o�t�O�r�R�i�s�k�)�;�
�
� � � � � � � � � � � �}�
�
� � � � � � � � � �e�l�s�e�
�
� � � � � � � � � � � �{�
�
� � � � � � � � � � � � �P�r�i�n�t�(�_�_�F�I�L�E�_�_�,�"� �"�,�_�_�F�U�N�C�T�I�O�N�_�_�,�"�,� �E�R�R�O�R�:� �O�b�j�e�c�t� �C�M�o�n�e�y�F�i�x�e�d�M�a�r�g�i�n� �i�s� �N�U�L�L�"�)�;�
�
� � � � � � � � � � � � �r�e�t�u�r�n�(�I�N�I�T�_�F�A�I�L�E�D�)�;�
�
� � � � � � � � � � � �}�
�
� � � � � � � � �}�
�
�/�/�-�-�-�
�
� � � �m�_�b�a�r�_�c�u�r�r�e�n�t�=�1�;�
�
�/�/�-�-�-�
�
� � � �r�e�t�u�r�n�(�I�N�I�T�_�S�U�C�C�E�E�D�E�D�)�;�
�
� � �}�
�
�/�/�+�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�+�
�
�/�/�|� �E�x�p�e�r�t� �d�e�i�n�i�t�i�a�l�i�z�a�t�i�o�n� �f�u�n�c�t�i�o�n� � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � �|�
�
�/�/�+�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�+�
�
�v�o�i�d� �O�n�D�e�i�n�i�t�(�c�o�n�s�t� �i�n�t� �r�e�a�s�o�n�)�
�
� � �{�
�
�/�/�-�-�-�
�
� � � �i�f�(�m�_�m�o�n�e�y�!�=�N�U�L�L�)�
�
� � � � � � �d�e�l�e�t�e� �m�_�m�o�n�e�y�;�
�
� � �}�
�
�/�/�+�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�+�
�
�/�/�|� �E�x�p�e�r�t� �t�i�c�k� �f�u�n�c�t�i�o�n� � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � �|�
�
�/�/�+�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�+�
�
�v�o�i�d� �O�n�T�i�c�k�(�)�
�
� � �{�
�
�/�/�-�-�-�
�
� � � �i�f�(�m�_�n�e�e�d�_�d�e�l�e�t�e�_�a�l�l�)�
�
� � � � � �{�
�
� � � � � � �i�f�(�I�s�P�e�n�d�i�n�g�O�r�d�e�r�s�E�x�i�s�t�s�(�)�)�
�
� � � � � � � � �{�
�
� � � � � � � � � �d�o�u�b�l�e� �l�e�v�e�l�;�
�
� � � � � � � � � �i�f�(�F�r�e�e�z�e�S�t�o�p�s�L�e�v�e�l�s�(�l�e�v�e�l�)�)�
�
� � � � � � � � � � � �{�
�
� � � � � � � � � � � � �D�e�l�e�t�e�A�l�l�P�e�n�d�i�n�g�O�r�d�e�r�s�(�l�e�v�e�l�)�;�
�
� � � � � � � � � � � � �r�e�t�u�r�n�;�
�
� � � � � � � � � � � �}�
�
� � � � � � � � � �e�l�s�e�
�
� � � � � � � � � � � � �r�e�t�u�r�n�;�
�
� � � � � � � � �}�
�
� � � � � � �e�l�s�e�
�
� � � � � � � � � �m�_�n�e�e�d�_�d�e�l�e�t�e�_�a�l�l�=�f�a�l�s�e�;�
�
� � � � � �}�
�
�/�/�-�-�-�
�
� � � �i�n�t� �s�i�z�e�_�n�e�e�d�_�p�e�n�d�i�n�g�=�A�r�r�a�y�S�i�z�e�(�S�P�e�n�d�i�n�g�)�;�
�
� � � �i�f�(�s�i�z�e�_�n�e�e�d�_�p�e�n�d�i�n�g�>�0�)�
�
� � � � � �{�
�
� � � � � � �i�f�(�!�m�_�w�a�i�t�i�n�g�_�p�e�n�d�i�n�g�_�o�r�d�e�r�)�
�
� � � � � � � � � �f�o�r�(�i�n�t� �i�=�s�i�z�e�_�n�e�e�d�_�p�e�n�d�i�n�g�-�1�;� �i�>�=�0�;� �i�-�-�)�
�
� � � � � � � � � � � �{�
�
� � � � � � � � � � � � �d�o�u�b�l�e� �l�e�v�e�l�;�
�
� � � � � � � � � � � � �d�o�u�b�l�e� �a�d�j�u�s�t�e�d�_�p�o�i�n�t�=�0�;�
�
� � � � � � � � � � � � �i�f�(�F�r�e�e�z�e�S�t�o�p�s�L�e�v�e�l�s�(�l�e�v�e�l�)�)�
�
� � � � � � � � � � � � � � �{�
�
� � � � � � � � � � � � � � � �m�_�w�a�i�t�i�n�g�_�p�e�n�d�i�n�g�_�o�r�d�e�r�=�t�r�u�e�;�
�
� � � � � � � � � � � � � � � �P�l�a�c�e�O�r�d�e�r�s�(�i�,�l�e�v�e�l�)�;�
�
� � � � � � � � � � � � � � �}�
�
� � � � � � � � � � � �}�
�
� � � � � � �r�e�t�u�r�n�;�
�
� � � � � �}�
�
�/�/�-�-�-�
�
� � � �i�f�(�I�n�p�T�r�a�i�l�i�n�g�F�r�e�q�u�e�n�c�y�>�=�1�0�)� �/�/� �t�r�a�i�l�i�n�g� �n�o� �m�o�r�e� �t�h�a�n� �o�n�c�e� �e�v�e�r�y� �1�0� �s�e�c�o�n�d�s�
�
� � � � � �{�
�
� � � � � � �d�a�t�e�t�i�m�e� �t�i�m�e�_�c�u�r�r�e�n�t�=�T�i�m�e�C�u�r�r�e�n�t�(�)�;�
�
� � � � � � �i�f�(�t�i�m�e�_�c�u�r�r�e�n�t�-�m�_�l�a�s�t�_�t�r�a�i�l�i�n�g�>�1�0�)�
�
� � � � � � � � �{�
�
� � � � � � � � � �d�o�u�b�l�e� �l�e�v�e�l�;�
�
� � � � � � � � � �i�f�(�F�r�e�e�z�e�S�t�o�p�s�L�e�v�e�l�s�(�l�e�v�e�l�)�)�
�
� � � � � � � � � � � � �T�r�a�i�l�i�n�g�(�l�e�v�e�l�)�;�
�
� � � � � � � � � �e�l�s�e�
�
� � � � � � � � � � � � �r�e�t�u�r�n�;�
�
� � � � � � � � � �m�_�l�a�s�t�_�t�r�a�i�l�i�n�g�=�t�i�m�e�_�c�u�r�r�e�n�t�;�
�
� � � � � � � � �}�
�
� � � � � �}�
�
�/�/�-�-�-� �w�e� �w�o�r�k� �o�n�l�y� �a�t� �t�h�e� �t�i�m�e� �o�f� �t�h�e� �b�i�r�t�h� �o�f� �n�e�w� �b�a�r�
�
� � � �d�a�t�e�t�i�m�e� �t�i�m�e�_�0�=�i�T�i�m�e�(�m�_�s�y�m�b�o�l�.�N�a�m�e�(�)�,�P�e�r�i�o�d�(�)�,�0�)�;�
�
� � � �i�f�(�t�i�m�e�_�0�=�=�m�_�p�r�e�v�_�b�a�r�s�)�
�
� � � � � � �r�e�t�u�r�n�;�
�
� � � �m�_�p�r�e�v�_�b�a�r�s�=�t�i�m�e�_�0�;�
�
� � � �i�f�(�I�n�p�T�r�a�i�l�i�n�g�F�r�e�q�u�e�n�c�y�<�1�0�)� �/�/� �t�r�a�i�l�i�n�g� �o�n�l�y� �a�t� �t�h�e� �t�i�m�e� �o�f� �t�h�e� �b�i�r�t�h� �o�f� �n�e�w� �b�a�r�
�
� � � � � �{�
�
� � � � � � �d�o�u�b�l�e� �l�e�v�e�l�;�
�
� � � � � � �i�f�(�F�r�e�e�z�e�S�t�o�p�s�L�e�v�e�l�s�(�l�e�v�e�l�)�)�
�
� � � � � � � � � �T�r�a�i�l�i�n�g�(�l�e�v�e�l�)�;�
�
� � � � � �}�
�
�/�/�-�-�-� �s�e�a�r�c�h� �f�o�r� �t�r�a�d�i�n�g� �s�i�g�n�a�l�s� �o�n�l�y� �a�t� �t�h�e� �t�i�m�e� �o�f� �t�h�e� �b�i�r�t�h� �o�f� �n�e�w� �b�a�r�
�
� � � �i�f�(�!�R�e�f�r�e�s�h�R�a�t�e�s�(�)�)�
�
� � � � � �{�
�
� � � � � � �m�_�p�r�e�v�_�b�a�r�s�=�0�;�
�
� � � � � � �r�e�t�u�r�n�;�
�
� � � � � �}�
�
�/�/�-�-�-� �s�e�a�r�c�h� �f�o�r� �t�r�a�d�i�n�g� �s�i�g�n�a�l�s�
�
� � � �i�f�(�!�S�e�a�r�c�h�T�r�a�d�i�n�g�S�i�g�n�a�l�s�(�)�)�
�
� � � � � �{�
�
� � � � � � �m�_�p�r�e�v�_�b�a�r�s�=�0�;�
�
� � � � � � �r�e�t�u�r�n�;�
�
� � � � � �}�
�
�/�/�-�-�-�
�
� � �}�
�
�/�/�+�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�+�
�
�/�/�|� �T�r�a�d�e�T�r�a�n�s�a�c�t�i�o�n� �f�u�n�c�t�i�o�n� � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � �|�
�
�/�/�+�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�+�
�
�v�o�i�d� �O�n�T�r�a�d�e�T�r�a�n�s�a�c�t�i�o�n�(�c�o�n�s�t� �M�q�l�T�r�a�d�e�T�r�a�n�s�a�c�t�i�o�n� �&�t�r�a�n�s�,�
�
� � � � � � � � � � � � � � � � � � � � � � � � �c�o�n�s�t� �M�q�l�T�r�a�d�e�R�e�q�u�e�s�t� �&�r�e�q�u�e�s�t�,�
�
� � � � � � � � � � � � � � � � � � � � � � � � �c�o�n�s�t� �M�q�l�T�r�a�d�e�R�e�s�u�l�t� �&�r�e�s�u�l�t�)�
�
� � �{�
�
�/�/�-�-�-� �g�e�t� �t�r�a�n�s�a�c�t�i�o�n� �t�y�p�e� �a�s� �e�n�u�m�e�r�a�t�i�o�n� �v�a�l�u�e�
�
� � � �E�N�U�M�_�T�R�A�D�E�_�T�R�A�N�S�A�C�T�I�O�N�_�T�Y�P�E� �t�y�p�e�=�t�r�a�n�s�.�t�y�p�e�;�
�
�/�/�-�-�-� �i�f� �t�r�a�n�s�a�c�t�i�o�n� �i�s� �r�e�s�u�l�t� �o�f� �a�d�d�i�t�i�o�n� �o�f� �t�h�e� �t�r�a�n�s�a�c�t�i�o�n� �i�n� �h�i�s�t�o�r�y�
�
� � � �i�f�(�t�y�p�e�=�=�T�R�A�D�E�_�T�R�A�N�S�A�C�T�I�O�N�_�D�E�A�L�_�A�D�D�)�
�
� � � � � �{�
�
� � � � � � �l�o�n�g� � � � � �d�e�a�l�_�t�i�c�k�e�t� � � � � � � �=�0�;�
�
� � � � � � �l�o�n�g� � � � � �d�e�a�l�_�o�r�d�e�r� � � � � � � � �=�0�;�
�
� � � � � � �l�o�n�g� � � � � �d�e�a�l�_�t�i�m�e� � � � � � � � � �=�0�;�
�
� � � � � � �l�o�n�g� � � � � �d�e�a�l�_�t�i�m�e�_�m�s�c� � � � � �=�0�;�
�
� � � � � � �l�o�n�g� � � � � �d�e�a�l�_�t�y�p�e� � � � � � � � � �=�-�1�;�
�
� � � � � � �l�o�n�g� � � � � �d�e�a�l�_�e�n�t�r�y� � � � � � � � �=�-�1�;�
�
� � � � � � �l�o�n�g� � � � � �d�e�a�l�_�m�a�g�i�c� � � � � � � � �=�0�;�
�
� � � � � � �l�o�n�g� � � � � �d�e�a�l�_�r�e�a�s�o�n� � � � � � � �=�-�1�;�
�
� � � � � � �l�o�n�g� � � � � �d�e�a�l�_�p�o�s�i�t�i�o�n�_�i�d� � �=�0�;�
�
� � � � � � �d�o�u�b�l�e� � � �d�e�a�l�_�v�o�l�u�m�e� � � � � � � �=�0�.�0�;�
�
� � � � � � �d�o�u�b�l�e� � � �d�e�a�l�_�p�r�i�c�e� � � � � � � � �=�0�.�0�;�
�
� � � � � � �d�o�u�b�l�e� � � �d�e�a�l�_�c�o�m�m�i�s�s�i�o�n� � � �=�0�.�0�;�
�
� � � � � � �d�o�u�b�l�e� � � �d�e�a�l�_�s�w�a�p� � � � � � � � � �=�0�.�0�;�
�
� � � � � � �d�o�u�b�l�e� � � �d�e�a�l�_�p�r�o�f�i�t� � � � � � � �=�0�.�0�;�
�
� � � � � � �s�t�r�i�n�g� � � �d�e�a�l�_�s�y�m�b�o�l� � � � � � � �=�"�"�;�
�
� � � � � � �s�t�r�i�n�g� � � �d�e�a�l�_�c�o�m�m�e�n�t� � � � � � �=�"�"�;�
�
� � � � � � �s�t�r�i�n�g� � � �d�e�a�l�_�e�x�t�e�r�n�a�l�_�i�d� � �=�"�"�;�
�
� � � � � � �i�f�(�H�i�s�t�o�r�y�D�e�a�l�S�e�l�e�c�t�(�t�r�a�n�s�.�d�e�a�l�)�)�
�
� � � � � � � � �{�
�
� � � � � � � � � �d�e�a�l�_�t�i�c�k�e�t� � � � � � � �=�H�i�s�t�o�r�y�D�e�a�l�G�e�t�I�n�t�e�g�e�r�(�t�r�a�n�s�.�d�e�a�l�,�D�E�A�L�_�T�I�C�K�E�T�)�;�
�
� � � � � � � � � �d�e�a�l�_�o�r�d�e�r� � � � � � � � �=�H�i�s�t�o�r�y�D�e�a�l�G�e�t�I�n�t�e�g�e�r�(�t�r�a�n�s�.�d�e�a�l�,�D�E�A�L�_�O�R�D�E�R�)�;�
�
� � � � � � � � � �d�e�a�l�_�t�i�m�e� � � � � � � � � �=�H�i�s�t�o�r�y�D�e�a�l�G�e�t�I�n�t�e�g�e�r�(�t�r�a�n�s�.�d�e�a�l�,�D�E�A�L�_�T�I�M�E�)�;�
�
� � � � � � � � � �d�e�a�l�_�t�i�m�e�_�m�s�c� � � � � �=�H�i�s�t�o�r�y�D�e�a�l�G�e�t�I�n�t�e�g�e�r�(�t�r�a�n�s�.�d�e�a�l�,�D�E�A�L�_�T�I�M�E�_�M�S�C�)�;�
�
� � � � � � � � � �d�e�a�l�_�t�y�p�e� � � � � � � � � �=�H�i�s�t�o�r�y�D�e�a�l�G�e�t�I�n�t�e�g�e�r�(�t�r�a�n�s�.�d�e�a�l�,�D�E�A�L�_�T�Y�P�E�)�;�
�
� � � � � � � � � �d�e�a�l�_�e�n�t�r�y� � � � � � � � �=�H�i�s�t�o�r�y�D�e�a�l�G�e�t�I�n�t�e�g�e�r�(�t�r�a�n�s�.�d�e�a�l�,�D�E�A�L�_�E�N�T�R�Y�)�;�
�
� � � � � � � � � �d�e�a�l�_�m�a�g�i�c� � � � � � � � �=�H�i�s�t�o�r�y�D�e�a�l�G�e�t�I�n�t�e�g�e�r�(�t�r�a�n�s�.�d�e�a�l�,�D�E�A�L�_�M�A�G�I�C�)�;�
�
� � � � � � � � � �d�e�a�l�_�r�e�a�s�o�n� � � � � � � �=�H�i�s�t�o�r�y�D�e�a�l�G�e�t�I�n�t�e�g�e�r�(�t�r�a�n�s�.�d�e�a�l�,�D�E�A�L�_�R�E�A�S�O�N�)�;�
�
� � � � � � � � � �d�e�a�l�_�p�o�s�i�t�i�o�n�_�i�d� � �=�H�i�s�t�o�r�y�D�e�a�l�G�e�t�I�n�t�e�g�e�r�(�t�r�a�n�s�.�d�e�a�l�,�D�E�A�L�_�P�O�S�I�T�I�O�N�_�I�D�)�;�
�
�
�
� � � � � � � � � �d�e�a�l�_�v�o�l�u�m�e� � � � � � � �=�H�i�s�t�o�r�y�D�e�a�l�G�e�t�D�o�u�b�l�e�(�t�r�a�n�s�.�d�e�a�l�,�D�E�A�L�_�V�O�L�U�M�E�)�;�
�
� � � � � � � � � �d�e�a�l�_�p�r�i�c�e� � � � � � � � �=�H�i�s�t�o�r�y�D�e�a�l�G�e�t�D�o�u�b�l�e�(�t�r�a�n�s�.�d�e�a�l�,�D�E�A�L�_�P�R�I�C�E�)�;�
�
� � � � � � � � � �d�e�a�l�_�c�o�m�m�i�s�s�i�o�n� � � �=�H�i�s�t�o�r�y�D�e�a�l�G�e�t�D�o�u�b�l�e�(�t�r�a�n�s�.�d�e�a�l�,�D�E�A�L�_�C�O�M�M�I�S�S�I�O�N�)�;�
�
� � � � � � � � � �d�e�a�l�_�s�w�a�p� � � � � � � � � �=�H�i�s�t�o�r�y�D�e�a�l�G�e�t�D�o�u�b�l�e�(�t�r�a�n�s�.�d�e�a�l�,�D�E�A�L�_�S�W�A�P�)�;�
�
� � � � � � � � � �d�e�a�l�_�p�r�o�f�i�t� � � � � � � �=�H�i�s�t�o�r�y�D�e�a�l�G�e�t�D�o�u�b�l�e�(�t�r�a�n�s�.�d�e�a�l�,�D�E�A�L�_�P�R�O�F�I�T�)�;�
�
�
�
� � � � � � � � � �d�e�a�l�_�s�y�m�b�o�l� � � � � � � �=�H�i�s�t�o�r�y�D�e�a�l�G�e�t�S�t�r�i�n�g�(�t�r�a�n�s�.�d�e�a�l�,�D�E�A�L�_�S�Y�M�B�O�L�)�;�
�
� � � � � � � � � �d�e�a�l�_�c�o�m�m�e�n�t� � � � � � �=�H�i�s�t�o�r�y�D�e�a�l�G�e�t�S�t�r�i�n�g�(�t�r�a�n�s�.�d�e�a�l�,�D�E�A�L�_�C�O�M�M�E�N�T�)�;�
�
� � � � � � � � � �d�e�a�l�_�e�x�t�e�r�n�a�l�_�i�d� � �=�H�i�s�t�o�r�y�D�e�a�l�G�e�t�S�t�r�i�n�g�(�t�r�a�n�s�.�d�e�a�l�,�D�E�A�L�_�E�X�T�E�R�N�A�L�_�I�D�)�;�
�
� � � � � � � � �}�
�
� � � � � � �e�l�s�e�
�
� � � � � � � � � �r�e�t�u�r�n�;�
�
� � � � � � �E�N�U�M�_�D�E�A�L�_�E�N�T�R�Y� �e�n�u�m�_�d�e�a�l�_�e�n�t�r�y�=�(�E�N�U�M�_�D�E�A�L�_�E�N�T�R�Y�)�d�e�a�l�_�e�n�t�r�y�;�
�
� � � � � � �i�f�(�d�e�a�l�_�s�y�m�b�o�l�=�=�m�_�s�y�m�b�o�l�.�N�a�m�e�(�)� �&�&� �d�e�a�l�_�m�a�g�i�c�=�=�I�n�p�M�a�g�i�c�)�
�
� � � � � � � � � �i�f�(�d�e�a�l�_�t�y�p�e�=�=�D�E�A�L�_�T�Y�P�E�_�B�U�Y� �|�|� �d�e�a�l�_�t�y�p�e�=�=�D�E�A�L�_�T�Y�P�E�_�S�E�L�L�)�
�
� � � � � � � � � � � � �i�f�(�d�e�a�l�_�e�n�t�r�y�=�=�D�E�A�L�_�E�N�T�R�Y�_�I�N�)�
�
� � � � � � � � � � � � � � � �m�_�n�e�e�d�_�d�e�l�e�t�e�_�a�l�l�=�t�r�u�e�;�
�
� � � � � �}�
�
� � �}�
�
�/�/�+�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�+�
�
�/�/�|� �R�e�f�r�e�s�h�e�s� �t�h�e� �s�y�m�b�o�l� �q�u�o�t�e�s� �d�a�t�a� � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � �|�
�
�/�/�+�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�+�
�
�b�o�o�l� �R�e�f�r�e�s�h�R�a�t�e�s�(�)�
�
� � �{�
�
�/�/�-�-�-� �r�e�f�r�e�s�h� �r�a�t�e�s�
�
� � � �i�f�(�!�m�_�s�y�m�b�o�l�.�R�e�f�r�e�s�h�R�a�t�e�s�(�)�)�
�
� � � � � �{�
�
� � � � � � �i�f�(�I�n�p�P�r�i�n�t�L�o�g�)�
�
� � � � � � � � � �P�r�i�n�t�(�_�_�F�I�L�E�_�_�,�"� �"�,�_�_�F�U�N�C�T�I�O�N�_�_�,�"�,� �E�R�R�O�R�:� �"�,�"�R�e�f�r�e�s�h�R�a�t�e�s� �e�r�r�o�r�"�)�;�
�
� � � � � � �r�e�t�u�r�n�(�f�a�l�s�e�)�;�
�
� � � � � �}�
�
�/�/�-�-�-� �p�r�o�t�e�c�t�i�o�n� �a�g�a�i�n�s�t� �t�h�e� �r�e�t�u�r�n� �v�a�l�u�e� �o�f� �"�z�e�r�o�"�
�
� � � �i�f�(�m�_�s�y�m�b�o�l�.�A�s�k�(�)�=�=�0� �|�|� �m�_�s�y�m�b�o�l�.�B�i�d�(�)�=�=�0�)�
�
� � � � � �{�
�
� � � � � � �i�f�(�I�n�p�P�r�i�n�t�L�o�g�)�
�
� � � � � � � � � �P�r�i�n�t�(�_�_�F�I�L�E�_�_�,�"� �"�,�_�_�F�U�N�C�T�I�O�N�_�_�,�"�,� �E�R�R�O�R�:� �"�,�"�A�s�k� �=�=� �0�.�0� �O�R� �B�i�d� �=�=� �0�.�0�"�)�;�
�
� � � � � � �r�e�t�u�r�n�(�f�a�l�s�e�)�;�
�
� � � � � �}�
�
�/�/�-�-�-�
�
� � � �r�e�t�u�r�n�(�t�r�u�e�)�;�
�
� � �}�
�
�/�/�+�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�+�
�
�/�/�|� �C�h�e�c�k� �t�h�e� �c�o�r�r�e�c�t�n�e�s�s� �o�f� �t�h�e� �p�o�s�i�t�i�o�n� �v�o�l�u�m�e� � � � � � � � � � � � � � � � � � � � � �|�
�
�/�/�+�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�+�
�
�b�o�o�l� �C�h�e�c�k�V�o�l�u�m�e�V�a�l�u�e�(�d�o�u�b�l�e� �v�o�l�u�m�e�,�s�t�r�i�n�g� �&�e�r�r�o�r�_�d�e�s�c�r�i�p�t�i�o�n�)�
�
� � �{�
�
�/�/�-�-�-� �m�i�n�i�m�a�l� �a�l�l�o�w�e�d� �v�o�l�u�m�e� �f�o�r� �t�r�a�d�e� �o�p�e�r�a�t�i�o�n�s�
�
� � � �d�o�u�b�l�e� �m�i�n�_�v�o�l�u�m�e�=�m�_�s�y�m�b�o�l�.�L�o�t�s�M�i�n�(�)�;�
�
� � � �i�f�(�v�o�l�u�m�e�<�m�i�n�_�v�o�l�u�m�e�)�
�
� � � � � �{�
�
� � � � � � �i�f�(�T�e�r�m�i�n�a�l�I�n�f�o�S�t�r�i�n�g�(�T�E�R�M�I�N�A�L�_�L�A�N�G�U�A�G�E�)�=�=�"�R�u�s�s�i�a�n�"�)�
�
� � � � � � � � � �e�r�r�o�r�_�d�e�s�c�r�i�p�t�i�o�n�=�S�t�r�i�n�g�F�o�r�m�a�t�(�"�1J5< �<5=LH5 �<8=8<0;L=> �4>?CAB8<>3> �S�Y�M�B�O�L�_�V�O�L�U�M�E�_�M�I�N�=�%�.�2�f�"�,�m�i�n�_�v�o�l�u�m�e�)�;�
�
� � � � � � �e�l�s�e�
�
� � � � � � � � � �e�r�r�o�r�_�d�e�s�c�r�i�p�t�i�o�n�=�S�t�r�i�n�g�F�o�r�m�a�t�(�"�V�o�l�u�m�e� �i�s� �l�e�s�s� �t�h�a�n� �t�h�e� �m�i�n�i�m�a�l� �a�l�l�o�w�e�d� �S�Y�M�B�O�L�_�V�O�L�U�M�E�_�M�I�N�=�%�.�2�f�"�,�m�i�n�_�v�o�l�u�m�e�)�;�
�
� � � � � � �r�e�t�u�r�n�(�f�a�l�s�e�)�;�
�
� � � � � �}�
�
�/�/�-�-�-� �m�a�x�i�m�a�l� �a�l�l�o�w�e�d� �v�o�l�u�m�e� �o�f� �t�r�a�d�e� �o�p�e�r�a�t�i�o�n�s�
�
� � � �d�o�u�b�l�e� �m�a�x�_�v�o�l�u�m�e�=�m�_�s�y�m�b�o�l�.�L�o�t�s�M�a�x�(�)�;�
�
� � � �i�f�(�v�o�l�u�m�e�>�m�a�x�_�v�o�l�u�m�e�)�
�
� � � � � �{�
�
� � � � � � �i�f�(�T�e�r�m�i�n�a�l�I�n�f�o�S�t�r�i�n�g�(�T�E�R�M�I�N�A�L�_�L�A�N�G�U�A�G�E�)�=�=�"�R�u�s�s�i�a�n�"�)�
�
� � � � � � � � � �e�r�r�o�r�_�d�e�s�c�r�i�p�t�i�o�n�=�S�t�r�i�n�g�F�o�r�m�a�t�(�"�1J5< �1>;LH5 �<0:A8<0;L=> �4>?CAB8<>3> �S�Y�M�B�O�L�_�V�O�L�U�M�E�_�M�A�X�=�%�.�2�f�"�,�m�a�x�_�v�o�l�u�m�e�)�;�
�
� � � � � � �e�l�s�e�
�
� � � � � � � � � �e�r�r�o�r�_�d�e�s�c�r�i�p�t�i�o�n�=�S�t�r�i�n�g�F�o�r�m�a�t�(�"�V�o�l�u�m�e� �i�s� �g�r�e�a�t�e�r� �t�h�a�n� �t�h�e� �m�a�x�i�m�a�l� �a�l�l�o�w�e�d� �S�Y�M�B�O�L�_�V�O�L�U�M�E�_�M�A�X�=�%�.�2�f�"�,�m�a�x�_�v�o�l�u�m�e�)�;�
�
� � � � � � �r�e�t�u�r�n�(�f�a�l�s�e�)�;�
�
� � � � � �}�
�
�/�/�-�-�-� �g�e�t� �m�i�n�i�m�a�l� �s�t�e�p� �o�f� �v�o�l�u�m�e� �c�h�a�n�g�i�n�g�
�
� � � �d�o�u�b�l�e� �v�o�l�u�m�e�_�s�t�e�p�=�m�_�s�y�m�b�o�l�.�L�o�t�s�S�t�e�p�(�)�;�
�
� � � �i�n�t� �r�a�t�i�o�=�(�i�n�t�)�M�a�t�h�R�o�u�n�d�(�v�o�l�u�m�e�/�v�o�l�u�m�e�_�s�t�e�p�)�;�
�
� � � �i�f�(�M�a�t�h�A�b�s�(�r�a�t�i�o�*�v�o�l�u�m�e�_�s�t�e�p�-�v�o�l�u�m�e�)�>�0�.�0�0�0�0�0�0�1�)�
�
� � � � � �{�
�
� � � � � � �i�f�(�T�e�r�m�i�n�a�l�I�n�f�o�S�t�r�i�n�g�(�T�E�R�M�I�N�A�L�_�L�A�N�G�U�A�G�E�)�=�=�"�R�u�s�s�i�a�n�"�)�
�
� � � � � � � � � �e�r�r�o�r�_�d�e�s�c�r�i�p�t�i�o�n�=�S�t�r�i�n�g�F�o�r�m�a�t�(�"�1J5< �=5 �:@0B5= �<8=8<0;L=><C �H03C �S�Y�M�B�O�L�_�V�O�L�U�M�E�_�S�T�E�P�=�%�.�2�f�,� �1;8609H89 �?@028;L=K9 �>1J5< �%�.�2�f�"�,�
�
� � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � �v�o�l�u�m�e�_�s�t�e�p�,�r�a�t�i�o�*�v�o�l�u�m�e�_�s�t�e�p�)�;�
�
� � � � � � �e�l�s�e�
�
� � � � � � � � � �e�r�r�o�r�_�d�e�s�c�r�i�p�t�i�o�n�=�S�t�r�i�n�g�F�o�r�m�a�t�(�"�V�o�l�u�m�e� �i�s� �n�o�t� �a� �m�u�l�t�i�p�l�e� �o�f� �t�h�e� �m�i�n�i�m�a�l� �s�t�e�p� �S�Y�M�B�O�L�_�V�O�L�U�M�E�_�S�T�E�P�=�%�.�2�f�,� �t�h�e� �c�l�o�s�e�s�t� �c�o�r�r�e�c�t� �v�o�l�u�m�e� �i�s� �%�.�2�f�"�,�
�
� � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � �v�o�l�u�m�e�_�s�t�e�p�,�r�a�t�i�o�*�v�o�l�u�m�e�_�s�t�e�p�)�;�
�
� � � � � � �r�e�t�u�r�n�(�f�a�l�s�e�)�;�
�
� � � � � �}�
�
� � � �e�r�r�o�r�_�d�e�s�c�r�i�p�t�i�o�n�=�"�C�o�r�r�e�c�t� �v�o�l�u�m�e� �v�a�l�u�e�"�;�
�
� � � �r�e�t�u�r�n�(�t�r�u�e�)�;�
�
� � �}�
�
�/�/�+�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�+�
�
�/�/�|� �C�h�e�c�k� �F�r�e�e�z�e� �a�n�d� �S�t�o�p�s� �l�e�v�e�l�s� � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � �|�
�
�/�/�+�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�+�
�
�b�o�o�l� �F�r�e�e�z�e�S�t�o�p�s�L�e�v�e�l�s�(�d�o�u�b�l�e� �&�l�e�v�e�l�)�
�
� � �{�
�
�/�/�-�-�-� �c�h�e�c�k� �F�r�e�e�z�e� �a�n�d� �S�t�o�p�s� �l�e�v�e�l�s�
�
� � � �/�*�
�
� � � � � � �T�y�p�e� �o�f� �o�r�d�e�r�/�p�o�s�i�t�i�o�n� � �|� � �A�c�t�i�v�a�t�i�o�n� �p�r�i�c�e� � �|� � �C�h�e�c�k�
�
� � � � � � �-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�|�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�|�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�
�
� � � � � � �B�u�y� �L�i�m�i�t� �o�r�d�e�r� � � � � � � � � �|� � �A�s�k� � � � � � � � � � � � � � � �|� � �A�s�k�-�O�p�e�n�P�r�i�c�e� � �>�=� �S�Y�M�B�O�L�_�T�R�A�D�E�_�F�R�E�E�Z�E�_�L�E�V�E�L�
�
� � � � � � �B�u�y� �S�t�o�p� �o�r�d�e�r� � � � � � � � � � �|� � �A�s�k� � � � � � � � � � � � � � � �|� � �O�p�e�n�P�r�i�c�e�-�A�s�k� � �>�=� �S�Y�M�B�O�L�_�T�R�A�D�E�_�F�R�E�E�Z�E�_�L�E�V�E�L�
�
� � � � � � �S�e�l�l� �L�i�m�i�t� �o�r�d�e�r� � � � � � � � �|� � �B�i�d� � � � � � � � � � � � � � � �|� � �O�p�e�n�P�r�i�c�e�-�B�i�d� � �>�=� �S�Y�M�B�O�L�_�T�R�A�D�E�_�F�R�E�E�Z�E�_�L�E�V�E�L�
�
� � � � � � �S�e�l�l� �S�t�o�p� �o�r�d�e�r� � � � � � � � � �|� � �B�i�d� � � � � � � � � � � � � � � �|� � �B�i�d�-�O�p�e�n�P�r�i�c�e� � �>�=� �S�Y�M�B�O�L�_�T�R�A�D�E�_�F�R�E�E�Z�E�_�L�E�V�E�L�
�
� � � � � � �B�u�y� �p�o�s�i�t�i�o�n� � � � � � � � � � � � �|� � �B�i�d� � � � � � � � � � � � � � � �|� � �T�a�k�e�P�r�o�f�i�t�-�B�i�d� �>�=� �S�Y�M�B�O�L�_�T�R�A�D�E�_�F�R�E�E�Z�E�_�L�E�V�E�L�
�
� � � � � � � � � � � � � � � � � � � � � � � � � � � � � � �|� � � � � � � � � � � � � � � � � � � � �|� � �B�i�d�-�S�t�o�p�L�o�s�s� � � �>�=� �S�Y�M�B�O�L�_�T�R�A�D�E�_�F�R�E�E�Z�E�_�L�E�V�E�L�
�
� � � � � � �S�e�l�l� �p�o�s�i�t�i�o�n� � � � � � � � � � � �|� � �A�s�k� � � � � � � � � � � � � � � �|� � �A�s�k�-�T�a�k�e�P�r�o�f�i�t� �>�=� �S�Y�M�B�O�L�_�T�R�A�D�E�_�F�R�E�E�Z�E�_�L�E�V�E�L�
�
� � � � � � � � � � � � � � � � � � � � � � � � � � � � � � �|� � � � � � � � � � � � � � � � � � � � �|� � �S�t�o�p�L�o�s�s�-�A�s�k� � � �>�=� �S�Y�M�B�O�L�_�T�R�A�D�E�_�F�R�E�E�Z�E�_�L�E�V�E�L�
�
�
�
� � � � � � �B�u�y�i�n�g� �i�s� �d�o�n�e� �a�t� �t�h�e� �A�s�k� �p�r�i�c�e� � � � � � � � � � � � � � � � � �|� � �S�e�l�l�i�n�g� �i�s� �d�o�n�e� �a�t� �t�h�e� �B�i�d� �p�r�i�c�e�
�
� � � � � � �-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�|�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�
�
� � � � � � �T�a�k�e�P�r�o�f�i�t� � � � � � � � �>�=� �B�i�d� � � � � � � � � � � � � � � � � � � � � � � � �|� � �T�a�k�e�P�r�o�f�i�t� � � � � � � � �<�=� �A�s�k�
�
� � � � � � �S�t�o�p�L�o�s�s� � � � � � � � � � �<�=� �B�i�d� � � � � � � � � � � � � � � � � � � � � � � � �|� � �S�t�o�p�L�o�s�s� � � � � � � � � � �>�=� �A�s�k�
�
� � � � � � �T�a�k�e�P�r�o�f�i�t� �-� �B�i�d� � �>�=� �S�Y�M�B�O�L�_�T�R�A�D�E�_�S�T�O�P�S�_�L�E�V�E�L� � � �|� � �A�s�k� �-� �T�a�k�e�P�r�o�f�i�t� � �>�=� �S�Y�M�B�O�L�_�T�R�A�D�E�_�S�T�O�P�S�_�L�E�V�E�L�
�
� � � � � � �B�i�d� �-� �S�t�o�p�L�o�s�s� � � � �>�=� �S�Y�M�B�O�L�_�T�R�A�D�E�_�S�T�O�P�S�_�L�E�V�E�L� � � �|� � �S�t�o�p�L�o�s�s� �-� �A�s�k� � � � �>�=� �S�Y�M�B�O�L�_�T�R�A�D�E�_�S�T�O�P�S�_�L�E�V�E�L�
�
� � � �*�/�
�
� � � �i�f�(�!�R�e�f�r�e�s�h�R�a�t�e�s�(�)� �|�|� �!�m�_�s�y�m�b�o�l�.�R�e�f�r�e�s�h�(�)�)�
�
� � � � � � �r�e�t�u�r�n�(�f�a�l�s�e�)�;�
�
�/�/�-�-�-� �F�r�e�e�z�e�L�e�v�e�l� �-�>� �f�o�r� �p�e�n�d�i�n�g� �o�r�d�e�r� �a�n�d� �m�o�d�i�f�i�c�a�t�i�o�n�
�
� � � �d�o�u�b�l�e� �f�r�e�e�z�e�_�l�e�v�e�l�=�m�_�s�y�m�b�o�l�.�F�r�e�e�z�e�L�e�v�e�l�(�)�*�m�_�s�y�m�b�o�l�.�P�o�i�n�t�(�)�;�
�
� � � �i�f�(�f�r�e�e�z�e�_�l�e�v�e�l�=�=�0�.�0�)�
�
� � � � � � �f�r�e�e�z�e�_�l�e�v�e�l�=�(�m�_�s�y�m�b�o�l�.�A�s�k�(�)�-�m�_�s�y�m�b�o�l�.�B�i�d�(�)�)�*�3�.�0�;�
�
�/�/�-�-�-� �S�t�o�p�s�L�e�v�e�l� �-�>� �f�o�r� �T�a�k�e�P�r�o�f�i�t� �a�n�d� �S�t�o�p�L�o�s�s�
�
� � � �d�o�u�b�l�e� �s�t�o�p�_�l�e�v�e�l�=�m�_�s�y�m�b�o�l�.�S�t�o�p�s�L�e�v�e�l�(�)�*�m�_�s�y�m�b�o�l�.�P�o�i�n�t�(�)�;�
�
� � � �i�f�(�s�t�o�p�_�l�e�v�e�l�=�=�0�.�0�)�
�
� � � � � � �s�t�o�p�_�l�e�v�e�l�=�(�m�_�s�y�m�b�o�l�.�A�s�k�(�)�-�m�_�s�y�m�b�o�l�.�B�i�d�(�)�)�*�3�.�0�;�
�
�
�
� � � �i�f�(�f�r�e�e�z�e�_�l�e�v�e�l�<�=�0�.�0� �|�|� �s�t�o�p�_�l�e�v�e�l�<�=�0�.�0�)�
�
� � � � � � �r�e�t�u�r�n�(�f�a�l�s�e�)�;�
�
�
�
� � � �l�e�v�e�l�=�(�f�r�e�e�z�e�_�l�e�v�e�l�>�s�t�o�p�_�l�e�v�e�l�)�?�f�r�e�e�z�e�_�l�e�v�e�l�:�s�t�o�p�_�l�e�v�e�l�;�
�
�
�
� � � �d�o�u�b�l�e� �s�p�r�e�a�d�=�m�_�s�y�m�b�o�l�.�S�p�r�e�a�d�(�)�*�m�_�s�y�m�b�o�l�.�P�o�i�n�t�(�)�*�3�.�0�;�
�
� � � �l�e�v�e�l�=�(�l�e�v�e�l�>�s�p�r�e�a�d�)�?�l�e�v�e�l�:�s�p�r�e�a�d�;�
�
�/�/�-�-�-�
�
� � � �r�e�t�u�r�n�(�t�r�u�e�)�;�
�
� � �}�
�
�/�/�+�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�+�
�
�/�/�|� �P�r�i�n�t� �C�T�r�a�d�e� �r�e�s�u�l�t� � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � �|�
�
�/�/�+�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�+�
�
�v�o�i�d� �P�r�i�n�t�R�e�s�u�l�t�T�r�a�d�e�(�C�T�r�a�d�e� �&�t�r�a�d�e�,�C�S�y�m�b�o�l�I�n�f�o� �&�s�y�m�b�o�l�)�
�
� � �{�
�
� � � �P�r�i�n�t�(�_�_�F�I�L�E�_�_�,�"� �"�,�_�_�F�U�N�C�T�I�O�N�_�_�,�"�,� �S�y�m�b�o�l�:� �"�,�s�y�m�b�o�l�.�N�a�m�e�(�)�+�"�,� �"�+�
�
� � � � � � � � � �"�C�o�d�e� �o�f� �r�e�q�u�e�s�t� �r�e�s�u�l�t�:� �"�+�I�n�t�e�g�e�r�T�o�S�t�r�i�n�g�(�t�r�a�d�e�.�R�e�s�u�l�t�R�e�t�c�o�d�e�(�)�)�+�"�,� �"�+�
�
� � � � � � � � � �"�C�o�d�e� �o�f� �r�e�q�u�e�s�t� �r�e�s�u�l�t� �a�s� �a� �s�t�r�i�n�g�:� �"�+�t�r�a�d�e�.�R�e�s�u�l�t�R�e�t�c�o�d�e�D�e�s�c�r�i�p�t�i�o�n�(�)�)�;�
�
� � � �P�r�i�n�t�(�"�D�e�a�l� �t�i�c�k�e�t�:� �"�+�I�n�t�e�g�e�r�T�o�S�t�r�i�n�g�(�t�r�a�d�e�.�R�e�s�u�l�t�D�e�a�l�(�)�)�+�"�,� �"�+�
�
� � � � � � � � � �"�O�r�d�e�r� �t�i�c�k�e�t�:� �"�+�I�n�t�e�g�e�r�T�o�S�t�r�i�n�g�(�t�r�a�d�e�.�R�e�s�u�l�t�O�r�d�e�r�(�)�)�+�"�,� �"�+�
�
� � � � � � � � � �"�O�r�d�e�r� �r�e�t�c�o�d�e� �e�x�t�e�r�n�a�l�:� �"�+�I�n�t�e�g�e�r�T�o�S�t�r�i�n�g�(�t�r�a�d�e�.�R�e�s�u�l�t�R�e�t�c�o�d�e�E�x�t�e�r�n�a�l�(�)�)�+�"�,� �"�+�
�
� � � � � � � � � �"�V�o�l�u�m�e� �o�f� �d�e�a�l� �o�r� �o�r�d�e�r�:� �"�+�D�o�u�b�l�e�T�o�S�t�r�i�n�g�(�t�r�a�d�e�.�R�e�s�u�l�t�V�o�l�u�m�e�(�)�,�2�)�)�;�
�
� � � �P�r�i�n�t�(�"�P�r�i�c�e�,� �c�o�n�f�i�r�m�e�d� �b�y� �b�r�o�k�e�r�:� �"�+�D�o�u�b�l�e�T�o�S�t�r�i�n�g�(�t�r�a�d�e�.�R�e�s�u�l�t�P�r�i�c�e�(�)�,�s�y�m�b�o�l�.�D�i�g�i�t�s�(�)�)�+�"�,� �"�+�
�
� � � � � � � � � �"�C�u�r�r�e�n�t� �b�i�d� �p�r�i�c�e�:� �"�+�D�o�u�b�l�e�T�o�S�t�r�i�n�g�(�s�y�m�b�o�l�.�B�i�d�(�)�,�s�y�m�b�o�l�.�D�i�g�i�t�s�(�)�)�+�"� �(�t�h�e� �r�e�q�u�o�t�e�)�:� �"�+�D�o�u�b�l�e�T�o�S�t�r�i�n�g�(�t�r�a�d�e�.�R�e�s�u�l�t�B�i�d�(�)�,�s�y�m�b�o�l�.�D�i�g�i�t�s�(�)�)�+�"�,� �"�+�
�
� � � � � � � � � �"�C�u�r�r�e�n�t� �a�s�k� �p�r�i�c�e�:� �"�+�D�o�u�b�l�e�T�o�S�t�r�i�n�g�(�s�y�m�b�o�l�.�A�s�k�(�)�,�s�y�m�b�o�l�.�D�i�g�i�t�s�(�)�)�+�"� �(�t�h�e� �r�e�q�u�o�t�e�)�:� �"�+�D�o�u�b�l�e�T�o�S�t�r�i�n�g�(�t�r�a�d�e�.�R�e�s�u�l�t�A�s�k�(�)�,�s�y�m�b�o�l�.�D�i�g�i�t�s�(�)�)�)�;�
�
� � � �P�r�i�n�t�(�"�B�r�o�k�e�r� �c�o�m�m�e�n�t�:� �"�+�t�r�a�d�e�.�R�e�s�u�l�t�C�o�m�m�e�n�t�(�)�)�;�
�
� � �}�
�
�/�/�+�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�+�
�
�/�/�|� �T�r�a�i�l�i�n�g� � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � �|�
�
�/�/�|� � � �I�n�p�T�r�a�i�l�i�n�g�S�t�o�p�:� �m�i�n� �d�i�s�t�a�n�c�e� �f�r�o�m� �p�r�i�c�e� �t�o� �S�t�o�p� �L�o�s�s� � � � � � � � � � �|�
�
�/�/�+�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�+�
�
�v�o�i�d� �T�r�a�i�l�i�n�g�(�c�o�n�s�t� �d�o�u�b�l�e� �s�t�o�p�_�l�e�v�e�l�)�
�
� � �{�
�
� � � �/�*�
�
� � � � � � �B�u�y�i�n�g� �i�s� �d�o�n�e� �a�t� �t�h�e� �A�s�k� �p�r�i�c�e� � � � � � � � � � � � � � � � � �|� � �S�e�l�l�i�n�g� �i�s� �d�o�n�e� �a�t� �t�h�e� �B�i�d� �p�r�i�c�e�
�
� � � � � � �-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�|�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�
�
� � � � � � �T�a�k�e�P�r�o�f�i�t� � � � � � � � �>�=� �B�i�d� � � � � � � � � � � � � � � � � � � � � � � � �|� � �T�a�k�e�P�r�o�f�i�t� � � � � � � � �<�=� �A�s�k�
�
� � � � � � �S�t�o�p�L�o�s�s� � � � � � � � � � �<�=� �B�i�d� � � � � � � � � � � � � � � � � � � � � � � � �|� � �S�t�o�p�L�o�s�s� � � � � � � � � � �>�=� �A�s�k�
�
� � � � � � �T�a�k�e�P�r�o�f�i�t� �-� �B�i�d� � �>�=� �S�Y�M�B�O�L�_�T�R�A�D�E�_�S�T�O�P�S�_�L�E�V�E�L� � � �|� � �A�s�k� �-� �T�a�k�e�P�r�o�f�i�t� � �>�=� �S�Y�M�B�O�L�_�T�R�A�D�E�_�S�T�O�P�S�_�L�E�V�E�L�
�
� � � � � � �B�i�d� �-� �S�t�o�p�L�o�s�s� � � � �>�=� �S�Y�M�B�O�L�_�T�R�A�D�E�_�S�T�O�P�S�_�L�E�V�E�L� � � �|� � �S�t�o�p�L�o�s�s� �-� �A�s�k� � � � �>�=� �S�Y�M�B�O�L�_�T�R�A�D�E�_�S�T�O�P�S�_�L�E�V�E�L�
�
� � � �*�/�
�
� � � �i�f�(�I�n�p�T�r�a�i�l�i�n�g�S�t�o�p�=�=�0�)�
�
� � � � � � �r�e�t�u�r�n�;�
�
� � � �f�o�r�(�i�n�t� �i�=�P�o�s�i�t�i�o�n�s�T�o�t�a�l�(�)�-�1�;� �i�>�=�0�;� �i�-�-�)� �/�/� �r�e�t�u�r�n�s� �t�h�e� �n�u�m�b�e�r� �o�f� �o�p�e�n� �p�o�s�i�t�i�o�n�s�
�
� � � � � � �i�f�(�m�_�p�o�s�i�t�i�o�n�.�S�e�l�e�c�t�B�y�I�n�d�e�x�(�i�)�)�
�
� � � � � � � � � �i�f�(�m�_�p�o�s�i�t�i�o�n�.�S�y�m�b�o�l�(�)�=�=�m�_�s�y�m�b�o�l�.�N�a�m�e�(�)� �&�&� �m�_�p�o�s�i�t�i�o�n�.�M�a�g�i�c�(�)�=�=�I�n�p�M�a�g�i�c�)�
�
� � � � � � � � � � � �{�
�
� � � � � � � � � � � � �d�o�u�b�l�e� �p�r�i�c�e�_�c�u�r�r�e�n�t� �=� �m�_�p�o�s�i�t�i�o�n�.�P�r�i�c�e�C�u�r�r�e�n�t�(�)�;�
�
� � � � � � � � � � � � �d�o�u�b�l�e� �p�r�i�c�e�_�o�p�e�n� � � � �=� �m�_�p�o�s�i�t�i�o�n�.�P�r�i�c�e�O�p�e�n�(�)�;�
�
� � � � � � � � � � � � �d�o�u�b�l�e� �s�t�o�p�_�l�o�s�s� � � � � �=� �m�_�p�o�s�i�t�i�o�n�.�S�t�o�p�L�o�s�s�(�)�;�
�
� � � � � � � � � � � � �d�o�u�b�l�e� �t�a�k�e�_�p�r�o�f�i�t� � � �=� �m�_�p�o�s�i�t�i�o�n�.�T�a�k�e�P�r�o�f�i�t�(�)�;�
�
� � � � � � � � � � � � �d�o�u�b�l�e� �a�s�k� � � � � � � � � � � �=� �m�_�s�y�m�b�o�l�.�A�s�k�(�)�;�
�
� � � � � � � � � � � � �d�o�u�b�l�e� �b�i�d� � � � � � � � � � � �=� �m�_�s�y�m�b�o�l�.�B�i�d�(�)�;�
�
� � � � � � � � � � � � �/�/�-�-�-�
�
� � � � � � � � � � � � �i�f�(�m�_�p�o�s�i�t�i�o�n�.�P�o�s�i�t�i�o�n�T�y�p�e�(�)�=�=�P�O�S�I�T�I�O�N�_�T�Y�P�E�_�B�U�Y�)�
�
� � � � � � � � � � � � � � �{�
�
� � � � � � � � � � � � � � � �i�f�(�p�r�i�c�e�_�c�u�r�r�e�n�t�-�p�r�i�c�e�_�o�p�e�n�>�m�_�t�r�a�i�l�i�n�g�_�s�t�o�p�+�m�_�t�r�a�i�l�i�n�g�_�s�t�e�p�)�
�
� � � � � � � � � � � � � � � � � � �i�f�(�s�t�o�p�_�l�o�s�s�<�p�r�i�c�e�_�c�u�r�r�e�n�t�-�(�m�_�t�r�a�i�l�i�n�g�_�s�t�o�p�+�m�_�t�r�a�i�l�i�n�g�_�s�t�e�p�)�)�
�
� � � � � � � � � � � � � � � � � � � � � �i�f�(�m�_�t�r�a�i�l�i�n�g�_�s�t�o�p�>�=�s�t�o�p�_�l�e�v�e�l� �&�&� �(�t�a�k�e�_�p�r�o�f�i�t�-�b�i�d�>�=�s�t�o�p�_�l�e�v�e�l� �|�|� �t�a�k�e�_�p�r�o�f�i�t�=�=�0�.�0�)�)�
�
� � � � � � � � � � � � � � � � � � � � � � � �{�
�
� � � � � � � � � � � � � � � � � � � � � � � � �i�f�(�!�m�_�t�r�a�d�e�.�P�o�s�i�t�i�o�n�M�o�d�i�f�y�(�m�_�p�o�s�i�t�i�o�n�.�T�i�c�k�e�t�(�)�,�
�
� � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � �m�_�s�y�m�b�o�l�.�N�o�r�m�a�l�i�z�e�P�r�i�c�e�(�p�r�i�c�e�_�c�u�r�r�e�n�t�-�m�_�t�r�a�i�l�i�n�g�_�s�t�o�p�)�,�
�
� � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � �t�a�k�e�_�p�r�o�f�i�t�)�)�
�
� � � � � � � � � � � � � � � � � � � � � � � � � � � �i�f�(�I�n�p�P�r�i�n�t�L�o�g�)�
�
� � � � � � � � � � � � � � � � � � � � � � � � � � � � � � �P�r�i�n�t�(�_�_�F�I�L�E�_�_�,�"� �"�,�_�_�F�U�N�C�T�I�O�N�_�_�,�"�,� �E�R�R�O�R�:� �"�,�"�M�o�d�i�f�y� �B�U�Y� �"�,�m�_�p�o�s�i�t�i�o�n�.�T�i�c�k�e�t�(�)�,�
�
� � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � �"� �P�o�s�i�t�i�o�n� �-�>� �f�a�l�s�e�.� �R�e�s�u�l�t� �R�e�t�c�o�d�e�:� �"�,�m�_�t�r�a�d�e�.�R�e�s�u�l�t�R�e�t�c�o�d�e�(�)�,�
�
� � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � �"�,� �d�e�s�c�r�i�p�t�i�o�n� �o�f� �r�e�s�u�l�t�:� �"�,�m�_�t�r�a�d�e�.�R�e�s�u�l�t�R�e�t�c�o�d�e�D�e�s�c�r�i�p�t�i�o�n�(�)�)�;�
�
� � � � � � � � � � � � � � � � � � � � � � � � �i�f�(�I�n�p�P�r�i�n�t�L�o�g�)�
�
� � � � � � � � � � � � � � � � � � � � � � � � � � �{�
�
� � � � � � � � � � � � � � � � � � � � � � � � � � � �R�e�f�r�e�s�h�R�a�t�e�s�(�)�;�
�
� � � � � � � � � � � � � � � � � � � � � � � � � � � �m�_�p�o�s�i�t�i�o�n�.�S�e�l�e�c�t�B�y�I�n�d�e�x�(�i�)�;�
�
� � � � � � � � � � � � � � � � � � � � � � � � � � � �P�r�i�n�t�R�e�s�u�l�t�M�o�d�i�f�y�(�m�_�t�r�a�d�e�,�m�_�s�y�m�b�o�l�,�m�_�p�o�s�i�t�i�o�n�)�;�
�
� � � � � � � � � � � � � � � � � � � � � � � � � � �}�
�
� � � � � � � � � � � � � � � � � � � � � � � � �c�o�n�t�i�n�u�e�;�
�
� � � � � � � � � � � � � � � � � � � � � � � �}�
�
� � � � � � � � � � � � � � �}�
�
� � � � � � � � � � � � �e�l�s�e�
�
� � � � � � � � � � � � � � �{�
�
� � � � � � � � � � � � � � � �i�f�(�p�r�i�c�e�_�o�p�e�n�-�p�r�i�c�e�_�c�u�r�r�e�n�t�>�m�_�t�r�a�i�l�i�n�g�_�s�t�o�p�+�m�_�t�r�a�i�l�i�n�g�_�s�t�e�p�)�
�
� � � � � � � � � � � � � � � � � � �i�f�(�(�s�t�o�p�_�l�o�s�s�>�(�p�r�i�c�e�_�c�u�r�r�e�n�t�+�(�m�_�t�r�a�i�l�i�n�g�_�s�t�o�p�+�m�_�t�r�a�i�l�i�n�g�_�s�t�e�p�)�)�)� �|�|� �(�s�t�o�p�_�l�o�s�s�=�=�0�)�)�
�
� � � � � � � � � � � � � � � � � � � � � �i�f�(�m�_�t�r�a�i�l�i�n�g�_�s�t�o�p�>�=�s�t�o�p�_�l�e�v�e�l� �&�&� �a�s�k�-�t�a�k�e�_�p�r�o�f�i�t�>�=�s�t�o�p�_�l�e�v�e�l�)�
�
� � � � � � � � � � � � � � � � � � � � � � � �{�
�
� � � � � � � � � � � � � � � � � � � � � � � � �i�f�(�!�m�_�t�r�a�d�e�.�P�o�s�i�t�i�o�n�M�o�d�i�f�y�(�m�_�p�o�s�i�t�i�o�n�.�T�i�c�k�e�t�(�)�,�
�
� � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � �m�_�s�y�m�b�o�l�.�N�o�r�m�a�l�i�z�e�P�r�i�c�e�(�p�r�i�c�e�_�c�u�r�r�e�n�t�+�m�_�t�r�a�i�l�i�n�g�_�s�t�o�p�)�,�
�
� � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � �t�a�k�e�_�p�r�o�f�i�t�)�)�
�
� � � � � � � � � � � � � � � � � � � � � � � � � � � �i�f�(�I�n�p�P�r�i�n�t�L�o�g�)�
�
� � � � � � � � � � � � � � � � � � � � � � � � � � � � � � �P�r�i�n�t�(�_�_�F�I�L�E�_�_�,�"� �"�,�_�_�F�U�N�C�T�I�O�N�_�_�,�"�,� �E�R�R�O�R�:� �"�,�"�M�o�d�i�f�y� �S�E�L�L� �"�,�m�_�p�o�s�i�t�i�o�n�.�T�i�c�k�e�t�(�)�,�
�
� � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � �"� �P�o�s�i�t�i�o�n� �-�>� �f�a�l�s�e�.� �R�e�s�u�l�t� �R�e�t�c�o�d�e�:� �"�,�m�_�t�r�a�d�e�.�R�e�s�u�l�t�R�e�t�c�o�d�e�(�)�,�
�
� � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � �"�,� �d�e�s�c�r�i�p�t�i�o�n� �o�f� �r�e�s�u�l�t�:� �"�,�m�_�t�r�a�d�e�.�R�e�s�u�l�t�R�e�t�c�o�d�e�D�e�s�c�r�i�p�t�i�o�n�(�)�)�;�
�
� � � � � � � � � � � � � � � � � � � � � � � � �i�f�(�I�n�p�P�r�i�n�t�L�o�g�)�
�
� � � � � � � � � � � � � � � � � � � � � � � � � � �{�
�
� � � � � � � � � � � � � � � � � � � � � � � � � � � �R�e�f�r�e�s�h�R�a�t�e�s�(�)�;�
�
� � � � � � � � � � � � � � � � � � � � � � � � � � � �m�_�p�o�s�i�t�i�o�n�.�S�e�l�e�c�t�B�y�I�n�d�e�x�(�i�)�;�
�
� � � � � � � � � � � � � � � � � � � � � � � � � � � �P�r�i�n�t�R�e�s�u�l�t�M�o�d�i�f�y�(�m�_�t�r�a�d�e�,�m�_�s�y�m�b�o�l�,�m�_�p�o�s�i�t�i�o�n�)�;�
�
� � � � � � � � � � � � � � � � � � � � � � � � � � �}�
�
� � � � � � � � � � � � � � � � � � � � � � � �}�
�
� � � � � � � � � � � � � � �}�
�
� � � � � � � � � � � �}�
�
� � �}�
�
�/�/�+�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�+�
�
�/�/�|� �P�r�i�n�t� �C�T�r�a�d�e� �r�e�s�u�l�t� � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � �|�
�
�/�/�+�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�+�
�
�v�o�i�d� �P�r�i�n�t�R�e�s�u�l�t�M�o�d�i�f�y�(�C�T�r�a�d�e� �&�t�r�a�d�e�,�C�S�y�m�b�o�l�I�n�f�o� �&�s�y�m�b�o�l�,�C�P�o�s�i�t�i�o�n�I�n�f�o� �&�p�o�s�i�t�i�o�n�)�
�
� � �{�
�
� � � �P�r�i�n�t�(�"�F�i�l�e�:� �"�,�_�_�F�I�L�E�_�_�,�"�,� �s�y�m�b�o�l�:� �"�,�s�y�m�b�o�l�.�N�a�m�e�(�)�)�;�
�
� � � �P�r�i�n�t�(�"�C�o�d�e� �o�f� �r�e�q�u�e�s�t� �r�e�s�u�l�t�:� �"�+�I�n�t�e�g�e�r�T�o�S�t�r�i�n�g�(�t�r�a�d�e�.�R�e�s�u�l�t�R�e�t�c�o�d�e�(�)�)�)�;�
�
� � � �P�r�i�n�t�(�"�c�o�d�e� �o�f� �r�e�q�u�e�s�t� �r�e�s�u�l�t� �a�s� �a� �s�t�r�i�n�g�:� �"�+�t�r�a�d�e�.�R�e�s�u�l�t�R�e�t�c�o�d�e�D�e�s�c�r�i�p�t�i�o�n�(�)�)�;�
�
� � � �P�r�i�n�t�(�"�D�e�a�l� �t�i�c�k�e�t�:� �"�+�I�n�t�e�g�e�r�T�o�S�t�r�i�n�g�(�t�r�a�d�e�.�R�e�s�u�l�t�D�e�a�l�(�)�)�)�;�
�
� � � �P�r�i�n�t�(�"�O�r�d�e�r� �t�i�c�k�e�t�:� �"�+�I�n�t�e�g�e�r�T�o�S�t�r�i�n�g�(�t�r�a�d�e�.�R�e�s�u�l�t�O�r�d�e�r�(�)�)�)�;�
�
� � � �P�r�i�n�t�(�"�V�o�l�u�m�e� �o�f� �d�e�a�l� �o�r� �o�r�d�e�r�:� �"�+�D�o�u�b�l�e�T�o�S�t�r�i�n�g�(�t�r�a�d�e�.�R�e�s�u�l�t�V�o�l�u�m�e�(�)�,�2�)�)�;�
�
� � � �P�r�i�n�t�(�"�P�r�i�c�e�,� �c�o�n�f�i�r�m�e�d� �b�y� �b�r�o�k�e�r�:� �"�+�D�o�u�b�l�e�T�o�S�t�r�i�n�g�(�t�r�a�d�e�.�R�e�s�u�l�t�P�r�i�c�e�(�)�,�s�y�m�b�o�l�.�D�i�g�i�t�s�(�)�)�)�;�
�
� � � �P�r�i�n�t�(�"�C�u�r�r�e�n�t� �b�i�d� �p�r�i�c�e�:� �"�+�D�o�u�b�l�e�T�o�S�t�r�i�n�g�(�s�y�m�b�o�l�.�B�i�d�(�)�,�s�y�m�b�o�l�.�D�i�g�i�t�s�(�)�)�+�"� �(�t�h�e� �r�e�q�u�o�t�e�)�:� �"�+�D�o�u�b�l�e�T�o�S�t�r�i�n�g�(�t�r�a�d�e�.�R�e�s�u�l�t�B�i�d�(�)�,�s�y�m�b�o�l�.�D�i�g�i�t�s�(�)�)�)�;�
�
� � � �P�r�i�n�t�(�"�C�u�r�r�e�n�t� �a�s�k� �p�r�i�c�e�:� �"�+�D�o�u�b�l�e�T�o�S�t�r�i�n�g�(�s�y�m�b�o�l�.�A�s�k�(�)�,�s�y�m�b�o�l�.�D�i�g�i�t�s�(�)�)�+�"� �(�t�h�e� �r�e�q�u�o�t�e�)�:� �"�+�D�o�u�b�l�e�T�o�S�t�r�i�n�g�(�t�r�a�d�e�.�R�e�s�u�l�t�A�s�k�(�)�,�s�y�m�b�o�l�.�D�i�g�i�t�s�(�)�)�)�;�
�
� � � �P�r�i�n�t�(�"�B�r�o�k�e�r� �c�o�m�m�e�n�t�:� �"�+�t�r�a�d�e�.�R�e�s�u�l�t�C�o�m�m�e�n�t�(�)�)�;�
�
� � � �P�r�i�n�t�(�"�F�r�e�e�z�e� �L�e�v�e�l�:� �"�+�D�o�u�b�l�e�T�o�S�t�r�i�n�g�(�s�y�m�b�o�l�.�F�r�e�e�z�e�L�e�v�e�l�(�)�,�0�)�,�"�,� �S�t�o�p�s� �L�e�v�e�l�:� �"�+�D�o�u�b�l�e�T�o�S�t�r�i�n�g�(�s�y�m�b�o�l�.�S�t�o�p�s�L�e�v�e�l�(�)�,�0�)�)�;�
�
� � � �P�r�i�n�t�(�"�P�r�i�c�e� �o�f� �p�o�s�i�t�i�o�n� �o�p�e�n�i�n�g�:� �"�+�D�o�u�b�l�e�T�o�S�t�r�i�n�g�(�p�o�s�i�t�i�o�n�.�P�r�i�c�e�O�p�e�n�(�)�,�s�y�m�b�o�l�.�D�i�g�i�t�s�(�)�)�)�;�
�
� � � �P�r�i�n�t�(�"�P�r�i�c�e� �o�f� �p�o�s�i�t�i�o�n�'�s� �S�t�o�p� �L�o�s�s�:� �"�+�D�o�u�b�l�e�T�o�S�t�r�i�n�g�(�p�o�s�i�t�i�o�n�.�S�t�o�p�L�o�s�s�(�)�,�s�y�m�b�o�l�.�D�i�g�i�t�s�(�)�)�)�;�
�
� � � �P�r�i�n�t�(�"�P�r�i�c�e� �o�f� �p�o�s�i�t�i�o�n�'�s� �T�a�k�e� �P�r�o�f�i�t�:� �"�+�D�o�u�b�l�e�T�o�S�t�r�i�n�g�(�p�o�s�i�t�i�o�n�.�T�a�k�e�P�r�o�f�i�t�(�)�,�s�y�m�b�o�l�.�D�i�g�i�t�s�(�)�)�)�;�
�
� � � �P�r�i�n�t�(�"�C�u�r�r�e�n�t� �p�r�i�c�e� �b�y� �p�o�s�i�t�i�o�n�:� �"�+�D�o�u�b�l�e�T�o�S�t�r�i�n�g�(�p�o�s�i�t�i�o�n�.�P�r�i�c�e�C�u�r�r�e�n�t�(�)�,�s�y�m�b�o�l�.�D�i�g�i�t�s�(�)�)�)�;�
�
� � �}�
�
�/�/�+�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�+�
�
�/�/�|� �S�e�a�r�c�h� �t�r�a�d�i�n�g� �s�i�g�n�a�l�s� � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � �|�
�
�/�/�+�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�+�
�
�b�o�o�l� �S�e�a�r�c�h�T�r�a�d�i�n�g�S�i�g�n�a�l�s�(�v�o�i�d�)�
�
� � �{�
�
� � � �i�f�(�!�T�i�m�e�C�o�n�t�r�o�l�H�o�u�r�M�i�n�u�t�e�(�)�)�
�
� � � � � � �r�e�t�u�r�n�(�t�r�u�e�)�;�
�
�
�
� � � �i�f�(�I�s�P�o�s�i�t�i�o�n�E�x�i�s�t�s�(�)� �|�|� �I�s�P�e�n�d�i�n�g�O�r�d�e�r�s�E�x�i�s�t�s�(�)�)�
�
� � � � � � �r�e�t�u�r�n�(�t�r�u�e�)�;�
�
�
�
� � � �i�n�t� �s�i�z�e�_�n�e�e�d�_�p�e�n�d�i�n�g�=�A�r�r�a�y�S�i�z�e�(�S�P�e�n�d�i�n�g�)�;�
�
� � � �i�f�(�s�i�z�e�_�n�e�e�d�_�p�e�n�d�i�n�g�>�0�)�
�
� � � � � � �r�e�t�u�r�n�(�t�r�u�e�)�;�
�
�
�
� � � �A�r�r�a�y�R�e�s�i�z�e�(�S�P�e�n�d�i�n�g�,�s�i�z�e�_�n�e�e�d�_�p�e�n�d�i�n�g�+�2�)�;�
�
�
�
� � � �S�P�e�n�d�i�n�g�[�s�i�z�e�_�n�e�e�d�_�p�e�n�d�i�n�g�]�.�p�e�n�d�i�n�g�_�t�y�p�e�=�O�R�D�E�R�_�T�Y�P�E�_�B�U�Y�_�S�T�O�P�;�
�
� � � �S�P�e�n�d�i�n�g�[�s�i�z�e�_�n�e�e�d�_�p�e�n�d�i�n�g�]�.�i�n�d�e�n�t�=�m�_�p�e�n�d�i�n�g�_�i�n�d�e�n�t�;�
�
� � � �i�f�(�I�n�p�P�e�n�d�i�n�g�E�x�p�i�r�a�t�i�o�n�>�0�)�
�
� � � � � � �S�P�e�n�d�i�n�g�[�s�i�z�e�_�n�e�e�d�_�p�e�n�d�i�n�g�]�.�e�x�p�i�r�a�t�i�o�n�=�(�l�o�n�g�)�(�I�n�p�P�e�n�d�i�n�g�E�x�p�i�r�a�t�i�o�n�*�6�0�)�;�
�
� � � �i�f�(�I�n�p�P�r�i�n�t�L�o�g�)�
�
� � � � � � �P�r�i�n�t�(�_�_�F�I�L�E�_�_�,�"� �"�,�_�_�F�U�N�C�T�I�O�N�_�_�,�"�,� �O�K�:� �"�,�"�S�i�g�n�a�l� �B�U�Y� �S�T�O�P�"�)�;�
�
�
�
� � � �S�P�e�n�d�i�n�g�[�s�i�z�e�_�n�e�e�d�_�p�e�n�d�i�n�g�+�1�]�.�p�e�n�d�i�n�g�_�t�y�p�e�=�O�R�D�E�R�_�T�Y�P�E�_�S�E�L�L�_�S�T�O�P�;�
�
� � � �S�P�e�n�d�i�n�g�[�s�i�z�e�_�n�e�e�d�_�p�e�n�d�i�n�g�+�1�]�.�i�n�d�e�n�t�=�m�_�p�e�n�d�i�n�g�_�i�n�d�e�n�t�;�
�
� � � �i�f�(�I�n�p�P�e�n�d�i�n�g�E�x�p�i�r�a�t�i�o�n�>�0�)�
�
� � � � � � �S�P�e�n�d�i�n�g�[�s�i�z�e�_�n�e�e�d�_�p�e�n�d�i�n�g�+�1�]�.�e�x�p�i�r�a�t�i�o�n�=�(�l�o�n�g�)�(�I�n�p�P�e�n�d�i�n�g�E�x�p�i�r�a�t�i�o�n�*�6�0�)�;�
�
� � � �i�f�(�I�n�p�P�r�i�n�t�L�o�g�)�
�
� � � � � � �P�r�i�n�t�(�_�_�F�I�L�E�_�_�,�"� �"�,�_�_�F�U�N�C�T�I�O�N�_�_�,�"�,� �O�K�:� �"�,�"�S�i�g�n�a�l� �S�E�L�L� �S�T�O�P�"�)�;�
�
�/�/�-�-�-�
�
� � � �r�e�t�u�r�n�(�t�r�u�e�)�;�
�
� � �}�
�
�/�/�+�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�+�
�
�/�/�|� �D�e�l�e�t�e� �a�l�l� �p�e�n�d�i�n�g� �o�r�d�e�r�s� � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � �|�
�
�/�/�+�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�+�
�
�v�o�i�d� �D�e�l�e�t�e�A�l�l�P�e�n�d�i�n�g�O�r�d�e�r�s�(�c�o�n�s�t� �d�o�u�b�l�e� �l�e�v�e�l�)�
�
� � �{�
�
� � � �f�o�r�(�i�n�t� �i�=�O�r�d�e�r�s�T�o�t�a�l�(�)�-�1�;� �i�>�=�0�;� �i�-�-�)� �/�/� �r�e�t�u�r�n�s� �t�h�e� �n�u�m�b�e�r� �o�f� �c�u�r�r�e�n�t� �o�r�d�e�r�s�
�
� � � � � � �i�f�(�m�_�o�r�d�e�r�.�S�e�l�e�c�t�B�y�I�n�d�e�x�(�i�)�)� � � � � �/�/� �s�e�l�e�c�t�s� �t�h�e� �p�e�n�d�i�n�g� �o�r�d�e�r� �b�y� �i�n�d�e�x� �f�o�r� �f�u�r�t�h�e�r� �a�c�c�e�s�s� �t�o� �i�t�s� �p�r�o�p�e�r�t�i�e�s�
�
� � � � � � � � � �i�f�(�m�_�o�r�d�e�r�.�S�y�m�b�o�l�(�)�=�=�m�_�s�y�m�b�o�l�.�N�a�m�e�(�)� �&�&� �m�_�o�r�d�e�r�.�M�a�g�i�c�(�)�=�=�I�n�p�M�a�g�i�c�)�
�
� � � � � � � � � � � �{�
�
� � � � � � � � � � � � �i�f�(�m�_�o�r�d�e�r�.�O�r�d�e�r�T�y�p�e�(�)�=�=�O�R�D�E�R�_�T�Y�P�E�_�B�U�Y�_�L�I�M�I�T�)�
�
� � � � � � � � � � � � � � �{�
�
� � � � � � � � � � � � � � � �i�f�(�m�_�s�y�m�b�o�l�.�A�s�k�(�)�-�m�_�o�r�d�e�r�.�P�r�i�c�e�O�p�e�n�(�)�>�=�l�e�v�e�l�)�
�
� � � � � � � � � � � � � � � � � � �i�f�(�!�m�_�t�r�a�d�e�.�O�r�d�e�r�D�e�l�e�t�e�(�m�_�o�r�d�e�r�.�T�i�c�k�e�t�(�)�)�)�
�
� � � � � � � � � � � � � � � � � � � � � �i�f�(�I�n�p�P�r�i�n�t�L�o�g�)�
�
� � � � � � � � � � � � � � � � � � � � � � � � �P�r�i�n�t�(�_�_�F�I�L�E�_�_�,�"� �"�,�_�_�F�U�N�C�T�I�O�N�_�_�,�"�,� �E�R�R�O�R�:� �"�,�"�C�T�r�a�d�e�.�O�r�d�e�r�D�e�l�e�t�e� �"�,�m�_�o�r�d�e�r�.�T�i�c�k�e�t�(�)�)�;�
�
� � � � � � � � � � � � � � � �c�o�n�t�i�n�u�e�;�
�
� � � � � � � � � � � � � � �}�
�
� � � � � � � � � � � � �i�f�(�m�_�o�r�d�e�r�.�O�r�d�e�r�T�y�p�e�(�)�=�=�O�R�D�E�R�_�T�Y�P�E�_�B�U�Y�_�S�T�O�P�)�
�
� � � � � � � � � � � � � � �{�
�
� � � � � � � � � � � � � � � �i�f�(�m�_�o�r�d�e�r�.�P�r�i�c�e�O�p�e�n�(�)�-�m�_�s�y�m�b�o�l�.�A�s�k�(�)�>�=�l�e�v�e�l�)�
�
� � � � � � � � � � � � � � � � � � �i�f�(�!�m�_�t�r�a�d�e�.�O�r�d�e�r�D�e�l�e�t�e�(�m�_�o�r�d�e�r�.�T�i�c�k�e�t�(�)�)�)�
�
� � � � � � � � � � � � � � � � � � � � � �i�f�(�I�n�p�P�r�i�n�t�L�o�g�)�
�
� � � � � � � � � � � � � � � � � � � � � � � � �P�r�i�n�t�(�_�_�F�I�L�E�_�_�,�"� �"�,�_�_�F�U�N�C�T�I�O�N�_�_�,�"�,� �E�R�R�O�R�:� �"�,�"�C�T�r�a�d�e�.�O�r�d�e�r�D�e�l�e�t�e� �"�,�m�_�o�r�d�e�r�.�T�i�c�k�e�t�(�)�)�;�
�
� � � � � � � � � � � � � � � �c�o�n�t�i�n�u�e�;�
�
� � � � � � � � � � � � � � �}�
�
� � � � � � � � � � � � �i�f�(�m�_�o�r�d�e�r�.�O�r�d�e�r�T�y�p�e�(�)�=�=�O�R�D�E�R�_�T�Y�P�E�_�S�E�L�L�_�L�I�M�I�T�)�
�
� � � � � � � � � � � � � � �{�
�
� � � � � � � � � � � � � � � �i�f�(�m�_�o�r�d�e�r�.�P�r�i�c�e�O�p�e�n�(�)�-�m�_�s�y�m�b�o�l�.�B�i�d�(�)�>�=�l�e�v�e�l�)�
�
� � � � � � � � � � � � � � � � � � �i�f�(�!�m�_�t�r�a�d�e�.�O�r�d�e�r�D�e�l�e�t�e�(�m�_�o�r�d�e�r�.�T�i�c�k�e�t�(�)�)�)�
�
� � � � � � � � � � � � � � � � � � � � � �i�f�(�I�n�p�P�r�i�n�t�L�o�g�)�
�
� � � � � � � � � � � � � � � � � � � � � � � � �P�r�i�n�t�(�_�_�F�I�L�E�_�_�,�"� �"�,�_�_�F�U�N�C�T�I�O�N�_�_�,�"�,� �E�R�R�O�R�:� �"�,�"�C�T�r�a�d�e�.�O�r�d�e�r�D�e�l�e�t�e� �"�,�m�_�o�r�d�e�r�.�T�i�c�k�e�t�(�)�)�;�
�
� � � � � � � � � � � � � � � �c�o�n�t�i�n�u�e�;�
�
� � � � � � � � � � � � � � �}�
�
� � � � � � � � � � � � �i�f�(�m�_�o�r�d�e�r�.�O�r�d�e�r�T�y�p�e�(�)�=�=�O�R�D�E�R�_�T�Y�P�E�_�S�E�L�L�_�S�T�O�P�)�
�
� � � � � � � � � � � � � � �{�
�
� � � � � � � � � � � � � � � �i�f�(�m�_�s�y�m�b�o�l�.�B�i�d�(�)�-�m�_�o�r�d�e�r�.�P�r�i�c�e�O�p�e�n�(�)�>�=�l�e�v�e�l�)�
�
� � � � � � � � � � � � � � � � � � �i�f�(�!�m�_�t�r�a�d�e�.�O�r�d�e�r�D�e�l�e�t�e�(�m�_�o�r�d�e�r�.�T�i�c�k�e�t�(�)�)�)�
�
� � � � � � � � � � � � � � � � � � � � � �i�f�(�I�n�p�P�r�i�n�t�L�o�g�)�
�
� � � � � � � � � � � � � � � � � � � � � � � � �P�r�i�n�t�(�_�_�F�I�L�E�_�_�,�"� �"�,�_�_�F�U�N�C�T�I�O�N�_�_�,�"�,� �E�R�R�O�R�:� �"�,�"�C�T�r�a�d�e�.�O�r�d�e�r�D�e�l�e�t�e� �"�,�m�_�o�r�d�e�r�.�T�i�c�k�e�t�(�)�)�;�
�
� � � � � � � � � � � � � � � �c�o�n�t�i�n�u�e�;�
�
� � � � � � � � � � � � � � �}�
�
� � � � � � � � � � � �}�
�
� � �}�
�
�/�/�+�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�+�
�
�/�/�|� �I�s� �p�e�n�d�i�n�g� �o�r�d�e�r�s� �e�x�i�s�t�s� � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � �|�
�
�/�/�+�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�+�
�
�b�o�o�l� �I�s�P�e�n�d�i�n�g�O�r�d�e�r�s�E�x�i�s�t�s�(�v�o�i�d�)�
�
� � �{�
�
� � � �f�o�r�(�i�n�t� �i�=�O�r�d�e�r�s�T�o�t�a�l�(�)�-�1�;� �i�>�=�0�;� �i�-�-�)� �/�/� �r�e�t�u�r�n�s� �t�h�e� �n�u�m�b�e�r� �o�f� �c�u�r�r�e�n�t� �o�r�d�e�r�s�
�
� � � � � � �i�f�(�m�_�o�r�d�e�r�.�S�e�l�e�c�t�B�y�I�n�d�e�x�(�i�)�)� � � � � �/�/� �s�e�l�e�c�t�s� �t�h�e� �p�e�n�d�i�n�g� �o�r�d�e�r� �b�y� �i�n�d�e�x� �f�o�r� �f�u�r�t�h�e�r� �a�c�c�e�s�s� �t�o� �i�t�s� �p�r�o�p�e�r�t�i�e�s�
�
� � � � � � � � � �i�f�(�m�_�o�r�d�e�r�.�S�y�m�b�o�l�(�)�=�=�m�_�s�y�m�b�o�l�.�N�a�m�e�(�)� �&�&� �m�_�o�r�d�e�r�.�M�a�g�i�c�(�)�=�=�I�n�p�M�a�g�i�c�)�
�
� � � � � � � � � � � � �r�e�t�u�r�n�(�t�r�u�e�)�;�
�
�/�/�-�-�-�
�
� � � �r�e�t�u�r�n�(�f�a�l�s�e�)�;�
�
� � �}�
�
�/�/�+�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�+�
�
�/�/�|� �P�l�a�c�e� �O�r�d�e�r�s� � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � �|�
�
�/�/�+�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�+�
�
�v�o�i�d� �P�l�a�c�e�O�r�d�e�r�s�(�c�o�n�s�t� �i�n�t� �i�n�d�e�x�,�c�o�n�s�t� �d�o�u�b�l�e� �l�e�v�e�l�)�
�
� � �{�
�
�/�/�-�-�-� �c�h�e�c�k� �F�r�e�e�z�e� �a�n�d� �S�t�o�p�s� �l�e�v�e�l�s�
�
� � � �/�*�
�
� � � � � � �T�y�p�e� �o�f� �o�r�d�e�r�/�p�o�s�i�t�i�o�n� � �|� � �A�c�t�i�v�a�t�i�o�n� �p�r�i�c�e� � �|� � �C�h�e�c�k�
�
� � � � � � �-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�|�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�|�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�
�
� � � � � � �B�u�y� �L�i�m�i�t� �o�r�d�e�r� � � � � � � � � �|� � �A�s�k� � � � � � � � � � � � � � � �|� � �A�s�k�-�O�p�e�n�P�r�i�c�e� � �>�=� �S�Y�M�B�O�L�_�T�R�A�D�E�_�F�R�E�E�Z�E�_�L�E�V�E�L�
�
� � � � � � �B�u�y� �S�t�o�p� �o�r�d�e�r� � � � � � � � � � �|� � �A�s�k� � � � � � � � � � � � � � � �|� � �O�p�e�n�P�r�i�c�e�-�A�s�k� � �>�=� �S�Y�M�B�O�L�_�T�R�A�D�E�_�F�R�E�E�Z�E�_�L�E�V�E�L�
�
� � � � � � �S�e�l�l� �L�i�m�i�t� �o�r�d�e�r� � � � � � � � �|� � �B�i�d� � � � � � � � � � � � � � � �|� � �O�p�e�n�P�r�i�c�e�-�B�i�d� � �>�=� �S�Y�M�B�O�L�_�T�R�A�D�E�_�F�R�E�E�Z�E�_�L�E�V�E�L�
�
� � � � � � �S�e�l�l� �S�t�o�p� �o�r�d�e�r� � � � � � � � � �|� � �B�i�d� � � � � � � � � � � � � � � �|� � �B�i�d�-�O�p�e�n�P�r�i�c�e� � �>�=� �S�Y�M�B�O�L�_�T�R�A�D�E�_�F�R�E�E�Z�E�_�L�E�V�E�L�
�
� � � � � � �B�u�y� �p�o�s�i�t�i�o�n� � � � � � � � � � � � �|� � �B�i�d� � � � � � � � � � � � � � � �|� � �T�a�k�e�P�r�o�f�i�t�-�B�i�d� �>�=� �S�Y�M�B�O�L�_�T�R�A�D�E�_�F�R�E�E�Z�E�_�L�E�V�E�L�
�
� � � � � � � � � � � � � � � � � � � � � � � � � � � � � � �|� � � � � � � � � � � � � � � � � � � � �|� � �B�i�d�-�S�t�o�p�L�o�s�s� � � �>�=� �S�Y�M�B�O�L�_�T�R�A�D�E�_�F�R�E�E�Z�E�_�L�E�V�E�L�
�
� � � � � � �S�e�l�l� �p�o�s�i�t�i�o�n� � � � � � � � � � � �|� � �A�s�k� � � � � � � � � � � � � � � �|� � �A�s�k�-�T�a�k�e�P�r�o�f�i�t� �>�=� �S�Y�M�B�O�L�_�T�R�A�D�E�_�F�R�E�E�Z�E�_�L�E�V�E�L�
�
� � � � � � � � � � � � � � � � � � � � � � � � � � � � � � �|� � � � � � � � � � � � � � � � � � � � �|� � �S�t�o�p�L�o�s�s�-�A�s�k� � � �>�=� �S�Y�M�B�O�L�_�T�R�A�D�E�_�F�R�E�E�Z�E�_�L�E�V�E�L�
�
�
�
� � � � � � �B�u�y�i�n�g� �i�s� �d�o�n�e� �a�t� �t�h�e� �A�s�k� �p�r�i�c�e� � � � � � � � � � � � � � � � � �|� � �S�e�l�l�i�n�g� �i�s� �d�o�n�e� �a�t� �t�h�e� �B�i�d� �p�r�i�c�e�
�
� � � � � � �-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�|�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�
�
� � � � � � �T�a�k�e�P�r�o�f�i�t� � � � � � � � �>�=� �B�i�d� � � � � � � � � � � � � � � � � � � � � � � � �|� � �T�a�k�e�P�r�o�f�i�t� � � � � � � � �<�=� �A�s�k�
�
� � � � � � �S�t�o�p�L�o�s�s� � � � � � � � � � �<�=� �B�i�d� � � � � � � � � � � � � � � � � � � � � � � � �|� � �S�t�o�p�L�o�s�s� � � � � � � � � � �>�=� �A�s�k�
�
� � � � � � �T�a�k�e�P�r�o�f�i�t� �-� �B�i�d� � �>�=� �S�Y�M�B�O�L�_�T�R�A�D�E�_�S�T�O�P�S�_�L�E�V�E�L� � � �|� � �A�s�k� �-� �T�a�k�e�P�r�o�f�i�t� � �>�=� �S�Y�M�B�O�L�_�T�R�A�D�E�_�S�T�O�P�S�_�L�E�V�E�L�
�
� � � � � � �B�i�d� �-� �S�t�o�p�L�o�s�s� � � � �>�=� �S�Y�M�B�O�L�_�T�R�A�D�E�_�S�T�O�P�S�_�L�E�V�E�L� � � �|� � �S�t�o�p�L�o�s�s� �-� �A�s�k� � � � �>�=� �S�Y�M�B�O�L�_�T�R�A�D�E�_�S�T�O�P�S�_�L�E�V�E�L�
�
� � � �*�/�
�
� � � �d�o�u�b�l�e� �s�p�r�e�a�d�=�m�_�s�y�m�b�o�l�.�A�s�k�(�)�-�m�_�s�y�m�b�o�l�.�B�i�d�(�)�;�
�
� � � �i�f�(�s�p�r�e�a�d�>�m�_�m�a�x�_�s�p�r�e�a�d�)�
�
� � � � � �{�
�
� � � � � � �m�_�w�a�i�t�i�n�g�_�p�e�n�d�i�n�g�_�o�r�d�e�r�=�f�a�l�s�e�;�
�
� � � � � � �i�f�(�I�n�p�P�r�i�n�t�L�o�g�)�
�
� � � � � � � � � �P�r�i�n�t�(�_�_�F�I�L�E�_�_�,�"� �"�,�_�_�F�U�N�C�T�I�O�N�_�_�,�
�
� � � � � � � � � � � � � � � �"�,� �E�R�R�O�R�:� �"�,�"�S�p�r�e�a�d� �A�s�k�-�B�i�d� �(�"�,�D�o�u�b�l�e�T�o�S�t�r�i�n�g�(�s�p�r�e�a�d�,�m�_�s�y�m�b�o�l�.�D�i�g�i�t�s�(�)�)�,�"�)�"�,�
�
� � � � � � � � � � � � � � � �"� �>� �M�a�x�i�m�u�m� �s�p�r�e�a�d� �(�"�,�D�o�u�b�l�e�T�o�S�t�r�i�n�g�(�m�_�m�a�x�_�s�p�r�e�a�d�,�m�_�s�y�m�b�o�l�.�D�i�g�i�t�s�(�)�)�,�"�)�"�)�;�
�
� � � � � � �r�e�t�u�r�n�;�
�
� � � � � �}�
�
�/�/�-�-�-� �b�u�y� �s�t�o�p�
�
� � � �i�f�(�S�P�e�n�d�i�n�g�[�i�n�d�e�x�]�.�p�e�n�d�i�n�g�_�t�y�p�e�=�=�O�R�D�E�R�_�T�Y�P�E�_�B�U�Y�_�S�T�O�P�)�
�
� � � � � �{�
�
� � � � � � �i�f�(�S�P�e�n�d�i�n�g�[�i�n�d�e�x�]�.�p�r�i�c�e�=�=�0�.�0�)�
�
� � � � � � � � � �S�P�e�n�d�i�n�g�[�i�n�d�e�x�]�.�p�r�i�c�e�=�m�_�s�y�m�b�o�l�.�A�s�k�(�)�+�m�_�p�e�n�d�i�n�g�_�i�n�d�e�n�t�;�
�
� � � � � � �i�f�(�S�P�e�n�d�i�n�g�[�i�n�d�e�x�]�.�p�r�i�c�e�-�m�_�s�y�m�b�o�l�.�A�s�k�(�)�<�l�e�v�e�l�)� �/�/� �c�h�e�c�k� �p�r�i�c�e�
�
� � � � � � � � � �S�P�e�n�d�i�n�g�[�i�n�d�e�x�]�.�p�r�i�c�e�=�m�_�s�y�m�b�o�l�.�A�s�k�(�)�+�l�e�v�e�l�;�
�
� � � � � � �S�P�e�n�d�i�n�g�[�i�n�d�e�x�]�.�s�t�o�p�_�l�o�s�s�=�(�m�_�s�t�o�p�_�l�o�s�s�=�=�0�.�0�)�?�0�.�0�:�S�P�e�n�d�i�n�g�[�i�n�d�e�x�]�.�p�r�i�c�e�-�m�_�s�t�o�p�_�l�o�s�s�;�
�
� � � � � � �S�P�e�n�d�i�n�g�[�i�n�d�e�x�]�.�t�a�k�e�_�p�r�o�f�i�t�=�(�m�_�t�a�k�e�_�p�r�o�f�i�t�=�=�0�.�0�)�?�0�.�0�:�S�P�e�n�d�i�n�g�[�i�n�d�e�x�]�.�p�r�i�c�e�+�m�_�t�a�k�e�_�p�r�o�f�i�t�;�
�
� � � � � � �d�o�u�b�l�e� �s�l�=�S�P�e�n�d�i�n�g�[�i�n�d�e�x�]�.�s�t�o�p�_�l�o�s�s�;�
�
� � � � � � �i�f�(�s�l�<�=�0�.�0�)�/�/� �c�h�e�c�k� �s�l�
�
� � � � � � � � � �s�l�=�0�.�0�;�
�
� � � � � � �e�l�s�e�
�
� � � � � � � � � �i�f�(�S�P�e�n�d�i�n�g�[�i�n�d�e�x�]�.�p�r�i�c�e�-�s�l�<�l�e�v�e�l�)�
�
� � � � � � � � � � � � �s�l�=�S�P�e�n�d�i�n�g�[�i�n�d�e�x�]�.�p�r�i�c�e�-�l�e�v�e�l�;�
�
�
�
� � � � � � �d�o�u�b�l�e� �t�p�=�S�P�e�n�d�i�n�g�[�i�n�d�e�x�]�.�t�a�k�e�_�p�r�o�f�i�t�;�
�
� � � � � � �i�f�(�t�p�<�=�0�.�0�)� �/�/� �c�h�e�c�k� �t�p�
�
� � � � � � � � � �t�p�=�0�.�0�;�
�
� � � � � � �e�l�s�e�
�
� � � � � � � � � �i�f�(�t�p�-�S�P�e�n�d�i�n�g�[�i�n�d�e�x�]�.�p�r�i�c�e�<�l�e�v�e�l�)�
�
� � � � � � � � � � � � �t�p�=�S�P�e�n�d�i�n�g�[�i�n�d�e�x�]�.�p�r�i�c�e�+�l�e�v�e�l�;�
�
�
�
� � � � � � �P�e�n�d�i�n�g�O�r�d�e�r�(�i�n�d�e�x�,�s�l�,�t�p�)�;�
�
� � � � � � �A�r�r�a�y�R�e�m�o�v�e�(�S�P�e�n�d�i�n�g�,�i�n�d�e�x�,�1�)�;�
�
� � � � � � �m�_�w�a�i�t�i�n�g�_�p�e�n�d�i�n�g�_�o�r�d�e�r�=�f�a�l�s�e�;�
�
� � � � � � �r�e�t�u�r�n�;�
�
� � � � � �}�
�
�/�/�-�-�-� �s�e�l�l� �s�t�o�p�
�
� � � �i�f�(�S�P�e�n�d�i�n�g�[�i�n�d�e�x�]�.�p�e�n�d�i�n�g�_�t�y�p�e�=�=�O�R�D�E�R�_�T�Y�P�E�_�S�E�L�L�_�S�T�O�P�)�
�
� � � � � �{�
�
� � � � � � �i�f�(�S�P�e�n�d�i�n�g�[�i�n�d�e�x�]�.�p�r�i�c�e�=�=�0�.�0�)�
�
� � � � � � � � � �S�P�e�n�d�i�n�g�[�i�n�d�e�x�]�.�p�r�i�c�e�=�m�_�s�y�m�b�o�l�.�B�i�d�(�)�-�m�_�p�e�n�d�i�n�g�_�i�n�d�e�n�t�;�
�
� � � � � � �i�f�(�m�_�s�y�m�b�o�l�.�B�i�d�(�)�-�S�P�e�n�d�i�n�g�[�i�n�d�e�x�]�.�p�r�i�c�e�<�l�e�v�e�l�)� �/�/� �c�h�e�c�k� �p�r�i�c�e�
�
� � � � � � � � � �S�P�e�n�d�i�n�g�[�i�n�d�e�x�]�.�p�r�i�c�e�=�m�_�s�y�m�b�o�l�.�B�i�d�(�)�-�l�e�v�e�l�;�
�
� � � � � � �S�P�e�n�d�i�n�g�[�i�n�d�e�x�]�.�s�t�o�p�_�l�o�s�s�=�(�m�_�s�t�o�p�_�l�o�s�s�=�=�0�.�0�)�?�0�.�0�:�S�P�e�n�d�i�n�g�[�i�n�d�e�x�]�.�p�r�i�c�e�+�m�_�s�t�o�p�_�l�o�s�s�;�
�
� � � � � � �S�P�e�n�d�i�n�g�[�i�n�d�e�x�]�.�t�a�k�e�_�p�r�o�f�i�t�=�(�m�_�t�a�k�e�_�p�r�o�f�i�t�=�=�0�.�0�)�?�0�.�0�:�S�P�e�n�d�i�n�g�[�i�n�d�e�x�]�.�p�r�i�c�e�-�m�_�t�a�k�e�_�p�r�o�f�i�t�;�
�
� � � � � � �d�o�u�b�l�e� �s�l�=�S�P�e�n�d�i�n�g�[�i�n�d�e�x�]�.�s�t�o�p�_�l�o�s�s�;�
�
� � � � � � �i�f�(�s�l�<�=�0�.�0�)� �/�/� �c�h�e�c�k� �s�l�
�
� � � � � � � � � �s�l�=�0�.�0�;�
�
� � � � � � �e�l�s�e�
�
� � � � � � � � � �i�f�(�s�l�-�S�P�e�n�d�i�n�g�[�i�n�d�e�x�]�.�p�r�i�c�e�<�l�e�v�e�l�)�
�
� � � � � � � � � � � � �s�l�=�S�P�e�n�d�i�n�g�[�i�n�d�e�x�]�.�p�r�i�c�e�+�l�e�v�e�l�;�
�
�
�
� � � � � � �d�o�u�b�l�e� �t�p�=�S�P�e�n�d�i�n�g�[�i�n�d�e�x�]�.�t�a�k�e�_�p�r�o�f�i�t�;�
�
� � � � � � �i�f�(�t�p�<�=�0�.�0�)� �/�/� �c�h�e�c�k� �t�p�
�
� � � � � � � � � �t�p�=�0�.�0�;�
�
� � � � � � �e�l�s�e�
�
� � � � � � � � � �i�f�(�S�P�e�n�d�i�n�g�[�i�n�d�e�x�]�.�p�r�i�c�e�-�t�p�<�l�e�v�e�l�)�
�
� � � � � � � � � � � � �t�p�=�S�P�e�n�d�i�n�g�[�i�n�d�e�x�]�.�p�r�i�c�e�-�l�e�v�e�l�;�
�
�
�
� � � � � � �P�e�n�d�i�n�g�O�r�d�e�r�(�i�n�d�e�x�,�s�l�,�t�p�)�;�
�
� � � � � � �A�r�r�a�y�R�e�m�o�v�e�(�S�P�e�n�d�i�n�g�,�i�n�d�e�x�,�1�)�;�
�
� � � � � � �m�_�w�a�i�t�i�n�g�_�p�e�n�d�i�n�g�_�o�r�d�e�r�=�f�a�l�s�e�;�
�
� � � � � � �r�e�t�u�r�n�;�
�
� � � � � �}�
�
� � �}�
�
�/�/�+�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�+�
�
�/�/�|� �P�e�n�d�i�n�g� �o�r�d�e�r� � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � �|�
�
�/�/�+�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�+�
�
�b�o�o�l� �P�e�n�d�i�n�g�O�r�d�e�r�(�c�o�n�s�t� �i�n�t� �i�n�d�e�x�,�d�o�u�b�l�e� �s�l�,�d�o�u�b�l�e� �t�p�)�
�
� � �{�
�
� � � �s�l�=�m�_�s�y�m�b�o�l�.�N�o�r�m�a�l�i�z�e�P�r�i�c�e�(�s�l�)�;�
�
� � � �t�p�=�m�_�s�y�m�b�o�l�.�N�o�r�m�a�l�i�z�e�P�r�i�c�e�(�t�p�)�;�
�
�/�/�-�-�-� �c�h�e�c�k� �v�o�l�u�m�e� �b�e�f�o�r�e� �O�r�d�e�r�S�e�n�d� �t�o� �a�v�o�i�d� �"�n�o�t� �e�n�o�u�g�h� �m�o�n�e�y�"� �e�r�r�o�r� �(�C�T�r�a�d�e�)�
�
� � � �E�N�U�M�_�O�R�D�E�R�_�T�Y�P�E� �c�h�e�c�k�_�o�r�d�e�r�_�t�y�p�e�=�-�1�;�
�
� � � �s�w�i�t�c�h�(�S�P�e�n�d�i�n�g�[�i�n�d�e�x�]�.�p�e�n�d�i�n�g�_�t�y�p�e�)�
�
� � � � � �{�
�
� � � � � � �c�a�s�e� � �O�R�D�E�R�_�T�Y�P�E�_�B�U�Y�:�
�
� � � � � � � � � �c�h�e�c�k�_�o�r�d�e�r�_�t�y�p�e�=�O�R�D�E�R�_�T�Y�P�E�_�B�U�Y�;�
�
� � � � � � � � � �b�r�e�a�k�;�
�
� � � � � � �c�a�s�e� �O�R�D�E�R�_�T�Y�P�E�_�S�E�L�L�:�
�
� � � � � � � � � �c�h�e�c�k�_�o�r�d�e�r�_�t�y�p�e�=�O�R�D�E�R�_�T�Y�P�E�_�S�E�L�L�;�
�
� � � � � � � � � �b�r�e�a�k�;�
�
� � � � � � �c�a�s�e� �O�R�D�E�R�_�T�Y�P�E�_�B�U�Y�_�L�I�M�I�T�:�
�
� � � � � � � � � �c�h�e�c�k�_�o�r�d�e�r�_�t�y�p�e�=�O�R�D�E�R�_�T�Y�P�E�_�B�U�Y�;�
�
� � � � � � � � � �b�r�e�a�k�;�
�
� � � � � � �c�a�s�e� �O�R�D�E�R�_�T�Y�P�E�_�S�E�L�L�_�L�I�M�I�T�:�
�
� � � � � � � � � �c�h�e�c�k�_�o�r�d�e�r�_�t�y�p�e�=�O�R�D�E�R�_�T�Y�P�E�_�S�E�L�L�;�
�
� � � � � � � � � �b�r�e�a�k�;�
�
� � � � � � �c�a�s�e� �O�R�D�E�R�_�T�Y�P�E�_�B�U�Y�_�S�T�O�P�:�
�
� � � � � � � � � �c�h�e�c�k�_�o�r�d�e�r�_�t�y�p�e�=�O�R�D�E�R�_�T�Y�P�E�_�B�U�Y�;�
�
� � � � � � � � � �b�r�e�a�k�;�
�
� � � � � � �c�a�s�e� �O�R�D�E�R�_�T�Y�P�E�_�S�E�L�L�_�S�T�O�P�:�
�
� � � � � � � � � �c�h�e�c�k�_�o�r�d�e�r�_�t�y�p�e�=�O�R�D�E�R�_�T�Y�P�E�_�S�E�L�L�;�
�
� � � � � � � � � �b�r�e�a�k�;�
�
� � � � � � �d�e�f�a�u�l�t�:�
�
� � � � � � � � � �r�e�t�u�r�n�(�f�a�l�s�e�)�;�
�
� � � � � � � � � �b�r�e�a�k�;�
�
� � � � � �}�
�
�/�/�-�-�-�
�
� � � �d�o�u�b�l�e� �l�o�n�g�_�l�o�t�=�0�.�0�;�
�
� � � �d�o�u�b�l�e� �s�h�o�r�t�_�l�o�t�=�0�.�0�;�
�
� � � �i�f�(�I�n�p�L�o�t�O�r�R�i�s�k�=�=�r�i�s�k�)�
�
� � � � � �{�
�
� � � � � � �b�o�o�l� �e�r�r�o�r�=�f�a�l�s�e�;�
�
� � � � � � �l�o�n�g�_�l�o�t�=�m�_�m�o�n�e�y�.�C�h�e�c�k�O�p�e�n�L�o�n�g�(�m�_�s�y�m�b�o�l�.�A�s�k�(�)�,�s�l�)�;�
�
� � � � � � �i�f�(�I�n�p�P�r�i�n�t�L�o�g�)�
�
� � � � � � � � � �P�r�i�n�t�(�_�_�F�I�L�E�_�_�,�"� �"�,�_�_�F�U�N�C�T�I�O�N�_�_�,�"�,� �O�K�:� �"�,�"�s�l�=�"�,�D�o�u�b�l�e�T�o�S�t�r�i�n�g�(�s�l�,�m�_�s�y�m�b�o�l�.�D�i�g�i�t�s�(�)�)�,�
�
� � � � � � � � � � � � � � � �"�,� �C�h�e�c�k�O�p�e�n�L�o�n�g�:� �"�,�D�o�u�b�l�e�T�o�S�t�r�i�n�g�(�l�o�n�g�_�l�o�t�,�2�)�,�
�
� � � � � � � � � � � � � � � �"�,� �B�a�l�a�n�c�e�:� �"�,� � � � �D�o�u�b�l�e�T�o�S�t�r�i�n�g�(�m�_�a�c�c�o�u�n�t�.�B�a�l�a�n�c�e�(�)�,�2�)�,�
�
� � � � � � � � � � � � � � � �"�,� �E�q�u�i�t�y�:� �"�,� � � � � �D�o�u�b�l�e�T�o�S�t�r�i�n�g�(�m�_�a�c�c�o�u�n�t�.�E�q�u�i�t�y�(�)�,�2�)�,�
�
� � � � � � � � � � � � � � � �"�,� �F�r�e�e�M�a�r�g�i�n�:� �"�,� �D�o�u�b�l�e�T�o�S�t�r�i�n�g�(�m�_�a�c�c�o�u�n�t�.�F�r�e�e�M�a�r�g�i�n�(�)�,�2�)�)�;�
�
� � � � � � �i�f�(�l�o�n�g�_�l�o�t�=�=�0�.�0�)�
�
� � � � � � � � �{�
�
� � � � � � � � � �i�f�(�I�n�p�P�r�i�n�t�L�o�g�)�
�
� � � � � � � � � � � � �P�r�i�n�t�(�_�_�F�I�L�E�_�_�,�"� �"�,�_�_�F�U�N�C�T�I�O�N�_�_�,�"�,� �E�R�R�O�R�:� �"�,�"�C�M�o�n�e�y�F�i�x�e�d�M�a�r�g�i�n�.�C�h�e�c�k�O�p�e�n�L�o�n�g� �r�e�t�u�r�n�e�d� �t�h�e� �v�a�l�u�e� �o�f� �\�"�0�.�0�\�"�"�)�;�
�
� � � � � � � � � �e�r�r�o�r�=�t�r�u�e�;�
�
� � � � � � � � �}�
�
� � � � � � �/�/�-�-�-�
�
� � � � � � �s�h�o�r�t�_�l�o�t�=�m�_�m�o�n�e�y�.�C�h�e�c�k�O�p�e�n�S�h�o�r�t�(�m�_�s�y�m�b�o�l�.�B�i�d�(�)�,�s�l�)�;�
�
� � � � � � �i�f�(�I�n�p�P�r�i�n�t�L�o�g�)�
�
� � � � � � � � � �P�r�i�n�t�(�_�_�F�I�L�E�_�_�,�"� �"�,�_�_�F�U�N�C�T�I�O�N�_�_�,�"�,� �O�K�:� �"�,�"�s�l�=�"�,�D�o�u�b�l�e�T�o�S�t�r�i�n�g�(�s�l�,�m�_�s�y�m�b�o�l�.�D�i�g�i�t�s�(�)�)�,�
�
� � � � � � � � � � � � � � � �"�,� �C�h�e�c�k�O�p�e�n�L�o�n�g�:� �"�,�D�o�u�b�l�e�T�o�S�t�r�i�n�g�(�s�h�o�r�t�_�l�o�t�,�2�)�,�
�
� � � � � � � � � � � � � � � �"�,� �B�a�l�a�n�c�e�:� �"�,� � � � �D�o�u�b�l�e�T�o�S�t�r�i�n�g�(�m�_�a�c�c�o�u�n�t�.�B�a�l�a�n�c�e�(�)�,�2�)�,�
�
� � � � � � � � � � � � � � � �"�,� �E�q�u�i�t�y�:� �"�,� � � � � �D�o�u�b�l�e�T�o�S�t�r�i�n�g�(�m�_�a�c�c�o�u�n�t�.�E�q�u�i�t�y�(�)�,�2�)�,�
�
� � � � � � � � � � � � � � � �"�,� �F�r�e�e�M�a�r�g�i�n�:� �"�,� �D�o�u�b�l�e�T�o�S�t�r�i�n�g�(�m�_�a�c�c�o�u�n�t�.�F�r�e�e�M�a�r�g�i�n�(�)�,�2�)�)�;�
�
� � � � � � �i�f�(�s�h�o�r�t�_�l�o�t�=�=�0�.�0�)�
�
� � � � � � � � �{�
�
� � � � � � � � � �i�f�(�I�n�p�P�r�i�n�t�L�o�g�)�
�
� � � � � � � � � � � � �P�r�i�n�t�(�_�_�F�I�L�E�_�_�,�"� �"�,�_�_�F�U�N�C�T�I�O�N�_�_�,�"�,� �E�R�R�O�R�:� �"�,�"�C�M�o�n�e�y�F�i�x�e�d�M�a�r�g�i�n�.�C�h�e�c�k�O�p�e�n�S�h�o�r�t� �r�e�t�u�r�n�e�d� �t�h�e� �v�a�l�u�e� �o�f� �\�"�0�.�0�\�"�"�)�;�
�
� � � � � � � � � �e�r�r�o�r�=�t�r�u�e�;�
�
� � � � � � � � �}�
�
� � � � � � �/�/�-�-�-�
�
� � � � � � �i�f�(�e�r�r�o�r�)�
�
� � � � � � � � � �r�e�t�u�r�n�(�f�a�l�s�e�)�;�
�
� � � � � �}�
�
� � � �e�l�s�e�
�
� � � � � � �i�f�(�I�n�p�L�o�t�O�r�R�i�s�k�=�=�l�o�t�)�
�
� � � � � � � � �{�
�
� � � � � � � � � �l�o�n�g�_�l�o�t�=�I�n�p�V�o�l�u�m�e�L�o�t�O�r�R�i�s�k�;�
�
� � � � � � � � � �s�h�o�r�t�_�l�o�t�=�I�n�p�V�o�l�u�m�e�L�o�t�O�r�R�i�s�k�;�
�
� � � � � � � � �}�
�
� � � � � � �e�l�s�e�
�
� � � � � � � � � �i�f�(�I�n�p�L�o�t�O�r�R�i�s�k�=�=�l�o�t�s�_�m�i�n�)�
�
� � � � � � � � � � � �{�
�
� � � � � � � � � � � � �l�o�n�g�_�l�o�t�=�m�_�s�y�m�b�o�l�.�L�o�t�s�M�i�n�(�)�;�
�
� � � � � � � � � � � � �s�h�o�r�t�_�l�o�t�=�m�_�s�y�m�b�o�l�.�L�o�t�s�M�i�n�(�)�;�
�
� � � � � � � � � � � �}�
�
� � � � � � � � � �e�l�s�e�
�
� � � � � � � � � � � � �r�e�t�u�r�n�(�f�a�l�s�e�)�;�
�
�/�/�-�-�-� �c�h�e�c�k� �v�o�l�u�m�e� �b�e�f�o�r�e� �O�r�d�e�r�S�e�n�d� �t�o� �a�v�o�i�d� �"�n�o�t� �e�n�o�u�g�h� �m�o�n�e�y�"� �e�r�r�o�r� �(�C�T�r�a�d�e�)�
�
� � � �d�o�u�b�l�e� �c�h�e�c�k�_�p�r�i�c�e�=�0�;�
�
� � � �d�o�u�b�l�e� �c�h�e�c�k�_�l�o�t�=�0�;�
�
� � � �i�f�(�c�h�e�c�k�_�o�r�d�e�r�_�t�y�p�e�=�=�O�R�D�E�R�_�T�Y�P�E�_�B�U�Y�)�
�
� � � � � �{�
�
� � � � � � �c�h�e�c�k�_�p�r�i�c�e�=�m�_�s�y�m�b�o�l�.�A�s�k�(�)�;�
�
� � � � � � �c�h�e�c�k�_�l�o�t�=�l�o�n�g�_�l�o�t�;�
�
� � � � � �}�
�
� � � �e�l�s�e�
�
� � � � � �{�
�
� � � � � � �c�h�e�c�k�_�p�r�i�c�e�=�m�_�s�y�m�b�o�l�.�B�i�d�(�)�;�
�
� � � � � � �c�h�e�c�k�_�l�o�t�=�s�h�o�r�t�_�l�o�t�;�
�
� � � � � �}�
�
�/�/�-�-�-�
�
� � � �i�f�(�m�_�s�y�m�b�o�l�.�L�o�t�s�L�i�m�i�t�(�)�>�0�.�0�)�
�
� � � � � �{�
�
� � � � � � �d�o�u�b�l�e� �v�o�l�u�m�e�_�b�u�y�s� � � � � � � � �=� �0�.�0�;�
�
� � � � � � �d�o�u�b�l�e� �v�o�l�u�m�e�_�s�e�l�l�s� � � � � � � �=� �0�.�0�;�
�
� � � � � � �d�o�u�b�l�e� �v�o�l�u�m�e�_�b�u�y�_�l�i�m�i�t�s� � �=� �0�.�0�;�
�
� � � � � � �d�o�u�b�l�e� �v�o�l�u�m�e�_�s�e�l�l�_�l�i�m�i�t�s� �=� �0�.�0�;�
�
� � � � � � �d�o�u�b�l�e� �v�o�l�u�m�e�_�b�u�y�_�s�t�o�p�s� � � �=� �0�.�0�;�
�
� � � � � � �d�o�u�b�l�e� �v�o�l�u�m�e�_�s�e�l�l�_�s�t�o�p�s� � �=� �0�.�0�;�
�
� � � � � � �C�a�l�c�u�l�a�t�e�A�l�l�V�o�l�u�m�e�s�(�v�o�l�u�m�e�_�b�u�y�s�,�v�o�l�u�m�e�_�s�e�l�l�s�,�
�
� � � � � � � � � � � � � � � � � � � � � � � � � � �v�o�l�u�m�e�_�b�u�y�_�l�i�m�i�t�s�,�v�o�l�u�m�e�_�s�e�l�l�_�l�i�m�i�t�s�,�
�
� � � � � � � � � � � � � � � � � � � � � � � � � � �v�o�l�u�m�e�_�b�u�y�_�s�t�o�p�s�,�v�o�l�u�m�e�_�s�e�l�l�_�s�t�o�p�s�)�;�
�
� � � � � � �i�f�(�v�o�l�u�m�e�_�b�u�y�s�+�v�o�l�u�m�e�_�s�e�l�l�s�+�
�
� � � � � � � � � �v�o�l�u�m�e�_�b�u�y�_�l�i�m�i�t�s�+�v�o�l�u�m�e�_�s�e�l�l�_�l�i�m�i�t�s�+�
�
� � � � � � � � � �v�o�l�u�m�e�_�b�u�y�_�s�t�o�p�s�+�v�o�l�u�m�e�_�s�e�l�l�_�s�t�o�p�s�+�c�h�e�c�k�_�l�o�t�>�m�_�s�y�m�b�o�l�.�L�o�t�s�L�i�m�i�t�(�)�)�
�
� � � � � � � � �{�
�
� � � � � � � � � �i�f�(�I�n�p�P�r�i�n�t�L�o�g�)�
�
� � � � � � � � � � � � �P�r�i�n�t�(�_�_�F�I�L�E�_�_�,�"� �"�,�_�_�F�U�N�C�T�I�O�N�_�_�,�"�,� �E�R�R�O�R�:� �"�,�"�#�0� �,�"�,�E�n�u�m�T�o�S�t�r�i�n�g�(�S�P�e�n�d�i�n�g�[�i�n�d�e�x�]�.�p�e�n�d�i�n�g�_�t�y�p�e�)�,�"�,� �"�,�
�
� � � � � � � � � � � � � � � � � � �"�V�o�l�u�m�e� �B�u�y�'�s� �(�"�,�D�o�u�b�l�e�T�o�S�t�r�i�n�g�(�v�o�l�u�m�e�_�b�u�y�s�,�2�)�,�"�)�"�,�
�
� � � � � � � � � � � � � � � � � � �"�V�o�l�u�m�e� �S�e�l�l�'�s� �(�"�,�D�o�u�b�l�e�T�o�S�t�r�i�n�g�(�v�o�l�u�m�e�_�s�e�l�l�s�,�2�)�,�"�)�"�,�
�
� � � � � � � � � � � � � � � � � � �"�V�o�l�u�m�e� �B�u�y� �l�i�m�i�t�'�s� �(�"�,�D�o�u�b�l�e�T�o�S�t�r�i�n�g�(�v�o�l�u�m�e�_�b�u�y�_�l�i�m�i�t�s�,�2�)�,�"�)�"�,�
�
� � � � � � � � � � � � � � � � � � �"�V�o�l�u�m�e� �S�e�l�l� �l�i�m�i�t�'�s� �(�"�,�D�o�u�b�l�e�T�o�S�t�r�i�n�g�(�v�o�l�u�m�e�_�s�e�l�l�_�l�i�m�i�t�s�,�2�)�,�"�)�"�,�
�
� � � � � � � � � � � � � � � � � � �"�V�o�l�u�m�e� �B�u�y� �s�t�o�p�s�'�s� �(�"�,�D�o�u�b�l�e�T�o�S�t�r�i�n�g�(�v�o�l�u�m�e�_�b�u�y�_�s�t�o�p�s�,�2�)�,�"�)�"�,�
�
� � � � � � � � � � � � � � � � � � �"�V�o�l�u�m�e� �S�e�l�l� �s�t�o�p�s�'�s� �(�"�,�D�o�u�b�l�e�T�o�S�t�r�i�n�g�(�v�o�l�u�m�e�_�s�e�l�l�_�s�t�o�p�s�,�2�)�,�"�)�"�,�
�
� � � � � � � � � � � � � � � � � � �"�C�h�e�c�k� �l�o�t� �(�"�,�D�o�u�b�l�e�T�o�S�t�r�i�n�g�(�c�h�e�c�k�_�l�o�t�,�2�)�,�"�)�"�,�
�
� � � � � � � � � � � � � � � � � � �"� �>� �L�o�t�s� �L�i�m�i�t� �(�"�,�D�o�u�b�l�e�T�o�S�t�r�i�n�g�(�m�_�s�y�m�b�o�l�.�L�o�t�s�L�i�m�i�t�(�)�,�2�)�,�"�)�"�)�;�
�
� � � � � � � � � �r�e�t�u�r�n�(�f�a�l�s�e�)�;�
�
� � � � � � � � �}�
�
� � � � � �}�
�
�/�/�-�-�-� �c�h�e�c�k� �m�a�x�i�m�a�l� �n�u�m�b�e�r� �o�f� �a�l�l�o�w�e�d� �p�e�n�d�i�n�g� �o�r�d�e�r�s�
�
� � � �i�n�t� �a�c�c�o�u�n�t�_�l�i�m�i�t�_�o�r�d�e�r�s�=�m�_�a�c�c�o�u�n�t�.�L�i�m�i�t�O�r�d�e�r�s�(�)�;�
�
� � � �i�f�(�a�c�c�o�u�n�t�_�l�i�m�i�t�_�o�r�d�e�r�s�>�0�)�
�
� � � � � �{�
�
� � � � � � �i�n�t� �a�l�l�_�p�e�n�d�i�n�g�_�o�r�d�e�r�s�=�C�a�l�c�u�l�a�t�e�A�l�l�P�e�n�d�i�n�g�O�r�d�e�r�s�(�)�;�
�
� � � � � � �/�*�
�
� � � � � � � � � � � � �t�h�e�r�e� �i�s� �8�,� � �a�n�d� �t�h�e�r�e� �w�i�l�l� �b�e� � �9� �>� �r�e�s�t�r�i�c�t�i�o�n� �1�0� �-�>� �O�K�
�
� � � � � � � � � � � � �t�h�e�r�e� �i�s� �9�,� � �a�n�d� �t�h�e�r�e� �w�i�l�l� �b�e� �1�0� �>� �r�e�s�t�r�i�c�t�i�o�n� �1�0� �-�>� �O�K�
�
� � � � � � � � � � � � �t�h�e�r�e� �i�s� �1�0�,� �a�n�d� �t�h�e�r�e� �w�i�l�l� �b�e� �1�1� �>� �r�e�s�t�r�i�c�t�i�o�n� �1�0� �-�>� �E�R�R�O�R�
�
� � � � � � �*�/�
�
� � � � � � �i�f�(�a�l�l�_�p�e�n�d�i�n�g�_�o�r�d�e�r�s�+�1�>�a�c�c�o�u�n�t�_�l�i�m�i�t�_�o�r�d�e�r�s�)�
�
� � � � � � � � � �r�e�t�u�r�n�(�f�a�l�s�e�)�;�
�
� � � � � �}�
�
�/�/�-�-�-� �c�h�e�c�k� �v�o�l�u�m�e� �b�e�f�o�r�e� �O�r�d�e�r�S�e�n�d� �t�o� �a�v�o�i�d� �"�n�o�t� �e�n�o�u�g�h� �m�o�n�e�y�"� �e�r�r�o�r� �(�C�T�r�a�d�e�)�
�
� � � �d�o�u�b�l�e� �f�r�e�e�_�m�a�r�g�i�n�_�c�h�e�c�k�=�m�_�a�c�c�o�u�n�t�.�F�r�e�e�M�a�r�g�i�n�C�h�e�c�k�(�m�_�s�y�m�b�o�l�.�N�a�m�e�(�)�,�
�
� � � � � � � � � � � � � � � � � � � � � � � � � � � � �c�h�e�c�k�_�o�r�d�e�r�_�t�y�p�e�,�c�h�e�c�k�_�l�o�t�,�c�h�e�c�k�_�p�r�i�c�e�)�;�
�
� � � �d�o�u�b�l�e� �m�a�r�g�i�n�_�c�h�e�c�k�=�m�_�a�c�c�o�u�n�t�.�M�a�r�g�i�n�C�h�e�c�k�(�m�_�s�y�m�b�o�l�.�N�a�m�e�(�)�,�
�
� � � � � � � � � � � � � � � � � � � � � � � �c�h�e�c�k�_�o�r�d�e�r�_�t�y�p�e�,�c�h�e�c�k�_�l�o�t�,�S�P�e�n�d�i�n�g�[�i�n�d�e�x�]�.�p�r�i�c�e�)�;�
�
� � � �i�f�(�f�r�e�e�_�m�a�r�g�i�n�_�c�h�e�c�k�>�m�a�r�g�i�n�_�c�h�e�c�k�)�
�
� � � � � �{�
�
� � � � � � �b�o�o�l� �r�e�s�u�l�t�=�f�a�l�s�e�;�
�
� � � � � � �i�f�(�S�P�e�n�d�i�n�g�[�i�n�d�e�x�]�.�e�x�p�i�r�a�t�i�o�n�>�0�)�
�
� � � � � � � � �{�
�
� � � � � � � � � �d�a�t�e�t�i�m�e� �t�i�m�e�_�e�x�p�i�r�a�t�i�o�n�=�T�i�m�e�C�u�r�r�e�n�t�(�)�+�(�d�a�t�e�t�i�m�e�)�S�P�e�n�d�i�n�g�[�i�n�d�e�x�]�.�e�x�p�i�r�a�t�i�o�n�;�
�
� � � � � � � � � �r�e�s�u�l�t�=�m�_�t�r�a�d�e�.�O�r�d�e�r�O�p�e�n�(�m�_�s�y�m�b�o�l�.�N�a�m�e�(�)�,�
�
� � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � �S�P�e�n�d�i�n�g�[�i�n�d�e�x�]�.�p�e�n�d�i�n�g�_�t�y�p�e�,�c�h�e�c�k�_�l�o�t�,�0�.�0�,�
�
� � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � �m�_�s�y�m�b�o�l�.�N�o�r�m�a�l�i�z�e�P�r�i�c�e�(�S�P�e�n�d�i�n�g�[�i�n�d�e�x�]�.�p�r�i�c�e�)�,�
�
� � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � �m�_�s�y�m�b�o�l�.�N�o�r�m�a�l�i�z�e�P�r�i�c�e�(�s�l�)�,�
�
� � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � �m�_�s�y�m�b�o�l�.�N�o�r�m�a�l�i�z�e�P�r�i�c�e�(�t�p�)�,�
�
� � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � �O�R�D�E�R�_�T�I�M�E�_�S�P�E�C�I�F�I�E�D�,�
�
� � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � �t�i�m�e�_�e�x�p�i�r�a�t�i�o�n�)�;�
�
� � � � � � � � �}�
�
� � � � � � �e�l�s�e�
�
� � � � � � � � �{�
�
� � � � � � � � � �r�e�s�u�l�t�=�m�_�t�r�a�d�e�.�O�r�d�e�r�O�p�e�n�(�m�_�s�y�m�b�o�l�.�N�a�m�e�(�)�,�
�
� � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � �S�P�e�n�d�i�n�g�[�i�n�d�e�x�]�.�p�e�n�d�i�n�g�_�t�y�p�e�,�c�h�e�c�k�_�l�o�t�,�0�.�0�,�
�
� � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � �m�_�s�y�m�b�o�l�.�N�o�r�m�a�l�i�z�e�P�r�i�c�e�(�S�P�e�n�d�i�n�g�[�i�n�d�e�x�]�.�p�r�i�c�e�)�,�
�
� � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � �m�_�s�y�m�b�o�l�.�N�o�r�m�a�l�i�z�e�P�r�i�c�e�(�s�l�)�,�
�
� � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � �m�_�s�y�m�b�o�l�.�N�o�r�m�a�l�i�z�e�P�r�i�c�e�(�t�p�)�)�;�
�
� � � � � � � � �}�
�
�
�
� � � � � � �i�f�(�r�e�s�u�l�t�)�
�
� � � � � � � � �{�
�
� � � � � � � � � �i�f�(�m�_�t�r�a�d�e�.�R�e�s�u�l�t�O�r�d�e�r�(�)�=�=�0�)�
�
� � � � � � � � � � � �{�
�
� � � � � � � � � � � � �i�f�(�I�n�p�P�r�i�n�t�L�o�g�)�
�
� � � � � � � � � � � � � � � �P�r�i�n�t�(�_�_�F�I�L�E�_�_�,�"� �"�,�_�_�F�U�N�C�T�I�O�N�_�_�,�"�,� �E�R�R�O�R�:� �"�,�"�#�1� �"�,�E�n�u�m�T�o�S�t�r�i�n�g�(�S�P�e�n�d�i�n�g�[�i�n�d�e�x�]�.�p�e�n�d�i�n�g�_�t�y�p�e�)�,�"� �-�>� �f�a�l�s�e�.� �R�e�s�u�l�t� �R�e�t�c�o�d�e�:� �"�,�m�_�t�r�a�d�e�.�R�e�s�u�l�t�R�e�t�c�o�d�e�(�)�,�
�
� � � � � � � � � � � � � � � � � � � � � �"�,� �d�e�s�c�r�i�p�t�i�o�n� �o�f� �r�e�s�u�l�t�:� �"�,�m�_�t�r�a�d�e�.�R�e�s�u�l�t�R�e�t�c�o�d�e�D�e�s�c�r�i�p�t�i�o�n�(�)�)�;�
�
� � � � � � � � � � � � �i�f�(�I�n�p�P�r�i�n�t�L�o�g�)�
�
� � � � � � � � � � � � � � � �P�r�i�n�t�R�e�s�u�l�t�T�r�a�d�e�(�m�_�t�r�a�d�e�,�m�_�s�y�m�b�o�l�)�;�
�
� � � � � � � � � � � � �r�e�t�u�r�n�(�f�a�l�s�e�)�;�
�
� � � � � � � � � � � �}�
�
� � � � � � � � � �e�l�s�e�
�
� � � � � � � � � � � �{�
�
� � � � � � � � � � � � �i�f�(�I�n�p�P�r�i�n�t�L�o�g�)�
�
� � � � � � � � � � � � � � � �P�r�i�n�t�(�_�_�F�I�L�E�_�_�,�"� �"�,�_�_�F�U�N�C�T�I�O�N�_�_�,�"�,� �O�K�:� �"�,�"�#�2� �"�,�E�n�u�m�T�o�S�t�r�i�n�g�(�S�P�e�n�d�i�n�g�[�i�n�d�e�x�]�.�p�e�n�d�i�n�g�_�t�y�p�e�)�,�"� �-�>� �t�r�u�e�.� �R�e�s�u�l�t� �R�e�t�c�o�d�e�:� �"�,�m�_�t�r�a�d�e�.�R�e�s�u�l�t�R�e�t�c�o�d�e�(�)�,�
�
� � � � � � � � � � � � � � � � � � � � � �"�,� �d�e�s�c�r�i�p�t�i�o�n� �o�f� �r�e�s�u�l�t�:� �"�,�m�_�t�r�a�d�e�.�R�e�s�u�l�t�R�e�t�c�o�d�e�D�e�s�c�r�i�p�t�i�o�n�(�)�)�;�
�
� � � � � � � � � � � � �i�f�(�I�n�p�P�r�i�n�t�L�o�g�)�
�
� � � � � � � � � � � � � � � �P�r�i�n�t�R�e�s�u�l�t�T�r�a�d�e�(�m�_�t�r�a�d�e�,�m�_�s�y�m�b�o�l�)�;�
�
� � � � � � � � � � � � �r�e�t�u�r�n�(�t�r�u�e�)�;�
�
� � � � � � � � � � � �}�
�
� � � � � � � � �}�
�
� � � � � � �e�l�s�e�
�
� � � � � � � � �{�
�
� � � � � � � � � �i�f�(�I�n�p�P�r�i�n�t�L�o�g�)�
�
� � � � � � � � � � � � �P�r�i�n�t�(�_�_�F�I�L�E�_�_�,�"� �"�,�_�_�F�U�N�C�T�I�O�N�_�_�,�"�,� �E�R�R�O�R�:� �"�,�"�#�3� �"�,�E�n�u�m�T�o�S�t�r�i�n�g�(�S�P�e�n�d�i�n�g�[�i�n�d�e�x�]�.�p�e�n�d�i�n�g�_�t�y�p�e�)�,�"� �-�>� �f�a�l�s�e�.� �R�e�s�u�l�t� �R�e�t�c�o�d�e�:� �"�,�m�_�t�r�a�d�e�.�R�e�s�u�l�t�R�e�t�c�o�d�e�(�)�,�
�
� � � � � � � � � � � � � � � � � � �"�,� �d�e�s�c�r�i�p�t�i�o�n� �o�f� �r�e�s�u�l�t�:� �"�,�m�_�t�r�a�d�e�.�R�e�s�u�l�t�R�e�t�c�o�d�e�D�e�s�c�r�i�p�t�i�o�n�(�)�)�;�
�
� � � � � � � � � �i�f�(�I�n�p�P�r�i�n�t�L�o�g�)�
�
� � � � � � � � � � � � �P�r�i�n�t�R�e�s�u�l�t�T�r�a�d�e�(�m�_�t�r�a�d�e�,�m�_�s�y�m�b�o�l�)�;�
�
� � � � � � � � � �r�e�t�u�r�n�(�f�a�l�s�e�)�;�
�
� � � � � � � � �}�
�
� � � � � �}�
�
� � � �e�l�s�e�
�
� � � � � �{�
�
� � � � � � �i�f�(�I�n�p�P�r�i�n�t�L�o�g�)�
�
� � � � � � � � � �P�r�i�n�t�(�_�_�F�I�L�E�_�_�,�"� �"�,�_�_�F�U�N�C�T�I�O�N�_�_�,�"�,� �E�R�R�O�R�:� �C�A�c�c�o�u�n�t�I�n�f�o�.�F�r�e�e�M�a�r�g�i�n�C�h�e�c�k� �r�e�t�u�r�n�e�d� �t�h�e� �v�a�l�u�e� �"�,�D�o�u�b�l�e�T�o�S�t�r�i�n�g�(�f�r�e�e�_�m�a�r�g�i�n�_�c�h�e�c�k�,�2�)�)�;�
�
� � � � � � �r�e�t�u�r�n�(�f�a�l�s�e�)�;�
�
� � � � � �}�
�
�/�/�-�-�-�
�
� � � �r�e�t�u�r�n�(�f�a�l�s�e�)�;�
�
� � �}�
�
�/�/�+�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�+�
�
�/�/�|� �C�a�l�c�u�l�a�t�e� �a�l�l� �v�o�l�u�m�e�s� � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � �|�
�
�/�/�+�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�+�
�
�v�o�i�d� �C�a�l�c�u�l�a�t�e�A�l�l�V�o�l�u�m�e�s�(�d�o�u�b�l�e� �&�v�o�l�u�m�n�e�_�b�u�y�s�,�d�o�u�b�l�e� �&�v�o�l�u�m�n�e�_�s�e�l�l�s�,�
�
� � � � � � � � � � � � � � � � � � � � � � � � � �d�o�u�b�l�e� �&�v�o�l�u�m�n�e�_�b�u�y�_�l�i�m�i�t�s�,�d�o�u�b�l�e� �&�v�o�l�u�m�n�e�_�s�e�l�l�_�l�i�m�i�t�s�,�
�
� � � � � � � � � � � � � � � � � � � � � � � � � �d�o�u�b�l�e� �&�v�o�l�u�m�n�e�_�b�u�y�_�s�t�o�p�s�,�d�o�u�b�l�e� �&�v�o�l�u�m�n�e�_�s�e�l�l�_�s�t�o�p�s�)�
�
� � �{�
�
� � � �v�o�l�u�m�n�e�_�b�u�y�s� � � � � � � � � �=� �0�.�0�;�
�
� � � �v�o�l�u�m�n�e�_�s�e�l�l�s� � � � � � � � �=� �0�.�0�;�
�
� � � �v�o�l�u�m�n�e�_�b�u�y�_�l�i�m�i�t�s� � � �=� �0�.�0�;�
�
� � � �v�o�l�u�m�n�e�_�s�e�l�l�_�l�i�m�i�t�s� � �=� �0�.�0�;�
�
� � � �v�o�l�u�m�n�e�_�b�u�y�_�s�t�o�p�s� � � � �=� �0�.�0�;�
�
� � � �v�o�l�u�m�n�e�_�s�e�l�l�_�s�t�o�p�s� � � �=� �0�.�0�;�
�
�
�
� � � �f�o�r�(�i�n�t� �i�=�P�o�s�i�t�i�o�n�s�T�o�t�a�l�(�)�-�1�;� �i�>�=�0�;� �i�-�-�)�
�
� � � � � � �i�f�(�m�_�p�o�s�i�t�i�o�n�.�S�e�l�e�c�t�B�y�I�n�d�e�x�(�i�)�)� �/�/� �s�e�l�e�c�t�s� �t�h�e� �p�o�s�i�t�i�o�n� �b�y� �i�n�d�e�x� �f�o�r� �f�u�r�t�h�e�r� �a�c�c�e�s�s� �t�o� �i�t�s� �p�r�o�p�e�r�t�i�e�s�
�
� � � � � � � � � �i�f�(�m�_�p�o�s�i�t�i�o�n�.�S�y�m�b�o�l�(�)�=�=�m�_�s�y�m�b�o�l�.�N�a�m�e�(�)�)�
�
� � � � � � � � � � � �{�
�
� � � � � � � � � � � � �i�f�(�m�_�p�o�s�i�t�i�o�n�.�P�o�s�i�t�i�o�n�T�y�p�e�(�)�=�=�P�O�S�I�T�I�O�N�_�T�Y�P�E�_�B�U�Y�)�
�
� � � � � � � � � � � � � � � �v�o�l�u�m�n�e�_�b�u�y�s�+�=�m�_�p�o�s�i�t�i�o�n�.�V�o�l�u�m�e�(�)�;�
�
� � � � � � � � � � � � �e�l�s�e�
�
� � � � � � � � � � � � � � � �i�f�(�m�_�p�o�s�i�t�i�o�n�.�P�o�s�i�t�i�o�n�T�y�p�e�(�)�=�=�P�O�S�I�T�I�O�N�_�T�Y�P�E�_�S�E�L�L�)�
�
� � � � � � � � � � � � � � � � � � �v�o�l�u�m�n�e�_�s�e�l�l�s�+�=�m�_�p�o�s�i�t�i�o�n�.�V�o�l�u�m�e�(�)�;�
�
� � � � � � � � � � � �}�
�
�
�
� � � �f�o�r�(�i�n�t� �i�=�O�r�d�e�r�s�T�o�t�a�l�(�)�-�1�;� �i�>�=�0�;� �i�-�-�)� �/�/� �r�e�t�u�r�n�s� �t�h�e� �n�u�m�b�e�r� �o�f� �c�u�r�r�e�n�t� �o�r�d�e�r�s�
�
� � � � � � �i�f�(�m�_�o�r�d�e�r�.�S�e�l�e�c�t�B�y�I�n�d�e�x�(�i�)�)� �/�/� �s�e�l�e�c�t�s� �t�h�e� �p�e�n�d�i�n�g� �o�r�d�e�r� �b�y� �i�n�d�e�x� �f�o�r� �f�u�r�t�h�e�r� �a�c�c�e�s�s� �t�o� �i�t�s� �p�r�o�p�e�r�t�i�e�s�
�
� � � � � � � � � �i�f�(�m�_�o�r�d�e�r�.�S�y�m�b�o�l�(�)�=�=�m�_�s�y�m�b�o�l�.�N�a�m�e�(�)�)�
�
� � � � � � � � � � � �{�
�
� � � � � � � � � � � � �i�f�(�m�_�o�r�d�e�r�.�O�r�d�e�r�T�y�p�e�(�)�=�=�O�R�D�E�R�_�T�Y�P�E�_�B�U�Y�_�L�I�M�I�T�)�
�
� � � � � � � � � � � � � � � �v�o�l�u�m�n�e�_�b�u�y�_�l�i�m�i�t�s�+�=�m�_�o�r�d�e�r�.�V�o�l�u�m�e�I�n�i�t�i�a�l�(�)�;�
�
� � � � � � � � � � � � �e�l�s�e�
�
� � � � � � � � � � � � � � � �i�f�(�m�_�o�r�d�e�r�.�O�r�d�e�r�T�y�p�e�(�)�=�=�O�R�D�E�R�_�T�Y�P�E�_�S�E�L�L�_�L�I�M�I�T�)�
�
� � � � � � � � � � � � � � � � � � �v�o�l�u�m�n�e�_�s�e�l�l�_�l�i�m�i�t�s�+�=�m�_�o�r�d�e�r�.�V�o�l�u�m�e�I�n�i�t�i�a�l�(�)�;�
�
� � � � � � � � � � � � � � � �e�l�s�e�
�
� � � � � � � � � � � � � � � � � � �i�f�(�m�_�o�r�d�e�r�.�O�r�d�e�r�T�y�p�e�(�)�=�=�O�R�D�E�R�_�T�Y�P�E�_�B�U�Y�_�S�T�O�P�)�
�
� � � � � � � � � � � � � � � � � � � � � �v�o�l�u�m�n�e�_�b�u�y�_�s�t�o�p�s�+�=�m�_�o�r�d�e�r�.�V�o�l�u�m�e�I�n�i�t�i�a�l�(�)�;�
�
� � � � � � � � � � � � � � � � � � �e�l�s�e�
�
� � � � � � � � � � � � � � � � � � � � � �i�f�(�m�_�o�r�d�e�r�.�O�r�d�e�r�T�y�p�e�(�)�=�=�O�R�D�E�R�_�T�Y�P�E�_�S�E�L�L�_�S�T�O�P�)�
�
� � � � � � � � � � � � � � � � � � � � � � � � �v�o�l�u�m�n�e�_�s�e�l�l�_�s�t�o�p�s�+�=�m�_�o�r�d�e�r�.�V�o�l�u�m�e�I�n�i�t�i�a�l�(�)�;�
�
� � � � � � � � � � � �}�
�
� � �}�
�
�/�/�+�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�+�
�
�/�/�|� �I�s� �p�o�s�i�t�i�o�n� �e�x�i�s�t�s� � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � �|�
�
�/�/�+�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�+�
�
�b�o�o�l� �I�s�P�o�s�i�t�i�o�n�E�x�i�s�t�s�(�v�o�i�d�)�
�
� � �{�
�
� � � �f�o�r�(�i�n�t� �i�=�P�o�s�i�t�i�o�n�s�T�o�t�a�l�(�)�-�1�;� �i�>�=�0�;� �i�-�-�)�
�
� � � � � � �i�f�(�m�_�p�o�s�i�t�i�o�n�.�S�e�l�e�c�t�B�y�I�n�d�e�x�(�i�)�)� �/�/� �s�e�l�e�c�t�s� �t�h�e� �p�o�s�i�t�i�o�n� �b�y� �i�n�d�e�x� �f�o�r� �f�u�r�t�h�e�r� �a�c�c�e�s�s� �t�o� �i�t�s� �p�r�o�p�e�r�t�i�e�s�
�
� � � � � � � � � �i�f�(�m�_�p�o�s�i�t�i�o�n�.�S�y�m�b�o�l�(�)�=�=�m�_�s�y�m�b�o�l�.�N�a�m�e�(�)� �&�&� �m�_�p�o�s�i�t�i�o�n�.�M�a�g�i�c�(�)�=�=�I�n�p�M�a�g�i�c�)�
�
� � � � � � � � � � � � �r�e�t�u�r�n�(�t�r�u�e�)�;�
�
�/�/�-�-�-�
�
� � � �r�e�t�u�r�n�(�f�a�l�s�e�)�;�
�
� � �}�
�
�/�/�+�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�+�
�
�/�/�|� �C�a�l�c�u�l�a�t�e� �a�l�l� �p�e�n�d�i�n�g� �o�r�d�e�r�s� � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � �|�
�
�/�/�+�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�+�
�
�i�n�t� �C�a�l�c�u�l�a�t�e�A�l�l�P�e�n�d�i�n�g�O�r�d�e�r�s�(�v�o�i�d�)�
�
� � �{�
�
� � � �i�n�t� �c�o�u�n�t�=�0�;�
�
�
�
� � � �f�o�r�(�i�n�t� �i�=�O�r�d�e�r�s�T�o�t�a�l�(�)�-�1�;� �i�>�=�0�;� �i�-�-�)� �/�/� �r�e�t�u�r�n�s� �t�h�e� �n�u�m�b�e�r� �o�f� �c�u�r�r�e�n�t� �o�r�d�e�r�s�
�
� � � � � � �i�f�(�m�_�o�r�d�e�r�.�S�e�l�e�c�t�B�y�I�n�d�e�x�(�i�)�)� � � � � �/�/� �s�e�l�e�c�t�s� �t�h�e� �p�e�n�d�i�n�g� �o�r�d�e�r� �b�y� �i�n�d�e�x� �f�o�r� �f�u�r�t�h�e�r� �a�c�c�e�s�s� �t�o� �i�t�s� �p�r�o�p�e�r�t�i�e�s�
�
� � � � � � � � � �c�o�u�n�t�+�+�;�
�
�/�/�-�-�-�
�
� � � �r�e�t�u�r�n�(�c�o�u�n�t�)�;�
�
� � �}�
�
�/�/�+�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�+�
�
�/�/�|� �T�i�m�e�C�o�n�t�r�o�l� � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � �|�
�
�/�/�+�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�+�
�
�b�o�o�l� �T�i�m�e�C�o�n�t�r�o�l�H�o�u�r�M�i�n�u�t�e�(�v�o�i�d�)�
�
� � �{�
�
� � � �i�f�(�!�I�n�p�T�i�m�e�C�o�n�t�r�o�l�)�
�
� � � � � � �r�e�t�u�r�n�(�t�r�u�e�)�;�
�
� � � �M�q�l�D�a�t�e�T�i�m�e� �S�T�i�m�e�C�u�r�r�e�n�t�;�
�
� � � �d�a�t�e�t�i�m�e� �t�i�m�e�_�c�u�r�r�e�n�t�=�T�i�m�e�C�u�r�r�e�n�t�(�)�;�
�
� � � �i�f�(�t�i�m�e�_�c�u�r�r�e�n�t�=�=�D�'�1�9�7�0�.�0�1�.�0�1� �0�0�:�0�0�'�)�
�
� � � � � � �r�e�t�u�r�n�(�f�a�l�s�e�)�;�
�
� � � �T�i�m�e�T�o�S�t�r�u�c�t�(�t�i�m�e�_�c�u�r�r�e�n�t�,�S�T�i�m�e�C�u�r�r�e�n�t�)�;�
�
� � � �i�f�(�(�I�n�p�S�t�a�r�t�H�o�u�r�*�6�0�*�6�0�+�I�n�p�S�t�a�r�t�M�i�n�u�t�e�*�6�0�)�<�(�I�n�p�E�n�d�H�o�u�r�*�6�0�*�6�0�+�I�n�p�E�n�d�M�i�n�u�t�e�*�6�0�)�)� �/�/� �i�n�t�r�a�d�a�y� �t�i�m�e� �i�n�t�e�r�v�a�l�
�
� � � � � �{�
�
� � � � � � �/�*�
�
� � � � � � �E�x�a�m�p�l�e�:�
�
� � � � � � �i�n�p�u�t� �u�c�h�a�r� � � � �I�n�p�S�t�a�r�t�H�o�u�r� � � � � � �=� �5�;� � � � � � � � �/�/� �S�t�a�r�t� �h�o�u�r�
�
� � � � � � �i�n�p�u�t� �u�c�h�a�r� � � � �I�n�p�E�n�d�H�o�u�r� � � � � � � � �=� �1�0�;� � � � � � � �/�/� �E�n�d� �h�o�u�r�
�
� � � � � � �0� � �1� � �2� � �3� � �4� � �5� � �6� � �7� � �8� � �9� � �1�0� �1�1� �1�2� �1�3� �1�4� �1�5� �1�6� �1�7� �1�8� �1�9� �2�0� �2�1� �2�2� �2�3� �0� � �1� � �2� � �3� � �4� � �5� � �6� � �7� � �8� � �9� � �1�0� �1�1� �1�2� �1�3� �1�4� �1�5�
�
� � � � � � �_� � �_� � �_� � �_� � �_� � �+� � �+� � �+� � �+� � �+� � �_� � �_� � �_� � �_� � �_� � �_� � �_� � �_� � �_� � �_� � �_� � �_� � �_� � �_� � �_� � �_� � �_� � �_� � �_� � �+� � �+� � �+� � �+� � �+� � �_� � �_� � �_� � �_� � �_� � �_�
�
� � � � � � �*�/�
�
� � � � � � �i�f�(�(�S�T�i�m�e�C�u�r�r�e�n�t�.�h�o�u�r�*�6�0�*�6�0�+�S�T�i�m�e�C�u�r�r�e�n�t�.�m�i�n�*�6�0�>�=�I�n�p�S�t�a�r�t�H�o�u�r�*�6�0�*�6�0�+�I�n�p�S�t�a�r�t�M�i�n�u�t�e�*�6�0�)� �&�&�
�
� � � � � � � � � �(�S�T�i�m�e�C�u�r�r�e�n�t�.�h�o�u�r�*�6�0�*�6�0�+�S�T�i�m�e�C�u�r�r�e�n�t�.�m�i�n�*�6�0�<�I�n�p�E�n�d�H�o�u�r�*�6�0�*�6�0�+�I�n�p�E�n�d�M�i�n�u�t�e�*�6�0�)�)�
�
� � � � � � � � � �r�e�t�u�r�n�(�t�r�u�e�)�;�
�
� � � � � �}�
�
� � � �e�l�s�e�
�
� � � � � � �i�f�(�(�I�n�p�S�t�a�r�t�H�o�u�r�*�6�0�*�6�0�+�I�n�p�S�t�a�r�t�M�i�n�u�t�e�*�6�0�)�>�(�I�n�p�E�n�d�H�o�u�r�*�6�0�*�6�0�+�I�n�p�E�n�d�M�i�n�u�t�e�*�6�0�)�)� �/�/� �t�i�m�e� �i�n�t�e�r�v�a�l� �w�i�t�h� �t�h�e� �t�r�a�n�s�i�t�i�o�n� �i�n� �a� �d�a�y�
�
� � � � � � � � �{�
�
� � � � � � � � � �/�*�
�
� � � � � � � � � �E�x�a�m�p�l�e�:�
�
� � � � � � � � � �i�n�p�u�t� �u�c�h�a�r� � � � �I�n�p�S�t�a�r�t�H�o�u�r� � � � � � �=� �1�0�;� � � � � � � �/�/� �S�t�a�r�t� �h�o�u�r�
�
� � � � � � � � � �i�n�p�u�t� �u�c�h�a�r� � � � �I�n�p�E�n�d�H�o�u�r� � � � � � � � �=� �5�;� � � � � � � � �/�/� �E�n�d� �h�o�u�r�
�
� � � � � � � � � �0� � �1� � �2� � �3� � �4� � �5� � �6� � �7� � �8� � �9� � �1�0� �1�1� �1�2� �1�3� �1�4� �1�5� �1�6� �1�7� �1�8� �1�9� �2�0� �2�1� �2�2� �2�3� �0� � �1� � �2� � �3� � �4� � �5� � �6� � �7� � �8� � �9� � �1�0� �1�1� �1�2� �1�3� �1�4� �1�5�
�
� � � � � � � � � �_� � �_� � �_� � �_� � �_� � �_� � �_� � �_� � �_� � �_� � �+� � �+� � �+� � �+� � �+� � �+� � �+� � �+� � �+� � �+� � �+� � �+� � �+� � �+� � �+� � �+� � �+� � �+� � �+� � �_� � �_� � �_� � �_� � �_� � �+� � �+� � �+� � �+� � �+� � �+�
�
� � � � � � � � � �*�/�
�
� � � � � � � � � �i�f�(�S�T�i�m�e�C�u�r�r�e�n�t�.�h�o�u�r�*�6�0�*�6�0�+�S�T�i�m�e�C�u�r�r�e�n�t�.�m�i�n�*�6�0�>�=�I�n�p�S�t�a�r�t�H�o�u�r�*�6�0�*�6�0�+�I�n�p�S�t�a�r�t�M�i�n�u�t�e�*�6�0� �|�|�
�
� � � � � � � � � � � � �S�T�i�m�e�C�u�r�r�e�n�t�.�h�o�u�r�*�6�0�*�6�0�+�S�T�i�m�e�C�u�r�r�e�n�t�.�m�i�n�*�6�0�<�I�n�p�E�n�d�H�o�u�r�*�6�0�*�6�0�+�I�n�p�E�n�d�M�i�n�u�t�e�*�6�0�)�
�
� � � � � � � � � � � � �r�e�t�u�r�n�(�t�r�u�e�)�;�
�
� � � � � � � � �}�
�
� � � � � � �e�l�s�e�
�
� � � � � � � � � �r�e�t�u�r�n�(�f�a�l�s�e�)�;�
�
�/�/�-�-�-�
�
� � � �r�e�t�u�r�n�(�f�a�l�s�e�)�;�
�
� � �}�
�
�/�/�+�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�+�
�
�

Comments