rsx_variation

Download script
Author: © mladen, 2016, MetaQuotes Software Corp.
Price Data Components
11 Views
1 Downloads
0 Favorites
rsx_variation
ÿþ/�/�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�
�
�#�p�r�o�p�e�r�t�y� �c�o�p�y�r�i�g�h�t� �"�©� �m�l�a�d�e�n�,� �2�0�1�6�,� �M�e�t�a�Q�u�o�t�e�s� �S�o�f�t�w�a�r�e� �C�o�r�p�.�"�
�
�#�p�r�o�p�e�r�t�y� �l�i�n�k� � � � � � �"�w�w�w�.�f�o�r�e�x�-�t�s�d�.�c�o�m�,� �w�w�w�.�m�q�l�5�.�c�o�m�"�
�
�/�/�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�
�
�#�p�r�o�p�e�r�t�y� �i�n�d�i�c�a�t�o�r�_�s�e�p�a�r�a�t�e�_�w�i�n�d�o�w�
�
�#�p�r�o�p�e�r�t�y� �i�n�d�i�c�a�t�o�r�_�b�u�f�f�e�r�s� �2�
�
�#�p�r�o�p�e�r�t�y� �i�n�d�i�c�a�t�o�r�_�p�l�o�t�s� � � �1�
�
�#�p�r�o�p�e�r�t�y� �i�n�d�i�c�a�t�o�r�_�l�a�b�e�l�1� � �"�r�s�i�"�
�
�#�p�r�o�p�e�r�t�y� �i�n�d�i�c�a�t�o�r�_�t�y�p�e�1� � � �D�R�A�W�_�C�O�L�O�R�_�L�I�N�E�
�
�#�p�r�o�p�e�r�t�y� �i�n�d�i�c�a�t�o�r�_�c�o�l�o�r�1� � �c�l�r�D�a�r�k�G�r�a�y�,�c�l�r�L�i�m�e�G�r�e�e�n�,�c�l�r�O�r�a�n�g�e�R�e�d�
�
�#�p�r�o�p�e�r�t�y� �i�n�d�i�c�a�t�o�r�_�s�t�y�l�e�1� � �S�T�Y�L�E�_�S�O�L�I�D�
�
�#�p�r�o�p�e�r�t�y� �i�n�d�i�c�a�t�o�r�_�w�i�d�t�h�1� � �2�
�
�
�
�/�/�
�
�/�/�
�
�/�/�
�
�/�/�
�
�/�/�
�
�
�
�e�n�u�m� �e�n�P�r�i�c�e�s�
�
�{�
�
� � � �p�r�_�c�l�o�s�e�,� � � � � � �/�/� �C�l�o�s�e�
�
� � � �p�r�_�o�p�e�n�,� � � � � � � �/�/� �O�p�e�n�
�
� � � �p�r�_�h�i�g�h�,� � � � � � � �/�/� �H�i�g�h�
�
� � � �p�r�_�l�o�w�,� � � � � � � � �/�/� �L�o�w�
�
� � � �p�r�_�m�e�d�i�a�n�,� � � � � �/�/� �M�e�d�i�a�n�
�
� � � �p�r�_�t�y�p�i�c�a�l�,� � � � �/�/� �T�y�p�i�c�a�l�
�
� � � �p�r�_�w�e�i�g�h�t�e�d�,� � � �/�/� �W�e�i�g�h�t�e�d�
�
� � � �p�r�_�a�v�e�r�a�g�e�,� � � � �/�/� �A�v�e�r�a�g�e� �(�h�i�g�h�+�l�o�w�+�o�p�e�n�+�c�l�o�s�e�)�/�4�
�
� � � �p�r�_�m�e�d�i�a�n�b�,� � � � �/�/� �A�v�e�r�a�g�e� �m�e�d�i�a�n� �b�o�d�y� �(�o�p�e�n�+�c�l�o�s�e�)�/�2�
�
� � � �p�r�_�t�b�i�a�s�e�d�,� � � � �/�/� �T�r�e�n�d� �b�i�a�s�e�d� �p�r�i�c�e�
�
� � � �p�r�_�t�b�i�a�s�e�d�2�,� � � �/�/� �T�r�e�n�d� �b�i�a�s�e�d� �(�e�x�t�r�e�m�e�)� �p�r�i�c�e�
�
� � � �p�r�_�h�a�c�l�o�s�e�,� � � � �/�/� �H�e�i�k�e�n� �a�s�h�i� �c�l�o�s�e�
�
� � � �p�r�_�h�a�o�p�e�n� �,� � � � �/�/� �H�e�i�k�e�n� �a�s�h�i� �o�p�e�n�
�
� � � �p�r�_�h�a�h�i�g�h�,� � � � � �/�/� �H�e�i�k�e�n� �a�s�h�i� �h�i�g�h�
�
� � � �p�r�_�h�a�l�o�w�,� � � � � � �/�/� �H�e�i�k�e�n� �a�s�h�i� �l�o�w�
�
� � � �p�r�_�h�a�m�e�d�i�a�n�,� � � �/�/� �H�e�i�k�e�n� �a�s�h�i� �m�e�d�i�a�n�
�
� � � �p�r�_�h�a�t�y�p�i�c�a�l�,� � �/�/� �H�e�i�k�e�n� �a�s�h�i� �t�y�p�i�c�a�l�
�
� � � �p�r�_�h�a�w�e�i�g�h�t�e�d�,� �/�/� �H�e�i�k�e�n� �a�s�h�i� �w�e�i�g�h�t�e�d�
�
� � � �p�r�_�h�a�a�v�e�r�a�g�e�,� � �/�/� �H�e�i�k�e�n� �a�s�h�i� �a�v�e�r�a�g�e�
�
� � � �p�r�_�h�a�m�e�d�i�a�n�b�,� � �/�/� �H�e�i�k�e�n� �a�s�h�i� �m�e�d�i�a�n� �b�o�d�y�
�
� � � �p�r�_�h�a�t�b�i�a�s�e�d�,� � �/�/� �H�e�i�k�e�n� �a�s�h�i� �t�r�e�n�d� �b�i�a�s�e�d� �p�r�i�c�e�
�
� � � �p�r�_�h�a�t�b�i�a�s�e�d�2� � �/�/� �H�e�i�k�e�n� �a�s�h�i� �t�r�e�n�d� �b�i�a�s�e�d� �(�e�x�t�r�e�m�e�)� �p�r�i�c�e�
�
�}�;�
�
�i�n�p�u�t� �i�n�t� � � � � � �R�s�x�P�e�r�i�o�d� � �=� �3�2�;� � � � � � � �/�/� �R�S�X� �p�e�r�i�o�d�
�
�i�n�p�u�t� �i�n�t� � � � � � �M�o�m�P�e�r�i�o�d� � �=� � �4�;� � � � � � � �/�/� �M�o�m�e�n�t�u�m� �p�e�r�i�o�d� �(�1� �f�o�r� �o�r�i�g�i�n�a�l� �r�s�x�)�
�
�i�n�p�u�t� �e�n�P�r�i�c�e�s� �R�s�x�P�r�i�c�e� � � �=� �p�r�_�c�l�o�s�e�;� �/�/� �P�r�i�c�e�
�
�
�
�d�o�u�b�l�e� �r�s�i�[�]�,�r�s�i�c�[�]�;�
�
�
�
�/�/�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�
�
�/�/�
�
�/�/�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�
�
�/�/�
�
�/�/�
�
�/�/�
�
�/�/�
�
�/�/�
�
�
�
�i�n�t� �O�n�I�n�i�t�(�)�
�
�{�
�
� � � �S�e�t�I�n�d�e�x�B�u�f�f�e�r�(�0�,�r�s�i� � �,�I�N�D�I�C�A�T�O�R�_�D�A�T�A�)�;� �
�
� � � �S�e�t�I�n�d�e�x�B�u�f�f�e�r�(�1�,�r�s�i�c� �,�I�N�D�I�C�A�T�O�R�_�C�O�L�O�R�_�I�N�D�E�X�)�;� �
�
� � � � � � �I�n�d�i�c�a�t�o�r�S�e�t�S�t�r�i�n�g�(�I�N�D�I�C�A�T�O�R�_�S�H�O�R�T�N�A�M�E�,�"�R�S�X� �v�a�r�i�a�t�i�o�n� �(�"�+�(�s�t�r�i�n�g�)�R�s�x�P�e�r�i�o�d�+�"�,�"�+�(�s�t�r�i�n�g�)�M�o�m�P�e�r�i�o�d�+�"�)�"�)�;�
�
� � � � � � �
�
� � � �r�e�t�u�r�n�(�0�)�;�
�
�}�
�
�
�
�/�/�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�
�
�/�/�
�
�/�/�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�
�
�/�/�
�
�/�/�
�
�/�/�
�
�/�/�
�
�/�/�
�
�
�
�d�o�u�b�l�e� �w�r�k�B�u�f�f�e�r�[�]�[�1�3�]�;�
�
�i�n�t� �O�n�C�a�l�c�u�l�a�t�e�(�c�o�n�s�t� �i�n�t� �r�a�t�e�s�_�t�o�t�a�l�,�
�
� � � � � � � � � � � � � � � � �c�o�n�s�t� �i�n�t� �p�r�e�v�_�c�a�l�c�u�l�a�t�e�d�,�
�
� � � � � � � � � � � � � � � � �c�o�n�s�t� �d�a�t�e�t�i�m�e�&� �t�i�m�e�[�]�,�
�
� � � � � � � � � � � � � � � � �c�o�n�s�t� �d�o�u�b�l�e�&� �o�p�e�n�[�]�,�
�
� � � � � � � � � � � � � � � � �c�o�n�s�t� �d�o�u�b�l�e�&� �h�i�g�h�[�]�,�
�
� � � � � � � � � � � � � � � � �c�o�n�s�t� �d�o�u�b�l�e�&� �l�o�w�[�]�,�
�
� � � � � � � � � � � � � � � � �c�o�n�s�t� �d�o�u�b�l�e�&� �c�l�o�s�e�[�]�,�
�
� � � � � � � � � � � � � � � � �c�o�n�s�t� �l�o�n�g�&� �t�i�c�k�_�v�o�l�u�m�e�[�]�,�
�
� � � � � � � � � � � � � � � � �c�o�n�s�t� �l�o�n�g�&� �v�o�l�u�m�e�[�]�,�
�
� � � � � � � � � � � � � � � � �c�o�n�s�t� �i�n�t�&� �s�p�r�e�a�d�[�]�)�
�
�{�
�
� � � �i�f� �(�B�a�r�s�(�_�S�y�m�b�o�l�,�_�P�e�r�i�o�d�)�<�r�a�t�e�s�_�t�o�t�a�l�)� �r�e�t�u�r�n�(�-�1�)�;�
�
� � � �i�f� �(�A�r�r�a�y�R�a�n�g�e�(�w�r�k�B�u�f�f�e�r�,�0�)�!�=�r�a�t�e�s�_�t�o�t�a�l�)� �A�r�r�a�y�R�e�s�i�z�e�(�w�r�k�B�u�f�f�e�r�,�r�a�t�e�s�_�t�o�t�a�l�)�;�
�
�
�
� � � �/�/�
�
� � � �/�/�
�
� � � �/�/�
�
� � � �/�/�
�
� � � �/�/�
�
�
�
� � � �d�o�u�b�l�e� �K�g� �=� �(�3�.�0�)�/�(�2�.�0�+�R�s�x�P�e�r�i�o�d�)�,� �H�g� �=� �1�.�0�-�K�g�;�
�
� � � �i�n�t� �m�o�m�P�e�r�i�o�d� �=� �M�a�t�h�M�a�x�(�M�o�m�P�e�r�i�o�d�,�1�)�;�
�
� � � �f�o�r� �(�i�n�t� �i�=�(�i�n�t�)�M�a�t�h�M�a�x�(�p�r�e�v�_�c�a�l�c�u�l�a�t�e�d�-�1�,�0�)�;� �i�<�r�a�t�e�s�_�t�o�t�a�l� �&�&� �!�I�s�S�t�o�p�p�e�d�(�)�;� �i�+�+�)�
�
� � � �{�
�
� � � � � � �f�o�r� �(�i�n�t� �c�=�0�;� �c�<�1�2�;� �c�+�+�)� �w�r�k�B�u�f�f�e�r�[�i�]�[�c�]� �=� �0�;� �w�r�k�B�u�f�f�e�r�[�i�]�[�1�2�]� �=� �g�e�t�P�r�i�c�e�(�R�s�x�P�r�i�c�e�,�o�p�e�n�,�c�l�o�s�e�,�h�i�g�h�,�l�o�w�,�i�,�r�a�t�e�s�_�t�o�t�a�l�)�;�
�
�
�
� � � � � � �/�/�
�
� � � � � � �/�/�
�
� � � � � � �/�/�
�
� � � � � � �/�/�
�
� � � � � � �/�/�
�
� � � � � � �
�
� � � � � � �d�o�u�b�l�e� �r�o�c� �=� �(�i�>�m�o�m�P�e�r�i�o�d�)� �?� �w�r�k�B�u�f�f�e�r�[�i�]�[�1�2�]�-�w�r�k�B�u�f�f�e�r�[�i�-�m�o�m�P�e�r�i�o�d�]�[�1�2�]� �:� �0�;�
�
� � � � � � �d�o�u�b�l�e� �r�o�a� �=� �M�a�t�h�A�b�s�(�r�o�c�)�;�
�
� � � � � � �i�f� �(�i�>�0�)� �f�o�r� �(�i�n�t� �k�=�0�;� �k�<�3�;� �k�+�+�)�
�
� � � � � � �{�
�
� � � � � � � � � �i�n�t� �k�k� �=� �k�*�2�;�
�
� � � � � � � � � � � � �w�r�k�B�u�f�f�e�r�[�i�]�[�k�k�+�0�]� �=� �K�g�*�r�o�c� � � � � � � � � � � � � � � � �+� �H�g�*�w�r�k�B�u�f�f�e�r�[�i�-�1�]�[�k�k�+�0�]�;�
�
� � � � � � � � � � � � �w�r�k�B�u�f�f�e�r�[�i�]�[�k�k�+�1�]� �=� �K�g�*�w�r�k�B�u�f�f�e�r�[�i�]�[�k�k�+�0�]� �+� �H�g�*�w�r�k�B�u�f�f�e�r�[�i�-�1�]�[�k�k�+�1�]�;� �r�o�c� �=� �1�.�5�*�w�r�k�B�u�f�f�e�r�[�i�]�[�k�k�+�0�]� �-� �0�.�5� �*� �w�r�k�B�u�f�f�e�r�[�i�]�[�k�k�+�1�]�;�
�
� � � � � � � � � � � � �w�r�k�B�u�f�f�e�r�[�i�]�[�k�k�+�6�]� �=� �K�g�*�r�o�a� � � � � � � � � � � � � � � � �+� �H�g�*�w�r�k�B�u�f�f�e�r�[�i�-�1�]�[�k�k�+�6�]�;�
�
� � � � � � � � � � � � �w�r�k�B�u�f�f�e�r�[�i�]�[�k�k�+�7�]� �=� �K�g�*�w�r�k�B�u�f�f�e�r�[�i�]�[�k�k�+�6�]� �+� �H�g�*�w�r�k�B�u�f�f�e�r�[�i�-�1�]�[�k�k�+�7�]�;� �r�o�a� �=� �1�.�5�*�w�r�k�B�u�f�f�e�r�[�i�]�[�k�k�+�6�]� �-� �0�.�5� �*� �w�r�k�B�u�f�f�e�r�[�i�]�[�k�k�+�7�]�;�
�
� � � � � � �}�
�
� � � � � � �r�s�i�[�i�]� � �=� �(�r�o�a�!�=�0�)� �?� �M�a�t�h�M�a�x�(�M�a�t�h�M�i�n�(�(�r�o�c�/�r�o�a�+�1�.�0�)�*�5�0�.�0�,�1�0�0�.�0�0�)�,�0�.�0�0�)� �:� �0�;� �
�
� � � � � � �r�s�i�c�[�i�]� �=� �(�i�>�0�)� � � � �?� �(�r�s�i�[�i�]�>�r�s�i�[�i�-�1�]�)� �?� �1� �:� �(�r�s�i�[�i�]�<�r�s�i�[�i�-�1�]�)� �?� �2� �:� �r�s�i�c�[�i�-�1�]� �:� �0�;�
�
� � � �}�
�
� � � �r�e�t�u�r�n�(�r�a�t�e�s�_�t�o�t�a�l�)�;�
�
�}�
�
�
�
�/�/�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�
�
�/�/�
�
�/�/�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�
�
�/�/�
�
�/�/�
�
�/�/�
�
�/�/�
�
�/�/�
�
�/�/�
�
�
�
�#�d�e�f�i�n�e� �p�r�i�c�e�I�n�s�t�a�n�c�e�s� �1�
�
�d�o�u�b�l�e� �w�o�r�k�H�a�[�]�[�p�r�i�c�e�I�n�s�t�a�n�c�e�s�*�4�]�;�
�
�d�o�u�b�l�e� �g�e�t�P�r�i�c�e�(�i�n�t� �t�p�r�i�c�e�,� �c�o�n�s�t� �d�o�u�b�l�e�&� �o�p�e�n�[�]�,� �c�o�n�s�t� �d�o�u�b�l�e�&� �c�l�o�s�e�[�]�,� �c�o�n�s�t� �d�o�u�b�l�e�&� �h�i�g�h�[�]�,� �c�o�n�s�t� �d�o�u�b�l�e�&� �l�o�w�[�]�,� �i�n�t� �i�,�i�n�t� �_�b�a�r�s�,� �i�n�t� �i�n�s�t�a�n�c�e�N�o�=�0�)�
�
�{�
�
� � �i�f� �(�t�p�r�i�c�e�>�=�p�r�_�h�a�c�l�o�s�e�)�
�
� � � �{�
�
� � � � � � �i�f� �(�A�r�r�a�y�R�a�n�g�e�(�w�o�r�k�H�a�,�0�)�!�=� �_�b�a�r�s�)� �A�r�r�a�y�R�e�s�i�z�e�(�w�o�r�k�H�a�,�_�b�a�r�s�)�;� �i�n�s�t�a�n�c�e�N�o�*�=�4�;�
�
� � � � � � � � � �
�
� � � � � � � � � �/�/�
�
� � � � � � � � � �/�/�
�
� � � � � � � � � �/�/�
�
� � � � � � � � � �/�/�
�
� � � � � � � � � �/�/�
�
� � � � � � � � � �
�
� � � � � � � � � �d�o�u�b�l�e� �h�a�O�p�e�n�;�
�
� � � � � � � � � �i�f� �(�i�>�0�)�
�
� � � � � � � � � � � � � � � � �h�a�O�p�e�n� � �=� �(�w�o�r�k�H�a�[�i�-�1�]�[�i�n�s�t�a�n�c�e�N�o�+�2�]� �+� �w�o�r�k�H�a�[�i�-�1�]�[�i�n�s�t�a�n�c�e�N�o�+�3�]�)�/�2�.�0�;�
�
� � � � � � � � � �e�l�s�e� � � �h�a�O�p�e�n� � �=� �(�o�p�e�n�[�i�]�+�c�l�o�s�e�[�i�]�)�/�2�;�
�
� � � � � � � � � �d�o�u�b�l�e� �h�a�C�l�o�s�e� �=� �(�o�p�e�n�[�i�]� �+� �h�i�g�h�[�i�]� �+� �l�o�w�[�i�]� �+� �c�l�o�s�e�[�i�]�)� �/� �4�.�0�;�
�
� � � � � � � � � �d�o�u�b�l�e� �h�a�H�i�g�h� � �=� �M�a�t�h�M�a�x�(�h�i�g�h�[�i�]�,� �M�a�t�h�M�a�x�(�h�a�O�p�e�n�,�h�a�C�l�o�s�e�)�)�;�
�
� � � � � � � � � �d�o�u�b�l�e� �h�a�L�o�w� � � �=� �M�a�t�h�M�i�n�(�l�o�w�[�i�]� �,� �M�a�t�h�M�i�n�(�h�a�O�p�e�n�,�h�a�C�l�o�s�e�)�)�;�
�
�
�
� � � � � � � � � �i�f�(�h�a�O�p�e�n� � �<�h�a�C�l�o�s�e�)� �{� �w�o�r�k�H�a�[�i�]�[�i�n�s�t�a�n�c�e�N�o�+�0�]� �=� �h�a�L�o�w�;� � �w�o�r�k�H�a�[�i�]�[�i�n�s�t�a�n�c�e�N�o�+�1�]� �=� �h�a�H�i�g�h�;� �}� �
�
� � � � � � � � � �e�l�s�e� � � � � � � � � � � � � � � � � �{� �w�o�r�k�H�a�[�i�]�[�i�n�s�t�a�n�c�e�N�o�+�0�]� �=� �h�a�H�i�g�h�;� �w�o�r�k�H�a�[�i�]�[�i�n�s�t�a�n�c�e�N�o�+�1�]� �=� �h�a�L�o�w�;� � �}� �
�
� � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � �w�o�r�k�H�a�[�i�]�[�i�n�s�t�a�n�c�e�N�o�+�2�]� �=� �h�a�O�p�e�n�;�
�
� � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � �w�o�r�k�H�a�[�i�]�[�i�n�s�t�a�n�c�e�N�o�+�3�]� �=� �h�a�C�l�o�s�e�;�
�
� � � � � � � � � �/�/�
�
� � � � � � � � � �/�/�
�
� � � � � � � � � �/�/�
�
� � � � � � � � � �/�/�
�
� � � � � � � � � �/�/�
�
� � � � � � � � � �
�
� � � � � � � � � �s�w�i�t�c�h� �(�t�p�r�i�c�e�)�
�
� � � � � � � � � �{�
�
� � � � � � � � � � � � �c�a�s�e� �p�r�_�h�a�c�l�o�s�e�:� � � � � �r�e�t�u�r�n�(�h�a�C�l�o�s�e�)�;�
�
� � � � � � � � � � � � �c�a�s�e� �p�r�_�h�a�o�p�e�n�:� � � � � � �r�e�t�u�r�n�(�h�a�O�p�e�n�)�;�
�
� � � � � � � � � � � � �c�a�s�e� �p�r�_�h�a�h�i�g�h�:� � � � � � �r�e�t�u�r�n�(�h�a�H�i�g�h�)�;�
�
� � � � � � � � � � � � �c�a�s�e� �p�r�_�h�a�l�o�w�:� � � � � � � �r�e�t�u�r�n�(�h�a�L�o�w�)�;�
�
� � � � � � � � � � � � �c�a�s�e� �p�r�_�h�a�m�e�d�i�a�n�:� � � � �r�e�t�u�r�n�(�(�h�a�H�i�g�h�+�h�a�L�o�w�)�/�2�.�0�)�;�
�
� � � � � � � � � � � � �c�a�s�e� �p�r�_�h�a�m�e�d�i�a�n�b�:� � � �r�e�t�u�r�n�(�(�h�a�O�p�e�n�+�h�a�C�l�o�s�e�)�/�2�.�0�)�;�
�
� � � � � � � � � � � � �c�a�s�e� �p�r�_�h�a�t�y�p�i�c�a�l�:� � � �r�e�t�u�r�n�(�(�h�a�H�i�g�h�+�h�a�L�o�w�+�h�a�C�l�o�s�e�)�/�3�.�0�)�;�
�
� � � � � � � � � � � � �c�a�s�e� �p�r�_�h�a�w�e�i�g�h�t�e�d�:� � �r�e�t�u�r�n�(�(�h�a�H�i�g�h�+�h�a�L�o�w�+�h�a�C�l�o�s�e�+�h�a�C�l�o�s�e�)�/�4�.�0�)�;�
�
� � � � � � � � � � � � �c�a�s�e� �p�r�_�h�a�a�v�e�r�a�g�e�:� � � �r�e�t�u�r�n�(�(�h�a�H�i�g�h�+�h�a�L�o�w�+�h�a�C�l�o�s�e�+�h�a�O�p�e�n�)�/�4�.�0�)�;�
�
� � � � � � � � � � � � �c�a�s�e� �p�r�_�h�a�t�b�i�a�s�e�d�:�
�
� � � � � � � � � � � � � � � �i�f� �(�h�a�C�l�o�s�e�>�h�a�O�p�e�n�)�
�
� � � � � � � � � � � � � � � � � � � � � �r�e�t�u�r�n�(�(�h�a�H�i�g�h�+�h�a�C�l�o�s�e�)�/�2�.�0�)�;�
�
� � � � � � � � � � � � � � � �e�l�s�e� � �r�e�t�u�r�n�(�(�h�a�L�o�w�+�h�a�C�l�o�s�e�)�/�2�.�0�)�;� � � � � � � � �
�
� � � � � � � � � � � � �c�a�s�e� �p�r�_�h�a�t�b�i�a�s�e�d�2�:�
�
� � � � � � � � � � � � � � � �i�f� �(�h�a�C�l�o�s�e�>�h�a�O�p�e�n�)� � �r�e�t�u�r�n�(�h�a�H�i�g�h�)�;�
�
� � � � � � � � � � � � � � � �i�f� �(�h�a�C�l�o�s�e�<�h�a�O�p�e�n�)� � �r�e�t�u�r�n�(�h�a�L�o�w�)�;�
�
� � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � �r�e�t�u�r�n�(�h�a�C�l�o�s�e�)�;� � � � � � � � �
�
� � � � � � � � � �}�
�
� � � �}�
�
� � � �
�
� � � �/�/�
�
� � � �/�/�
�
� � � �/�/�
�
� � � �/�/�
�
� � � �/�/�
�
� � � �
�
� � � �s�w�i�t�c�h� �(�t�p�r�i�c�e�)�
�
� � � �{�
�
� � � � � � �c�a�s�e� �p�r�_�c�l�o�s�e�:� � � � � �r�e�t�u�r�n�(�c�l�o�s�e�[�i�]�)�;�
�
� � � � � � �c�a�s�e� �p�r�_�o�p�e�n�:� � � � � � �r�e�t�u�r�n�(�o�p�e�n�[�i�]�)�;�
�
� � � � � � �c�a�s�e� �p�r�_�h�i�g�h�:� � � � � � �r�e�t�u�r�n�(�h�i�g�h�[�i�]�)�;�
�
� � � � � � �c�a�s�e� �p�r�_�l�o�w�:� � � � � � � �r�e�t�u�r�n�(�l�o�w�[�i�]�)�;�
�
� � � � � � �c�a�s�e� �p�r�_�m�e�d�i�a�n�:� � � � �r�e�t�u�r�n�(�(�h�i�g�h�[�i�]�+�l�o�w�[�i�]�)�/�2�.�0�)�;�
�
� � � � � � �c�a�s�e� �p�r�_�m�e�d�i�a�n�b�:� � � �r�e�t�u�r�n�(�(�o�p�e�n�[�i�]�+�c�l�o�s�e�[�i�]�)�/�2�.�0�)�;�
�
� � � � � � �c�a�s�e� �p�r�_�t�y�p�i�c�a�l�:� � � �r�e�t�u�r�n�(�(�h�i�g�h�[�i�]�+�l�o�w�[�i�]�+�c�l�o�s�e�[�i�]�)�/�3�.�0�)�;�
�
� � � � � � �c�a�s�e� �p�r�_�w�e�i�g�h�t�e�d�:� � �r�e�t�u�r�n�(�(�h�i�g�h�[�i�]�+�l�o�w�[�i�]�+�c�l�o�s�e�[�i�]�+�c�l�o�s�e�[�i�]�)�/�4�.�0�)�;�
�
� � � � � � �c�a�s�e� �p�r�_�a�v�e�r�a�g�e�:� � � �r�e�t�u�r�n�(�(�h�i�g�h�[�i�]�+�l�o�w�[�i�]�+�c�l�o�s�e�[�i�]�+�o�p�e�n�[�i�]�)�/�4�.�0�)�;�
�
� � � � � � �c�a�s�e� �p�r�_�t�b�i�a�s�e�d�:� � � �
�
� � � � � � � � � � � � � � � �i�f� �(�c�l�o�s�e�[�i�]�>�o�p�e�n�[�i�]�)�
�
� � � � � � � � � � � � � � � � � � � � � �r�e�t�u�r�n�(�(�h�i�g�h�[�i�]�+�c�l�o�s�e�[�i�]�)�/�2�.�0�)�;�
�
� � � � � � � � � � � � � � � �e�l�s�e� � �r�e�t�u�r�n�(�(�l�o�w�[�i�]�+�c�l�o�s�e�[�i�]�)�/�2�.�0�)�;� � � � � � � � �
�
� � � � � � �c�a�s�e� �p�r�_�t�b�i�a�s�e�d�2�:� � � �
�
� � � � � � � � � � � � � � � �i�f� �(�c�l�o�s�e�[�i�]�>�o�p�e�n�[�i�]�)� �r�e�t�u�r�n�(�h�i�g�h�[�i�]�)�;�
�
� � � � � � � � � � � � � � � �i�f� �(�c�l�o�s�e�[�i�]�<�o�p�e�n�[�i�]�)� �r�e�t�u�r�n�(�l�o�w�[�i�]�)�;�
�
� � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � �r�e�t�u�r�n�(�c�l�o�s�e�[�i�]�)�;� � � � � � � � �
�
� � � �}�
�
� � � �r�e�t�u�r�n�(�0�)�;�
�
�}�

Comments