1 #ifndef BASESTRATEGYWRAPPER_H 2 #define BASESTRATEGYWRAPPER_H 4 #include "sharedParams.h" 8 #include <QtWidgets/QShortcut> 10 #include "sharedStrutures.h" 11 #include "QtSql/QSqlQuery" 12 #include "QtSql/QSqlRecord" 13 #define Unknownstr "Unknown" 14 #ifndef MUTRADE_CLIENT 15 #include "../../api2/api_includes/api2RequestResponse.h" 16 #include "../../api2/api_includes/sharedResponse.h" 17 #include "../../api2/api_includes/api2UserCommands.h" 19 #include "../api2/headers/api2UserCommands.h" 20 #include "api2/headers/api2RequestResponse.h" 21 #include "shared/response.h" 329 virtual API2::LEGS
getLegType(QString str){
return API2::LEG_MAX; }
385 virtual void runStrategy(
int row = -1,
bool isWriteMethod=
false,
bool isModifyFromAltM=
false){}
402 qlonglong underlyingSymbolId = 0){}
421 qlonglong underlyingSymbolId = 0){}
432 qlonglong quantity) {}
492 virtual void disableColumn(QStandardItem *item,
bool isDefaultColor =
true){}
617 virtual void enableSymbolPanel(API2::LEGS leg,
bool isEnable,
bool isAccountDetail =
true,
bool isNewButtonClicked =
true){}
698 virtual void hideFeilds(API2::LEGS leg,API2::SYM_PANEL element){}
740 virtual void setCurrentStrike(
short leg,
const QString& strike,
bool isBlockSignal =
false){}
865 virtual void edit(QModelIndex &index){}
900 virtual qlonglong
getCashSymbolId(QString source,QString market, QString symbol){
return 0; }
912 virtual qlonglong
getFutureSymbolId(QString source,QString market, QString symbol, QString strDate){
return 0; }
926 virtual qlonglong
getOptionSymbolId(QString source,QString market, QString symbol, QString strDate,QString optionType,QString strikePrice){
return 0; }
951 virtual void sortExpiryDate(QStringList expDateList,QStringList &sortedExpDateList){}
1008 virtual void printSqlError(QSqlQuery &query, QString fileName, QString funcName,
int line){}
1066 virtual void getAccountDetailList(qlonglong adminTokenId,QList<qlonglong> &symbolIdList,QStringList &cCodePCodeList){}
1103 virtual qlonglong
getVolume(qlonglong symbolId){
return -1; }
1130 virtual bool isKeyExists(QString clientCode, qlonglong symbolId){
return false; }
1146 virtual void updateResponse(QSharedPointer<API2::Strategy> strategyResponseSharedPtr){}
1167 virtual bool getBidAsk(qlonglong symbolId, qlonglong& bidPrice, qlonglong &askPrice,
int position=0){
return false; }
1178 virtual qlonglong
getBidAskQty(qlonglong symbolId,
const short &side,
int position=0) {
return 0;}
1199 qlonglong underlyingSymbolId){}
1214 qlonglong underlyingSymbolId,
1217 bool isVegaCalculate){}
1346 QStandardItemModel *model){}
1415 QPair<QString,QString> emptyPair(QString(
""), QString(
""));
1681 virtual bool isSenderLeg(API2::LEGS leg,QObject *
object){
return false; }
1782 virtual void populateLeg(API2::LEGS leg, qlonglong symbolId,qlonglong adminTokenId){}
2036 _baseStrategyWrapper = baseStrategyWrapper;
2045 return _baseStrategyWrapper;
2054 _commonMethodsWrapper = commonMethodsWrapper;
2063 return _commonMethodsWrapper;
2160 virtual void sendUserResponse(QMessageBox::StandardButton ret,QSharedPointer<API2::Strategy> strategyResponseSharedPtr){}
2223 virtual bool setTotalQtyForLegs(
int row,
short type,QSqlRecord &oldRecord,
const QList<BaseSymbolIds *> &symbolIdsList){
return true;}
2448 virtual void setApiCommand(API2::UserParams*,QSqlRecord &record,
int stgCount,
short type){}
2554 const QList<BaseSymbolIds *> &symbolIdsList,
2787 virtual bool validatePortFolioDataWithErrorText( qlonglong adminTokenId ,
2788 QStringList &errorText)
2964 virtual void getUniqueSpreadKeyValuePair(QPair<QString, QString > &uniqueSpreadKeyValuePair,
int row = -1 ,
const QStringList &dataList = QStringList()) { }
3115 virtual QString
getMarket(
const UNSIGNED_CHARACTER &exchangeId){
return ""; }
3140 virtual qlonglong
gcd(qlonglong num1,qlonglong num2){
return 1; }
3151 virtual qlonglong
gcd(qlonglong num1,qlonglong num2, qlonglong num3){
return 1; }
3164 virtual qlonglong
gcd(qlonglong num1,qlonglong num2, qlonglong num3, qlonglong num4){
return 1; }
3176 virtual bool compareRatio(QList<int> &firstList ,QVector<qlonglong> &secondList,
int limit){
return false; }
3187 virtual bool compareRatio(QVector<qlonglong> &firstList ,QVector<qlonglong> &secondList,
int limit) {
return false; }
3230 virtual void setItem(QStandardItemModel *tableModel,
int row,
int col, QVariant data, Qt::AlignmentFlag alignmentFlag = Qt::AlignCenter) {}
3258 virtual QStandardItem *
getItem(QVariant data,Qt::AlignmentFlag alignmentFlag = Qt::AlignCenter){
return NULL; }
3270 virtual QStandardItem *
getItem(QVariant data, QBrush& brush, Qt::AlignmentFlag alignmentFlag){
return NULL; }
3579 virtual void showMessage(QWidget *parent, QString title, QString message){}
3631 virtual bool eventFilterStrikePriceCombobox(QObject *
object, QEvent *event, QHash<QObject *, QString> &hashComboSearchedString, qlonglong &keyPressEventTimer){
return false;}
3687 virtual void getTrades(qlonglong symbolId, qlonglong strategyId, qlonglong &filledBuyQty,
3688 float &filledBuyPrice, qlonglong &filledSellQty,
float &filledSellPrice,
3689 QString &buyPriceStr, QString &sellPriceStr) {}
3713 virtual QHeaderView*
getFilterHeaderView(QVector<short> &filterTypeList, QTableView* tableView){
return NULL; }
3732 virtual void onTextFilterChanged(QSortFilterProxyModel *proxyModel, QHeaderView *headerView, QList<short> &filterColList){}
3759 virtual void convertBPSToSpread(qlonglong &spread,
short orderMode ,qlonglong price,qlonglong dividend = 0){}
3821 virtual void getExpiryList(
const QString& symbol,
const QString& market ,QStringList &expiryList ){}
3900 qlonglong underlyingSymbolId,
3903 bool isVegaCalculate){}
3915 #endif // BASESTRATEGYWRAPPER_H virtual void replacePortfolioValuesOnSave(QStringList &dataList)
replacePortfolioValuesOnSave To Replace portfolio values that need to changed while saving portfolio ...
Definition: baseStrategyWrapper.h:2911
virtual void convertBPSToSpread(qlonglong &spread, short orderMode, qlonglong price, qlonglong dividend=0)
convertBPSToSpread To convert the Basis Point, the passed price to spread can be implemented by user
Definition: baseStrategyWrapper.h:3759
virtual void setFilterVisible(QHeaderView *headerView, bool isFilterActive)
setFilterVisible To set the filters active in the header view If already active then it hide them can...
Definition: baseStrategyWrapper.h:3749
virtual QStandardItem * getItem(QVariant data, Qt::AlignmentFlag alignmentFlag=Qt::AlignCenter)
getItem To get the pointer to QStandard item containing passed data with passed allignment can be imp...
Definition: baseStrategyWrapper.h:3258
virtual QString getInstrumentTypeStr(QString instrument)
getInstrumentTypeStr To get the instrument type string "Stock", "Future" and "Option" using passed in...
Definition: baseStrategyWrapper.h:3390
virtual void setColumnCustomColor(int row)
setColumnCustomColor To set the columns default colour of the passed row
Definition: baseStrategyWrapper.h:2301
virtual void onLoadPortFolioNew()
onLoadPortFolioNew On Loading the portfolio from .csv file fetch the strategies on the UI can be over...
Definition: baseStrategyWrapper.h:1928
virtual void onRunActivated()
onRunActivated On pressing Run push button or clicking the check box of particular row,...
Definition: baseStrategyWrapper.h:1229
virtual void onRunPushButtonClicked()
onRunPushButtonClicked To call the function on_RunPushButton_Clicked to run the selected startegy can...
Definition: baseStrategyWrapper.h:2144
virtual bool showRunAddedStrategyPopup()
showRunAddedStrategyPopup To show the pop up to run the strategy when added new strategy can be imple...
Definition: baseStrategyWrapper.h:2713
virtual QString getInstrumentTypeStr(short securityType)
getInstrumentTypeStr To get the instrument type string "Stock", "Future", "Option" and "Spread" using...
Definition: baseStrategyWrapper.h:3399
virtual bool isStrategyCompletedState(int row)
isStrategyCompletedState To check whether the strategy is in completed state can be implemented by us...
Definition: baseStrategyWrapper.h:2814
virtual void updateRemainingFeilds(int row, QSqlRecord &adminTokenIdData)
updateRemainingFeilds To update the remaining fields in the strategy table using the passed admimn to...
Definition: baseStrategyWrapper.h:2194
virtual QString getCurrentExpiry(API2::LEGS leg)
getCurrentExpiry To get the current expiry details of passed leg can be implemented by user
Definition: baseStrategyWrapper.h:633
virtual void receiveCustomResponse(API2::API2_CustomResponse &apiCustomResponse)
receiveCustomResponse To receive custom response from the passed api custom response object can be im...
Definition: baseStrategyWrapper.h:2527
virtual bool isTracker()
isTracker To check whether it is tracker can be implemented by user
Definition: baseStrategyWrapper.h:2873
virtual void getCurrentMonthExpiry(QComboBox *comboBox)
getCurrentMonthExpiry To set the index of current month in the combo box can be implemented by user
Definition: baseStrategyWrapper.h:3796
virtual QString getStrategyDisplayName()
getStrategyDisplayName To get the strategy name to display on the window can be implemented by user
Definition: baseStrategyWrapper.h:2898
virtual UNSIGNED_LONG getTotalQuantityForLegs(API2::LEGS)
getTotalQuantityForLegs To get the total quantity from the passed leg can be implemented by user
Definition: baseStrategyWrapper.h:2520
virtual void onUpKeyPressed()
onUpKeyPressed On pressing up key if strategy container is visible then it hides it otherwise show it...
Definition: baseStrategyWrapper.h:2415
virtual void setSymbolToolTip(API2::LEGS leg, const char *tooltip)
symbolPanel
Definition: baseStrategyWrapper.h:575
virtual const API2::SymbolDetail & getSymbolIdDetail(qlonglong symbolId)
getSymbolIdDetail To get the symbol detail pointer containing market id, secuirity id and each and ev...
Definition: baseStrategyWrapper.h:3867
virtual bool isSymbolPanelInitialized(API2::LEGS leg)
isSymbolPanelInitialized Gives true if symbol panel is initialized for passed leg can be implemented ...
Definition: baseStrategyWrapper.h:1671
virtual void convertToLots(QModelIndex index)
convertToLots To convert the quantity in lots of the passed index can be implemented by user
Definition: baseStrategyWrapper.h:2352
virtual bool isTotalQtyVailid(int row)
isTotalQtyVailid To check whether the total qauntity is valid or not total quantity should be greater...
Definition: baseStrategyWrapper.h:2272
virtual bool getIsLoadFromMarketWatch()
getIsLoadFromMarketWatch Gives true if data model is loaded from market watch can be implemented by u...
Definition: baseStrategyWrapper.h:1662
virtual bool isBuySellSpreadDiff(short strategy)
isBuySellSpreadDiff To check whether their is spread diff in the buy sell of the passed strategy can ...
Definition: baseStrategyWrapper.h:2338
void setApiPointer(APIWrapper *ptr)
setApiPointer To copy the value of one pointer to another
Definition: baseStrategyWrapper.h:119
virtual QString getTwoLegThreeLegSpreadTypeStr(short twoLegThreeLegSpreadType)
getTwoLegThreeLegSpreadTypeStr To get the two leg three leg spread type string "Prod Diff",...
Definition: baseStrategyWrapper.h:3460
virtual void initialize()
initialize To initialize the strategy at the begining with default values can be implemented by user
Definition: baseStrategyWrapper.h:133
virtual QString getLegTypeStr(short leg)
getLegTypeStr To get the leg type string "1L", "2L", "3L" and "4L" can be implemented by user
Definition: baseStrategyWrapper.h:3330
virtual void clearUniqueSpreadPairs()
clearUniqueSpreadPairs To clear the current and old unique key value pairs can be implemented by user
Definition: baseStrategyWrapper.h:1404
virtual void populateIvUnderlying(const qlonglong &symbolId, const int &count)
populateIvUnderlying To populate the underlying iv of the passed symbol id can be implemented by user
Definition: baseStrategyWrapper.h:2577
virtual void updateFieldsOnLoadOld(int row)
updateFieldsOnLoadOld To update the fields on loading the old data from row can be implemented by use...
Definition: baseStrategyWrapper.h:2676
virtual QString getOrderStatus(short orderStatus)
getOrderStatus To Get the order status string Confirmed Filled Pending Cancelled Rejected And some ot...
Definition: baseStrategyWrapper.h:1573
virtual void updateOldStrategyId(qlonglong strategyId, qlonglong adminTokenId)
updateOldStrategyId To update the old strategy id with passed admin token id can be implemented by us...
Definition: baseStrategyWrapper.h:2697
Definition: sharedStrutures.h:142
virtual bool isTruncateOnArchive()
isTruncateOnArchive To check whether it is going to be truncated on archive can be implemented by use...
Definition: baseStrategyWrapper.h:2822
virtual QStandardItem * getItem(QVariant data, QBrush &brush, Qt::AlignmentFlag alignmentFlag)
getItem To get the pointer to QStandard item containing passed data with passed allignment and foregr...
Definition: baseStrategyWrapper.h:3270
virtual void setCommandParameters(QSqlRecord &record, int stgCount, short type)
setCommandParameters To set the command parameters using the passed sql record can be implemented by ...
Definition: baseStrategyWrapper.h:2212
virtual int getUhedgePortfolioId(const QString &portfolioName)
getUhedgePortfolioId To get the Uhedge Portfolio id from passed portfolio name can be implemented by ...
Definition: baseStrategyWrapper.h:1987
virtual void sendUserResponse(QMessageBox::StandardButton ret, QSharedPointer< API2::Strategy > strategyResponseSharedPtr)
sendUserResponse To send the response message to user usnig the passed strategy response shared point...
Definition: baseStrategyWrapper.h:2160
virtual void thirdLegAccountUpdated()
thirdLegAccountUpdated On Updating the account deatils of the third leg can be implemented by user
Definition: baseStrategyWrapper.h:2904
virtual void onSavePortFolio()
onSavePortFolio On Saving portfolio in the .csv file To Load it on later time can be implemented by u...
Definition: baseStrategyWrapper.h:1921
virtual void onColumnDoubleClicked(QModelIndex index)
onColumnDoubleClicked To enable the editable column for editing in the strategy table on double click...
Definition: baseStrategyWrapper.h:2288
virtual QString getGenericStrategyTypeStr(short threeLegStrategy)
getGenericStrategyTypeStr To get the generic strategy type string "ITM", "IV", "Vol Spread",...
Definition: baseStrategyWrapper.h:3306
virtual bool isPushButtonEnabled(short button)
isPushButtonEnabled To check whether given button is enabled/disabled in button panel can be implemen...
Definition: baseStrategyWrapper.h:263
QHash< int,SpreadDetails * > _hashRowSpreadDetail
_hashRowSpreadDetail Hash containing the spread details in different rows
Definition: baseStrategyWrapper.h:97
virtual void onUpKeyPressed()
onUpKeyPressed On pressing up key if strategy container is visible then it hides it otherwise show it...
Definition: baseStrategyWrapper.h:1241
virtual void getEditableFieldData(qlonglong adminTokenId, QSqlRecord &records)
getEditableFieldData To get the data of all the editable columns of passed admin token id from the st...
Definition: baseStrategyWrapper.h:887
virtual void initDisplay()
initDisplay To initialize the display can be implemented by user
Definition: baseStrategyWrapper.h:2084
virtual void populateExecutionStyle(QComboBox *comboSpreadType)
populateExecutionStyle To add the execution style "TWAP" "POV" "PRICE BAND" "NO EXEC" can be implemen...
Definition: baseStrategyWrapper.h:238
virtual qlonglong getPortFolioId()
getPortFolioId To get the Portfolio id of the selected portfolio can be implemented by user
Definition: baseStrategyWrapper.h:299
virtual void getUniqueSpreadKeyValuePair(QPair< QString, QString > &uniqueSpreadKeyValuePair, int row=-1, const QStringList &dataList=QStringList())
getUniqueSpreadKeyValuePair Used for unique spread key on addding,loading portfolio,...
Definition: baseStrategyWrapper.h:2964
virtual void updateStrategyState(int row)
updateStrategyState It updates the checkbox state and background colour On ready state it uncheck the...
Definition: baseStrategyWrapper.h:1263
virtual bool isKeyExists(QString clientCode, qlonglong symbolId)
isKeyExists To check whether the client contains the symbol id or not
Definition: baseStrategyWrapper.h:1130
virtual qlonglong getBidAskQty(qlonglong symbolId, const short &side, int position=0)
getBidAskQty To get the bid quantity or ask quantity of the passed symbol id from the market data can...
Definition: baseStrategyWrapper.h:1178
virtual bool terminateValidation(int row, QString &error)
terminateValidation To check whether the validation is terminated and give the error in the passed re...
Definition: baseStrategyWrapper.h:2661
virtual bool showAdditionalSpreadPopups(short strategy, QSqlRecord &adminTokenIdData, bool isModify=false)
showAdditionalSpreadPopups To check whether to show the additional spread pop ups of passed admin tok...
Definition: baseStrategyWrapper.h:2748
virtual void setCurrentIndexFromRow(int row)
setCurrentIndexFromRow Select another row using passed row can be implemented by user
Definition: baseStrategyWrapper.h:1813
virtual bool validateData(API2::LEGS leg)
validateData Validate all the entered details and return true everything is valid on the passed leg c...
Definition: baseStrategyWrapper.h:682
virtual void receiveStrategyResponse(API2::Strategy &strategyResponse)
receiveStrategyResponse Receives response from hft and if it is success then put it in the queue can ...
Definition: baseStrategyWrapper.h:2505
virtual void initializeSecondLegSignals()
initializeSecondLegSignals Initialize the signals to emit when second leg is selected can be implemen...
Definition: baseStrategyWrapper.h:1527
virtual QString getLegTypeStr(short leg)
getLegTypeStr To get the string of leg type can be implemented by user
Definition: baseStrategyWrapper.h:321
virtual QString getInstrumentTypeString(short securityType)
getInstrumentTypeString To get the instrument type string "STOCK", "FUTURE", "OPTION" and "SPREAD" us...
Definition: baseStrategyWrapper.h:3381
virtual bool isShowHideTradedQtyChecked()
isShowHideTradedQtyChecked To check whether the traded quantity checkbox is shown or hidden in the bu...
Definition: baseStrategyWrapper.h:1367
virtual void setOldPositionUploadAllowed(bool isOldPositionUpload)
setOldPositionUploadAllowed Used to set old position uplaod allowed can be implemented by user
Definition: baseStrategyWrapper.h:1891
virtual void setFocus()
setFocus To set focus on anything can be implemented by user
Definition: baseStrategyWrapper.h:879
virtual void setColumnBackGround(int row, int colIndex, QColor color)
setColumnBackGround Sets given color in the background at that particular row and column can be imple...
Definition: baseStrategyWrapper.h:476
virtual void printSqlError(QSqlQuery &query)
printSqlError To print the deatils of the sql error like executed query, error, file name,...
Definition: baseStrategyWrapper.h:3859
virtual void onCtrlSpacePressed()
onCtrlSpacePressed On pressing Ctrl Space it uncheckes the selected row and checks the selcted row ca...
Definition: baseStrategyWrapper.h:1235
virtual bool isPortfolioNewLoadSaveHandling()
isPortfolioNewLoadSaveHandling To check whether the handlilng of new, load and save portfolio is done...
Definition: baseStrategyWrapper.h:2972
virtual short getStrategyExecType(QString strategyExecType)
getStrategyExecType To get the enum value of passed strategy execution type can be implemented by use...
Definition: baseStrategyWrapper.h:3373
virtual void setItrationQty(API2::Strategy strategyResponse)
setItrationQty Empty functions can be implemented by user
Definition: baseStrategyWrapper.h:1877
virtual void onSettingPushButtonClicked()
onSettingPushButtonClicked Gives setting box for changing differnet options on clicking setting butto...
Definition: baseStrategyWrapper.h:1862
virtual qlonglong getSymbolIdFromISIN(const QString &ISIN, short exchangeId)
getSymbolIdFromISIN To get the symbol id from the passed ISIN number and exchange id from the scrip m...
Definition: baseStrategyWrapper.h:3781
virtual QString getInstrumentStr(short securityType)
getInstrumentStr To get the instrument type string "C", "F", "O" and "S" using passed security type c...
Definition: baseStrategyWrapper.h:3408
virtual void updateAccountDetailOnEdit(const int row, const int col, API2::LEGS leg)
updateAccountDetailOnEdit To update account details of the row and column in the database of the pass...
Definition: baseStrategyWrapper.h:1121
virtual void serializeParamsCommand(API2::AbstractUserParams *genericPtr)
serializeParamsCommand To serialize the pointer objetc of abstract user params can be implemented by ...
Definition: baseStrategyWrapper.h:1965
virtual bool validateUniqueSpreadCheckEntry(const QString &uniqueKey, const QString &spreadKey, bool isModify, bool showPopup=true)
validateUniqueSpreadCheckEntry To check whether the same spread value has been added to particular cl...
Definition: baseStrategyWrapper.h:1381
virtual void runStrategy(int row=-1, bool isWriteMethod=false, bool isModifyFromAltM=false)
runStrategy To run the strategy and update the table layout can be implemented by user
Definition: baseStrategyWrapper.h:385
virtual void updateCustomValuesInUiOnModify(int row)
updateCustomValuesInUiOnModify To update the custom values of strategy in ui when strategy is already...
Definition: baseStrategyWrapper.h:2993
virtual void setSpreadPopOnAddPortfolio(bool flag)
setSpreadPopOnAddPortfolio To enable/disable the spread pop up on adding new portfolio can be impleme...
Definition: baseStrategyWrapper.h:1703
virtual QString getOrderTypeStr(short orderType)
getOrderTypeStr To get the order type string "Market", "Limit", "Stop" and "Stop Market" can be imple...
Definition: baseStrategyWrapper.h:3219
virtual void setLastLogOutTime(qlonglong time)
setLastLogOutTime Saves the last logout time in the file canbe overridden
Definition: baseStrategyWrapper.h:1645
virtual QString getNormalStr()
getNormalStr To get the string "Normal" can be overeridden
Definition: baseStrategyWrapper.h:3107
virtual void updateTrades(const RSP::OrderConfirmation &orderConfirmation)
updateTrades To update the trades from order confirmation object can be implemented by user
Definition: baseStrategyWrapper.h:2512
virtual API2::AccountDetail getAccountDetailFromDb(qlonglong adminTokenId, short leg)
getAccountDetailFromDb To get the account details of the passed admin token id from the database of t...
Definition: baseStrategyWrapper.h:1139
virtual short getGenericBaseType(QString baseType)
getGenericBaseType To get the enum value of generic base type of passed base type can be implemented ...
Definition: baseStrategyWrapper.h:3280
virtual QString getInstrumentTypeBriefIndex()
getInstrumentTypeBriefIndex To get the string "I" can be implemented by user
Definition: baseStrategyWrapper.h:3122
virtual void insertHashRowSymbolId(BaseSymbolIds *symbolIds, int row, int symbolIdIndex, qlonglong quantity, int orderModeIndex, short strategyType, qlonglong underlyingSymbolId=0)
insertHashRowSymbolId Insert symbol ids, row, symbol ids, quantity, order mode index and strategy typ...
Definition: baseStrategyWrapper.h:415
virtual void addWidgetInButtonPanelGroup(QWidget *)
addWidgetInButtonPanelGroup To add the passed widget in the button panel can be implemented by user
Definition: baseStrategyWrapper.h:1352
virtual void setFilterActive(QSortFilterProxyModel *proxyModel, bool isFilterActive)
setFilterActive To set the filter active or diable according to passed isfilteractive can be implemen...
Definition: baseStrategyWrapper.h:3740
virtual void setCurrentInstrument(short leg, const QString &inst, bool isBlockSignal=false)
setCurrentInstrument To set the passed instrument text as the current text on the instrument field on...
Definition: baseStrategyWrapper.h:714
virtual void setSymbol(API2::LEGS leg, QString symbol)
setSymbol To activate the search for entering text to match with any symbol and gives combo box featu...
Definition: baseStrategyWrapper.h:673
virtual QString getStrategyState(short responseType)
getStrategyState To get the strategy type string "RUN", "FAILURE", "SHUTDOWN", "SHUTDOWN SQUAREOFF",...
Definition: baseStrategyWrapper.h:3478
virtual QString maturityDayMonYearToDate(int day, int yearMon, const QString &format=QString("dd MMM yyyy"))
maturityDayMonYearToDate To get the maturity date including passed day and yearmon in the passed form...
Definition: baseStrategyWrapper.h:3608
virtual void updateTableView(QTableView *tableview)
updateTableView To update the table view after any change can be implemented by user
Definition: baseStrategyWrapper.h:3554
virtual double getGammaValue(qlonglong symbolId)
getGammaValue To get the rate of change between an option's delta and the underlying asset's price of...
Definition: baseStrategyWrapper.h:1455
virtual bool isRatioUnChanged(int row)
isRatioUnChanged To check whether the ratio is unchanged of the passed row can be implemented by user
Definition: baseStrategyWrapper.h:2281
virtual bool isMulIocAllowed()
isMulIocAllowed To check whether the validity is mulyi IOC can be implemented by user
Definition: baseStrategyWrapper.h:3027
virtual bool isSpreadAllowed(short strategy)
isSpreadAllowed To check whether the spread is allowed for the passed strategy can be implemented by ...
Definition: baseStrategyWrapper.h:2310
virtual void hideShowCommonButtonPanelWidgets(API2::CTRL_BTN hideShowCheckBox, bool isShowHide)
hideShowCommonButtonPanelWidgets To show/hide the hideshow check box on the button panel can be imple...
Definition: baseStrategyWrapper.h:1083
virtual qlonglong getVolume(qlonglong symbolId)
getVolume To get the volume of the passed symbol id from the market can be implemented by user
Definition: baseStrategyWrapper.h:1103
virtual bool isAlwaysArchive()
isAlwaysArchive To check whether it is always archived can be implemented by user
Definition: baseStrategyWrapper.h:2669
virtual short getExecutionVolumn(QString type)
getExecutionVolumn To get the enum value of passed execution volume type can be implemented by user
Definition: baseStrategyWrapper.h:3348
virtual bool isGtcOrder(short orderValidity)
isGtcOrder Gives true if order validity is gtc(good till cancelled) can be implemented by user
Definition: baseStrategyWrapper.h:1638
virtual void convertExpiryDate(QComboBox *comboBox)
convertExpiryDate To convert expiry date from passed combo box to string date can be implemented by u...
Definition: baseStrategyWrapper.h:1514
virtual short getOptionMode(QString optionType)
getOptionMode To get the enum value of passed option type string can be implemented by user
Definition: baseStrategyWrapper.h:3523
virtual void insertTradeWiseTrackerList(QSharedPointer< API2::TradeWiseTrackerData > &tradeWiseTrackerData)
insertTradeWiseTrackerList It appends the trade wise tracker data in the track wise tracker list can ...
Definition: baseStrategyWrapper.h:1254
virtual void getPrecisionAndMultiplier(qlonglong symbolId, double &multiplier, short &precision)
getPrecisionAndMultiplier To get the multiplier and precision from the passed symbol id can be implem...
Definition: baseStrategyWrapper.h:974
virtual bool isNoRemainingQty(int row)
isNoRemainingQty To check whether their is remaining quantity or not of the passed row can be impleme...
Definition: baseStrategyWrapper.h:2329
virtual QString getOptionType(QString optionTypeStr)
getOptionType To get the option type string "P" or "C" can be implemented by user
Definition: baseStrategyWrapper.h:3531
virtual void populateSpreadTerm(QComboBox *spreadTerm)
populateSpreadTerm To add 2 leg spred type "ABS" "BPS" can be implemented by user
Definition: baseStrategyWrapper.h:289
virtual qlonglong getClosePrice(qlonglong symbolId)
getClosePrice To get the close price of the passed symbol id from the market data can be implemented ...
Definition: baseStrategyWrapper.h:3598
virtual void setApiCommand(API2::UserParams *, QSqlRecord &record, int stgCount, short type)
setApiCommand To set the api command and set default vaues and send the values to the backend from th...
Definition: baseStrategyWrapper.h:2448
virtual void setItem(QStandardItemModel *tableModel, int row, int col, QVariant data, Qt::AlignmentFlag alignmentFlag=Qt::AlignCenter)
setItem To set the passed data in the passed table model on the passed row and column with passed all...
Definition: baseStrategyWrapper.h:3230
virtual bool checkForBannedScrips(qlonglong symbolId)
checkForBannedScrips To check whether the passed symbol id is banned through dealer or globally or no...
Definition: baseStrategyWrapper.h:3812
virtual void changesOnTermiantion(int rowClicked)
changesOnTermiantion To do the changes done on termination in the passed row can be implemented by us...
Definition: baseStrategyWrapper.h:2939
virtual void applyUIValidation(short, short state)
applyUIValidation To apply ui validation so that no invalid data gets saved in the database can be im...
Definition: baseStrategyWrapper.h:2239
virtual void setDVMFocusWiget(QString focusWidgetKey)
setDVMFocusWiget To set the focus on the passed focus widget key can be implemented by user
Definition: baseStrategyWrapper.h:551
virtual QString getInstrumentTypeFromName(QString instrument)
getInstrumentTypeFromName To get the instrument type string "C", "F", "O" and "S" using passed instru...
Definition: baseStrategyWrapper.h:3416
virtual void clearLegDetails(API2::LEGS leg)
clearLegDetails To clear the leg details of the passed leg can be implemented by user
Definition: baseStrategyWrapper.h:705
virtual void insertCustomSymbolDetailParameters(BaseSymbolIds *symbolIds, int row)
insertCustomSymbolDetailParameters To insert the custom symbol detail parameters from the passed symb...
Definition: baseStrategyWrapper.h:2858
virtual void populateBiddingLeg(QComboBox *comboBoxBiddingLong, short legCount)
populateBiddingLeg To add the bidding leg in the combo box "First Leg" "Seconf Leg" "Third Leg" "Four...
Definition: baseStrategyWrapper.h:194
virtual QString getClientStr()
getClientStr To get the string "Client" can be implemented by user
Definition: baseStrategyWrapper.h:3100
Definition: sharedStrutures.h:312
virtual void getDllVersionString(QString &dllVersionString)
getDllVersionString To get the dll version string in the passed dllversionstring reference can be imp...
Definition: baseStrategyWrapper.h:2071
virtual void spreadCalculationMethod(int row, QList< BaseSymbolIds > &symbolIdsList)
spreadCalculationMethod To calculate spread of passed row of the symbol id list can be implemented by...
Definition: baseStrategyWrapper.h:2385
virtual void closeOpenDialog()
closeOpenDialog To open/close dialog can be implemented by user
Definition: baseStrategyWrapper.h:2844
virtual QModelIndex getProxyModelIndex()
getProxyModelIndex To get the current index form strategy table can be implemented by user
Definition: baseStrategyWrapper.h:832
virtual void onAltOPressed()
onAltOPressed On pressing ALt + 'O' the load portfolio is enabled can be implemented by user
Definition: baseStrategyWrapper.h:2439
virtual void setDelegateStepSize(double stepSize, short elementType, short decimals=2)
setDelegateStepSize To set the single step size of passed element type can be implemented by user
Definition: baseStrategyWrapper.h:850
virtual void onMarketChanged()
onMarketChanged On market change show the symbols and other data for the same can be implemented by u...
Definition: baseStrategyWrapper.h:2644
virtual bool isStrategyIdExists(qlonglong strategyId)
isStrategyIdExists To check whether their exists any other strategy id same as passed strategy id can...
Definition: baseStrategyWrapper.h:2948
virtual bool validatePortFolioData(QStringList &dataList, QString &errorText, int portfolioCount)
validatePortFolioData To validate the portfolio data from the passed reference datalist and return er...
Definition: baseStrategyWrapper.h:2588
virtual bool isSidTotalQtyHandling()
isSidTotalQtyHandling To check whether sid total quantity is handling can be implemented by user
Definition: baseStrategyWrapper.h:2498
virtual void onSpacePressed()
onSpacePressed On pressing space key the editing is enable can be implemented by user
Definition: baseStrategyWrapper.h:2391
virtual void on_CommitPushButton_Clicked(bool isModifyFromAltM=false)
on_CommitPushButton_Clicked Save the changes made to selected row in the database can be implemented ...
Definition: baseStrategyWrapper.h:1820
virtual bool populateStrategyFromPortfolio()
populateStrategyFromPortfolio To check strategy is populated from portfolio or not can be implemented...
Definition: baseStrategyWrapper.h:1870
virtual double getGreeksDelta(qlonglong symbolId)
getGreeksDelta To get rate of change between the option's price and a $1 change in the underlying ass...
Definition: baseStrategyWrapper.h:1654
virtual short getTwoLegArbitHedgeMethod(QString hedgeMethod)
getTwoLegArbitHedgeMethod To get the enum value of the passed hedge method string can be implemented ...
Definition: baseStrategyWrapper.h:3434
virtual bool byPassRunAddedStrategy()
byPassRunAddedStrategy can be implemented by user
Definition: baseStrategyWrapper.h:2705
virtual void onSecondLegMarketChanged()
onSecondLegMarketChanged On Second leg market changed show the symbols accordingly can be implemented...
Definition: baseStrategyWrapper.h:2638
virtual SpreadDetails * getSpreadDetail(int row)
getSpreadDetail To get the spread details of passed row can be implemented by user
Definition: baseStrategyWrapper.h:1155
virtual bool isSpotMarket(QString currentMarketId)
isSpotMarket Gives true if passed market id is present in the data can be implemented by user
Definition: baseStrategyWrapper.h:1478
virtual void disableColumn(QStandardItem *item, bool isDefaultColor=true)
disableColumn Used to disable a particular column and make its color default can be implemented by us...
Definition: baseStrategyWrapper.h:492
virtual void setDelegatesFocusOut()
setDelegatesFocusOut To set the focus out from the strategy table can be implemented by user
Definition: baseStrategyWrapper.h:1709
ColumnIndex _col
_col Object of ColumnIndex Structure To get the data of any column
Definition: baseStrategyWrapper.h:82
APIWrapper * _ApiPointer
_ApiPointer A pointer object of APIWrapper Class
Definition: baseStrategyWrapper.h:113
Definition: sharedStrutures.h:177
virtual bool isProcessingDefaultValues()
isProcessingDefaultValues To check whether the processing field contains default values or not can be...
Definition: baseStrategyWrapper.h:1447
virtual void populateSymbolPRO(API2::LEGS leg, qlonglong symbolId)
populateSymbolPRO To populate the ui with details of passed symbol id and in the passed leg can be im...
Definition: baseStrategyWrapper.h:599
virtual int getPortFolioRowFromPortfolioId(const qlonglong &portID)
getPortFolioRowFromPortfolioId To get the portfolio row value from the portfolio id can be implemente...
Definition: baseStrategyWrapper.h:1281
virtual void showHidePanel(API2::LEGS leg, bool status)
showHidePanel To show symbol panel fields pass true and to hide pass false of passed leg can be imple...
Definition: baseStrategyWrapper.h:665
virtual void setEditableModeRow(int row)
setEditableModeRow To set the passed row in editable mode can be implemented by user
Definition: baseStrategyWrapper.h:1359
QQueue< QSharedPointer< API2::Strategy > > _responseQueue
_responseQueue Contains the queue of strategy responses
Definition: baseStrategyWrapper.h:92
virtual void getNextMonthExpiry(QComboBox *comboBox)
getNextMonthExpiry To set the index in the combo box for the next month from the current one can be i...
Definition: baseStrategyWrapper.h:3803
virtual void onEditPushButtonClicked()
onEditPushButtonClicked To call the function on_EditPushButton_Clicked to edit the added strategy can...
Definition: baseStrategyWrapper.h:2114
virtual COMMAND_CATEGORY_TYPE getCommandCategory()
getCommandCategory To get the command category type can be implemented by user
Definition: baseStrategyWrapper.h:1297
virtual bool compareRatio(QVector< qlonglong > &firstList, QVector< qlonglong > &secondList, int limit)
compareRatio Checks whether first list ratio and second list ratio is valid can be implemented by use...
Definition: baseStrategyWrapper.h:3187
virtual void modifyCancelOrders(qlonglong strategyId, API2::apiOrderBookParams *apiBookParams=NULL)
modifyCancelOrders To modify/cancel the orders from the order book in orderontime can be implemented ...
Definition: baseStrategyWrapper.h:1312
virtual QString getOptionStr()
getOptionStr To get the string "Option" can be implemented by user
Definition: baseStrategyWrapper.h:3079
virtual short getTwoLegThreeLegSpreadType(QString strSpreadType)
getTwoLegThreeLegSpreadType To get the enum value of passed spread type string can be implemented by ...
Definition: baseStrategyWrapper.h:3469
virtual QString getOptionsConRevCombination()
getOptionsConRevCombination To get the options con rev combination can be implemented by user
Definition: baseStrategyWrapper.h:1943
virtual bool isTableViewFocused()
isTableViewFocused To check whether table view has focus or not can be implemented by user
Definition: baseStrategyWrapper.h:1507
virtual int getCurrentExpiryIndexSpread(QComboBox *comboBoxExpiry)
getCurrentExpiryIndexSpread To get the current selected expiry index spread of the passed combo box e...
Definition: baseStrategyWrapper.h:3570
virtual bool isSenderLeg(API2::LEGS leg, QObject *object)
isSenderLeg To check whether the passed object is present in the symbol panel list of the passed leg ...
Definition: baseStrategyWrapper.h:1681
virtual void onEscapePressed()
onEscapePressed On pressing Escape key the strategy window will get minimized can be implemented by u...
Definition: baseStrategyWrapper.h:1223
virtual void updateNonPortfolioDbParams(QMap< QString, QString > &nonPortfolioDbParams, QStringList &dataList)
updateNonPortfolioDbParams To update database parameters that are not in portfolio can be implemented...
Definition: baseStrategyWrapper.h:2980
virtual bool updateStrategyDefaultValues(qlonglong adminTokenIdNew)
updateStrategyDefaultValues To check the updation of the strategy default values using the passed adm...
Definition: baseStrategyWrapper.h:2255
virtual void insertHashRowSymbolId(int row, int symbolIdIndex, qlonglong quantity)
insertHashRowSymbolId Insert row, symbol id index and quantity in the hash can be implemented by user
Definition: baseStrategyWrapper.h:430
virtual qlonglong getOptionSymbolId(QString source, QString market, QString symbol, QString strDate, QString optionType, QString strikePrice)
getOptionSymbolId To get the secuirity id of option method from the scrip master containing the passe...
Definition: baseStrategyWrapper.h:926
virtual QString getSymbolString(bool isAdd, int row=-1)
getSymbolString To get the symbol string from the passed row can be implemented by user
Definition: baseStrategyWrapper.h:2831
virtual void onAltSPressed()
onAltSPressed On pressing ALt + 'S' the portfolio is saved can be implemented by user
Definition: baseStrategyWrapper.h:2433
virtual void hideFeilds(API2::LEGS leg, API2::SYM_PANEL element)
hideFeilds To hide any particualr element from the symbol panel of the passed leg can be implemented ...
Definition: baseStrategyWrapper.h:698
virtual void applyDefaultValue(QString)
applyDefaultValue To apply default value to passed key can be implemented by user
Definition: baseStrategyWrapper.h:544
virtual void updateAccountDetail(const int row)
updateAccountDetail To update the account deatils of the passed row in the database can be implemente...
Definition: baseStrategyWrapper.h:2563
virtual void sortExpiryDate(QStringList expDateList, QStringList &sortedExpDateList)
sortExpiryDate To sort the expiry dates list and save it in the passed reference sortedExpDateList li...
Definition: baseStrategyWrapper.h:951
virtual void updateResponse(QSharedPointer< API2::Strategy > strategyResponseSharedPtr)
updateResponse To get the response type and took action accordingly can be implemented by user
Definition: baseStrategyWrapper.h:1146
virtual short getSegmentFromInstrument(const QString &instrument)
getSegmentFromInstrument Gives the enum value of segment type CM or FO using the passed instrument ca...
Definition: baseStrategyWrapper.h:3640
QHash< int,QList< BaseSymbolIds * > > _hashRowSymboID
_hashRowSymboID Contains the rows of data of symbol id and its details
Definition: baseStrategyWrapper.h:87
virtual bool isQuoteAvailable(qlonglong symbolId)
isQuoteAvailable To check whether quote is available for passed symbol id in the market data or not c...
Definition: baseStrategyWrapper.h:3649
virtual void onRemoveAllClicked()
onRemoveAllClicked Removes all the rows from the table can be implemented by user
Definition: baseStrategyWrapper.h:458
virtual void printSqlError(QSqlQuery &query, QString fileName, QString funcName, int line)
printSqlError To get the address of the error coming while executing the query can be implemented by ...
Definition: baseStrategyWrapper.h:1008
virtual void updateSqlRecordOnEdit(int row)
updateSqlRecordOnEdit To Update the Database records when commit the changes in the strategy table ca...
Definition: baseStrategyWrapper.h:1614
virtual void initializeFourthLegSignals()
initializeFourthLegSignals Initialize the signals to emit when fourth leg is selected can be implemen...
Definition: baseStrategyWrapper.h:1539
virtual double getPriceMultiplier(qlonglong symbolId)
getPriceMultiplier To get the price multiplier of the passed symbol id can be implemented by user
Definition: baseStrategyWrapper.h:983
virtual void onCommitPushButtonClicked()
onCommitPushButtonClicked To call the function on_CommitPushButton_Clicked to commit the changes done...
Definition: baseStrategyWrapper.h:2120
virtual void setRatioChecked(bool ratio)
setRatioChecked To enable/disable the writing to table can be implemented by user
Definition: baseStrategyWrapper.h:163
virtual bool validatePortFolioDataOnLoadOld(qlonglong adminTokenId)
validatePortFolioDataOnLoadOld To validate portfolio data while loading the old data can be implement...
Definition: baseStrategyWrapper.h:2772
virtual bool getIsOldPositionUploadAllowed()
getIsOldPositionUploadAllowed Gives true if old position upload is allowed can be implemented by user
Definition: baseStrategyWrapper.h:1899
virtual void onRemovePushButtonClicked()
onRemovePushButtonClicked To call the function on_RemovePushButton_Clicked to remove the selected str...
Definition: baseStrategyWrapper.h:2132
virtual void resetTotalQtyForLegs()
resetTotalQtyForLegs To reset the total quantity for legs to again start again with 0 can be implemen...
Definition: baseStrategyWrapper.h:2850
virtual bool on_AddPushButton_Clicked()
on_AddPushButton_Clicked Add the parameter values to the database Updates the strategy table can be i...
Definition: baseStrategyWrapper.h:1799
virtual bool readyStateValidations(int row, QSqlRecord &dbRecord)
readyStateValidations To validate the passed row which is in ready state from the db record can be im...
Definition: baseStrategyWrapper.h:2377
virtual qlonglong gcd(qlonglong num1, qlonglong num2, qlonglong num3, qlonglong num4)
gcd To get the greatest common divisor of num1, num2, num3 and num4 can be implemented by user
Definition: baseStrategyWrapper.h:3164
virtual int getSpreadTimer()
getSpreadTimer To get the value of spread timer can be implemented by user
Definition: baseStrategyWrapper.h:3657
virtual QString getGenericExecutionStyleStr(short baseType)
getGenericExecutionStyleStr To get the generic execution style string "TWAP", "POV",...
Definition: baseStrategyWrapper.h:3497
virtual bool isStrategyLegPresent()
isStrategyLegPresent To check whether the strategy leg is present can be implemented by user
Definition: baseStrategyWrapper.h:2490
virtual QHeaderView * getFilterHeaderView(QVector< short > &filterTypeList, QTableView *tableView)
getFilterHeaderView To get the header view of the filter enable columns in the table view using the p...
Definition: baseStrategyWrapper.h:3713
virtual void getGtcOrderConfirmationVector(QVector< RSP::OrderConfirmation * > &orderConfirmationVector)
getGtcOrderConfirmationVector To get the good till order confirmation vector in the passed vector can...
Definition: baseStrategyWrapper.h:1630
virtual QString getSpreadStr()
getSpreadStr To get the string "Spread" can be implemented by user
Definition: baseStrategyWrapper.h:3086
virtual bool isProcessingEvent()
isProcessingEvent Checks whether if any event is under process or not can be implemented by user defa...
Definition: baseStrategyWrapper.h:127
virtual int getClientCodePortfolioIndex(API2::LEGS leg)
getClientCodePortfolioIndex To get the client code from the portfolio of passed leg can be implemente...
Definition: baseStrategyWrapper.h:1764
virtual void on_StopAllPushButton_clicked()
on_StopAllPushButton_clicked Stop all the running strategies can be implemented by user
Definition: baseStrategyWrapper.h:1826
virtual void enableDisableStrikePrice(short leg, bool isEnable)
enableDisableStrikePrice To enable/disable strike price field according to requirement from the passe...
Definition: baseStrategyWrapper.h:807
Definition: sharedParams.h:13
virtual void on_radioButtonClientAccount1_toggled(bool checked)
on_radioButtonClientAccount1_toggled On toggling the radio button of client and pro,...
Definition: baseStrategyWrapper.h:2651
virtual QComboBox * getSymbolCombo(API2::LEGS leg)
getSymbolCombo To get the symbol combo box on the strategy window of the passed leg can be implemente...
Definition: baseStrategyWrapper.h:1582
virtual bool eventFilterStrikePriceCombobox(QObject *object, QEvent *event, QHash< QObject *, QString > &hashComboSearchedString, qlonglong &keyPressEventTimer)
eventFilterStrikePriceCombobox To check whether event filter is active on strike price combo box or n...
Definition: baseStrategyWrapper.h:3631
virtual void resetWidgetStateOnValidation(API2::PORTFOLIO_STATE state, API2::PARAM *strategyParam, int lotSize=1)
resetWidgetStateOnValidation To reset the value of strategy parameters on user interface on validatio...
Definition: baseStrategyWrapper.h:1607
virtual QString getCurrentOptType(short leg)
getCurrentOptType To get the current opt type from the opt type field of the passed leg can be implem...
Definition: baseStrategyWrapper.h:774
virtual void symbolActivated(API2::LEGS leg)
symbolActivated To give the completion to the entered symbol in symbol combo box can be implemented b...
Definition: baseStrategyWrapper.h:1696
virtual API2::AbstractUserParams * getParamsCommand()
getParamsCommand To get the data using pointer object of abstract user params can be overriden
Definition: baseStrategyWrapper.h:1936
virtual void hideShowColumns(QTableView *tableView, QString title, QList< int >, QWidget *parent, bool isColumn, QStandardItemModel *model)
hideShowColumns To show/hide the passed column from the table view can be implemented by user
Definition: baseStrategyWrapper.h:1341
virtual QPair< QString, QString > & getUniqueSpreadKeyValuePair(bool isNew=false)
getUniqueSpreadKeyValuePair To get the unique spread key value pair If isNew is true then give the cu...
Definition: baseStrategyWrapper.h:1414
virtual bool validateData(API2::PORTFOLIO_STATE state)
validateData To validate the data entered in the strategy parameters before saving it in the strategy...
Definition: baseStrategyWrapper.h:2169
virtual bool isSpreadAlgo()
isSpreadAlgo To check whether the given algo is spread algo can be implemented by user
Definition: baseStrategyWrapper.h:2737
virtual QString getOrderMode(short orderMode)
getOrderMode To get the order mode string "Buy" or "Sell" can be implemented by user
Definition: baseStrategyWrapper.h:3442
virtual void onFirstLegSymbolFocusOut()
onFirstLegSymbolFocusOut To be called when the first leg symbol's focus is out can be implemented by ...
Definition: baseStrategyWrapper.h:2090
virtual bool isEditableColumn(int column)
isEditableColumn To get whether the passed column is editable form the strategy table view or not can...
Definition: baseStrategyWrapper.h:841
virtual void firstLegSymbolChanged()
firstLegSymbolChanged On first leg symbol changed show the selected leg symbols and details can be im...
Definition: baseStrategyWrapper.h:2608
virtual void onComboBoxOptTypeActivated(short leg, QString arg)
onComboBoxOptTypeActivated On combo box opt type activated of passed leg it gives values to strike pr...
Definition: baseStrategyWrapper.h:649
virtual QString getStrategyExecTypeStr(short strategyExecType)
getStrategyExecTypeStr To get the strategy execution type string "BID", "IOC" and "MUL IOC" can be im...
Definition: baseStrategyWrapper.h:3364
virtual int getDbIndex(const QString name)
getDbIndex To get the index of name from database can be implemented by user
Definition: baseStrategyWrapper.h:247
virtual void updateTableView()
updateTableView Updates the table view with latest changes can be implemented by user
Definition: baseStrategyWrapper.h:444
virtual void onModifyStrategy()
onModifyStrategy To Modify the Strategy values while it is running can be implemented by user
Definition: baseStrategyWrapper.h:2017
virtual const QString & getUhedgePortfolioNameFromId(const int portfolioId)
getUhedgePortfolioNameFromId To get the uhedge portfolio name from passed portfolio id can be impleme...
Definition: baseStrategyWrapper.h:1995
virtual void loadOldTrackerData()
loadOldTrackerData To load old tracker data can be implemented by user
Definition: baseStrategyWrapper.h:2879
virtual short getSecurityType(QString securityType)
getSecurityType To get the security type, whether stock, option, futuer or spread can be implemented ...
Definition: baseStrategyWrapper.h:3203
virtual void on_RemovePushButton_Clicked()
on_RemovePushButton_Clicked Removes the selected row from the strategy table can be implemented by us...
Definition: baseStrategyWrapper.h:1844
Definition: sharedStrutures.h:18
virtual bool validateAccountDetailOnLoad(const QString &clientCode, qlonglong symbolId)
validateAccountDetailOnLoad Gives true if account details given at the time adding new strategy is va...
Definition: baseStrategyWrapper.h:1719
virtual void receiveStrategyResponse(QSharedPointer< API2::Strategy > strategyResponseSharedPtr)
receiveStrategyResponse Receives response from hft and if it is success then put it in the queue can ...
Definition: baseStrategyWrapper.h:1884
virtual void onFirstLegMarketChanged()
onFirstLegMarketChanged On First leg market changed show the symbols accordingly can be implemented b...
Definition: baseStrategyWrapper.h:2614
virtual void setCurrentInstrument(short leg, int index, bool isBlockSignal=false)
setCurrentInstrument To set the passed instrument index as the current index on the instrument field ...
Definition: baseStrategyWrapper.h:723
virtual void enableSymbolPanel(API2::LEGS leg, bool isEnable, bool isAccountDetail=true, bool isNewButtonClicked=true)
enableSymbolPanel To enable the symbol panel fields of passed leg on pressing new push button can be ...
Definition: baseStrategyWrapper.h:617
virtual void insertHashRowSymbolId(int row, int symbolIdIndex, qlonglong quantity, int orderModeIndex, short strategyType, qlonglong underlyingSymbolId=0)
insertHashRowSymbolId Insert Row , symbol id index, quantity, order mode index and strategy type in t...
Definition: baseStrategyWrapper.h:397
virtual void convertExpiryToMonNumber(QString &expiry)
convertExpiryToMonNumber To convert expiry month name string to month number string can be implemente...
Definition: baseStrategyWrapper.h:965
virtual void setDelegateMinValue(double minval, short elementType)
setDelegateMinValue To set the minimum possible value of the passed element type can be implemented b...
Definition: baseStrategyWrapper.h:858
virtual void OnDownKeyPressed()
OnDownKeyPressed On down key preesing it make sure that strategy container is visible can be implemen...
Definition: baseStrategyWrapper.h:1247
virtual void getIvVegaPrice(qlonglong symbolId, qlonglong price, short, qlonglong underlyingSymbolId, qlonglong &ivPrice, double &vega, bool isVegaCalculate)
getIvVegaPrice To get the IV and Vega price of the passed symbol id in the passed reference can be im...
Definition: baseStrategyWrapper.h:3897
virtual short configFileValue(const char *str)
configFileValue To get the value of passed string pointer from the configuration file can be implemen...
Definition: baseStrategyWrapper.h:3885
virtual void addtoParamsGroup(API2::StrategyParamMap *paramMap)
addtoParamsGroup To add new parameter in the database can be implemented by user
Definition: baseStrategyWrapper.h:254
virtual void removeUniqueSpreadKeyValue(const QString &uniqueKey, const QString &spreadKey)
removeUniqueSpreadKeyValue To remove the spread key present at unique key can be implemented by user
Definition: baseStrategyWrapper.h:1398
virtual void showByPopulatingSymbolPanel(qlonglong symbolId, QKeySequence sequence=QKeySequence::UnknownKey)
showByPopulatingSymbolPanel To show by populating the symbol panel from the passed symbol id can be i...
Definition: baseStrategyWrapper.h:2805
virtual short getOrderMode(QString orderMode)
getOrderMode To get the enum value of passed order mode string can be implemented by user
Definition: baseStrategyWrapper.h:3451
virtual void modifySaveFileHeader(QString &headerRow)
modifySaveFileHeader To modify save file header in case implementing custom portfolio save can be imp...
Definition: baseStrategyWrapper.h:2925
virtual short isIvstrategy(short strategy, int row=-1)
isIvstrategy To check whether the strategy contains implied volatility can be implemented by user
Definition: baseStrategyWrapper.h:2320
virtual void onEscapePressed()
onEscapePressed On pressing Escape key the strategy window will get minimized can be implemented by u...
Definition: baseStrategyWrapper.h:2403
virtual void getAccountDetailList(qlonglong adminTokenId, QList< qlonglong > &symbolIdList, QStringList &cCodePCodeList)
getAccountDetailList To get the list of all the accounts contianing passed admin token id in passed c...
Definition: baseStrategyWrapper.h:1066
virtual void onFirstLegAccountChanged(bool isChecked)
onFirstLegAccountChanged To be run when the account of first leg is changed
Definition: baseStrategyWrapper.h:2096
virtual void convertToLots(QSqlRecord &record)
convertToLots To convert the quantity in lots in the passed sql record reference can be implemented b...
Definition: baseStrategyWrapper.h:2345
virtual QString getDiffTypeStr(short diffType)
getDiffTypeStr To get the diff type string "IV" or "Vega" can be implemented by user
Definition: baseStrategyWrapper.h:3322
virtual qlonglong getCashSymbolId(QString source, QString market, QString symbol)
CommonMethods.
Definition: baseStrategyWrapper.h:900
~BaseStrategyWrapper()
~BaseStrategyWrapper A destructor
Definition: baseStrategyWrapper.h:108
virtual void clearCustomStructure(qlonglong adminTokenIdNew)
clearCustomStructure To clear the custom structure of the passed new admin token id can be implemente...
Definition: baseStrategyWrapper.h:2262
virtual void populateLeg(API2::LEGS leg, qlonglong symbolId, qlonglong adminTokenId)
populateLeg To populate the details of passed symbol id with passed admin token id on the passed leg ...
Definition: baseStrategyWrapper.h:1782
virtual bool showRemovePopup()
showRemovePopup To check whether remove pop up is shown on removing strategy can be implemented by us...
Definition: baseStrategyWrapper.h:2543
virtual bool customUniqueSpreadHandlingCheck(int row=-1, const QStringList &dataList=QStringList())
customUniqueSpreadHandlingCheck To check whether the custom unique spread check is handling can be im...
Definition: baseStrategyWrapper.h:3003
virtual QPushButton * getpushButton(short button)
getpushButton To get the Pointer to passed button can be implemented by user
Definition: baseStrategyWrapper.h:280
virtual qlonglong getOppositePrice(qlonglong symbolId, short orderMode)
getOppositePrice To get the best buy or sell price from the market data of passed symbol id For buy m...
Definition: baseStrategyWrapper.h:3771
virtual QString getOrderValidityStr(unsigned short orderValidity)
getOrderValidityStr To get the order validity string "DAY", "IOC", "FOK", "GFS", "GFD",...
Definition: baseStrategyWrapper.h:3238
Definition: baseStrategyWrapper.h:2023
virtual void hideButtons(API2::CTRL_BTN btn)
hideButtons To hide the passed button from button panel can be implemented by user
Definition: baseStrategyWrapper.h:1330
virtual void addDefaultParameter(QString name, short type, QWidget *element, QWidget *elementGroup=0)
addDefaultParameter To add default parameters to a widget can be implemented by user
Definition: baseStrategyWrapper.h:508
virtual void applyDefaultValues(const QStringList &ignoredkey=(QStringList()<< Unknownstr))
applyDefaultValues To apply default values to all except ignored key can be implemented by user
Definition: baseStrategyWrapper.h:538
virtual void populateAccountDetail(API2::LEGS leg, qlonglong symbolId)
populateAccountDetail To populate account details using passed symbol id and in the passed leg can be...
Definition: baseStrategyWrapper.h:607
virtual void setInstrTypeFromMkt(QComboBox *comboBox, QString market)
setInstrTypeFromMkt To set the current index of the instrument type from the passed market For spot m...
Definition: baseStrategyWrapper.h:3852
virtual QModelIndex getCurrentIndex()
getCurrentIndex To get the current index from the table view after maping to source can be implemente...
Definition: baseStrategyWrapper.h:825
virtual void loadDeafaultValuseFromFile()
loadDeafaultValuseFromFile To load default values from file can be implemented by user
Definition: baseStrategyWrapper.h:531
virtual int getPortfolioFieldCount()
getPortfolioFieldCount To Count and give the number of portfolio fields can be implemented by user
Definition: baseStrategyWrapper.h:2011
virtual qlonglong getLegsSymbolId(API2::LEGS leg)
getLegsSymbolId To get the symbol id of passed leg can be implemented by user
Definition: baseStrategyWrapper.h:591
virtual void setStrategyContainer(QGroupBox *strategyContainer, QPushButton *showHideLegPushButton)
setStrategyContainer To Show/Hide the group box containing the strategy parameters can be implemented...
Definition: baseStrategyWrapper.h:171
virtual void onTextFilterChanged(QSortFilterProxyModel *proxyModel, QHeaderView *headerView, QList< short > &filterColList)
onTextFilterChanged To call it when the text is changed in the filter widget can be implemented by us...
Definition: baseStrategyWrapper.h:3732
virtual bool isBidAllowed()
isBidAllowed To check whether the Bid is allowed for placing the given order can be implemented by us...
Definition: baseStrategyWrapper.h:3011
virtual int getStrategyRowFromAdminTokenId(const qlonglong &adminTokenId)
getStrategyRowFromAdminTokenId To get the admin token id value from the strategy row can be implement...
Definition: baseStrategyWrapper.h:1272
virtual QKeySequence getStrategyShortCut(short orderMode)
getStrategyShortCut To get the shortcut of the strategy of passed order mode can be implemented by us...
Definition: baseStrategyWrapper.h:2797
virtual short configFileValue(const char *str)
configFileValue To get short value of the passed config file value key string can be implemented by u...
Definition: baseStrategyWrapper.h:1017
virtual void setCurrentSpreadKeyValuePair(const QString &key, const QString &value)
setCurrentSpreadKeyValuePair To set the current spread key and value as passed can be implemented by ...
Definition: baseStrategyWrapper.h:1425
virtual bool isIocAllowed()
isIocAllowed To check whether the IOC is allowed for the given specifications can be implemented by u...
Definition: baseStrategyWrapper.h:3019
virtual void deleteParamsCommand(API2::AbstractUserParams *&genericPtr)
deleteParamsCommand To delete the pointer object of abstract userparams class can be implemented by u...
Definition: baseStrategyWrapper.h:1958
virtual qlonglong getCurrentMonthFutureSymbolId(const QString &source, const QString &market, const QString &symbol)
getCurrentMonthFutureSymbolId To get the future id symbol id using passed source, market and symbol n...
Definition: baseStrategyWrapper.h:3619
virtual void receiveApiResponse(const API2::API2_Response &api2_Response)
receiveApiResponse To get the front end design and to set the api index of user params can be impleme...
Definition: baseStrategyWrapper.h:1304
virtual QString getFileName()
getFileName To get the name of the file can be implemented by user
Definition: baseStrategyWrapper.h:1032
virtual void setMarketAndSecurityId(qlonglong symbolId)
setMarketAndSecurityId To set the market and security id using symbol id can be implemented by user
Definition: baseStrategyWrapper.h:148
virtual bool isDisplayInLotsAllowed()
isDisplayInLotsAllowed To check whether to display in lots is allowed can be implemented by user
Definition: baseStrategyWrapper.h:2763
virtual QWidget * getFilterHeaderViewWidget(QHeaderView *headerView, short filterWidget)
getFilterHeaderViewWidget To get the passed filter widget in the header view for the filter enable co...
Definition: baseStrategyWrapper.h:3723
virtual void setCommandCategory(COMMAND_CATEGORY_TYPE)
setCommandCategory To set the command category type Generic Strategy Terminate Strategy Pause Strateg...
Definition: baseStrategyWrapper.h:1290
virtual int getEditableModeRow()
getEditableModeRow Returns the row which is in currently being edited can be implemented by user
Definition: baseStrategyWrapper.h:1485
virtual void populateBaseSpread(QComboBox *baseSpread)
populateBaseSpread To add 2 leg/3 leg bid diff spred type "Hit Spread" "Try Spred" can be implemented...
Definition: baseStrategyWrapper.h:217
virtual QString getCurrentInstrument(short leg)
getCurrentInstrument To get the current instrument from instrument field from the passed leg can be i...
Definition: baseStrategyWrapper.h:731
virtual void updateSidQty(qlonglong row)
updateSidQty To update the total strategy quantity in the passed row can be implemented by user
Definition: baseStrategyWrapper.h:2932
virtual bool isDisplayInLots()
isDisplayInLots To check whether to show the lot size or quantity of lots can be implemented by user ...
Definition: baseStrategyWrapper.h:141
Definition: baseStrategyWrapper.h:3041
virtual void allUIValidation(int row=-1, short strategy=STRATEGY_TYPE_MAX)
allUIValidation To perform all the ui validation of the passed row and strategy type can be implement...
Definition: baseStrategyWrapper.h:2360
virtual bool showSpreadPopup()
showSpreadPopup To check whether spread pop up is shown on adding new strategy can be implemented by ...
Definition: baseStrategyWrapper.h:2535
virtual QString getStrategyVersion()
getStrategyVersion To get the strategy version of the strategy type can be implemented by user
Definition: baseStrategyWrapper.h:3561
virtual void setBasePointer(BaseStrategyWrapper *ptr)
setBasePointer To set the passed pointer ptr to assign to base strategy wrapper pointer can be implem...
Definition: baseStrategyWrapper.h:2078
virtual qlonglong getUserId()
getUserId To get the user id of the logged in user can be implemented by user
Definition: baseStrategyWrapper.h:1048
virtual int getFieldCount()
getFieldCount Get the total number of parameters saved in parameter list can be implemented by user
Definition: baseStrategyWrapper.h:1432
Definition: sharedStrutures.h:105
virtual void updateSpreadInPortfolio()
updateSpreadInPortfolio Updates spread details of portfolio in the strategy table can be implemented ...
Definition: baseStrategyWrapper.h:498
virtual void destroyDependendObjects()
destroyDependendObjects To Destroy objects dependent on basestrategywrapper from its destructor can b...
Definition: baseStrategyWrapper.h:2986
virtual void revertEditableFeildData(int row)
revertEditableFeildData To revert the changes done in editable fields of passed row can be implemente...
Definition: baseStrategyWrapper.h:2602
virtual bool isWaitStateSupported()
isWaitStateSupported To check whether the wait state is supported by that strategy can be implemented...
Definition: baseStrategyWrapper.h:2721
virtual void loadDataFromMarketWatch(qlonglong symbolId, short option)
loadDataFromMarketWatch To load the data from the market watch of the passed symbol id in the strateg...
Definition: baseStrategyWrapper.h:2152
virtual QString getMarket(const UNSIGNED_CHARACTER &exchangeId)
getMarket To get the market name using exchange id can be implemented by user
Definition: baseStrategyWrapper.h:3115
virtual QString configFileValueStr(const char *str)
configFileValueStr To get the string value of the passed config file value key string can be implemen...
Definition: baseStrategyWrapper.h:1025
virtual QString getCurrentSymbol(API2::LEGS leg)
getCurrentSymbol To get the current symbol id of the passed leg can be implemented by user
Definition: baseStrategyWrapper.h:625
virtual void setOptionsConRevCombination(QString conRevCombination)
setOptionsConRevCombination To set the passed con rev combination in the options con rev combination ...
Definition: baseStrategyWrapper.h:1914
virtual void insertNewUniqueSpreadCheckEntry(const QString &uniqueKey, const QString &spreadKey)
insertNewUniqueSpreadCheckEntry To add the spread key at the unique key if it does not have the same ...
Definition: baseStrategyWrapper.h:1390
Definition: sharedStrutures.h:202
virtual qlonglong getUnderlyingFutSymbolId(qlonglong symbolId)
getUnderlyingFutSymbolId To get the future symbol id in reference with passed symbol id can be implem...
Definition: baseStrategyWrapper.h:934
virtual QString getProStr()
getProStr To get the string "Pro" can be implemented by user
Definition: baseStrategyWrapper.h:3093
virtual QGroupBox * getButtonPanel()
getButtonPanel Gives Pointer to Button panel can be implemented by user
Definition: baseStrategyWrapper.h:271
virtual void secondLegAccountUpdated()
secondLegAccountUpdated On Updating the account deatils of the second leg can be implemented by user
Definition: baseStrategyWrapper.h:2891
virtual void showMessage(QWidget *parent, QString title, QString message)
showMessage To show the message box on the parent widget with passed title and passed message can be ...
Definition: baseStrategyWrapper.h:3579
virtual void onFirstLegOptTypeChanged()
onFirstLegOptTypeChanged On First leg opt type change, change other details accordingly can be implem...
Definition: baseStrategyWrapper.h:2626
virtual bool terminateStrategy(int row, int index=-1)
terminateStrateg Gives true if strategy is in run state and passed a valid row send terminate strateg...
Definition: baseStrategyWrapper.h:1838
virtual short getGenericExecutionStyle(QString baseType)
getGenericExecutionStyle To get the enum value of passed base type string can be implemented by user
Definition: baseStrategyWrapper.h:3488
virtual void setCurrentStrike(short leg, const QString &strike, bool isBlockSignal=false)
setCurrentStrike To set the passed strike price text as the current strike price on the strike price ...
Definition: baseStrategyWrapper.h:740
virtual void addNewSectionDefaultSetting(QString containerName)
addNewSectionDefaultSetting To add a new container and giving it default settings can be implemented ...
Definition: baseStrategyWrapper.h:515
virtual bool setTotalQtyForLegs(int row, short type, QSqlRecord &oldRecord, const QList< BaseSymbolIds * > &symbolIdsList)
setTotalQtyForLegs To set the total quantity using old sql record of the passed row of all the passed...
Definition: baseStrategyWrapper.h:2223
virtual void fillOldPositionData(QStringList &dataList)
fillOldPositionData To fill the old position data from the passed datalist can be implemented by user
Definition: baseStrategyWrapper.h:2838
virtual short getContinuousHedgeMode(QString mode)
getCommonMethodsWrapper()->getContinuousHedgeMode To get the enum value of continuous hedging mode ca...
Definition: baseStrategyWrapper.h:3540
virtual bool buildCommandFromUi(API2::PORTFOLIO_STATE state)
buildCommandFromUi To fetch the details from the ui parameters and save them in the strategy table ca...
Definition: baseStrategyWrapper.h:2178
virtual void getIvVegaPrice(qlonglong symbolId, qlonglong price, short, qlonglong underlyingSymbolId, qlonglong &ivPrice, double &vega, bool isVegaCalculate)
getIvVegaPrice To get the ivPrice and vega after calculations using the symbol id and price can be im...
Definition: baseStrategyWrapper.h:1211
virtual void onFirstLegExpiryChanged()
onFirstLegExpiryChanged On First leg expiry change, change other details accordingly can be implement...
Definition: baseStrategyWrapper.h:2620
virtual void setStrategyInSingleRow(short count)
setStrategyInSingleRow Make sure only single row is created at a time can be implemented by user
Definition: baseStrategyWrapper.h:483
virtual void convertExpiryToMonStr(QString &expiry)
convertExpiryToMonStr To convert expiry month number to month abbreviation string can be implemented ...
Definition: baseStrategyWrapper.h:958
virtual void resetData(QString str, QComboBox *combo)
resetData To reset the data of combo box containing str can be implemented by user
Definition: baseStrategyWrapper.h:525
virtual QString getStockStr()
getStockStr To get the string "Stock" can be implemented by user
Definition: baseStrategyWrapper.h:3065
virtual qlonglong gcd(qlonglong num1, qlonglong num2, qlonglong num3)
gcd To get the greatest common divisor of num1, num2 and num3 can be implemented by user
Definition: baseStrategyWrapper.h:3151
virtual QString getExecutionVolumnStr(short type)
getExecutionVolumnStr To get the execution volume string "Max Volume", "Min Volume" and Specified Vol...
Definition: baseStrategyWrapper.h:3356
virtual QSqlQuery & fillDetailsFromAdminTokenId(const UNSIGNED_LONG adminTokenId, QString condition)
fillDetailsFromAdminTokenId To get the query containg the details of strategy using admin token id ca...
Definition: baseStrategyWrapper.h:1623
virtual QString getCurrentMarket(API2::LEGS leg)
getCurrentMarket To get the current market details of passed leg can be implemented by user
Definition: baseStrategyWrapper.h:657
virtual void OnDownKeyPressed()
OnDownKeyPressed On down key preesing it make sure that strategy container is visible can be implemen...
Definition: baseStrategyWrapper.h:2421
virtual void updateEditableFieldColor(int row, QColor color)
updateEditableFieldColor To update the colour of the editable fields of the passed row as the color p...
Definition: baseStrategyWrapper.h:2247
virtual QString getNotApplicableStr()
getNotApplicableStr To get the string "N/A" can be implemented by user
Definition: baseStrategyWrapper.h:3051
virtual void disabledFeilds(API2::LEGS leg, API2::SYM_PANEL element)
disabledFeilds To disable any particular element in the symbol panel of the passed leg can be impleme...
Definition: baseStrategyWrapper.h:690
virtual short getOrderValidity(QString orderValidity)
getOrderValidity To get the enum value of passed order validity can be implemented by user
Definition: baseStrategyWrapper.h:3247
virtual void rowRemovedNotifier(int row, int pid=0)
rowRemovedNotifier To notify when the row that is removed is the passed row can be implemented by use...
Definition: baseStrategyWrapper.h:2729
BaseStrategyWrapper()
BaseStrategyWrapper Explicit constructor to prevent implicit conversions.
Definition: baseStrategyWrapper.h:102
virtual void getAccountDetailFromPortfolio(API2::LEGS leg, const QStringList &dataList, QString &accountDetail)
getAccountDetailFromPortfolio To get the account details from the passed datalist of the passed leg c...
Definition: baseStrategyWrapper.h:1728
virtual void onModifyStrategy()
onModifyStrategy To modify and run the strategy when it is already running can be implemented by user
Definition: baseStrategyWrapper.h:3036
virtual int getRowCount()
getRowCount To get the count of total number of rows present can be implemented by user
Definition: baseStrategyWrapper.h:873
BaseStrategyWrapper * getBaseWrapper()
getBaseWrapper To get the pointer object of base strategy wrapper class
Definition: baseStrategyWrapper.h:2043
virtual QString getStrategyState(int row)
getStrategyState To get the strategy state of the passed row Run State Wait State Ready State can be ...
Definition: baseStrategyWrapper.h:1323
virtual void getOfflineConfirmationMap(QHash< QString, RSP::OrderConfirmation * > &orderBookConfirmationMap)
getOfflineConfirmationMap To get the confirmation of order from the passed order book confirmation ma...
Definition: baseStrategyWrapper.h:1559
virtual API2::LEGS getLegType(QString str)
getLegType To get the enum value of leg type can be implemented by user
Definition: baseStrategyWrapper.h:329
virtual QString getCurrentStrike(short leg)
getCurrentStrike To get the current strike price from the strike price field of the passed leg can be...
Definition: baseStrategyWrapper.h:757
virtual void convertToMultipleOfTickSize(qlonglong &hitSpread, qlonglong symbolId)
convertToMultipleOfTickSize To convert the passed hit spread multiple of symbol id's tick size can be...
Definition: baseStrategyWrapper.h:3789
virtual void closeDefaultManager()
closeDefaultManager To close the default value manager can be implemented by user
Definition: baseStrategyWrapper.h:557
virtual void firstLegAccountUpdated()
firstLegAccountUpdated On Updating the account deatils of the first leg can be implemented by user
Definition: baseStrategyWrapper.h:2885
virtual void onRowClickedNotifier(int rowClicked)
onRowClickedNotifier To notify when the passed row is clicked can be implemented by user
Definition: baseStrategyWrapper.h:2683
virtual void onAltMPressed()
onAltMPressed To save the changes done on editable fields in the database can be implemented by user
Definition: baseStrategyWrapper.h:2397
virtual void movePortfolioIndex(QStringList &dataList, int fromIndex, int toIndex)
movePortfolioIndex To move the portfolio in passed data list from passed fromindex to passed toindex ...
Definition: baseStrategyWrapper.h:1773
virtual bool isEditState()
isEditState Checks wheteher the edit push button in the button panel is enabled or not can be impleme...
Definition: baseStrategyWrapper.h:1755
virtual const API2::SymbolDetail & getSymbolIdDetail(qlonglong symbolId)
getSymbolIdDetail To get all the details of the passed symbol id can be implemented by user
Definition: baseStrategyWrapper.h:1040
virtual void setIsSpreadPopAlreadyShown(bool isEnable)
setIsSpreadPopAlreadyShown Set isspreadpopalreadyshown true if passed true can be implemented by user
Definition: baseStrategyWrapper.h:1492
virtual QString getOptionModeStr(short optMode)
getOptionModeStr To get the option mode string "Put" or "Call" can be implemented by user
Definition: baseStrategyWrapper.h:3505
virtual QString getContinuousHedgeModeStr(short mode)
getCommonMethodsWrapper()->getContinuousHedgeModeStr To get the continuous hedging mode string "SAME ...
Definition: baseStrategyWrapper.h:3547
virtual QString maturityDayMonYearToString(int day, int yearMon)
maturityDayMonYearToString To convert the passed day and yearmon in the string date format can be imp...
Definition: baseStrategyWrapper.h:943
virtual void on_NewPushButton_Clicked()
on_NewPushButton_Clicked Enable the parameters to enter new values can be implemented by user
Definition: baseStrategyWrapper.h:1791
virtual void updateDisableColumnsColor(int row)
updateDisableColumnsColor To update the disable columns colour of the selected row as the passed colo...
Definition: baseStrategyWrapper.h:2295
virtual void addToMainStrategyWindow(QVBoxLayout *tableviewLayout)
addToMainStrategyWindow To add the table layout to the strategy window can be implemented by user
Definition: baseStrategyWrapper.h:336
virtual void keyPressEvent(QKeyEvent *event)
keyPressEvent Call the button panel functions if that button has focus and is enabled can be implemen...
Definition: baseStrategyWrapper.h:1552
virtual void populateUIPanels(int row, QSqlRecord &record, bool isNew)
populateUIPanels To populate the ui panel taking values from the strategy table of the passed row can...
Definition: baseStrategyWrapper.h:2232
virtual QString getScripName(qlonglong symbolId)
getScripName To get the scrip name of the passed symbol id can be implemented by user
Definition: baseStrategyWrapper.h:991
virtual bool isSameSidHandling()
isSameSidHandling To check whether their is handling of more than one same strategy quauntity can be ...
Definition: baseStrategyWrapper.h:2780
virtual QSortFilterProxyModel * getSortFilterProxyModel(QList< short > &filterColList, QObject *parent=0)
getSortFilterProxyModel To get the sort filter proxy model to apply when filter is used can be implem...
Definition: baseStrategyWrapper.h:3703
virtual void getExpiryList(const QString &symbol, const QString &market, QStringList &expiryList)
getExpiryList To get the expiry list of passed symbol and market of the non stock instrument type in ...
Definition: baseStrategyWrapper.h:3821
virtual void printSqlError(QSqlQuery &query)
printSqlError To print the error coming at the time of executing query can be implemented by user
Definition: baseStrategyWrapper.h:998
virtual void setPortfolioDefaultValues(QStringList &portfolioRow)
setPortfolioDefaultValues To set the default portfolio values in the passed portfolio row can be impl...
Definition: baseStrategyWrapper.h:2367
virtual void processMktData(qlonglong symbolId)
processMktData To process the market data of passed symbol if not processing Othnerwise update it can...
Definition: baseStrategyWrapper.h:1689
virtual void setItmStatus(bool itmStatue)
setItmStatus To set the opt type combo box activate and put default value to it can be implemented by...
Definition: baseStrategyWrapper.h:582
virtual void setApiCommand(API2::UserParams *, QSqlRecord &record, int stgCount, short type, API2::apiOrderBookParams *ptr)
setApiCommand can be implemented by user
Definition: baseStrategyWrapper.h:2458
virtual void showHideCheckBoxClicked(bool isChecked)
showHideCheckBoxClicked To chow/hide the check box in the button panel can be implemented by user
Definition: baseStrategyWrapper.h:2595
virtual void on_StopPushButton_Clicked()
on_StopPushButton_Clicked Stops the selected running strategy can be implemented by user
Definition: baseStrategyWrapper.h:1850
virtual QString getCmFoMarket(QString currentMarketId)
getCmFoMarket To Get NSECM or NSEFO or BSECM or BSEFO Market from the passed current market id can be...
Definition: baseStrategyWrapper.h:1469
virtual void registerForUhedgePortfolio()
registerForUhedgePortfolio To emit the signal of updated portfolio to populate uhedge portfolio can b...
Definition: baseStrategyWrapper.h:1978
virtual void getClientInfoFromConfirmation(const RSP::OrderConfirmation &confirmation, QString &parentClCode, QString &childClCode, QString &partCode)
getClientInfoFromConfirmation To get the parent client code, child client code and part code from the...
Definition: baseStrategyWrapper.h:3831
virtual void getTrades(qlonglong symbolId, qlonglong strategyId, qlonglong &filledBuyQty, float &filledBuyPrice, qlonglong &filledSellQty, float &filledSellPrice, QString &buyPriceStr, QString &sellPriceStr)
getTrades To get the total traded quantity of sell and buy with total price of sell and buy inthe pas...
Definition: baseStrategyWrapper.h:3687
virtual bool isClientCodePresent(const QString &market, const QString &inst)
isClientCodePresent Checks Whether any client code is present for the passed market with passed instr...
Definition: baseStrategyWrapper.h:3589
virtual QString getTimeFromSec(UNSIGNED_LONG secSinceEpoch)
getTimeFromSec To get the time in date time format by using passed seconds since epoch time can be im...
Definition: baseStrategyWrapper.h:3211
virtual void addSymbolPanel(const short instrument, SymbolPanelElements *elements, bool isExpiry, bool addExchanges=true)
addSymbolPanel To add symbol panel details in the strategy can be implemented by user
Definition: baseStrategyWrapper.h:348
virtual void populateHedgingPortfolio(QComboBox *comboBox)
populateHedgingPortfolio To populate hedge portfolio name list in the passed combo box can be impleme...
Definition: baseStrategyWrapper.h:1972
virtual QString getTwoLegArbitHedgeMethod(short hedgeMethod)
getTwoLegArbitHedgeMethod To get the two leg arbit hedge method string "Market Order",...
Definition: baseStrategyWrapper.h:3424
virtual qlonglong getLastTradePrice(qlonglong symbolId)
getLastTradePrice To get last traded price of the passed symbol id from the the market can be impleme...
Definition: baseStrategyWrapper.h:1094
virtual void keyPressEventStrategySpecific()
keyPressEventStrategySpecific To create a key press event for specific strategy can be implemented by...
Definition: baseStrategyWrapper.h:2569
virtual API2::UserParams * getAPICommand()
getAPICommand To get the api params values form the parameters can be implemented by user
Definition: baseStrategyWrapper.h:2466
virtual void setTableData(int row, int col, QVariant data)
setTableData Used to set Particular data on particular column in a partical row can be implemented by...
Definition: baseStrategyWrapper.h:467
virtual bool isSpreadCalculationAllowed()
isSpreadCalculationAllowed To check whether the spread calculation is allowed can be implemented by u...
Definition: baseStrategyWrapper.h:2474
virtual void restoreTableHeaderState()
restoreTableHeaderState To Get the changes done last time on the table headers can be implemented by ...
Definition: baseStrategyWrapper.h:438
virtual bool isUnderLyingStock()
isUnderLyingStock Gives true if underlying type is stock can be implemented by user
Definition: baseStrategyWrapper.h:1744
virtual void onStopAllPushButtonclicked()
onStopAllPushButtonclicked To call the function on_StopAllPushButton_Clicked to stop all the running ...
Definition: baseStrategyWrapper.h:2126
virtual void onShowHideLegs()
onShowHideLegs To show/hide the legs can be implemented by user
Definition: baseStrategyWrapper.h:2689
virtual void onLoadOldStrategies()
onLoadOldStrategies To Get the old strategies from database on starting strategy and decides what hap...
Definition: baseStrategyWrapper.h:374
virtual void onStopPushButtonClicked()
onStopPushButtonClicked To call the function on_StopPushButton_Clicked to stop the selected running s...
Definition: baseStrategyWrapper.h:2138
virtual bool isStrategyReadyState()
isStrategyReadyState To check whether the strategy is in ready state or not can be implemented by use...
Definition: baseStrategyWrapper.h:365
virtual void subscribeSymbol(qlonglong symbolId)
subscribeSymbol Subscribe symbol to see all the feed of that particualar symbol using passed symbol i...
Definition: baseStrategyWrapper.h:1439
virtual bool isUniqueSpreadHandling()
isUniqueSpreadHandling To check whether the handling of unique spread is done can be implemented by u...
Definition: baseStrategyWrapper.h:2956
virtual int getQuoteWaitCounter()
getQuoteWaitCounter To get the value of quote wait counter can be implemented by user
Definition: baseStrategyWrapper.h:3665
virtual void checkShowHideQuantity()
checkShowHideQuantity If show hide check box is enabled and has focus and is visible then toggle it i...
Definition: baseStrategyWrapper.h:1461
virtual void updateSymbolIdsDetail(int row, bool isUpdateAll=false)
updateSymbolIdsDetail To update the symbol id details in the strategy table can be implemented by use...
Definition: baseStrategyWrapper.h:2186
virtual bool isPortfolioNamePresent()
isPortfolioNamePresent To check whether the portfolio name is present can be implemented by user
Definition: baseStrategyWrapper.h:2482
virtual void onComboSymbolLostFocus(API2::LEGS leg)
onComboSymbolLostFocus To emit the signal of focuslost on loosing focus on symbol combo box with pass...
Definition: baseStrategyWrapper.h:1597
virtual API2::AbstractUserParams * getNewParamsCommand()
getNewParamsCommand To get the pointer object reference of abstract user params class can be implemen...
Definition: baseStrategyWrapper.h:1951
virtual void initializeFirstLegSignals()
initializeFirstLegSignals Initialize the signals to emit when first leg is selected can be implemente...
Definition: baseStrategyWrapper.h:1521
virtual void onRunActivated()
onRunActivated On pressing Run push button or clicking the check box of particular row,...
Definition: baseStrategyWrapper.h:2427
virtual void updateAdditionalValuesInPortfolio(QStringList &dataList)
updateAdditionalValuesInPortfolio To update the additional values in the portfolio from the datalist ...
Definition: baseStrategyWrapper.h:2755
virtual QString getTrueStr()
getTrueStr To get the string "True" can be implemented by user
Definition: baseStrategyWrapper.h:3058
virtual void replacePortfolioValuesOnLoad(QStringList &dataList)
replacePortfolioValuesOnLoad To Replace portfolio values that need to changed while loading portfolio...
Definition: baseStrategyWrapper.h:2918
virtual void insertTradeWiseTrackerList(QSharedPointer< API2::TradeWiseTrackerData > &tradeWiseTrackerData)
insertTradeWiseTrackerList To insert the trade data in trade wise tracker table after each iteration ...
Definition: baseStrategyWrapper.h:3910
virtual void updateCustomDbValuesOnLoadOld()
updateCustomDbValuesOnLoadOld To update the custom database values on loading old data can be impleme...
Definition: baseStrategyWrapper.h:2786
virtual void on_EditPushButton_Clicked(int row=-1)
on_EditPushButton_Clicked Edit the parameter values of any selected row can be implemented by user
Definition: baseStrategyWrapper.h:1806
Definition: sharedStrutures.h:325
virtual UNSIGNED_CHARACTER getExchangeId(const QString &market)
getExchangeId To get the exchange id using markeet name can be implemented by user
Definition: baseStrategyWrapper.h:3130
virtual QStandardItemModel * getTableModel()
getTableModel To get the structure of the table can be implemented by user By default return NULL
Definition: baseStrategyWrapper.h:156
virtual void secondLegSymbolChanged()
secondLegSymbolChanged On Second leg symbol changed show the selected leg symbols and details can be ...
Definition: baseStrategyWrapper.h:2632
virtual qlonglong getLastLogOutTime()
getLastLogOutTime To get the last log out time of current user can be implemented by user
Definition: baseStrategyWrapper.h:1074
virtual qlonglong gcd(qlonglong num1, qlonglong num2)
gcd To get the greatest common divisor of num1 and num2 can be implemented by user
Definition: baseStrategyWrapper.h:3140
void setBaseWrapper(BaseStrategyWrapper *baseStrategyWrapper)
setBaseWrapper To set the the passed pointer to the pointer of base strategy wrapper class
Definition: baseStrategyWrapper.h:2034
virtual bool compareRatio(QList< int > &firstList, QVector< qlonglong > &secondList, int limit)
compareRatio Converts firstlist to vector and checks whether their ratio is valid can be implemented ...
Definition: baseStrategyWrapper.h:3176
virtual QString getSpreadTypeStr(short twoLegThreeLegSpreadType)
getSpreadTypeStr To get the spread type string "Prod Diff", "Actual Diff" and "Base Diff" can be impl...
Definition: baseStrategyWrapper.h:3314
virtual QString getstrategyName()
getstrategyName To get the strategy name can be implemented by user
Definition: baseStrategyWrapper.h:313
virtual void populateSpreadType(QComboBox *comboSpreadType)
populateSpreadType To add 2 leg/3 leg spred type "Prod Diff" "Actual Diff" "Base Diff" can be impleme...
Definition: baseStrategyWrapper.h:227
virtual void initializeHedgeLegSignals()
initializeHedgeLegSignals Initialize the signal to emit on market change when no leg is selected can ...
Definition: baseStrategyWrapper.h:1545
virtual void enableAccountDetailUI(API2::LEGS leg, bool status)
enableAccountDetailUI To enable the account details in the UI of passed leg can be implemented by use...
Definition: baseStrategyWrapper.h:641
virtual bool getBidAsk(qlonglong symbolId, qlonglong &bidPrice, qlonglong &askPrice, int position=0)
getBidAsk To get the bid price and ask price of the passed symbol id from the market data of the pass...
Definition: baseStrategyWrapper.h:1167
virtual void getPriceAccordingToTicksize(qlonglong &price, int ticksize, short orderMode)
getPriceAccordingToTicksize To get the price according to tick size of passed order mode For a miulti...
Definition: baseStrategyWrapper.h:3842
virtual void onCtrlSpacePressed()
onCtrlSpacePressed On pressing Ctrl Space it uncheckes the selected row and checks the selcted row ca...
Definition: baseStrategyWrapper.h:2409
virtual QVariant getTableData(int row, int col)
getTableData To get the data from table can be implemented by user
Definition: baseStrategyWrapper.h:357
virtual void enableNewPushButton(bool isEnable)
enableNewPushButton To Enable the new push button in the button panel if passed true can be implement...
Definition: baseStrategyWrapper.h:1499
virtual bool updateRemainingQty(int row)
updateRemainingQty To update the remaining quantity in the passed row can be implemented by user
Definition: baseStrategyWrapper.h:2203
virtual void onAddPushButtonClicked()
onAddPushButtonClicked To add the strategy in the strategy tabe and database by calling the function ...
Definition: baseStrategyWrapper.h:2102
virtual bool isModifyState()
isModifyState Gives true if selected strategy is in run state and instead of run it shows modify can ...
Definition: baseStrategyWrapper.h:1736
virtual QString getOptionModeStr(QString optMode)
getOptionModeStr To get the option mode string "Put" or "Call" using passed opt mode string can be im...
Definition: baseStrategyWrapper.h:3514
virtual void updateStrategyVsUhedgePortfolioMap(long strategyId, const QString &uhedgePortfolioName)
updateStrategyVsUhedgePortfolioMap To update the strategyvsuhedge portfolio of passed strategy id wit...
Definition: baseStrategyWrapper.h:2003
virtual QString getFutureStr()
getFutureStr To get the string "Future" can be implemented by user
Definition: baseStrategyWrapper.h:3072
virtual void setDefaultValuesHash(QHash< QString, QString > &defaultValuesMap)
setDefaultValuesHash To set the default value to reset hash can be implemented by user
Definition: baseStrategyWrapper.h:564
virtual QString getPortFolioName()
getPortFolioName To get the Portfolio name of the selected portfolio can be implemented by user
Definition: baseStrategyWrapper.h:306
virtual void onComboSymbolActivated(const QString &symbol, API2::LEGS leg)
onComboSymbolActivated To emit signal on symbol combo box activated with passed symbol and leg can be...
Definition: baseStrategyWrapper.h:1590
virtual void writeOnSocket(char *buffer, qint64 bytes, qint64 &bytesWritten)
writeOnSocket To write the data on the buffer in connected state to pass it through the socket to bac...
Definition: baseStrategyWrapper.h:1057
virtual void setCurrentOptType(short leg, short index, bool isBlockSignal=false)
setCurrentOptType To set the passed opt type index as the current opt type in the opt type field of t...
Definition: baseStrategyWrapper.h:766
virtual void getHitTrySpread(short spreadType, const QList< BaseSymbolIds * > &symbolIdsList, SpreadDetails *spreadDetail, int row=-1)
getHitTrySpread To get the hit try spread of passed spread type from the symbol id list of the passed...
Definition: baseStrategyWrapper.h:2553
virtual qlonglong getFutureSymbolId(QString source, QString market, QString symbol, QString strDate)
getFutureSymbolId To get the secuirity id of future method from the scrip master containing the passe...
Definition: baseStrategyWrapper.h:912
virtual void populateHedgeMethods(QComboBox *comboBoxHedgeMethod, bool isActualDiffAllowed=false)
populateHedgeMethods To add the hedge methods in the combo box "Market Order" "Best Bid/Ask" "Hit Bid...
Definition: baseStrategyWrapper.h:208
virtual void initializeThirdLegSignals()
initializeThirdLegSignals Initialize the signals to emit when third leg is selected can be implemente...
Definition: baseStrategyWrapper.h:1533
virtual void edit(QModelIndex &index)
edit To edit particular passed index can be implemented by user
Definition: baseStrategyWrapper.h:865
virtual void setCurrentStrike(short leg, int index, bool isBlockSignal=false)
setCurrentStrike To set the passed strike price index as the current strike price on the strike price...
Definition: baseStrategyWrapper.h:749
virtual void onNewPushButtonClicked()
onNewPushButtonClicked To call the function on_NewPushButton_Clicked to enable the parameters to add ...
Definition: baseStrategyWrapper.h:2108
virtual void getIvOrVegaVal(qlonglong symbolId, qlonglong &bidIv, qlonglong &askIv, short mode, double &bidVega, double &askVega, bool calculateVega, qlonglong underlyingSymbolId)
getIvOrVegaVal To get the bidIv and askIv and bidVega and askVega values after calculations in their ...
Definition: baseStrategyWrapper.h:1192
virtual short getExpiryInclusionExclusion()
getExpiryInclusionExclusion To get the value of expiry inclusion exclusion can be implemented by user
Definition: baseStrategyWrapper.h:3673
virtual void on_RemoveAll_Clicked()
on_RemoveAll_Clicked Removes all the rows from the strategy table can be implemented by user
Definition: baseStrategyWrapper.h:1856
virtual bool getIsSpreadPopAlreadyShown()
getIsSpreadPopAlreadyShown Gives true if spread pop up is already shown can be implemented by user
Definition: baseStrategyWrapper.h:1907
virtual QString getTrackerTableName()
getTrackerTableName To get the tracker table name can be implemented by user
Definition: baseStrategyWrapper.h:2865
virtual void updateAccountDetail(const int row)
updateAccountDetail To update the account deatils of the passed row of the database can be implemente...
Definition: baseStrategyWrapper.h:1112
virtual void setCurrentOrderMode(short leg, short index, bool isBlockSignal=false)
setCurrentOrderMode To set the passed order mode index as the current order mode in the order mode fi...
Definition: baseStrategyWrapper.h:783
virtual QComboBox * getFilterWidgetComboBox(int index)
CommonTableView.
Definition: baseStrategyWrapper.h:818
virtual void getPrecisionAndMultiplier(qlonglong symbolId, double &multiplier, short &precision)
getPrecisionAndMultiplier To get the precision and multiplier of the passed symbol id in the passed r...
Definition: baseStrategyWrapper.h:3876
virtual int getCurrentLotSize(short leg)
getCurrentLotSize To get the current lot size from the lot size field of the passed leg can be implem...
Definition: baseStrategyWrapper.h:791
virtual QString getGenericBaseTypeStr(short baseType)
getGenericBaseTypeStr To get the generic base type string "IV" or "INR" can be implemented by user
Definition: baseStrategyWrapper.h:3288
virtual void enableDisableOptType(short leg, bool isEnable)
enableDisableOptType To enable/disable opt type field according to requirement from the passed leg ca...
Definition: baseStrategyWrapper.h:799
virtual bool checkForUnderLying()
checkForUnderLying Checks for underlying can be implemented by user
Definition: baseStrategyWrapper.h:452
virtual short getGenericStrategyType(QString threeLegStrategy, short leg)
getGenericStrategyType To get the generic strategy type enum value of passed three leg strategy can b...
Definition: baseStrategyWrapper.h:3298
virtual short getLegType(QString str)
getLegType To get the enum value of leg type can be implemented by user
Definition: baseStrategyWrapper.h:3339
The BaseStrategyWrapper class The main class to be inherited for creating a new strategy.
Definition: baseStrategyWrapper.h:74
void setCommonMethodsWrapper(CommonMethodsWrapper *commonMethodsWrapper)
setCommonMethodsWrapper To set the passed pointer to the pointer of common methods wrapper class
Definition: baseStrategyWrapper.h:2052
CommonMethodsWrapper * getCommonMethodsWrapper()
getCommonMethodsWrapper To get the pointer object of common methods wrapper class
Definition: baseStrategyWrapper.h:2061
virtual void removeFocusFromPushButton(QPushButton *button)
removeFocusFromPushButton To remove the focus from the passeed push button can be implemented by user
Definition: baseStrategyWrapper.h:3194
virtual void populateOrderType(QComboBox *orderType)
populateOrderType To add the order types in the combo box "Limit" "Market" "Stop" "Stop Limit" can be...
Definition: baseStrategyWrapper.h:182