Support/Resistance Indicator

mejayusa
Trader
Posts: 21
Joined: Thu Oct 30, 2014 10:35 pm

Support/Resistance Indicator

Post by mejayusa »

Hey, just one question. When using the library, isn't the SSSR_GetZoneType(zone) supposed to return "1" if the price is in a support zone, and "2" if the price is in a resistance zone? I seem to be getting the opposite results on H4 chart. Is anyone else facing the same?

For ex. GBPJPY is now in support zone now. But I'am getting "2" for zone_type. Code extract below.

sup_zone = SSSR_FindZoneV2(SSSR_DN, true, bid, sup_hi, sup_lo, sup_strength);
zone_type = SSSR_GetZoneType(sup_zone);

Any pointers, guidance or support is greatly appreciated.
mejayusa
Trader
Posts: 21
Joined: Thu Oct 30, 2014 10:35 pm

Support/Resistance Indicator

Post by mejayusa »

mejayusa » Thu Nov 02, 2017 3:49 pm wrote:Hey, just one question. When using the library, isn't the SSSR_GetZoneType(zone) supposed to return "1" if the price is in a support zone, and "2" if the price is in a resistance zone? I seem to be getting the opposite results on H4 chart. Is anyone else facing the same?

For ex. GBPJPY is now in support zone now. But I'am getting "2" for zone_type. Code extract below.

sup_zone = SSSR_FindZoneV2(SSSR_DN, true, bid, sup_hi, sup_lo, sup_strength);
zone_type = SSSR_GetZoneType(sup_zone);

Any pointers, guidance or support is greatly appreciated.
Found the bug. At line 767 and 771 of LibSSRv4.mq4, Close[4] function is used which led to inconsistent results due to wrong values returned by the Close[] function. My multipair EA operates on multiple timeframes and looks it was messing the results of the Close[] function. So in-case anyone else is facing the issues I faced w.r.t incorrect zone identification when using the library to get the zone types of other pairs, then change the code as below.

Change:
if (SSSR_zone_hi[SSSR_zone_count] < Close[4]) -- line 767
if (SSSR_zone_lo[SSSR_zone_count] > Close[4])-- line 771
To:
if (SSSR_zone_hi[SSSR_zone_count] < iClose(SSSR_sym, SSSR_TF, 4))
if (SSSR_zone_lo[SSSR_zone_count] > iClose(SSSR_sym, SSSR_TF, 4))
User avatar
SteveHopwood
Owner
Posts: 9904
Joined: Tue Nov 15, 2011 8:43 am
Location: Misterton - an insignificant village in England. Very pleasant to live in.

Support/Resistance Indicator

Post by SteveHopwood »

This post is attempting to attract further interest to what looks like a most helpful indi. SHF member Ehernmat brought it to my attention.

Thanks for coding it all those years ago, Andrew. Sorry I either never noticed or, more likely, failed to see its significance at the time.

:xm: :rocket:
Read the effing manual, ok?

Afterprime is the official SHF broker. Read about them at https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?p=175790#p175790.

I still suffer from OCCD. Good thing, really.

Anyone here feeling generous? My paypal account is always in the market for a tiny donation. pianodoodler@hotmail.com is the account.

To see The Weekly Roundup of stuff you guys might have missed Click here

My special thanks to Thomas (tomele) for all the incredible work he does here.
User avatar
slipshod
Trader
Posts: 404
Joined: Tue Dec 27, 2011 9:14 am
Location: Australia

Support/Resistance Indicator

Post by slipshod »

SteveHopwood » Fri Sep 07, 2018 12:20 am wrote:This post is attempting to attract further interest to what looks like a most helpful indi. SHF member Ehernmat brought it to my attention.

Thanks for coding it all those years ago, Andrew. Sorry I either never noticed or, more likely, failed to see its significance at the time.

:xm: :rocket:
Hey Steve, I'm just glad it's finally proving useful :good: Mat messaged me about the EA yesterday, and I'll definitely be testing and helping out if I see any way of making a contribution.

For anyone who reads this & isn't aware of the "Holy Graily Candle Bob" EA which incorporates this indicator, the EA can be found here: http://www.stevehopwoodforex.com/phpBB3 ... =87&t=5517

EDIT: I've just uploaded version 5 of the LIBSSSR to the first post in this thread - this incorporates mejayusa's bugfix in his post from November 17. Thanks mejay, and sorry I wasn't around to notice your fix earlier.
heart1010
Trader
Posts: 56
Joined: Wed Mar 30, 2016 8:33 pm

Support/Resistance Indicator

Post by heart1010 »

Thanks for the update!

P.S.: In file LibSSSR_EA_Sample.mq4 (from LibSSSRv5.zip) the line

Code: Select all

#include <LibSSSRv4.mqh>
should also be changed to

Code: Select all

#include <LibSSSRv5.mqh>
, shouldn't it?
User avatar
slipshod
Trader
Posts: 404
Joined: Tue Dec 27, 2011 9:14 am
Location: Australia

Support/Resistance Indicator

Post by slipshod »

Hi heart - yes it should, thanks for letting me know. I've updated the contents of the zip file :good:
traderpositivo
Posts: 1
Joined: Mon Jul 08, 2019 7:07 pm

Support/Resistance Indicator

Post by traderpositivo »

Hi guys

What would be the most recent version of this indicator?
Yannis
Trader
Posts: 56
Joined: Tue May 22, 2012 7:42 am

Support/Resistance Indicator

Post by Yannis »

@traderpositivo
In most threads if not all, you will always find everything in the 1st couple of posts.
awakefrontiers
Posts: 1
Joined: Tue Mar 24, 2020 9:56 pm

Support/Resistance Indicator

Post by awakefrontiers »

Hi new here awesome forum I'm glad I found this comunity! :D

Well my question, I use the indicator settings of 30mins timeframe on the 5min chart and keeps displaying me the 5mins zones.
On the 5min chart I can put the 15mins, 1hour, 4hour settings and I can see their zones but not the 30mins zones.

There's a way I can fix that?
boyoforex
Posts: 1
Joined: Mon Sep 02, 2013 10:11 pm

Support/Resistance Indicator

Post by boyoforex »

Please I will like to know if the MT5 version of the indicator and library exists. Thanks
Post Reply

Return to “Indicators”