An effort to create superior support/resistance indicator - your help is needed!

 
Hi all,

I have an idea on how to work out support/resistance lines but do not have enough time to program it. I hope those developers who offer their skills at no charge would be interested in implementing this thing to help me out in my trading as well as making a good tool for themselves. Traders are welcome to contribute with their ideas for the algo!

So lets start with the method that returns those levels. We can use this in indicator as well as in EAs.

GetHorizontalSR(int start, int bars, int wings, int accuracy, int levels&[], int& index);

input parameters:
start - start bar
bars - bar depth
wings - the distance from current price where we stop looking for s/r
accuracy - the width of s/r line in points
output parameters:
levels - s/r levels, array of 2*wings+1 elements, each of which contains the strength of level
index - the index of current price in the levels array

E.g. current open price is 1.4000, wings is 100 then levels will be of 201 elements, index will be set to 100. So levels[100] corresponds to current price.
If there's a resistance level at 1.4020 then the element at levels[80] should contain the strength of the level.

Algo:

1. Mark all levels which match High or Low of each bar in the range [i,i+Bars), just do levels[n]++ for them.
2. Double the strength of levels which match to up/down fractals (in the same bar range).
3. If 2 neighboring fractals are higher for down fractal or lower for upper fractal - double the strength again.
4. Double the strength of levels which are close to X.XX00 prices (accuracy/2 points away) and add 10 so that it is still a level if nothing has been found there.
5. Go through all the bars in [i,i+Bars) and subtract 1 if any bar crosses the level (Low[i] < level price < High[i]). Skip this step if levels[n] is 0 to avoid negative values;
6. Build aggregate levels if accuracy>1. For each level add the strength of levels that are accuracy/2 points away from current one. (use temporary levels array).
7. Normalize all the strengths (levels[n] = 100*levels[n]/max(levels[]))

Make indicator that takes parameters start, bars, wings, accuracy and additional threshold parameter and shows s/r lines. Parameter threshold should control which levels to plot on the chart (levels[n] >= threshold). Lets make this indicator look at open prices only as the algo is a bit too complex to recalculate levels on every tick. Or make some optimization, say recalculate only if Close[0] breaks through High[1] or Low[1] and makes new high/low.

Lets see how good the levels are and then add some false levels detection or improving strength of the levels by adding volumes/bar ranges/whatever.

Thanks in advance!

Cheers,
Home
 
Home:
If there's a resistance level at 1.4020 then the element at levels[80] should contain the strength of the level.

I think it'd be better if levels[120] contain the strength of the level 1.4020 so that the index of the elements in levels[] increases as prices increase.


Is anyone interested? That's really promising thing...

 

I'm personally not interested, but I think you're more likely to get a response if you show pictures. Draw something up.

I'm a visual person myself. All that you just wrote was just mumbo jumbo until I see it in action in some way.