Qwt User's Guide  6.1.3
QwtOHLCSample Class Reference

Open-High-Low-Close sample used in financial charts. More...

#include <qwt_samples.h>

Public Member Functions

 QwtOHLCSample (double time=0.0, double open=0.0, double high=0.0, double low=0.0, double close=0.0)
QwtInterval boundingInterval () const
 Calculate the bounding interval of the OHLC values. More...
bool isValid () const
 Check if a sample is valid. More...

Public Attributes

double time
double open
 Opening price.
double high
 Highest price.
double low
 Lowest price.
double close
 Closing price.

Detailed Description

Open-High-Low-Close sample used in financial charts.

In financial charts the movement of a price in a time interval is often represented by the opening/closing prices and the lowest/highest prices in this interval.

See also

Constructor & Destructor Documentation

QwtOHLCSample::QwtOHLCSample ( double  t = 0.0,
double  o = 0.0,
double  h = 0.0,
double  l = 0.0,
double  c = 0.0 


tTime value
oOpen value
hHigh value
lLow value
cClose value

Member Function Documentation

QwtInterval QwtOHLCSample::boundingInterval ( ) const

Calculate the bounding interval of the OHLC values.

For valid samples the limits of this interval are always low/high.

Bounding interval
See also
bool QwtOHLCSample::isValid ( ) const

Check if a sample is valid.

A sample is valid, when all of the following checks are true:

  • low <= high
  • low <= open <= high
  • low <= close <= high
True, when the sample is valid

Member Data Documentation

double QwtOHLCSample::time

Time of the sample, usually a number representing a specific interval - like a day.