Basic Pivot indicator will draw line at bad location - page 2

 
RaptorUK:
Are you doing stuff on every tick that you don't need to ?


i would say yes. if i take out this:

while(i >= 0)
   {
      Pivotbuffer[i] = (iHigh("EURUSD",0,iHighest(NULL,0,MODE_HIGH,PivotPeriod,i))+iLow("EURUSD",0,iLowest(NULL,0,MODE_LOW,PivotPeriod,i))+Close[i])/3;
      i--;
   }

then the its all good and fast. i don't know how i could make this run smoother?!