Support/Resistance Indicator

Post Reply
User avatar
slipshod
Trader
Posts: 404
Joined: Tue Dec 27, 2011 9:14 am
Location: Australia

Support/Resistance Indicator

Post by slipshod »

This is similar in appearance to II_SupDem, though not in the code as I've written this from scratch. I liked how II_SupDem created zones rather than exact price levels, but I wanted preservation of strong zones that are broken by the market in case they "switch sides", ie resistance-turned-support & vice versa. In this indicator I've called these "turncoat" zones.

If you see any bugs or have any suggestions, or better still, code, for improving this indicator, please let me know. You may also wish to visit my manual S/R based discussion thread at http://www.stevehopwoodforex.com/phpBB3 ... f=16&t=553.

Edit: Updated to the latest version SS_SupportResistance_v0.6, which adds support for Empty4 build 600.

Another Edit: LibSSSR added to the downloads. It provides all the functionality of the indicator, except it does not (a) draw boxes or text, (b) set global variables, and (c) produce alerts. Its meant to be called directly by EAs, thus avoiding the need to use the indicator via iCustom calls or using global variables. Oh, and you can also process S/R zones for any currency pair, not just the one your EA's running on. I've added a sample EA using the library to better illustrate its use. NOTE If you look on the last couple of pages in the thread, you'll see that the library is not feature-complete. I'm not sure when I'll have time to finish it properly.

Edit #3: Version 0.7 is now available including a new Testing mode, developed & contributed by Michaeldz on page 17 of this thread - thanks Michael!

Lastly, if you find the library and/or indicator useful and they're helping you earn money, please consider making a small paypal donation to [email protected]. Time spent working on this stuff is time away from trading or contract programming - I don't begrudge it, but I do need to convince the missus that my efforts on this are worthwhile ;)

The Indicator:
SS_SupportResistance_v07.mq4
or if you prefer,
SS_SupportResistance_v06.mq4
The Library:
LibSSSRv5.zip
Old Versions:
SS_SupportResistance_OLD_VERSIONS.zip
You do not have the required permissions to view the files attached to this post.
Last edited by slipshod on Wed Sep 12, 2018 10:46 am, edited 21 times in total.
User avatar
youcrazykids
Trader
Posts: 41
Joined: Sat Nov 19, 2011 8:38 am
Location: Northumberland, UK

Re: Support/Resistance Indicator

Post by youcrazykids »

Excellent work so far - it looks clear and concise due to the colour coding. One of my gripes about many S&R indicators is the clutter that they create, and the utter confusion you encounter when trying to identify the next genuine sticky area that the price is due to run into.

I think your next challenge will be to see if the price does stall and/or reverse in the areas drawn by the indicator, which involves some forward testing and analysis.
User avatar
slipshod
Trader
Posts: 404
Joined: Tue Dec 27, 2011 9:14 am
Location: Australia

Re: Support/Resistance Indicator

Post by slipshod »

Yes, a messy chart is exactly what I was trying to avoid.

Seeing if the price stalls/reverses in the indicator's zones isn't really my challenge as such. The zones are taken off previous reversal or mid-trend S/R points, all it does is point it out nice & clearly, letting you know how often a zone has held up under repeated re-tests.

Its up to the trader (or an EA) to make the call as to whether they think a zone will stand firm or be broken, and this isn't something an indicator like this can do on its own.

In my manual trading I use it in combination with Wolfe Waves and Chuvashov forks (http://articles.mql4.com/1032) along with macd to see divergence. I'm working towards something totally automated though for shorter-TF scalping, which is a very ambitious goal, but it gives me something to do while I wait for the next 4 hour candle to complete :)
Dozer
Trader
Posts: 25
Joined: Wed Nov 16, 2011 4:32 pm

Re: Support/Resistance Indicator

Post by Dozer »

This is a very nice and clean indicator, and nice clean and readable code as well. Thanks for sharing it. :D

It wouldn't be too much effort to use this in a support/resistance EA. Counter trade a reversal from a S/R zone or trend trade a failed S/R zone, etc...

What is your intention for using the Global vars?

Thanks,
Dozer
User avatar
slipshod
Trader
Posts: 404
Joined: Tue Dec 27, 2011 9:14 am
Location: Australia

Re: Support/Resistance Indicator

Post by slipshod »

Hi Dozer, yes I tried to design this to use in an EA - that's what the globals are for, so that the EA doesn't have to look for the rectangles & so that it can be backtested in non-visual mode.
guandi
Trader
Posts: 24
Joined: Wed Nov 16, 2011 2:34 am

Re: Support/Resistance Indicator

Post by guandi »

hello slipshod,

can you post more details on Chuvashov forks beyond what was in the MQL article?

best regards.

-guandi
User avatar
slipshod
Trader
Posts: 404
Joined: Tue Dec 27, 2011 9:14 am
Location: Australia

Re: Support/Resistance Indicator

Post by slipshod »

The Chuvashov fork, at least in my understanding, is a very simple pattern - so much so that I'm surprised not to have come across it before. I guess the fact that a Russian guy on a little-known blog (outside of Russia) discovered & named it accounts for its lack of popularity? Anyway, like the Wolfe Wave its a reversal pattern, one that gives you confirmation of a change of trend.

The following image shows a WW followed by 3 forks. The 1st fork did not result in a reversal, and using the fork for confirmation you'd have been saved from a losing short entry when the initial steep trendline was broken. The 2nd was a great short trade, though it had an annoying false entry signal at first that could have seen your stops blown before it crossed the fork line properly. The 3rd was also a nice clear signal & a good trade.

Like any chart pattern, it helps to see them combined with known S/R zones, pivot lines, daily 50 ema or 200 sma - anything that adds to a "confluence" to help change the trend. In my manual trading the Fork is extremely helpful, as it stops me from aggressively fading the market simply because its entered an S/R zone.

As you can see these patterns are very easy to draw on a chart, but not so easy to program for an EA to use...

Edit: Amended the image to show some extra forks that I missed the 1st time round (missed trading them too!)
You do not have the required permissions to view the files attached to this post.
User avatar
slipshod
Trader
Posts: 404
Joined: Tue Dec 27, 2011 9:14 am
Location: Australia

Re: Support/Resistance Indicator

Post by slipshod »

Just a couple more examples, this time from the current situation with GU. Its been on a tear for over a week now, despite a bunch of bearish patterns that have formed (1st chart below, which is daily - please ignore the plethora of lines I draw all over my charts).
gu1.png
gu2.png
So assume I missed the ride up, and that I don't want to risk chasing the price by hopping on a long train that might end soon, I'd be looking instead for evidence of sellers entering to take profits then seriously short it down the other way. For this, I need a Chuvashov fork to be broken. There's none on the H4 chart at all - in fact I had to look at M30 in order to find one (see the steep orange trendline, then the dotted fork line), and so far its not breaking so for now I'm staying out of the market on GU.
gu3.png
You do not have the required permissions to view the files attached to this post.
guandi
Trader
Posts: 24
Joined: Wed Nov 16, 2011 2:34 am

Re: Support/Resistance Indicator

Post by guandi »

Hello slipshod,

many thanks for your posts and your indicator, i will try out the forks.

Best regards

- guandi
slipshod wrote:Just a couple more examples, this time from the current situation with GU. Its been on a tear for over a week now, despite a bunch of bearish patterns that have formed (1st chart below, which is daily - please ignore the plethora of lines I draw all over my charts).
gu1.png
gu2.png
So assume I missed the ride up, and that I don't want to risk chasing the price by hopping on a long train that might end soon, I'd be looking instead for evidence of sellers entering to take profits then seriously short it down the other way. For this, I need a Chuvashov fork to be broken. There's none on the H4 chart at all - in fact I had to look at M30 in order to find one (see the steep orange trendline, then the dotted fork line), and so far its not breaking so for now I'm staying out of the market on GU.
gu3.png
garyfritz

Re: Support/Resistance Indicator

Post by garyfritz »

These forks look a bit similar to the BARF or BARR formation, see e.g. http://stockcharts.com/school/doku.php? ... un_reversa

Image
Post Reply

Return to “Indicators”