BARS Class Reference

#include <BARS.h>

Inheritance diagram for BARS:

Inheritance graph
[legend]
Collaboration diagram for BARS:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 BARS ()
virtual ~BARS ()
Indicatorcalculate ()
PlotLinecalculateBar ()
PlotLinecalculateCandle ()
PlotLinecalculatePF ()
int indicatorPrefDialog (QWidget *)
void setDefaults ()
PlotLinecalculateCustom (QString &, QPtrList< PlotLine > &)
void getIndicatorSettings (Setting &)
void setIndicatorSettings (Setting &)
void calculateMA (Indicator *)
void formatDialog (QStringList &vl, QString &rv, QString &rs)
void getPFSettings ()

Private Attributes

QColor barUpColor
QColor barDownColor
QColor barNeutralColor
QColor candleColor
PlotLine::LineType lineType
QString label
QString method
QStringList methodList
QString dbPath
QColor maColor
QColor maColor2
QColor maColor3
PlotLine::LineType maLineType
PlotLine::LineType maLineType2
PlotLine::LineType maLineType3
QString maLabel
QString maLabel2
QString maLabel3
int maPeriod
int maPeriod2
int maPeriod3
int maType
int maType2
int maType3
BarData::InputType maInput
BarData::InputType maInput2
BarData::InputType maInput3
int pfReversal
double pfBoxSize
QColor pfXColor
QColor pfOColor
QString pfMethod
QString barUpColorLabel
QString barDownColorLabel
QString barNeutralColorLabel
QString candleColorLabel
QString labelLabel
QString methodLabel
QString lineTypeLabel
QString pluginLabel
QString pfXColorLabel
QString pfOColorLabel
QString pfReversalLabel
QString pfMethodLabel
QString maColorLabel
QString maLineTypeLabel
QString maPeriodLabel
QString maLabelLabel
QString maTypeLabel
QString maInputLabel
QString maColor2Label
QString maLineType2Label
QString maPeriod2Label
QString maLabel2Label
QString maType2Label
QString maInput2Label
QString maColor3Label
QString maLineType3Label
QString maPeriod3Label
QString maLabel3Label
QString maType3Label
QString maInput3Label


Detailed Description

Definition at line 24 of file BARS.h.


Constructor & Destructor Documentation

BARS::BARS (  ) 

Definition at line 33 of file BARS.cpp.

References barDownColorLabel, barNeutralColorLabel, barUpColorLabel, candleColorLabel, dbPath, IndicatorPlugin::formatList, IndicatorPlugin::FormatString, Config::getData(), IndicatorPlugin::helpFile, Config::Home, labelLabel, lineTypeLabel, maColor2Label, maColor3Label, maColorLabel, maInput2Label, maInput3Label, maInputLabel, maLabel2Label, maLabel3Label, maLabelLabel, maLineType2Label, maLineType3Label, maLineTypeLabel, maPeriod2Label, maPeriod3Label, maPeriodLabel, maType2Label, maType3Label, maTypeLabel, methodLabel, methodList, pfMethodLabel, pfOColorLabel, pfReversalLabel, pfXColorLabel, pluginLabel, IndicatorPlugin::pluginName, and setDefaults().

BARS::~BARS (  )  [virtual]

Definition at line 86 of file BARS.cpp.


Member Function Documentation

Indicator * BARS::calculate (  )  [virtual]

Reimplemented from IndicatorPlugin.

Definition at line 124 of file BARS.cpp.

References Indicator::addLine(), calculateBar(), calculateCandle(), calculateMA(), calculatePF(), IndicatorPlugin::dateFlag, IndicatorPlugin::logScale, method, Indicator::setDateFlag(), and Indicator::setLogScale().

PlotLine * BARS::calculateBar (  ) 

Definition at line 148 of file BARS.cpp.

