Range trading according to custom calculations. Version 3.
----------------------------------------------------------------------
-----------------------------------------
----------------------------------------------------------------------
-----------------------------------------