TO INSTALL:-

 1. Copy LibSSSRv1.mq4 to your experts\libraries folder
 
 2. Copy LibSSSRv1.mqh to your experts\include folder
 
 3. Open LibSSSRv1.mq4 in MetaEditor and compile it.


TO USE IN YOUR EAs/INDICATORs:-

 1. Add #include <LibSSSRv1.mqh> to the top of your EA.

 2. In your EA's init() function, add a call to SSSR_Settings() with your preferred values
    for how the library should calculate S/R levels.  These should be the same as your
    settings for the SS_SupportResistance_vX indicator.

 3. In the EA's start() function add a call where appropriate to SSSR_UpdateZones().  The 
    function's arguments are as follows:-
 
    checkNewCandle - if true, the library will only update zones if it detects that a new
                     candle has formed since it was last called.  This is ignored if a
                     different symbol or period are passed to the function.

    symbol         - Can be NULL or Symbol() if using the chart the EA/indicator's running
                     on, else can be any other valid pair symbol.

    timeframe      - 0 for the current chart's timeframe, else another valid timeframe.

 4. Where required in your EA, call SSSR_FindZone() with the following arguments:-

    direction     - must be either SSSR_UP or SSSR_DN.  If SSSR_UP it looks for the nearest
                    resistance zone, SSSR_DN it'll look for a support zone.

    useWeak       - specifies whether or not to find "weak" zones or to ignore them.

    price         - this can be anything you want.  The current market price is an obvious usage,
                    to find nearest zones for entries etc, but you're not restricted to that.

    SSSR_FindZone() will return the ID number of a zone, else -1 if it doesn't find one.

 5. Call SSSR_GetZoneHi() to find the price value of the top of the zone, SSSR_GetZoneLo() for 
    the zone's low value, and SSSR_GetZoneStrength() for the strength of the zone.  All three 
    take as an argument the ID number returned by SSSR_FindZone().

 That's all you need.  All other functions within the library are for its own internal use, and
 you don't need to know about them or call them from your own code.

 Lastly this library is released under the terms of the GNU General Public License (GPL) version
 2.0.  Under the GPL's terms if you distribute any EA or indicator that uses this library, you 
 must also distribute, free of charge, the sourcecode for your EA/indicator.  If you'd like an
 exemption from the license you need to contact me for a commercial license.

 Good luck and happy pipping!

 Andrew.

