BarData Class Reference

#include <BarData.h>

Collaboration diagram for BarData:

Collaboration graph
[legend]

List of all members.

Public Types

enum  BarType { Daily, Tick }
enum  InputType {
  Open, High, Low, Close,
  Volume, OpenInterest, Day, Week,
  Month, DayOfWeek
}
enum  BarLength {
  Minute1, Minute5, Minute10, Minute15,
  Minute30, Minute60, DailyBar, WeeklyBar,
  MonthlyBar
}

Public Member Functions

 BarData (QString &)
 ~BarData ()
int count ()
void getDate (int, QDateTime &)
double getOpen (int)
double getHigh (int)
double getLow (int)
double getClose (int)
double getVolume (int)
double getOI (int)
void prepend (Bar &bar)
void prependRaw (Bar &bar)
void appendRaw (Bar &bar)
int getX (QDateTime &)
double getMax ()
double getMin ()
void createDateList ()
void setBarType (BarData::BarType)
BarData::BarType getBarType ()
void getInputFields (QStringList &)
PlotLinegetInput (BarData::InputType)
BarData::InputType getInputType (QString &)
void getBarLengthList (QStringList &)
void getBar (int, Bar &)
void setMinMax ()
void clear ()
void setBarLength (BarData::BarLength)
BarData::BarLength getBarLength ()
void setStartEndDates (QDateTime &)
void setBar (int, Bar &)
void getSymbol (QString &)

Protected Attributes

QValueList< BarbarList
QDict< XdateList
double high
double low
BarData::BarType barType
BarData::BarLength barLength
QDateTime startDate
QDateTime endDate
Bar currentBar
QString symbol

Classes

struct  X


Detailed Description

Definition at line 32 of file BarData.h.


Member Enumeration Documentation

enum BarData::BarType

Enumerator:
Daily 
Tick 

Definition at line 40 of file BarData.h.

enum BarData::InputType

Enumerator:
Open 
High 
Low 
Close 
Volume 
OpenInterest 
Day 
Week 
Month 
DayOfWeek 

Definition at line 46 of file BarData.h.

enum BarData::BarLength

Enumerator:
Minute1 
Minute5 
Minute10 
Minute15 
Minute30 
Minute60 
DailyBar 
WeeklyBar 
MonthlyBar 

Definition at line 60 of file BarData.h.


Constructor & Destructor Documentation

BarData::BarData ( QString &  sym  ) 

Definition at line 25 of file BarData.cpp.

References barLength, barType, Daily, DailyBar, dateList, high, low, and symbol.

BarData::~BarData (  ) 

Definition at line 35 of file BarData.cpp.


Member Function Documentation

int BarData::count (  ) 

Definition at line 103 of file BarData.cpp.

References barList.

Referenced by TALIB::calculate(), BARS::calculateBar(), BARS::calculateCandle(), TALIB::calculateCustom(), VOL::calculateNVI(), BARS::calculatePF(), VOL::calculatePVI(), VOL::calculatePVT(), VOL::calculateVOL(), IndicatorPlot::convertXToDataIndex(), FiboLine::draw(), IndicatorPlot::drawBar(), IndicatorPlot::drawCandle(), IndicatorPlot::drawDot(), IndicatorPlot::drawHistogram(), IndicatorPlot::drawHistogramBar(), IndicatorPlot::drawInfo(), IndicatorPlot::drawLine(), IndicatorPlot::drawPF(), Tester::enterTrade(), DbPlugin::getCCHistory(), DatePlot::getDailyDate(), FI::getFI(), Spread::getHistory(), DbPlugin::getHistory(), CC::getHistory(), IndicatorPlot::getInfo(), ExScript::getInput(), LMS::getLMS(), DatePlot::getMinuteDate(), DatePlot::getMonthlyDate(), PP::getPP(), SINWAV::getSINWAV(), DbPlugin::getSpreadHistory(), SYMBOL::getSYMBOL(), SZ::getSZ(), THERM::getTHERM(), VFI::getVFI(), DatePlot::getWeeklyDate(), Index::loadIndexData(), DbPlugin::loadIndexData(), Tester::loadSignals(), DataWindow::setBars(), Plot::setData(), IndicatorPlot::setData(), DatePlot::setData(), IndicatorPlot::setScale(), QtstalkerApp::setSliderStart(), StocksDialog::split(), Tester::test(), and TesterChartPage::updateChart().

