count 5 ticks in a row

 

hi, what's the easiest way for me to count 5 positive or negative ticks in a row?


thanks in advance

 
  1. No Slaves here, learn to code or pay someone. We're not going to code it FOR you. We are willing to HELP you.
  2. int start(){
        static int nUpTicks, nDnTicks; static double lastPrice;
        if (Bid > lastPrice){ nUpTicks++; nDnTicks = 0; }
        else{                 nDnTicks++; nUpTicks = 0; }
        lastPrice = Bid;
        :

 
WHRoeder:
  1. No Slaves here, learn to code or pay someone. We're not going to code it FOR you. We are willing to HELP you.


thanks for the code and the tip mate...i'm just trying to build a simple prototype to test a particular strategy myself first...if I see a light at the end of the tunnel then I will find a CODER to HELP me build the whole concept.
Reason: