Question to code indicator (swing high low)

 

Hello,

anyone has time to code an indicator for me (and maybe other users who think it is useful)? it should show swing highs and lows.

here are the rules (example for a downtrend vice versa for an uptrend):

lower highs and lows makes it a downtrend, marked by the first 2 black points. the third green bar after the green point goes above the high of the bar before it. then 2 bars later we have a bar which goes below a the low of the bar before it (after third black point) but not lower than the bars after the green point, immediatly followed by a bar where the high is above the high of the bar before (last black point) which makes it a small higher low. at the red point it is an upswing (it is the end here but it don't have to be the end) after the big red bar (lower highs and lows) we can say it was the end. i only want to see the green and red point with this indicator. and it would be nice if i could choose the color for points, and for the last when it is not sure that it stays there.i think a higher timeframe could be interessting too.

i hope most people understand me

interessted in your thoughts about it. definition ok? already excists? and so on?

regards

joe

Files:
swinghilo.jpg  10 kb