Public Member Functions | Public Attributes | List of all members
QwtOHLCSample Class Reference

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

#include <qwt_samples.h>

Public Member Functions

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

Public Attributes

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

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
QwtTradingChartData

Definition at line 146 of file qwt_samples.h.

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 
)
inline

Constructor

Parameters
tTime value
oOpen value
hHigh value
lLow value
cClose value

Definition at line 186 of file qwt_samples.h.

Member Function Documentation

QwtInterval QwtOHLCSample::boundingInterval ( ) const
inline

Calculate the bounding interval of the OHLC values.

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

Returns
Bounding interval
See also
isValid()

Definition at line 224 of file qwt_samples.h.

bool QwtOHLCSample::isValid ( ) const
inline

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
Returns
True, when the sample is valid

Definition at line 207 of file qwt_samples.h.

Member Data Documentation

double QwtOHLCSample::close

Closing price.

Definition at line 173 of file qwt_samples.h.

double QwtOHLCSample::high

Highest price.

Definition at line 167 of file qwt_samples.h.

double QwtOHLCSample::low

Lowest price.

Definition at line 170 of file qwt_samples.h.

double QwtOHLCSample::open

Opening price.

Definition at line 164 of file qwt_samples.h.

double QwtOHLCSample::time

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

Definition at line 161 of file qwt_samples.h.


The documentation for this class was generated from the following file:


plotjuggler
Author(s): Davide Faconti
autogenerated on Sat Jul 6 2019 03:44:18