Ok, well you don't _need_ to call this function if you want the library to use the same default settings that SS_SupportResistance_v04c does. If you've used different settings for the indicator though, you'll probably want the library to work the same way & this is how you tell it what those settings are. Not sure how better I can explain itlucklogic wrote:1) what does this call mean - example pls
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.
Code: Select all
void init() {
// the following tells the library to only calculate on the last 1000 bars (instead of 10,000),
// to use a fuzzfactor of 1.0 instead of the default 0.9, and a fastfactor of 5 instead of 6.
SSSR_Settings(1000, 1.0, true, true, 5, 3);
}2) Example pls of this call :
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.
Code: Select all
// find the nearest resistance zone above the current price
int zoneID = SSSR_FindZone(SSSR_UP, true, Bid);3) Pls provide an example of how to determine the price action difference from the nearest support would be most appreciated. ie how many pips is the the price above the support top ???
Thanks in anticipation of you assistance
Code: Select all
int zoneID = SSSR_FindZone(SSSR_UP, true, Bid);
if (zoneID >= 0)
{
double zoneHi = SSSR_GetZoneHi(zoneID);
double zoneLo = SSSR_GetZoneLo(zoneID);
if (Bid > zoneLo)
{
// price is inside the zone
}
else
{
double distToResistance = zoneLo - Bid;
}
}