Consecutive UP/DOWN bar counter indicator

 

Hi,

I'm no coding expert in designing, but was looking if someone has or knew of the existence of an indicator that just counts the consecutive number of UP or DOWN bars, based on a simple closing.

I've toyed around a bit on sight, and this might be something with potential.

So for instance

14:01 1 min bar closes up - indicator should read 1

14:02 1 min bar closes up - indicator should read 2

14:03 1 min bar closes up - indicator should read 3

14:04 1 min bar closes down - indicator should read 0 (be re-set)

14:05 1 min bar closes down - indicator should read -1

14:06 1 min bar closes up - indicator should read 0 (be re-set)

14:07 1 min bar closes down - indicator should read -1

Visually, that would look a bit like the chart attached (not based on the example provided)

Anyone?

Thanks in advance!

Matt

Files:
barcount.jpg  9 kb
 

I have not seen it

I have not seen it before but looks very interesting

Lily1123:
Hi,

I'm no coding expert in designing, but was looking if someone has or knew of the existence of an indicator that just counts the consecutive number of UP or DOWN bars, based on a simple closing.

I've toyed around a bit on sight, and this might be something with potential.

So for instance

14:01 1 min bar closes up - indicator should read 1

14:02 1 min bar closes up - indicator should read 2

14:03 1 min bar closes up - indicator should read 3

14:04 1 min bar closes down - indicator should read 0 (be re-set)

14:05 1 min bar closes down - indicator should read -1

14:06 1 min bar closes up - indicator should read 0 (be re-set)

14:07 1 min bar closes down - indicator should read -1

Visually, that would look a bit like the chart attached (not based on the example provided)

Anyone?

Thanks in advance!

Matt
 

Thanks.

Visually (and during backtests on EA's) it has proven very successful in combination with other indicators. The longer the streak of consecutive ups-downs, the more reliable the signals becomes. Although it seems obvious and utterly simple at sight, I'm baffled that nowhere on the internet there's something like it...

As such, I wanted to share the idea, hoping that someone would be so kind to provide me the indicator code in return ;-).

Strangely enough, I can create an EA with those internet EA builder wizards (simple close n > close n+1 etc...), but coding an indicator seems much harder

Matt

Reason: