stevehopwoodforex.com
https://www.stevehopwoodforex.com/phpBB3/
Print view

Support/Resistance Indicator
https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?t=514
Page 10 of 23
Author:  Radar [ Mon Aug 05, 2013 10:20 am ]
Post subject:  Re: Support/Resistance Indicator

Hey Slipshod,
slipshod wrote:Hi Radar, sounds like a great idea. I'm pretty busy with a "real life" programming contract right now, but I'll try to find time to make those changes. Stay tuned :)
Great! Thanks for that :)

Hope the contract work goes well :)

Take care,

&

Have fun!

Radar =8^)
Author:  RxCape [ Thu Aug 08, 2013 1:35 pm ]
Post subject:  Re: Support/Resistance Indicator

cvdm001 wrote:Hi Slipshod,
Please would you let me have a link to enable me to download the Chuvashov Fork.

Thanks

Chris
Here is one that I had in my "library" of useful things.
Author:  slipshod [ Tue Aug 27, 2013 2:34 pm ]
Post subject:  Re: Support/Resistance Indicator

LibSSSRv3 is now available in the first post of the thread, including the ability to search for past fractals, either fast or slow as defined by the indicator, specifying the direction (ie up or down fractals).

These changes were in response to Radar's post on the preceding page, and hopefully it provides the functionality he needs. Please be aware that I've only just managed to scrape together the time to code these features, I haven't been able to test them at all other than making sure they compile. If there's any bugs or shortcomings, please feel free to send me a PM and I'll look at it asap.
Author:  dudest [ Tue Aug 27, 2013 8:10 pm ]
Post subject:  Re: Support/Resistance Indicator

slipshod wrote:LibSSSRv3 is now available in the first post of the thread, including the ability to search for past fractals, either fast or slow as defined by the indicator, specifying the direction (ie up or down fractals).

These changes were in response to Radar's post on the preceding page, and hopefully it provides the functionality he needs. Please be aware that I've only just managed to scrape together the time to code these features, I haven't been able to test them at all other than making sure they compile. If there's any bugs or shortcomings, please feel free to send me a PM and I'll look at it asap.
LIKE.jpg
.
Author:  fx800 [ Sat Oct 12, 2013 1:29 pm ]
Post subject:  Re: Support/Resistance Indicator

Hi Slipshod,

Thank you for sharing your hard work with the forum.

In the following code from Steve's Pinoccio ea, how does one make a call to verified/proven support/resistance zones only.

Code: Select all

   //slipshod's indi
   if (UseSlipshod)
   {
      // calling this with "true" as the first argument means
      // it doesn't do anything unless a new candle has formed 
      // since last time.  Call it with false and it'll recalculate
      // the zones, so don't do that every time through the start
      // function or your program will be very slow...
      SSSR_UpdateZones(true, Symbol(), Period());

      // finding the support & resistance zones closest to the bid price
      res_zone = SSSR_FindZoneV2(SSSR_UP, true, Bid, res_hi, res_lo, res_strength);
      sup_zone = SSSR_FindZoneV2(SSSR_DN, true, Bid, sup_hi, sup_lo, sup_strength);

      if(UseResistanceZoneHigh) ResistanceLevel = res_hi;
      if(UseResistanceZoneLow) ResistanceLevel = res_lo;
      if(UseSupportZoneHigh) SupportLevel= sup_hi;
      if(UseSupportZoneLow) SupportLevel= sup_lo;      
   }//if (UseSlipshod) 

Code: Select all

//Andrew's library
double          res_hi=0, res_lo=0, sup_hi=0, sup_lo=0;
int             res_strength=0, sup_strength=0;
int             sup_zone, res_zone;
Many thanks in advance.

peter
Author:  dudest [ Sat Oct 12, 2013 2:37 pm ]
Post subject:  Re: Support/Resistance Indicator

Hallo Peter,

Code: Select all

// find the support & resistance zones closest to price; ignore weak zones (false)
res_zone = SSSR_FindZoneV2(SSSR_UP, false, Ask, res_hi, res_lo, res_strength);
sup_zone = SSSR_FindZoneV2(SSSR_DN, false, Bid, sup_hi, sup_lo, sup_strength);
    
if ( (res_zone >= 0) && (res_strength > 2) && ( Bid >= res_lo ) && ( Bid < res_hi ) )
{
// Price is within a VERIFIED or PROVEN resistance zone; do something
..
}

if ( (sup_zone >= 0) && (sup_strength > 2) && ( Ask <= sup_hi ) && ( Ask > sup_lo ) )
{
// Price is within a VERIFIED or PROVEN support zone; do something
..
}

Verified zone = strength 3
Proven zone = strength 4

Cheers

.
Author:  fx800 [ Sat Oct 12, 2013 2:40 pm ]
Post subject:  Re: Support/Resistance Indicator

dudest wrote:Hallo Peter,

Code: Select all

