Indicator Cross over to find price MQL4

 

Trying to find the cross over between the two RSI's, then the Price at the crossover.


This is what I've tried to do but comes with a 0 value, i am looking for a price value. Also i need a tolerance so that the difference could be close to 0 which is good enough. 


int RSI()
  {
   double IndicatorValues1[200];
   double IndicatorValues2[200];
   for(int i=0; i<200; i++)
     {
      IndicatorValues1[i] = iRSI(_Symbol,PERIOD_H1,10,PRICE_CLOSE,i);
       IndicatorValues2[i] = iRSI(_Symbol,PERIOD_D1,10,PRICE_CLOSE,i);
     }
   int BarIndex1 =  ArrayMaximum(IndicatorValues1); 
   int BarIndex2 =  ArrayMaximum(IndicatorValues2);
   double valueConsenus = Close[IndicatorValues1[BarIndex1] == IndicatorValues2[BarIndex2]];
   return valueConsenus;
  }
 
  1. Close[IndicatorValues1[BarIndex1] == IndicatorValues2[BarIndex2]]

    Doubles are rarely equal. Understand the links in:
              The == operand. - MQL4 programming forum #2 (2013)

  2. Look for a cross.

    double aPrev = …(i+1), aCurr = …(i),
           bPrev = …(i+1), bCurr = …(i);
    bool   wasUp = aPrev > bPrev,
            isUp = aCurr > bCurr,
         isCross = isUp != wasUp;

  3. Why are you looking at past bars (200)? You can't trade past crosses.