void BarData::getDate ( int  i,
QDateTime &  dt 
)

Definition at line 197 of file BarData.cpp.

References barList.

Referenced by BARS::calculateBar(), BARS::calculateCandle(), FiboLine::draw(), Tester::enterTrade(), DbPlugin::getCCHistory(), DatePlot::getDailyDate(), Spread::getHistory(), CC::getHistory(), getInput(), DatePlot::getMinuteDate(), DatePlot::getMonthlyDate(), DbPlugin::getSpreadHistory(), SYMBOL::getSYMBOL(), DatePlot::getWeeklyDate(), IndicatorPlot::getXY(), Index::loadIndexData(), DbPlugin::loadIndexData(), Tester::loadSignals(), DataWindow::setBars(), Tester::test(), and TesterChartPage::updateChart().

double BarData::getOpen ( int  i  ) 

Definition at line 254 of file BarData.cpp.

References barList.

Referenced by TALIB::calculate(), BARS::calculateBar(), BARS::calculateCandle(), TALIB::calculateCustom(), TrendLine::draw(), IndicatorPlot::drawInfo(), getInput(), Tester::getPrice(), Index::loadIndexData(), DbPlugin::loadIndexData(), DataWindow::setBars(), and TesterChartPage::updateChart().

double BarData::getHigh ( int  i  ) 

Definition at line 259 of file BarData.cpp.

References barList.

Referenced by TALIB::calculate(), BARS::calculateBar(), BARS::calculateCandle(), TALIB::calculateCustom(), BARS::calculatePF(), TrendLine::draw(), IndicatorPlot::drawInfo(), Tester::enterTrade(), getInput(), LMS::getLMS(), PP::getPP(), Tester::getPrice(), SINWAV::getSINWAV(), SZ::getSZ(), THERM::getTHERM(), VFI::getVFI(), Index::loadIndexData(), DbPlugin::loadIndexData(), DataWindow::setBars(), and TesterChartPage::updateChart().

double BarData::getLow ( int  i  ) 

Definition at line 264 of file BarData.cpp.

References barList.

Referenced by TALIB::calculate(), BARS::calculateBar(), BARS::calculateCandle(), TALIB::calculateCustom(), BARS::calculatePF(), TrendLine::draw(), IndicatorPlot::drawInfo(), Tester::enterTrade(), getInput(), LMS::getLMS(), PP::getPP(), Tester::getPrice(), SINWAV::getSINWAV(), SZ::getSZ(), THERM::getTHERM(), VFI::getVFI(), Index::loadIndexData(), DbPlugin::loadIndexData(), DataWindow::setBars(), and TesterChartPage::updateChart().

double BarData::getClose ( int  i  ) 

Definition at line 269 of file BarData.cpp.

References barList.

Referenced by TALIB::calculate(), BARS::calculateBar(), BARS::calculateCandle(), TALIB::calculateCustom(), VOL::calculateNVI(), VOL::calculatePVI(), VOL::calculatePVT(), VOL::calculateVOL(), TrendLine::draw(), IndicatorPlot::drawInfo(), DbPlugin::getCCHistory(), FI::getFI(), Spread::getHistory(), CC::getHistory(), getInput(), PP::getPP(), Tester::getPrice(), DbPlugin::getSpreadHistory(), SYMBOL::getSYMBOL(), VFI::getVFI(), Index::loadIndexData(), DbPlugin::loadIndexData(), DataWindow::setBars(), Plot::setData(), and TesterChartPage::updateChart().

double BarData::getVolume ( int  i  ) 

Definition at line 274 of file BarData.cpp.

References barList.

Referenced by TALIB::calculate(), TALIB::calculateCustom(), VOL::calculateNVI(), VOL::calculatePVI(), VOL::calculatePVT(), FI::getFI(), getInput(), and VFI::getVFI().

double BarData::getOI ( int  i  ) 

Definition at line 279 of file BarData.cpp.

References barList.

Referenced by TALIB::calculate(), TALIB::calculateCustom(), and getInput().

void BarData::prepend ( Bar bar  ) 

Definition at line 108 of file BarData.cpp.

References barLength, barList, Bar::clear(), currentBar, endDate, Bar::getDate(), Bar::getEmptyFlag(), Bar::getHigh(), Bar::getLow(), Bar::getOI(), Bar::getOpen(), Bar::getVolume(), high, low, Minute60, Bar::setDate(), Bar::setHigh(), Bar::setLow(), Bar::setOI(), Bar::setOpen(), setStartEndDates(), Bar::setVolume(), and startDate.

Referenced by Spread::getHistory(), Index::getHistory(), DbPlugin::getHistory(), DbPlugin::getIndexHistory(), and DbPlugin::getSpreadHistory().

void BarData::prependRaw ( Bar bar  ) 

Definition at line 159 of file BarData.cpp.

References barList.

Referenced by DbPlugin::getAllBars().

void BarData::appendRaw ( Bar bar  ) 

Definition at line 164 of file BarData.cpp.

References barList.

Referenced by DbPlugin::getCCHistory(), and CC::getHistory().

int BarData::getX ( QDateTime &  date  ) 

Definition at line 202 of file BarData.cpp.

References dateList, and BarData::X::x.

Referenced by VerticalLine::draw(), TrendLine::draw(), Text::draw(), SellArrow::draw(), FiboLine::draw(), Cycle::draw(), BuyArrow::draw(), IndicatorPlot::drawCrossHair(), IndicatorPlot::getXFromDate(), and TesterChartPage::updateChart().

double BarData::getMax (  ) 

Definition at line 284 of file BarData.cpp.

References high.

Referenced by VerticalLine::getHigh(), Cycle::getHigh(), and BARS::getPFSettings().

double BarData::getMin (  ) 

Definition at line 289 of file BarData.cpp.

References low.

Referenced by VerticalLine::getLow(), Cycle::getLow(), and BARS::getPFSettings().

void BarData::createDateList (  ) 

Definition at line 169 of file BarData.cpp.

References barList, Bar::clear(), currentBar, dateList, Bar::getDateTimeString(), Bar::getEmptyFlag(), Bar::getHigh(), Bar::getLow(), high, low, and BarData::X::x.

Referenced by DbPlugin::getHistory().

void BarData::setBarType ( BarData::BarType  d  ) 

Definition at line 294 of file BarData.cpp.

References barType.

Referenced by QtstalkerApp::loadChart().

BarData::BarType BarData::getBarType (  ) 

Definition at line 299 of file BarData.cpp.

References barType.

Referenced by DbPlugin::getAllBars(), and DbPlugin::getHistory().

void BarData::getInputFields ( QStringList &  l  ) 

Definition at line 39 of file BarData.cpp.

Referenced by FormulaEdit::getVariableList(), and IndicatorPlugin::IndicatorPlugin().

PlotLine * BarData::getInput ( BarData::InputType  field  ) 

Definition at line 54 of file BarData.cpp.

References PlotLine::append(), barList, Day, DayOfWeek, getClose(), getDate(), getHigh(), getLow(), getOI(), getOpen(), getVolume(), High, Low, Month, Open, OpenInterest, Volume, and Week.

Referenced by VIDYA::calculate(), LOWPASS::calculate(), CUS::calculate(), BARS::calculateMA(), and VOL::calculateVOL().

