direction of current bar - page 2

 
  1. rlarz: Close[0] > Open[0] should work but Close value appears to be empty until the bar is complete. I
    Close[0] is not empty. It is exactly equal to Bid. Your problem is elsewhere.

  2. rlarz: just want to know if the current price (often called Last in other languages) is greater than or less than the current bar's Open.
    double GetBarDirection()
    {
            if(Open[0]>Bid) return -1.0;
            else if(Open[0]<Bid) return 1.0;
            else return 0.0;
    }

     It doesn't work either. All bars = 0.0;

    There is nothing wrong with that code. It does exactly what you stated, for the current bar. Your problem is elsewhere.

Reason: