Counting bars for Forex Trend Indicator.

Hi. I am building the automatic strategy and I need the code to count the number of bars from Forex Trend indicator. And hint would be appreciate. thank you
matomato:  Forex Trend indicator. hint would be appreciate.
  1. Do you expect us to know what indicator and what version you are referring two?
  2. If it shows a trend, what does number of bars have to do with that?
  3. There are no mind readers here.
It's a -> SilverTrend.mq4 | b//|  SilverTrend  rewritten by CrazyChart. I would like to count for example 3 red bars and than do something. See the image...  
Files:
bars.jpg  3 kb
matomato: I would like to count for example 3 red bars and than do something.

matomato: . And hint would be appreciate.

So what's stopping you?
          Detailed explanation of iCustom - MQL4 and MetaTrader 4 - MQL4 programming forum
matomato:
It's a -> SilverTrend.mq4 | b//|  SilverTrend  rewritten by CrazyChart. I would like to count for example 3 red bars and than do something. See the image...  

Intresting, i read nearly the same s... in the german forum

hm I tried with    -> if(counted_bars>3) ... but doesn't seems to work.
matomato: hm I tried with    -> if(counted_bars>3) ... but doesn't seems to work.
  1. "Doesn't work" is meaningless - just like saying the car doesn't work. Doesn't start, won't go in gear, no electrical, missing the key, flat tires - meaningless. We can't see your broken code. There are no mind readers here and our crystal balls are cracked.

  2. Do you really expect an answer? We can't see how you calculate counted_bars.

  3. You originally said "count for example 3 red bars" yet your post is for more than 3.