BarData::InputType BarData::getInputType ( QString &  d  ) 

Definition at line 304 of file BarData.cpp.

References Close, Day, DayOfWeek, High, Low, Month, Open, OpenInterest, Volume, and Week.

void BarData::getBarLengthList ( QStringList &  l  ) 

Definition at line 376 of file BarData.cpp.

Referenced by ChartToolbar::ChartToolbar(), IndicatorSummary::createDataWindow(), Scanner::Scanner(), and TesterTestPage::TesterTestPage().

void BarData::getBar ( int  d,
Bar bar 
)

Definition at line 390 of file BarData.cpp.

References barList.

Referenced by IndicatorPlot::drawInfo(), DbPlugin::getCCHistory(), CC::getHistory(), IndicatorPlot::getInfo(), ExScript::getInput(), StocksDialog::split(), and IndicatorPlot::updateStatusBar().

void BarData::setMinMax (  ) 

Definition at line 400 of file BarData.cpp.

References barList, Bar::getHigh(), Bar::getLow(), high, and low.

void BarData::clear (  ) 

Definition at line 415 of file BarData.cpp.

References barList, Bar::clear(), currentBar, dateList, high, and low.

void BarData::setBarLength ( BarData::BarLength  d  ) 

Definition at line 424 of file BarData.cpp.

References barLength.

Referenced by Spread::getHistory(), DbPlugin::getSpreadHistory(), QtstalkerApp::loadChart(), Index::loadIndexData(), and DbPlugin::loadIndexData().

BarData::BarLength BarData::getBarLength (  ) 

Definition at line 429 of file BarData.cpp.

References barLength.

void BarData::setStartEndDates ( QDateTime &  d  ) 

Definition at line 434 of file BarData.cpp.

References barLength, DailyBar, endDate, Minute1, Minute10, Minute15, Minute30, Minute5, Minute60, MonthlyBar, startDate, and WeeklyBar.

Referenced by prepend().

void BarData::setBar ( int  d,
Bar bar 
)

Definition at line 395 of file BarData.cpp.

References barList.

void BarData::getSymbol ( QString &  d  ) 

Definition at line 509 of file BarData.cpp.

References symbol.


Member Data Documentation

QValueList<Bar> BarData::barList [protected]

Definition at line 106 of file BarData.h.

Referenced by appendRaw(), clear(), count(), createDateList(), getBar(), getClose(), getDate(), getHigh(), getInput(), getLow(), getOI(), getOpen(), getVolume(), prepend(), prependRaw(), setBar(), and setMinMax().

QDict<X> BarData::dateList [protected]

Definition at line 107 of file BarData.h.

Referenced by BarData(), clear(), createDateList(), and getX().

double BarData::high [protected]

Definition at line 108 of file BarData.h.

Referenced by BarData(), clear(), createDateList(), getMax(), prepend(), and setMinMax().

double BarData::low [protected]

Definition at line 109 of file BarData.h.

Referenced by BarData(), clear(), createDateList(), getMin(), prepend(), and setMinMax().

BarData::BarType BarData::barType [protected]

Definition at line 110 of file BarData.h.

Referenced by BarData(), getBarType(), and setBarType().

BarData::BarLength BarData::barLength [protected]

Definition at line 111 of file BarData.h.

Referenced by BarData(), getBarLength(), prepend(), setBarLength(), and setStartEndDates().

QDateTime BarData::startDate [protected]

Definition at line 112 of file BarData.h.

Referenced by prepend(), and setStartEndDates().

QDateTime BarData::endDate [protected]

Definition at line 113 of file BarData.h.

Referenced by prepend(), and setStartEndDates().

Bar BarData::currentBar [protected]

Definition at line 114 of file BarData.h.

Referenced by clear(), createDateList(), and prepend().

QString BarData::symbol [protected]

Definition at line 115 of file BarData.h.

Referenced by BarData(), and getSymbol().


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