#include <TradeItem.h>
Definition at line 31 of file TradeItem.h.
None | |
EnterLong | |
ExitLong | |
EnterShort | |
ExitShort | |
MaximumLoss | |
Profit | |
Trailing | |
CUSStop | |
EndTest |
Definition at line 35 of file TradeItem.h.
TradeItem::TradeItem | ( | ) |
Definition at line 26 of file TradeItem.cpp.
References balance, commissionType, enterPrice, enterSignal, entryCom, exitCom, exitPrice, exitSignal, Long, margin, None, profit, stockFlag, tradePosition, and volume.
TradeItem::~TradeItem | ( | ) |
Definition at line 43 of file TradeItem.cpp.
void TradeItem::setTradePosition | ( | TradeItem::TradePosition | d | ) |
Definition at line 47 of file TradeItem.cpp.
References tradePosition.
Referenced by TesterReport::addTrade(), and Tester::enterTrade().
TradeItem::TradePosition TradeItem::getTradePosition | ( | ) |
Definition at line 52 of file TradeItem.cpp.
References tradePosition.
Referenced by TesterReport::createSummary(), and TesterChartPage::updateChart().
void TradeItem::setEnterSignal | ( | TradeItem::TradeSignal | d | ) |
Definition at line 57 of file TradeItem.cpp.
References enterSignal.
Referenced by Tester::enterTrade().
TradeItem::TradeSignal TradeItem::getEnterSignal | ( | ) |
void TradeItem::setExitSignal | ( | TradeItem::TradeSignal | d | ) |
Definition at line 67 of file TradeItem.cpp.
References exitSignal.
Referenced by TesterReport::addTrade(), and Tester::enterTrade().
void TradeItem::setExitSignal | ( | QString & | d | ) |
Definition at line 72 of file TradeItem.cpp.
References CUSStop, EndTest, EnterLong, EnterShort, ExitLong, ExitShort, exitSignal, MaximumLoss, Profit, and Trailing.
TradeItem::TradeSignal TradeItem::getExitSignal | ( | ) |
Definition at line 135 of file TradeItem.cpp.
References exitSignal.
Referenced by Tester::enterTrade().
void TradeItem::setEnterDate | ( | QDateTime & | d | ) |
Definition at line 140 of file TradeItem.cpp.
References enterDate.
Referenced by TesterReport::addTrade(), and Tester::enterTrade().
void TradeItem::getEnterDate | ( | QDateTime & | d | ) |
Definition at line 145 of file TradeItem.cpp.
References enterDate.
Referenced by TesterChartPage::updateChart().
void TradeItem::setExitDate | ( | QDateTime & | d | ) |
Definition at line 150 of file TradeItem.cpp.
References exitDate.
Referenced by TesterReport::addTrade(), and Tester::enterTrade().
void TradeItem::getExitDate | ( | QDateTime & | d | ) |
Definition at line 155 of file TradeItem.cpp.
References exitDate.
Referenced by TesterChartPage::updateChart().
void TradeItem::getEnterDateString | ( | QString & | s | ) |
Definition at line 160 of file TradeItem.cpp.
References enterDate.
Referenced by TesterReport::createSummary().
void TradeItem::getExitDateString | ( | QString & | s | ) |
Definition at line 165 of file TradeItem.cpp.
References exitDate.
Referenced by TesterReport::createSummary().
void TradeItem::setEnterPrice | ( | double | d | ) |
Definition at line 170 of file TradeItem.cpp.
References enterPrice.
Referenced by TesterReport::addTrade(), and Tester::enterTrade().
double TradeItem::getEnterPrice | ( | ) |
Definition at line 175 of file TradeItem.cpp.
References enterPrice.
Referenced by TesterReport::createSummary().
void TradeItem::setExitPrice | ( | double | d | ) |
Definition at line 180 of file TradeItem.cpp.
References exitPrice.
Referenced by TesterReport::addTrade(), and Tester::enterTrade().
double TradeItem::getExitPrice | ( | ) |
Definition at line 185 of file TradeItem.cpp.
References exitPrice.
Referenced by TesterReport::createSummary().
void TradeItem::setVolume | ( | int | d | ) |
Definition at line 190 of file TradeItem.cpp.
References volume.
Referenced by TesterReport::addTrade(), and Tester::enterTrade().
int TradeItem::getVolume | ( | ) |
Definition at line 195 of file TradeItem.cpp.
References volume.
Referenced by TesterReport::createSummary(), and Tester::enterTrade().
void TradeItem::setStockFlag | ( | bool | d | ) |
Definition at line 200 of file TradeItem.cpp.
References stockFlag.
Referenced by Tester::enterTrade(), and Tester::loadRule().
bool TradeItem::getStockFlag | ( | ) |
void TradeItem::setFuturesType | ( | QString & | d | ) |
Definition at line 210 of file TradeItem.cpp.
References fd, futuresType, and FuturesData::setSymbol().
Referenced by Tester::enterTrade(), and Tester::loadRule().
void TradeItem::calculateProfit | ( | ) |
Definition at line 216 of file TradeItem.cpp.
References balance, commissionType, enterPrice, entryCom, exitCom, exitPrice, fd, futuresType, FuturesData::getRate(), margin, profit, Short, stockFlag, tradePosition, and volume.
Referenced by Tester::enterTrade(), and Tester::loadRule().
void TradeItem::getTradePositionString | ( | QString & | s | ) |
Definition at line 254 of file TradeItem.cpp.
References Short, and tradePosition.
Referenced by TesterReport::createSummary().
void TradeItem::getExitSignalString | ( | QString & | s | ) |
Definition at line 261 of file TradeItem.cpp.
References CUSStop, EndTest, EnterLong, EnterShort, ExitLong, ExitShort, exitSignal, MaximumLoss, Profit, and Trailing.
Referenced by TesterReport::createSummary().
double TradeItem::getProfit | ( | ) |
Definition at line 299 of file TradeItem.cpp.
References profit.
Referenced by TesterReport::createSummary().
double TradeItem::getBalance | ( | ) |
Definition at line 309 of file TradeItem.cpp.
References balance.
Referenced by TesterReport::createSummary(), Tester::enterTrade(), Tester::loadRule(), and TesterChartPage::updateChart().
void TradeItem::setBalance | ( | double | d | ) |
Definition at line 304 of file TradeItem.cpp.
References balance.
Referenced by Tester::enterTrade(), and Tester::loadRule().
void TradeItem::setEntryCom | ( | double | d | ) |
Definition at line 314 of file TradeItem.cpp.
References entryCom.
Referenced by Tester::enterTrade(), and Tester::loadRule().
double TradeItem::getEntryCom | ( | ) |
Definition at line 319 of file TradeItem.cpp.
References entryCom.
Referenced by TesterReport::createSummary().
void TradeItem::setExitCom | ( | double | d | ) |
Definition at line 324 of file TradeItem.cpp.
References exitCom.
Referenced by Tester::enterTrade(), and Tester::loadRule().
double TradeItem::getExitCom | ( | ) |
Definition at line 329 of file TradeItem.cpp.
References exitCom.
Referenced by TesterReport::createSummary().
void TradeItem::setCommissionType | ( | bool | d | ) |
Definition at line 334 of file TradeItem.cpp.
References commissionType.
Referenced by Tester::enterTrade(), and Tester::loadRule().
bool TradeItem::getCommissionType | ( | ) |
double TradeItem::getCurrentProfit | ( | double | xp | ) |
Definition at line 344 of file TradeItem.cpp.
References enterPrice, fd, futuresType, FuturesData::getRate(), Short, stockFlag, tradePosition, and volume.
Referenced by TesterChartPage::updateChart().
void TradeItem::setMargin | ( | int | d | ) |
Definition at line 365 of file TradeItem.cpp.
References margin.
Referenced by Tester::enterTrade().
TradePosition TradeItem::tradePosition [protected] |
Definition at line 95 of file TradeItem.h.
Referenced by calculateProfit(), getCurrentProfit(), getTradePosition(), getTradePositionString(), setTradePosition(), and TradeItem().
TradeSignal TradeItem::enterSignal [protected] |
Definition at line 96 of file TradeItem.h.
Referenced by getEnterSignal(), setEnterSignal(), and TradeItem().
TradeSignal TradeItem::exitSignal [protected] |
Definition at line 97 of file TradeItem.h.
Referenced by getExitSignal(), getExitSignalString(), setExitSignal(), and TradeItem().
QDateTime TradeItem::enterDate [protected] |
Definition at line 98 of file TradeItem.h.
Referenced by getEnterDate(), getEnterDateString(), and setEnterDate().
QDateTime TradeItem::exitDate [protected] |
Definition at line 99 of file TradeItem.h.
Referenced by getExitDate(), getExitDateString(), and setExitDate().
double TradeItem::enterPrice [protected] |
Definition at line 100 of file TradeItem.h.
Referenced by calculateProfit(), getCurrentProfit(), getEnterPrice(), setEnterPrice(), and TradeItem().
double TradeItem::exitPrice [protected] |
Definition at line 101 of file TradeItem.h.
Referenced by calculateProfit(), getExitPrice(), setExitPrice(), and TradeItem().
double TradeItem::profit [protected] |
Definition at line 102 of file TradeItem.h.
Referenced by calculateProfit(), getProfit(), and TradeItem().
double TradeItem::balance [protected] |
Definition at line 103 of file TradeItem.h.
Referenced by calculateProfit(), getBalance(), setBalance(), and TradeItem().
int TradeItem::volume [protected] |
Definition at line 104 of file TradeItem.h.
Referenced by calculateProfit(), getCurrentProfit(), getVolume(), setVolume(), and TradeItem().
bool TradeItem::stockFlag [protected] |
Definition at line 105 of file TradeItem.h.
Referenced by calculateProfit(), getCurrentProfit(), getStockFlag(), setStockFlag(), and TradeItem().
QString TradeItem::futuresType [protected] |
Definition at line 106 of file TradeItem.h.
Referenced by calculateProfit(), getCurrentProfit(), and setFuturesType().
bool TradeItem::commissionType [protected] |
Definition at line 107 of file TradeItem.h.
Referenced by calculateProfit(), getCommissionType(), setCommissionType(), and TradeItem().
double TradeItem::entryCom [protected] |
Definition at line 108 of file TradeItem.h.
Referenced by calculateProfit(), getEntryCom(), setEntryCom(), and TradeItem().
double TradeItem::exitCom [protected] |
Definition at line 109 of file TradeItem.h.
Referenced by calculateProfit(), getExitCom(), setExitCom(), and TradeItem().
int TradeItem::margin [protected] |
Definition at line 110 of file TradeItem.h.
Referenced by calculateProfit(), setMargin(), and TradeItem().
FuturesData TradeItem::fd [protected] |
Definition at line 111 of file TradeItem.h.
Referenced by calculateProfit(), getCurrentProfit(), and setFuturesType().