Range data

 

If i want to count how many times a price range has been hit; what would I need to add to the for loop in order to do this? So, capture the data within the blue areas ever hour.

also what tick data would i use for array access?

int RangeData()
  {
   double TickData[1][5];
   for(int i=0; i<1000; i++)
     {
      TickData[i] = Close[1];
     }
   int BarIndexRange=ArrayRange(TickData,0);
   double Range=TickData[BarIndexRange];
   return Range;
  }


 
  1.    double TickData[1][5];
       for(int i=0; i<1000; i++)
         {
          TickData[i] = Close[1];

    Code makes no sense.

    1. You create a two dimension array, of size one.
    2. Treat it as a one dimension array.
    3. Try to insert a thousand elements into it.
    4. All with the same value.
  2. Sanjay Rathore: If i want to count how many times a price range has been hit;
    Define in concrete terms what you mean by “hit”. Until then it can not be coded.
 
William Roeder #:
  1. Code makes no sense.

    1. You create a two dimension array, of size one.
    2. Treat it as a one dimension array.
    3. Try to insert a thousand elements into it.
    4. All with the same value.
  2. Define in concrete terms what you mean by “hit”. Until then it can not be coded.

So, what I mean is the price within hour is counted, and across serval hours the market returns to that price; strengthening consensus for that price.