References PlotLine::append(), PlotLine::Bar, barDownColor, barNeutralColor, barUpColor, BarData::count(), IndicatorPlugin::data, BarData::getClose(), BarData::getDate(), BarData::getHigh(), BarData::getLow(), BarData::getOpen(), label, PlotLine::setLabel(), and PlotLine::setType().

Referenced by calculate(), and calculateCustom().

PlotLine * BARS::calculateCandle (  ) 

Definition at line 185 of file BARS.cpp.

References PlotLine::append(), PlotLine::Candle, candleColor, BarData::count(), IndicatorPlugin::data, BarData::getClose(), BarData::getDate(), BarData::getHigh(), BarData::getLow(), BarData::getOpen(), label, PlotLine::setLabel(), and PlotLine::setType().

Referenced by calculate(), and calculateCustom().

PlotLine * BARS::calculatePF (  ) 

Definition at line 213 of file BARS.cpp.

References PlotLine::append(), BarData::count(), IndicatorPlugin::data, BarData::getHigh(), BarData::getLow(), getPFSettings(), label, PlotLine::PF, pfBoxSize, pfOColor, pfReversal, pfXColor, PlotLine::setLabel(), and PlotLine::setType().

Referenced by calculate(), and calculateCustom().

int BARS::indicatorPrefDialog ( QWidget *  w  )  [virtual]

Reimplemented from IndicatorPlugin.

Definition at line 385 of file BARS.cpp.

References PrefDialog::addColorItem(), PrefDialog::addComboItem(), PrefDialog::addDoubleItem(), PrefDialog::addIntItem(), PrefDialog::addTextItem(), PlotLine::Bar, barDownColor, barNeutralColor, barUpColor, PlotLine::Candle, candleColor, DBBase::close(), PrefDialog::createPage(), Config::CurrentChart, IndicatorPlugin::data, dbPath, PrefDialog::getColor(), PrefDialog::getCombo(), PrefDialog::getComboIndex(), DBBase::getData(), Config::getData(), PrefDialog::getDouble(), PrefDialog::getInt(), IndicatorPlugin::getMATypes(), PrefDialog::getText(), IndicatorPlugin::helpFile, IndicatorPlugin::inputTypeList, label, lineType, IndicatorPlugin::lineTypes, maColor, maColor2, maColor3, maInput, maInput2, maInput3, maLabel, maLabel2, maLabel3, maLineType, maLineType2, maLineType3, maPeriod, maPeriod2, maPeriod3, maType, maType2, maType3, method, methodList, DBBase::open(), PlotLine::PF, pfBoxSize, pfMethod, pfOColor, pfReversal, pfXColor, DBBase::setData(), and PrefDialog::setHelpFile().

void BARS::setDefaults (  ) 

Definition at line 90 of file BARS.cpp.

References barDownColor, barNeutralColor, barUpColor, candleColor, BarData::Close, label, PlotLine::Line, maColor, maColor2, maColor3, maInput, maInput2, maInput3, maLabel, maLabel2, maLabel3, maLineType, maLineType2, maLineType3, maPeriod, maPeriod2, maPeriod3, maType, maType2, maType3, pfBoxSize, pfMethod, pfOColor, pfReversal, pfXColor, and IndicatorPlugin::pluginName.

Referenced by BARS(), and setIndicatorSettings().

PlotLine * BARS::calculateCustom ( QString &  p,
QPtrList< PlotLine > &  d 
) [virtual]

Reimplemented from IndicatorPlugin.

Definition at line 806 of file BARS.cpp.

References calculateBar(), calculateCandle(), calculatePF(), candleColor, IndicatorPlugin::checkFormat(), IndicatorPlugin::FormatInteger, IndicatorPlugin::formatList, IndicatorPlugin::FormatString, IndicatorPlugin::formatStringList, method, and pfReversal.

void BARS::getIndicatorSettings ( Setting dict  )  [virtual]

Reimplemented from IndicatorPlugin.

Definition at line 745 of file BARS.cpp.

