title: How to automatically calculate fibonnacci levels from yesterday/prev day in MQL4?
body: <p>how do I calculate the fibo levels from yesterday/previous day.</p>
  
  <p>This is how far I am currently:</p>
  
  <pre><code> int shift   = iBarShift( NULL, PERIOD_D1, Time[0] ) + 1;   // yesterday
   HiPrice     = iHigh(     NULL, PERIOD_D1, shift);
   LoPrice     = iLow (     NULL, PERIOD_D1, shift);
   StartTime   = iTime(     NULL, PERIOD_D1, shift);
  
   if ( TimeDayOfWeek( StartTime ) == 0    /* Sunday */ )
   {                                       // Add fridays high and low
        HiPrice = MathMax( HiPrice, iHigh( NULL, PERIOD_D1, shift + 1 ) );
        LoPrice = MathMin( LoPrice, iLow(  NULL, PERIOD_D1, shift + 1 ) );
   }
   Range = HiPrice - LoPrice;
  </code></pre>
  
  <p>I think now I should have all values necessary for calculating it.</p>
  
  <p>I am not sure on how I now can calculate the different levels now:<br>
  23.6 38.2 50.0 61.8 76.4  and  -23.6 -38.2 -50.0 -61.8 -76.4 -100</p>