heiken ashi candle shadow calucation

To add comments, please log in or register
swadeeep
28
swadeeep  

Hi

i am writing an expert advisor based on heiken ashi. i am trying to calculate the upper, lower shadow and body. of previous hashi candle but i dont seem to be getting correct values.

this is my code

      double actual_low[3];

      double actual_high[3];

      double point = m_symbol.Digits() * m_symbol.Point();

CopyLow(_Symbol, _Period, 0, 3, actual_low);

      CopyHigh(_Symbol, _Period, 0, 3, actual_high);

      double up_tail;

      double down_tail;

      double body;

      if (up_trend) { 

         up_tail = MathAbs(actual_high[1] - haClose[1])/point;

         down_tail = MathAbs(haOpen[1] - haLow[1])/point;

         body = MathAbs(haClose[1] - haOpen[1])/point;

         printf ("ha open and close %f, %f",  haOpen[1], haClose[1]);

}

can anybody please help me figure out what i am doing wrong here?

To add comments, please log in or register