References barDownColor, barDownColorLabel, barNeutralColor, barNeutralColorLabel, barUpColor, barUpColorLabel, candleColor, candleColorLabel, label, labelLabel, lineType, lineTypeLabel, maColor, maColor2, maColor2Label, maColor3, maColor3Label, maColorLabel, maInput, maInput2, maInput2Label, maInput3, maInput3Label, maInputLabel, maLabel, maLabel2, maLabel2Label, maLabel3, maLabel3Label, maLabelLabel, maLineType, maLineType2, maLineType2Label, maLineType3, maLineType3Label, maLineTypeLabel, maPeriod, maPeriod2, maPeriod2Label, maPeriod3, maPeriod3Label, maPeriodLabel, maType, maType2, maType2Label, maType3, maType3Label, maTypeLabel, method, methodLabel, pfMethod, pfMethodLabel, pfOColor, pfOColorLabel, pfReversal, pfReversalLabel, pfXColor, pfXColorLabel, pluginLabel, IndicatorPlugin::pluginName, and Setting::setData().

void BARS::setIndicatorSettings ( Setting dict  )  [virtual]

Reimplemented from IndicatorPlugin.

Definition at line 620 of file BARS.cpp.

References barDownColor, barDownColorLabel, barNeutralColor, barNeutralColorLabel, barUpColor, barUpColorLabel, candleColor, candleColorLabel, Setting::count(), Setting::getData(), label, labelLabel, lineType, lineTypeLabel, maColor, maColor2, maColor2Label, maColor3, maColor3Label, maColorLabel, maInput, maInput2, maInput2Label, maInput3, maInput3Label, maInputLabel, maLabel, maLabel2, maLabel2Label, maLabel3, maLabel3Label, maLabelLabel, maLineType, maLineType2, maLineType2Label, maLineType3, maLineType3Label, maLineTypeLabel, maPeriod, maPeriod2, maPeriod2Label, maPeriod3, maPeriod3Label, maPeriodLabel, maType, maType2, maType2Label, maType3, maType3Label, maTypeLabel, method, methodLabel, pfMethod, pfMethodLabel, pfOColor, pfOColorLabel, pfReversal, pfReversalLabel, pfXColor, pfXColorLabel, and setDefaults().

void BARS::calculateMA ( Indicator output  ) 

Definition at line 340 of file BARS.cpp.

References Indicator::addLine(), IndicatorPlugin::data, BarData::getInput(), IndicatorPlugin::getMA(), maColor, maColor2, maColor3, maInput, maInput2, maInput3, maLabel, maLabel2, maLabel3, maLineType, maLineType2, maLineType3, maPeriod, maPeriod2, maPeriod3, maType, maType2, maType3, PlotLine::setColor(), PlotLine::setLabel(), and PlotLine::setType().

Referenced by calculate().

void BARS::formatDialog ( QStringList &  vl,
QString &  rv,
QString &  rs 
) [virtual]

Reimplemented from IndicatorPlugin.

Definition at line 871 of file BARS.cpp.

References PrefDialog::addColorItem(), PrefDialog::addIntItem(), PrefDialog::addTextItem(), candleColor, PrefDialog::createPage(), PrefDialog::getColor(), PrefDialog::getInt(), PrefDialog::getText(), IndicatorPlugin::helpFile, method, methodList, pfReversal, and PrefDialog::setHelpFile().

void BARS::getPFSettings (  ) 

Definition at line 308 of file BARS.cpp.

References DBBase::close(), Config::CurrentChart, IndicatorPlugin::data, dbPath, DBBase::getData(), Config::getData(), BarData::getMax(), BarData::getMin(), DBBase::open(), pfBoxSize, pfMethod, and pfReversal.

Referenced by calculatePF().


Member Data Documentation

QColor BARS::barUpColor [private]

Definition at line 43 of file BARS.h.

Referenced by calculateBar(), getIndicatorSettings(), indicatorPrefDialog(), setDefaults(), and setIndicatorSettings().

QColor BARS::barDownColor [private]

Definition at line 44 of file BARS.h.

Referenced by calculateBar(), getIndicatorSettings(), indicatorPrefDialog(), setDefaults(), and setIndicatorSettings().

QColor BARS::barNeutralColor [private]

Definition at line 45 of file BARS.h.

Referenced by calculateBar(), getIndicatorSettings(), indicatorPrefDialog(), setDefaults(), and setIndicatorSettings().

QColor BARS::candleColor [private]

Definition at line 46 of file BARS.h.

Referenced by calculateCandle(), calculateCustom(), formatDialog(), getIndicatorSettings(), indicatorPrefDialog(), setDefaults(), and setIndicatorSettings().

PlotLine::LineType BARS::lineType [private]

Definition at line 47 of file BARS.h.

Referenced by getIndicatorSettings(), indicatorPrefDialog(), and setIndicatorSettings().

QString BARS::label [private]

Definition at line 48 of file BARS.h.

Referenced by calculateBar(), calculateCandle(), calculatePF(), getIndicatorSettings(), indicatorPrefDialog(), setDefaults(), and setIndicatorSettings().

QString BARS::method [private]

Definition at line 49 of file BARS.h.

Referenced by calculate(), calculateCustom(), formatDialog(), getIndicatorSettings(), indicatorPrefDialog(), and setIndicatorSettings().

QStringList BARS::methodList [private]

Definition at line 50 of file BARS.h.

Referenced by BARS(), formatDialog(), and indicatorPrefDialog().

QString BARS::dbPath [private]

Definition at line 51 of file BARS.h.

Referenced by BARS(), getPFSettings(), and indicatorPrefDialog().

QColor BARS::maColor [private]

Definition at line 53 of file BARS.h.

Referenced by calculateMA(), getIndicatorSettings(), indicatorPrefDialog(), setDefaults(), and setIndicatorSettings().

QColor BARS::maColor2 [private]

Definition at line 54 of file BARS.h.

Referenced by calculateMA(), getIndicatorSettings(), indicatorPrefDialog(), setDefaults(), and setIndicatorSettings().

QColor BARS::maColor3 [private]

Definition at line 55 of file BARS.h.

Referenced by calculateMA(), getIndicatorSettings(), indicatorPrefDialog(), setDefaults(), and setIndicatorSettings().

PlotLine::LineType BARS::maLineType [private]

Definition at line 56 of file BARS.h.

Referenced by calculateMA(), getIndicatorSettings(), indicatorPrefDialog(), setDefaults(), and setIndicatorSettings().

PlotLine::LineType BARS::maLineType2 [private]

Definition at line 57 of file BARS.h.

Referenced by calculateMA(), getIndicatorSettings(), indicatorPrefDialog(), setDefaults(), and setIndicatorSettings().

PlotLine::LineType BARS::maLineType3 [private]

Definition at line 58 of file BARS.h.

Referenced by calculateMA(), getIndicatorSettings(), indicatorPrefDialog(), setDefaults(), and setIndicatorSettings().

QString BARS::maLabel [private]

Definition at line 59 of file BARS.h.

Referenced by calculateMA(), getIndicatorSettings(), indicatorPrefDialog(), setDefaults(), and setIndicatorSettings().

QString BARS::maLabel2 [private]

Definition at line 60 of file BARS.h.

Referenced by calculateMA(), getIndicatorSettings(), indicatorPrefDialog(), setDefaults(), and setIndicatorSettings().

QString BARS::maLabel3 [private]

Definition at line 61 of file BARS.h.

Referenced by calculateMA(), getIndicatorSettings(), indicatorPrefDialog(), setDefaults(), and setIndicatorSettings().

int BARS::maPeriod [private]

Definition at line 62 of file BARS.h.

Referenced by calculateMA(), getIndicatorSettings(), indicatorPrefDialog(), setDefaults(), and setIndicatorSettings().

int BARS::maPeriod2 [private]