// find the support & resistance zones closest to price; ignore weak zones (false)
res_zone = SSSR_FindZoneV2(SSSR_UP, false, Ask, res_hi, res_lo, res_strength);
sup_zone = SSSR_FindZoneV2(SSSR_DN, false, Bid, sup_hi, sup_lo, sup_strength);
    
if ( (res_zone >= 0) && (res_strength > 2) )
{
// Price is within a VERIFIED or PROVEN resistance zone; do something
..
}

if ( (sup_zone >= 0) && (sup_strength > 2) )
{
// Price is within a VERIFIED or PROVEN support zone; do something
..
}

Verified zone = strength 3
Proven zone = strength 4

Cheers

.
Thanks, Dudest.

I have been trawling through the thread and can't seem to find where your info comes from. Can you please point me in the right direction.

peter
Author:  fx800 [ Sat Oct 12, 2013 4:59 pm ]
Post subject:  Re: Support/Resistance Indicator

fx8000 wrote:
dudest wrote:Hallo Peter,

Code: Select all

// find the support & resistance zones closest to price; ignore weak zones (false)
res_zone = SSSR_FindZoneV2(SSSR_UP, false, Ask, res_hi, res_lo, res_strength);
sup_zone = SSSR_FindZoneV2(SSSR_DN, false, Bid, sup_hi, sup_lo, sup_strength);
    
if ( (res_zone >= 0) && (res_strength > 2) )
{
// Price is within a VERIFIED or PROVEN resistance zone; do something
..
}

if ( (sup_zone >= 0) && (sup_strength > 2) )
{
// Price is within a VERIFIED or PROVEN support zone; do something
..
}

Verified zone = strength 3
Proven zone = strength 4

Cheers

.
Thanks, Dudest.

I have been trawling through the thread and can't seem to find where your info comes from. Can you please point me in the right direction.

peter
Did you obtain the info from the LibSSSRv3 ?

Code: Select all

#define ZONE_WEAK      0
#define ZONE_TURNCOAT  1
#define ZONE_UNTESTED  2
#define ZONE_VERIFIED  3
#define ZONE_PROVEN    4 
peter
Author:  dudest [ Sat Oct 12, 2013 9:28 pm ]
Post subject:  Re: Support/Resistance Indicator

Hallo Peter,

Yes, that's correct ( same info available in LibSSSRv2 and in the SS_SupportResistance_v04c indi itself )

PS: in the LibSSSR zip files on post #1, there's an Instructions.txt and sample EA showing usage. The bit about checking whether price is inside the zone is how I've tested it, and it works flawlessly

PS2: I edited the code in my post!, forgot a crucial element, supposed to be as below

Cheers!

Code: Select all

// find the support & resistance zones closest to price; ignore weak zones (false)
res_zone = SSSR_FindZoneV2(SSSR_UP, false, Ask, res_hi, res_lo, res_strength);
sup_zone = SSSR_FindZoneV2(SSSR_DN, false, Bid, sup_hi, sup_lo, sup_strength);
    
if ( (res_zone >= 0) && (res_strength > 2) && ( Bid >= res_lo ) && ( Bid < res_hi ) )
{
// Price is within a VERIFIED or PROVEN resistance zone; do something
..
}

if ( (sup_zone >= 0) && (sup_strength > 2) && ( Ask <= sup_hi ) && ( Ask > sup_lo ) )
{
// Price is within a VERIFIED or PROVEN support zone; do something
..
}
Author:  fx800 [ Sat Oct 12, 2013 11:51 pm ]
Post subject:  Re: Support/Resistance Indicator

dudest wrote:Hallo Peter,

Yes, that's correct ( same info available in LibSSSRv2 and in the SS_SupportResistance_v04c indi itself )

PS: in the LibSSSR zip files on post #1, there's an Instructions.txt and sample EA showing usage. The bit about checking whether price is inside the zone is how I've tested it, and it works flawlessly

PS2: I edited the code in my post!, forgot a crucial element, supposed to be as below

Cheers!

Code: Select all

// find the support & resistance zones closest to price; ignore weak zones (false)
res_zone = SSSR_FindZoneV2(SSSR_UP, false, Ask, res_hi, res_lo, res_strength);
sup_zone = SSSR_FindZoneV2(SSSR_DN, false, Bid, sup_hi, sup_lo, sup_strength);
    
if ( (res_zone >= 0) && (res_strength > 2) && ( Bid >= res_lo ) && ( Bid < res_hi ) )
{
// Price is within a VERIFIED or PROVEN resistance zone; do something
..
}

if ( (sup_zone >= 0) && (sup_strength > 2) && ( Ask <= sup_hi ) && ( Ask > sup_lo ) )
{
// Price is within a VERIFIED or PROVEN support zone; do something
..
}
Hi Dudest,

Your post is most helpful. I have read the instructions, and was not sure if setting useWeak = false will exclude untested zones.

peter
All times are UTC Page 10 of 23