Definition at line 63 of file BARS.h.

Referenced by calculateMA(), getIndicatorSettings(), indicatorPrefDialog(), setDefaults(), and setIndicatorSettings().

int BARS::maPeriod3 [private]

Definition at line 64 of file BARS.h.

Referenced by calculateMA(), getIndicatorSettings(), indicatorPrefDialog(), setDefaults(), and setIndicatorSettings().

int BARS::maType [private]

Definition at line 65 of file BARS.h.

Referenced by calculateMA(), getIndicatorSettings(), indicatorPrefDialog(), setDefaults(), and setIndicatorSettings().

int BARS::maType2 [private]

Definition at line 66 of file BARS.h.

Referenced by calculateMA(), getIndicatorSettings(), indicatorPrefDialog(), setDefaults(), and setIndicatorSettings().

int BARS::maType3 [private]

Definition at line 67 of file BARS.h.

Referenced by calculateMA(), getIndicatorSettings(), indicatorPrefDialog(), setDefaults(), and setIndicatorSettings().

BarData::InputType BARS::maInput [private]

Definition at line 68 of file BARS.h.

Referenced by calculateMA(), getIndicatorSettings(), indicatorPrefDialog(), setDefaults(), and setIndicatorSettings().

BarData::InputType BARS::maInput2 [private]

Definition at line 69 of file BARS.h.

Referenced by calculateMA(), getIndicatorSettings(), indicatorPrefDialog(), setDefaults(), and setIndicatorSettings().

BarData::InputType BARS::maInput3 [private]

Definition at line 70 of file BARS.h.

Referenced by calculateMA(), getIndicatorSettings(), indicatorPrefDialog(), setDefaults(), and setIndicatorSettings().

int BARS::pfReversal [private]

Definition at line 72 of file BARS.h.

Referenced by calculateCustom(), calculatePF(), formatDialog(), getIndicatorSettings(), getPFSettings(), indicatorPrefDialog(), setDefaults(), and setIndicatorSettings().

double BARS::pfBoxSize [private]

Definition at line 73 of file BARS.h.

Referenced by calculatePF(), getPFSettings(), indicatorPrefDialog(), and setDefaults().

QColor BARS::pfXColor [private]

Definition at line 74 of file BARS.h.

Referenced by calculatePF(), getIndicatorSettings(), indicatorPrefDialog(), setDefaults(), and setIndicatorSettings().

QColor BARS::pfOColor [private]

Definition at line 75 of file BARS.h.

Referenced by calculatePF(), getIndicatorSettings(), indicatorPrefDialog(), setDefaults(), and setIndicatorSettings().

QString BARS::pfMethod [private]

Definition at line 76 of file BARS.h.

Referenced by getIndicatorSettings(), getPFSettings(), indicatorPrefDialog(), setDefaults(), and setIndicatorSettings().

QString BARS::barUpColorLabel [private]

Definition at line 78 of file BARS.h.

Referenced by BARS(), getIndicatorSettings(), and setIndicatorSettings().

QString BARS::barDownColorLabel [private]

Definition at line 79 of file BARS.h.

Referenced by BARS(), getIndicatorSettings(), and setIndicatorSettings().

QString BARS::barNeutralColorLabel [private]

Definition at line 80 of file BARS.h.

Referenced by BARS(), getIndicatorSettings(), and setIndicatorSettings().

QString BARS::candleColorLabel [private]

Definition at line 81 of file BARS.h.

Referenced by BARS(), getIndicatorSettings(), and setIndicatorSettings().

QString BARS::labelLabel [private]

Definition at line 82 of file BARS.h.

Referenced by BARS(), getIndicatorSettings(), and setIndicatorSettings().

QString BARS::methodLabel [private]

Definition at line 83 of file BARS.h.

Referenced by BARS(), getIndicatorSettings(), and setIndicatorSettings().

QString BARS::lineTypeLabel [private]

Definition at line 84 of file BARS.h.

Referenced by BARS(), getIndicatorSettings(), and setIndicatorSettings().

QString BARS::pluginLabel [private]

Definition at line 85 of file BARS.h.

Referenced by BARS(), and getIndicatorSettings().

QString BARS::pfXColorLabel [private]

Definition at line 87 of file BARS.h.

Referenced by BARS(), getIndicatorSettings(), and setIndicatorSettings().

QString BARS::pfOColorLabel [private]

Definition at line 88 of file BARS.h.

Referenced by BARS(), getIndicatorSettings(), and setIndicatorSettings().

QString BARS::pfReversalLabel [private]

Definition at line 89 of file BARS.h.

Referenced by BARS(), getIndicatorSettings(), and setIndicatorSettings().

QString BARS::pfMethodLabel [private]

Definition at line 90 of file BARS.h.

Referenced by BARS(), getIndicatorSettings(), and setIndicatorSettings().

QString BARS::maColorLabel [private]

Definition at line 92 of file BARS.h.

Referenced by BARS(), getIndicatorSettings(), and setIndicatorSettings().

QString BARS::maLineTypeLabel [private]

Definition at line 93 of file BARS.h.

Referenced by BARS(), getIndicatorSettings(), and setIndicatorSettings().

QString BARS::maPeriodLabel [private]

Definition at line 94 of file BARS.h.

Referenced by BARS(), getIndicatorSettings(), and setIndicatorSettings().

QString BARS::maLabelLabel [private]

Definition at line 95 of file BARS.h.

Referenced by BARS(), getIndicatorSettings(), and setIndicatorSettings().

QString BARS::maTypeLabel [private]

Definition at line 96 of file BARS.h.

Referenced by BARS(), getIndicatorSettings(), and setIndicatorSettings().

QString BARS::maInputLabel [private]

Definition at line 97 of file BARS.h.

Referenced by BARS(), getIndicatorSettings(), and setIndicatorSettings().

QString BARS::maColor2Label [private]

Definition at line 99 of file BARS.h.

Referenced by BARS(), getIndicatorSettings(), and setIndicatorSettings().

QString BARS::maLineType2Label [private]

Definition at line 100 of file BARS.h.

Referenced by BARS(), getIndicatorSettings(), and setIndicatorSettings().

QString BARS::maPeriod2Label [private]

Definition at line 101 of file BARS.h.

Referenced by BARS(), getIndicatorSettings(), and setIndicatorSettings().

QString BARS::maLabel2Label [private]

Definition at line 102 of file BARS.h.

Referenced by BARS(), getIndicatorSettings(), and setIndicatorSettings().

QString BARS::maType2Label [private]

Definition at line 103 of file BARS.h.

Referenced by BARS(), getIndicatorSettings(), and setIndicatorSettings().

QString BARS::maInput2Label [private]

Definition at line 104 of file BARS.h.

Referenced by BARS(), getIndicatorSettings(), and setIndicatorSettings().

QString BARS::maColor3Label [private]

Definition at line 106 of file BARS.h.

Referenced by BARS(), getIndicatorSettings(), and setIndicatorSettings().

QString BARS::maLineType3Label [private]

Definition at line 107 of file BARS.h.

Referenced by BARS(), getIndicatorSettings(), and setIndicatorSettings().

QString BARS::maPeriod3Label [private]

Definition at line 108 of file BARS.h.

Referenced by BARS(), getIndicatorSettings(), and setIndicatorSettings().

QString BARS::maLabel3Label [private]

Definition at line 109 of file BARS.h.

Referenced by BARS(), getIndicatorSettings(), and setIndicatorSettings().

QString BARS::maType3Label [private]

Definition at line 110 of file BARS.h.

Referenced by BARS(), getIndicatorSettings(), and setIndicatorSettings().

QString BARS::maInput3Label [private]

Definition at line 111 of file BARS.h.

Referenced by BARS(), getIndicatorSettings(), and setIndicatorSettings().


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