uTrade Frontend Algo API  Version 1.0.0.0
μTrade HFT
BaseStrategyWrapper Class Reference

The BaseStrategyWrapper class The main class to be inherited for creating a new strategy. More...

#include <baseStrategyWrapper.h>

Inheritance diagram for BaseStrategyWrapper:

Public Slots

virtual void on_NewPushButton_Clicked ()
 on_NewPushButton_Clicked Enable the parameters to enter new values can be implemented by user
 
virtual bool on_AddPushButton_Clicked ()
 on_AddPushButton_Clicked Add the parameter values to the database Updates the strategy table can be implemented by user More...
 
virtual void on_EditPushButton_Clicked (int row=-1)
 on_EditPushButton_Clicked Edit the parameter values of any selected row can be implemented by user More...
 
virtual void setCurrentIndexFromRow (int row)
 setCurrentIndexFromRow Select another row using passed row can be implemented by user More...
 
virtual void on_CommitPushButton_Clicked (bool isModifyFromAltM=false)
 on_CommitPushButton_Clicked Save the changes made to selected row in the database can be implemented by user More...
 
virtual void on_StopAllPushButton_clicked ()
 on_StopAllPushButton_clicked Stop all the running strategies can be implemented by user
 
virtual bool terminateStrategy (int row, int index=-1)
 terminateStrateg Gives true if strategy is in run state and passed a valid row send terminate strategy signals can be implemented by user More...
 
virtual void on_RemovePushButton_Clicked ()
 on_RemovePushButton_Clicked Removes the selected row from the strategy table can be implemented by user
 
virtual void on_StopPushButton_Clicked ()
 on_StopPushButton_Clicked Stops the selected running strategy can be implemented by user
 
virtual void on_RemoveAll_Clicked ()
 on_RemoveAll_Clicked Removes all the rows from the strategy table can be implemented by user
 
virtual void onSettingPushButtonClicked ()
 onSettingPushButtonClicked Gives setting box for changing differnet options on clicking setting button in the strategy can be implemented by user
 
virtual bool populateStrategyFromPortfolio ()
 populateStrategyFromPortfolio To check strategy is populated from portfolio or not can be implemented by user More...
 
virtual void setItrationQty (API2::Strategy strategyResponse)
 setItrationQty Empty functions can be implemented by user More...
 
virtual void receiveStrategyResponse (QSharedPointer< API2::Strategy > strategyResponseSharedPtr)
 receiveStrategyResponse Receives response from hft and if it is success then put it in the queue can be implemented by user More...
 
virtual void setOldPositionUploadAllowed (bool isOldPositionUpload)
 setOldPositionUploadAllowed Used to set old position uplaod allowed can be implemented by user More...
 
virtual bool getIsOldPositionUploadAllowed ()
 getIsOldPositionUploadAllowed Gives true if old position upload is allowed can be implemented by user More...
 
virtual bool getIsSpreadPopAlreadyShown ()
 getIsSpreadPopAlreadyShown Gives true if spread pop up is already shown can be implemented by user More...
 
virtual void setOptionsConRevCombination (QString conRevCombination)
 setOptionsConRevCombination To set the passed con rev combination in the options con rev combination can be implemented by user More...
 
virtual void onSavePortFolio ()
 onSavePortFolio On Saving portfolio in the .csv file To Load it on later time can be implemented by user
 
virtual void onLoadPortFolioNew ()
 onLoadPortFolioNew On Loading the portfolio from .csv file fetch the strategies on the UI can be overriden
 
virtual API2::AbstractUserParams * getParamsCommand ()
 getParamsCommand To get the data using pointer object of abstract user params can be overriden More...
 
virtual QString getOptionsConRevCombination ()
 getOptionsConRevCombination To get the options con rev combination can be implemented by user More...
 
virtual API2::AbstractUserParams * getNewParamsCommand ()
 getNewParamsCommand To get the pointer object reference of abstract user params class can be implemented by user More...
 
virtual void deleteParamsCommand (API2::AbstractUserParams *&genericPtr)
 deleteParamsCommand To delete the pointer object of abstract userparams class can be implemented by user More...
 
virtual void serializeParamsCommand (API2::AbstractUserParams *genericPtr)
 serializeParamsCommand To serialize the pointer objetc of abstract user params can be implemented by user More...
 
virtual void populateHedgingPortfolio (QComboBox *comboBox)
 populateHedgingPortfolio To populate hedge portfolio name list in the passed combo box can be implemented by user More...
 
virtual void registerForUhedgePortfolio ()
 registerForUhedgePortfolio To emit the signal of updated portfolio to populate uhedge portfolio can be implemented by user
 
virtual int getUhedgePortfolioId (const QString &portfolioName)
 getUhedgePortfolioId To get the Uhedge Portfolio id from passed portfolio name can be implemented by user More...
 
virtual const QString & getUhedgePortfolioNameFromId (const int portfolioId)
 getUhedgePortfolioNameFromId To get the uhedge portfolio name from passed portfolio id can be implemented by user More...
 
virtual void updateStrategyVsUhedgePortfolioMap (long strategyId, const QString &uhedgePortfolioName)
 updateStrategyVsUhedgePortfolioMap To update the strategyvsuhedge portfolio of passed strategy id with passed uhedge portfolio name can be implemented by user More...
 
virtual int getPortfolioFieldCount ()
 getPortfolioFieldCount To Count and give the number of portfolio fields can be implemented by user More...
 
virtual void onModifyStrategy ()
 onModifyStrategy To Modify the Strategy values while it is running can be implemented by user
 

Public Member Functions

 BaseStrategyWrapper ()
 BaseStrategyWrapper Explicit constructor to prevent implicit conversions.
 
 ~BaseStrategyWrapper ()
 ~BaseStrategyWrapper A destructor
 
void setApiPointer (APIWrapper *ptr)
 setApiPointer To copy the value of one pointer to another More...
 
virtual bool isProcessingEvent ()
 isProcessingEvent Checks whether if any event is under process or not can be implemented by user default return value is false More...
 
virtual void initialize ()
 initialize To initialize the strategy at the begining with default values can be implemented by user
 
virtual bool isDisplayInLots ()
 isDisplayInLots To check whether to show the lot size or quantity of lots can be implemented by user default return value is false More...
 
virtual void setMarketAndSecurityId (qlonglong symbolId)
 setMarketAndSecurityId To set the market and security id using symbol id can be implemented by user More...
 
virtual QStandardItemModel * getTableModel ()
 getTableModel To get the structure of the table can be implemented by user By default return NULL More...
 
virtual void setRatioChecked (bool ratio)
 setRatioChecked To enable/disable the writing to table can be implemented by user More...
 
virtual void setStrategyContainer (QGroupBox *strategyContainer, QPushButton *showHideLegPushButton)
 setStrategyContainer To Show/Hide the group box containing the strategy parameters can be implemented by user More...
 
virtual void populateOrderType (QComboBox *orderType)
 populateOrderType To add the order types in the combo box "Limit" "Market" "Stop" "Stop Limit" can be implemented by user More...
 
virtual void populateBiddingLeg (QComboBox *comboBoxBiddingLong, short legCount)
 populateBiddingLeg To add the bidding leg in the combo box "First Leg" "Seconf Leg" "Third Leg" "Fourth Leg" can be implemented by user More...
 
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/Ask" "Actual Diff IOC Best" "Actual Diff" "Actual Diff Limit Best" can be implemented by user More...
 
virtual void populateBaseSpread (QComboBox *baseSpread)
 populateBaseSpread To add 2 leg/3 leg bid diff spred type "Hit Spread" "Try Spred" can be implemented by user More...
 
virtual void populateSpreadType (QComboBox *comboSpreadType)
 populateSpreadType To add 2 leg/3 leg spred type "Prod Diff" "Actual Diff" "Base Diff" can be implemented by user More...
 
virtual void populateExecutionStyle (QComboBox *comboSpreadType)
 populateExecutionStyle To add the execution style "TWAP" "POV" "PRICE BAND" "NO EXEC" can be implemented by user More...
 
virtual int getDbIndex (const QString name)
 getDbIndex To get the index of name from database can be implemented by user More...
 
virtual void addtoParamsGroup (API2::StrategyParamMap *paramMap)
 addtoParamsGroup To add new parameter in the database can be implemented by user More...
 
virtual bool isPushButtonEnabled (short button)
 isPushButtonEnabled To check whether given button is enabled/disabled in button panel can be implemented by user More...
 
virtual QGroupBox * getButtonPanel ()
 getButtonPanel Gives Pointer to Button panel can be implemented by user More...
 
virtual QPushButton * getpushButton (short button)
 getpushButton To get the Pointer to passed button can be implemented by user More...
 
virtual void populateSpreadTerm (QComboBox *spreadTerm)
 populateSpreadTerm To add 2 leg spred type "ABS" "BPS" can be implemented by user More...
 
virtual qlonglong getPortFolioId ()
 getPortFolioId To get the Portfolio id of the selected portfolio can be implemented by user More...
 
virtual QString getPortFolioName ()
 getPortFolioName To get the Portfolio name of the selected portfolio can be implemented by user More...
 
virtual QString getstrategyName ()
 getstrategyName To get the strategy name can be implemented by user More...
 
virtual QString getLegTypeStr (short leg)
 getLegTypeStr To get the string of leg type can be implemented by user More...
 
virtual API2::LEGS getLegType (QString str)
 getLegType To get the enum value of leg type can be implemented by user More...
 
virtual void addToMainStrategyWindow (QVBoxLayout *tableviewLayout)
 addToMainStrategyWindow To add the table layout to the strategy window can be implemented by user More...
 
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 More...
 
virtual QVariant getTableData (int row, int col)
 getTableData To get the data from table can be implemented by user More...
 
virtual bool isStrategyReadyState ()
 isStrategyReadyState To check whether the strategy is in ready state or not can be implemented by user More...
 
virtual void onLoadOldStrategies ()
 onLoadOldStrategies To Get the old strategies from database on starting strategy and decides what happens to them can be implemented by user More...
 
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 More...
 
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 the hash can be implemented by user More...
 
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 type in the hash can be implemented by user More...
 
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 More...
 
virtual void restoreTableHeaderState ()
 restoreTableHeaderState To Get the changes done last time on the table headers can be implemented by user
 
virtual void updateTableView ()
 updateTableView Updates the table view with latest changes can be implemented by user
 
virtual bool checkForUnderLying ()
 checkForUnderLying Checks for underlying can be implemented by user More...
 
virtual void onRemoveAllClicked ()
 onRemoveAllClicked Removes all the rows from the table can be implemented by user
 
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 user More...
 
virtual void setColumnBackGround (int row, int colIndex, QColor color)
 setColumnBackGround Sets given color in the background at that particular row and column can be implemented by user More...
 
virtual void setStrategyInSingleRow (short count)
 setStrategyInSingleRow Make sure only single row is created at a time can be implemented by user More...
 
virtual void disableColumn (QStandardItem *item, bool isDefaultColor=true)
 disableColumn Used to disable a particular column and make its color default can be implemented by user More...
 
virtual void updateSpreadInPortfolio ()
 updateSpreadInPortfolio Updates spread details of portfolio in the strategy table can be implemented by user
 
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 More...
 
virtual void addNewSectionDefaultSetting (QString containerName)
 addNewSectionDefaultSetting To add a new container and giving it default settings can be implemented by user More...
 
virtual void resetData (QString str, QComboBox *combo)
 resetData To reset the data of combo box containing str can be implemented by user More...
 
virtual void loadDeafaultValuseFromFile ()
 loadDeafaultValuseFromFile To load default values from file can be implemented by user
 
virtual void applyDefaultValues (const QStringList &ignoredkey=(QStringList()<< Unknownstr))
 applyDefaultValues To apply default values to all except ignored key can be implemented by user More...
 
virtual void applyDefaultValue (QString)
 applyDefaultValue To apply default value to passed key can be implemented by user
 
virtual void setDVMFocusWiget (QString focusWidgetKey)
 setDVMFocusWiget To set the focus on the passed focus widget key can be implemented by user More...
 
virtual void closeDefaultManager ()
 closeDefaultManager To close the default value manager can be implemented by user
 
virtual void setDefaultValuesHash (QHash< QString, QString > &defaultValuesMap)
 setDefaultValuesHash To set the default value to reset hash can be implemented by user More...
 
virtual void setSymbolToolTip (API2::LEGS leg, const char *tooltip)
 symbolPanel More...
 
virtual void setItmStatus (bool itmStatue)
 setItmStatus To set the opt type combo box activate and put default value to it can be implemented by user More...
 
virtual qlonglong getLegsSymbolId (API2::LEGS leg)
 getLegsSymbolId To get the symbol id of passed leg can be implemented by user More...
 
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 implemented by user More...
 
virtual void populateAccountDetail (API2::LEGS leg, qlonglong symbolId)
 populateAccountDetail To populate account details using passed symbol id and in the passed leg can be implemented by user More...
 
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 overriden More...
 
virtual QString getCurrentSymbol (API2::LEGS leg)
 getCurrentSymbol To get the current symbol id of the passed leg can be implemented by user More...
 
virtual QString getCurrentExpiry (API2::LEGS leg)
 getCurrentExpiry To get the current expiry details of passed leg can be implemented by user More...
 
virtual void enableAccountDetailUI (API2::LEGS leg, bool status)
 enableAccountDetailUI To enable the account details in the UI of passed leg can be implemented by user More...
 
virtual void onComboBoxOptTypeActivated (short leg, QString arg)
 onComboBoxOptTypeActivated On combo box opt type activated of passed leg it gives values to strike price and expiry details canbe overridden More...
 
virtual QString getCurrentMarket (API2::LEGS leg)
 getCurrentMarket To get the current market details of passed leg can be implemented by user More...
 
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 implemented by user More...
 
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 features to it on the passed leg can be implemented by user More...
 
virtual bool validateData (API2::LEGS leg)
 validateData Validate all the entered details and return true everything is valid on the passed leg can be implemented by user More...
 
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 implemented by user More...
 
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 by user More...
 
virtual void clearLegDetails (API2::LEGS leg)
 clearLegDetails To clear the leg details of the passed leg can be implemented by user More...
 
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 the passed leg and whether to block signal while doing it or not can be implemented by user More...
 
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 on the passed leg and whether to block signal while doing it or not can be implemented by user More...
 
virtual QString getCurrentInstrument (short leg)
 getCurrentInstrument To get the current instrument from instrument field from the passed leg can be implemented by user More...
 
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 field of the passed leg can be implemented by user More...
 
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 field of the passed leg can be implemented by user More...
 
virtual QString getCurrentStrike (short leg)
 getCurrentStrike To get the current strike price from the strike price field of the passed leg can be implemented by user More...
 
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 the passed leg can be implemented by user More...
 
virtual QString getCurrentOptType (short leg)
 getCurrentOptType To get the current opt type from the opt type field of the passed leg can be implemented by user More...
 
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 field of the passed leg can be implemented by user More...
 
virtual int getCurrentLotSize (short leg)
 getCurrentLotSize To get the current lot size from the lot size field of the passed leg can be implemented by user More...
 
virtual void enableDisableOptType (short leg, bool isEnable)
 enableDisableOptType To enable/disable opt type field according to requirement from the passed leg can be implemented by user More...
 
virtual void enableDisableStrikePrice (short leg, bool isEnable)
 enableDisableStrikePrice To enable/disable strike price field according to requirement from the passed leg can be implemented by user More...
 
virtual QComboBox * getFilterWidgetComboBox (int index)
 CommonTableView. More...
 
virtual QModelIndex getCurrentIndex ()
 getCurrentIndex To get the current index from the table view after maping to source can be implemented by user More...
 
virtual QModelIndex getProxyModelIndex ()
 getProxyModelIndex To get the current index form strategy table can be implemented by user More...
 
virtual bool isEditableColumn (int column)
 isEditableColumn To get whether the passed column is editable form the strategy table view or not can be implemented by user More...
 
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 More...
 
virtual void setDelegateMinValue (double minval, short elementType)
 setDelegateMinValue To set the minimum possible value of the passed element type can be implemented by user More...
 
virtual void edit (QModelIndex &index)
 edit To edit particular passed index can be implemented by user More...
 
virtual int getRowCount ()
 getRowCount To get the count of total number of rows present can be implemented by user More...
 
virtual void setFocus ()
 setFocus To set focus on anything can be implemented by user
 
virtual void getEditableFieldData (qlonglong adminTokenId, QSqlRecord &records)
 getEditableFieldData To get the data of all the editable columns of passed admin token id from the strategy table can be implemented by user More...
 
virtual qlonglong getCashSymbolId (QString source, QString market, QString symbol)
 CommonMethods. More...
 
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 passed deatils can be implemented by user More...
 
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 passed deatils can be implemented by user More...
 
virtual qlonglong getUnderlyingFutSymbolId (qlonglong symbolId)
 getUnderlyingFutSymbolId To get the future symbol id in reference with passed symbol id can be implemented by user More...
 
virtual QString maturityDayMonYearToString (int day, int yearMon)
 maturityDayMonYearToString To convert the passed day and yearmon in the string date format can be implemented by user More...
 
virtual void sortExpiryDate (QStringList expDateList, QStringList &sortedExpDateList)
 sortExpiryDate To sort the expiry dates list and save it in the passed reference sortedExpDateList list can be implemented by user More...
 
virtual void convertExpiryToMonStr (QString &expiry)
 convertExpiryToMonStr To convert expiry month number to month abbreviation string can be implemented by user More...
 
virtual void convertExpiryToMonNumber (QString &expiry)
 convertExpiryToMonNumber To convert expiry month name string to month number string can be implemented by user More...
 
virtual void getPrecisionAndMultiplier (qlonglong symbolId, double &multiplier, short &precision)
 getPrecisionAndMultiplier To get the multiplier and precision from the passed symbol id can be implemented by user More...
 
virtual double getPriceMultiplier (qlonglong symbolId)
 getPriceMultiplier To get the price multiplier of the passed symbol id can be implemented by user More...
 
virtual QString getScripName (qlonglong symbolId)
 getScripName To get the scrip name of the passed symbol id can be implemented by user More...
 
virtual void printSqlError (QSqlQuery &query)
 printSqlError To print the error coming at the time of executing query can be implemented by user More...
 
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 user More...
 
virtual short configFileValue (const char *str)
 configFileValue To get short value of the passed config file value key string can be implemented by user More...
 
virtual QString configFileValueStr (const char *str)
 configFileValueStr To get the string value of the passed config file value key string can be implemented by user More...
 
virtual QString getFileName ()
 getFileName To get the name of the file can be implemented by user More...
 
virtual const API2::SymbolDetailgetSymbolIdDetail (qlonglong symbolId)
 getSymbolIdDetail To get all the details of the passed symbol id can be implemented by user More...
 
virtual qlonglong getUserId ()
 getUserId To get the user id of the logged in user can be implemented by user More...
 
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 backend can be implemented by user More...
 
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 cCodePCodeList can be implemented by user More...
 
virtual qlonglong getLastLogOutTime ()
 getLastLogOutTime To get the last log out time of current user can be implemented by user More...
 
virtual void hideShowCommonButtonPanelWidgets (API2::CTRL_BTN hideShowCheckBox, bool isShowHide)
 hideShowCommonButtonPanelWidgets To show/hide the hideshow check box on the button panel can be implemented by user More...
 
virtual qlonglong getLastTradePrice (qlonglong symbolId)
 getLastTradePrice To get last traded price of the passed symbol id from the the market can be implemented by user More...
 
virtual qlonglong getVolume (qlonglong symbolId)
 getVolume To get the volume of the passed symbol id from the market can be implemented by user More...
 
virtual void updateAccountDetail (const int row)
 updateAccountDetail To update the account deatils of the passed row of the database can be implemented by user More...
 
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 passed leg can be implemented by user More...
 
virtual bool isKeyExists (QString clientCode, qlonglong symbolId)
 isKeyExists To check whether the client contains the symbol id or not More...
 
virtual API2::AccountDetail getAccountDetailFromDb (qlonglong adminTokenId, short leg)
 getAccountDetailFromDb To get the account details of the passed admin token id from the database of the passed leg can be implemented by user More...
 
virtual void updateResponse (QSharedPointer< API2::Strategy > strategyResponseSharedPtr)
 updateResponse To get the response type and took action accordingly can be implemented by user More...
 
virtual SpreadDetailsgetSpreadDetail (int row)
 getSpreadDetail To get the spread details of passed row can be implemented by user More...
 
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 passed position can be implemented by user More...
 
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 be implemented by user More...
 
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 references using the symbol id can be implemented by user More...
 
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 implemented by user More...
 
virtual void onEscapePressed ()
 onEscapePressed On pressing Escape key the strategy window will get minimized can be implemented by user
 
virtual void onRunActivated ()
 onRunActivated On pressing Run push button or clicking the check box of particular row, the strategy will start to run can be implemented by user
 
virtual void onCtrlSpacePressed ()
 onCtrlSpacePressed On pressing Ctrl Space it uncheckes the selected row and checks the selcted row can be implemented by user
 
virtual void onUpKeyPressed ()
 onUpKeyPressed On pressing up key if strategy container is visible then it hides it otherwise show it can be implemented by user
 
virtual void OnDownKeyPressed ()
 OnDownKeyPressed On down key preesing it make sure that strategy container is visible can be implemented by user.
 
virtual void insertTradeWiseTrackerList (QSharedPointer< API2::TradeWiseTrackerData > &tradeWiseTrackerData)
 insertTradeWiseTrackerList It appends the trade wise tracker data in the track wise tracker list can be implemented by user More...
 
virtual void updateStrategyState (int row)
 updateStrategyState It updates the checkbox state and background colour On ready state it uncheck the checkbox of passed row and set color to red On run state it checks the check box of passed row and set color to green can be implemented by user More...
 
virtual int getStrategyRowFromAdminTokenId (const qlonglong &adminTokenId)
 getStrategyRowFromAdminTokenId To get the admin token id value from the strategy row can be implemented by user More...
 
virtual int getPortFolioRowFromPortfolioId (const qlonglong &portID)
 getPortFolioRowFromPortfolioId To get the portfolio row value from the portfolio id can be implemented by user More...
 
virtual void setCommandCategory (COMMAND_CATEGORY_TYPE)
 setCommandCategory To set the command category type Generic Strategy Terminate Strategy Pause Strategy can be implemented by user
 
virtual COMMAND_CATEGORY_TYPE getCommandCategory ()
 getCommandCategory To get the command category type can be implemented by user More...
 
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 implemented by user More...
 
virtual void modifyCancelOrders (qlonglong strategyId, API2::apiOrderBookParams *apiBookParams=NULL)
 modifyCancelOrders To modify/cancel the orders from the order book in orderontime can be implemented by user More...
 
virtual QString getStrategyState (int row)
 getStrategyState To get the strategy state of the passed row Run State Wait State Ready State can be overriden More...
 
virtual void hideButtons (API2::CTRL_BTN btn)
 hideButtons To hide the passed button from button panel can be implemented by user More...
 
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 More...
 
virtual void addWidgetInButtonPanelGroup (QWidget *)
 addWidgetInButtonPanelGroup To add the passed widget in the button panel can be implemented by user
 
virtual void setEditableModeRow (int row)
 setEditableModeRow To set the passed row in editable mode can be implemented by user More...
 
virtual bool isShowHideTradedQtyChecked ()
 isShowHideTradedQtyChecked To check whether the traded quantity checkbox is shown or hidden in the button panel can be implemented by user More...
 
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 client or not can be implemented by user More...
 
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 If does not contain unique key then add both can be implemented by user More...
 
virtual void removeUniqueSpreadKeyValue (const QString &uniqueKey, const QString &spreadKey)
 removeUniqueSpreadKeyValue To remove the spread key present at unique key can be implemented by user More...
 
virtual void clearUniqueSpreadPairs ()
 clearUniqueSpreadPairs To clear the current and old unique key value pairs can be implemented by user
 
virtual QPair< QString, QString > & getUniqueSpreadKeyValuePair (bool isNew=false)
 getUniqueSpreadKeyValuePair To get the unique spread key value pair If isNew is true then give the current unique key value pair Else give old unique key value pair can be implemented by user More...
 
virtual void setCurrentSpreadKeyValuePair (const QString &key, const QString &value)
 setCurrentSpreadKeyValuePair To set the current spread key and value as passed can be implemented by user More...
 
virtual int getFieldCount ()
 getFieldCount Get the total number of parameters saved in parameter list can be implemented by user More...
 
virtual void subscribeSymbol (qlonglong symbolId)
 subscribeSymbol Subscribe symbol to see all the feed of that particualar symbol using passed symbol id can be implemented by user More...
 
virtual bool isProcessingDefaultValues ()
 isProcessingDefaultValues To check whether the processing field contains default values or not can be implemented by user More...
 
virtual double getGammaValue (qlonglong symbolId)
 getGammaValue To get the rate of change between an option's delta and the underlying asset's price of the passed symbol id can be implemented by user More...
 
virtual void checkShowHideQuantity ()
 checkShowHideQuantity If show hide check box is enabled and has focus and is visible then toggle it in the button panel can be implemented by user
 
virtual QString getCmFoMarket (QString currentMarketId)
 getCmFoMarket To Get NSECM or NSEFO or BSECM or BSEFO Market from the passed current market id can be implemented by user More...
 
virtual bool isSpotMarket (QString currentMarketId)
 isSpotMarket Gives true if passed market id is present in the data can be implemented by user More...
 
virtual int getEditableModeRow ()
 getEditableModeRow Returns the row which is in currently being edited can be implemented by user More...
 
virtual void setIsSpreadPopAlreadyShown (bool isEnable)
 setIsSpreadPopAlreadyShown Set isspreadpopalreadyshown true if passed true can be implemented by user More...
 
virtual void enableNewPushButton (bool isEnable)
 enableNewPushButton To Enable the new push button in the button panel if passed true can be implemented by user More...
 
virtual bool isTableViewFocused ()
 isTableViewFocused To check whether table view has focus or not can be implemented by user More...
 
virtual void convertExpiryDate (QComboBox *comboBox)
 convertExpiryDate To convert expiry date from passed combo box to string date can be implemented by user More...
 
virtual void initializeFirstLegSignals ()
 initializeFirstLegSignals Initialize the signals to emit when first leg is selected can be implemented by user
 
virtual void initializeSecondLegSignals ()
 initializeSecondLegSignals Initialize the signals to emit when second leg is selected can be implemented by user
 
virtual void initializeThirdLegSignals ()
 initializeThirdLegSignals Initialize the signals to emit when third leg is selected can be implemented by user
 
virtual void initializeFourthLegSignals ()
 initializeFourthLegSignals Initialize the signals to emit when fourth leg is selected can be implemented by user
 
virtual void initializeHedgeLegSignals ()
 initializeHedgeLegSignals Initialize the signal to emit on market change when no leg is selected can be implemented by user
 
virtual void keyPressEvent (QKeyEvent *event)
 keyPressEvent Call the button panel functions if that button has focus and is enabled can be implemented by user More...
 
virtual void getOfflineConfirmationMap (QHash< QString, RSP::OrderConfirmation * > &orderBookConfirmationMap)
 getOfflineConfirmationMap To get the confirmation of order from the passed order book confirmation map can be overriden More...
 
virtual QString getOrderStatus (short orderStatus)
 getOrderStatus To Get the order status string Confirmed Filled Pending Cancelled Rejected And some other can be implemented by user More...
 
virtual QComboBox * getSymbolCombo (API2::LEGS leg)
 getSymbolCombo To get the symbol combo box on the strategy window of the passed leg can be implemented by user More...
 
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 implemented by user More...
 
virtual void onComboSymbolLostFocus (API2::LEGS leg)
 onComboSymbolLostFocus To emit the signal of focuslost on loosing focus on symbol combo box with passed leg can be implemented by user More...
 
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 validation Adding points to double value fields in UI can be implemented by user More...
 
virtual void updateSqlRecordOnEdit (int row)
 updateSqlRecordOnEdit To Update the Database records when commit the changes in the strategy table can be implemented by user More...
 
virtual QSqlQuery & fillDetailsFromAdminTokenId (const UNSIGNED_LONG adminTokenId, QString condition)
 fillDetailsFromAdminTokenId To get the query containg the details of strategy using admin token id can be implemented by user More...
 
virtual void getGtcOrderConfirmationVector (QVector< RSP::OrderConfirmation * > &orderConfirmationVector)
 getGtcOrderConfirmationVector To get the good till order confirmation vector in the passed vector can be implemented by user More...
 
virtual bool isGtcOrder (short orderValidity)
 isGtcOrder Gives true if order validity is gtc(good till cancelled) can be implemented by user More...
 
virtual void setLastLogOutTime (qlonglong time)
 setLastLogOutTime Saves the last logout time in the file canbe overridden More...
 
virtual double getGreeksDelta (qlonglong symbolId)
 getGreeksDelta To get rate of change between the option's price and a $1 change in the underlying asset's price of the passed symbol id can be implemented by user More...
 
virtual bool getIsLoadFromMarketWatch ()
 getIsLoadFromMarketWatch Gives true if data model is loaded from market watch can be implemented by user More...
 
virtual bool isSymbolPanelInitialized (API2::LEGS leg)
 isSymbolPanelInitialized Gives true if symbol panel is initialized for passed leg can be implemented by user More...
 
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 can be implemented by user More...
 
virtual void processMktData (qlonglong symbolId)
 processMktData To process the market data of passed symbol if not processing Othnerwise update it can be implemented by user More...
 
virtual void symbolActivated (API2::LEGS leg)
 symbolActivated To give the completion to the entered symbol in symbol combo box can be implemented by user More...
 
virtual void setSpreadPopOnAddPortfolio (bool flag)
 setSpreadPopOnAddPortfolio To enable/disable the spread pop up on adding new portfolio can be implemented by user More...
 
virtual void setDelegatesFocusOut ()
 setDelegatesFocusOut To set the focus out from the strategy table can be implemented by user
 
virtual bool validateAccountDetailOnLoad (const QString &clientCode, qlonglong symbolId)
 validateAccountDetailOnLoad Gives true if account details given at the time adding new strategy is valid can be implemented by user More...
 
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 can be implemented by user More...
 
virtual bool isModifyState ()
 isModifyState Gives true if selected strategy is in run state and instead of run it shows modify can be implemented by user More...
 
virtual bool isUnderLyingStock ()
 isUnderLyingStock Gives true if underlying type is stock can be implemented by user More...
 
virtual bool isEditState ()
 isEditState Checks wheteher the edit push button in the button panel is enabled or not can be implemented by user More...
 
virtual int getClientCodePortfolioIndex (API2::LEGS leg)
 getClientCodePortfolioIndex To get the client code from the portfolio of passed leg can be implemented by user More...
 
virtual void movePortfolioIndex (QStringList &dataList, int fromIndex, int toIndex)
 movePortfolioIndex To move the portfolio in passed data list from passed fromindex to passed toindex can be implemented by user More...
 
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 can be implemented by user More...
 

Public Attributes

ColumnIndex _col
 _col Object of ColumnIndex Structure To get the data of any column
 
QHash< int,QList< BaseSymbolIds * > > _hashRowSymboID
 _hashRowSymboID Contains the rows of data of symbol id and its details
 
QQueue< QSharedPointer< API2::Strategy > > _responseQueue
 _responseQueue Contains the queue of strategy responses
 
QHash< int,SpreadDetails * > _hashRowSpreadDetail
 _hashRowSpreadDetail Hash containing the spread details in different rows
 
APIWrapper_ApiPointer
 _ApiPointer A pointer object of APIWrapper Class
 

Detailed Description

The BaseStrategyWrapper class The main class to be inherited for creating a new strategy.

Member Function Documentation

◆ addDefaultParameter()

virtual void BaseStrategyWrapper::addDefaultParameter ( QString  name,
short  type,
QWidget *  element,
QWidget *  elementGroup = 0 
)
inlinevirtual

addDefaultParameter To add default parameters to a widget can be implemented by user

Parameters
name
type
element
elementGroup

◆ addNewSectionDefaultSetting()

virtual void BaseStrategyWrapper::addNewSectionDefaultSetting ( QString  containerName)
inlinevirtual

addNewSectionDefaultSetting To add a new container and giving it default settings can be implemented by user

Parameters
containerName

◆ addSymbolPanel()

virtual void BaseStrategyWrapper::addSymbolPanel ( const short  instrument,
SymbolPanelElements elements,
bool  isExpiry,
bool  addExchanges = true 
)
inlinevirtual

addSymbolPanel To add symbol panel details in the strategy can be implemented by user

Parameters
instrumentinstrument enum value
elementsSymbol Panel Elements pointer
isExpirywhether expire or not default value is false
addExchangeswhether add exchange or not default value is true

◆ addToMainStrategyWindow()

virtual void BaseStrategyWrapper::addToMainStrategyWindow ( QVBoxLayout *  tableviewLayout)
inlinevirtual

addToMainStrategyWindow To add the table layout to the strategy window can be implemented by user

Parameters
tableviewLayoutLayout Widget object name

◆ addtoParamsGroup()

virtual void BaseStrategyWrapper::addtoParamsGroup ( API2::StrategyParamMap *  paramMap)
inlinevirtual

addtoParamsGroup To add new parameter in the database can be implemented by user

Parameters
paramMapPointer containig parameter information

◆ applyDefaultValues()

virtual void BaseStrategyWrapper::applyDefaultValues ( const QStringList &  ignoredkey = (QStringList() << Unknownstr))
inlinevirtual

applyDefaultValues To apply default values to all except ignored key can be implemented by user

Parameters
ignoredkey

◆ checkForUnderLying()

virtual bool BaseStrategyWrapper::checkForUnderLying ( )
inlinevirtual

checkForUnderLying Checks for underlying can be implemented by user

Returns
By default returns true

◆ clearLegDetails()

virtual void BaseStrategyWrapper::clearLegDetails ( API2::LEGS  leg)
inlinevirtual

clearLegDetails To clear the leg details of the passed leg can be implemented by user

Parameters
leg

◆ configFileValue()

virtual short BaseStrategyWrapper::configFileValue ( const char *  str)
inlinevirtual

configFileValue To get short value of the passed config file value key string can be implemented by user

Parameters
str
Returns
default return value is -1

◆ configFileValueStr()

virtual QString BaseStrategyWrapper::configFileValueStr ( const char *  str)
inlinevirtual

configFileValueStr To get the string value of the passed config file value key string can be implemented by user

Parameters
str
Returns

◆ convertExpiryDate()

virtual void BaseStrategyWrapper::convertExpiryDate ( QComboBox *  comboBox)
inlinevirtual

convertExpiryDate To convert expiry date from passed combo box to string date can be implemented by user

Parameters
comboBox

◆ convertExpiryToMonNumber()

virtual void BaseStrategyWrapper::convertExpiryToMonNumber ( QString &  expiry)
inlinevirtual

convertExpiryToMonNumber To convert expiry month name string to month number string can be implemented by user

Parameters
expiry

◆ convertExpiryToMonStr()

virtual void BaseStrategyWrapper::convertExpiryToMonStr ( QString &  expiry)
inlinevirtual

convertExpiryToMonStr To convert expiry month number to month abbreviation string can be implemented by user

Parameters
expiry

◆ deleteParamsCommand

virtual void BaseStrategyWrapper::deleteParamsCommand ( API2::AbstractUserParams *&  genericPtr)
inlinevirtualslot

deleteParamsCommand To delete the pointer object of abstract userparams class can be implemented by user

Parameters
genericPtr

◆ disableColumn()

virtual void BaseStrategyWrapper::disableColumn ( QStandardItem *  item,
bool  isDefaultColor = true 
)
inlinevirtual

disableColumn Used to disable a particular column and make its color default can be implemented by user

Parameters
item
isDefaultColorBy default true

◆ disabledFeilds()

virtual void BaseStrategyWrapper::disabledFeilds ( API2::LEGS  leg,
API2::SYM_PANEL  element 
)
inlinevirtual

disabledFeilds To disable any particular element in the symbol panel of the passed leg can be implemented by user

Parameters
leg
element

◆ edit()

virtual void BaseStrategyWrapper::edit ( QModelIndex &  index)
inlinevirtual

edit To edit particular passed index can be implemented by user

Parameters
index

◆ enableAccountDetailUI()

virtual void BaseStrategyWrapper::enableAccountDetailUI ( API2::LEGS  leg,
bool  status 
)
inlinevirtual

enableAccountDetailUI To enable the account details in the UI of passed leg can be implemented by user

Parameters
leg
status

◆ enableDisableOptType()

virtual void BaseStrategyWrapper::enableDisableOptType ( short  leg,
bool  isEnable 
)
inlinevirtual

enableDisableOptType To enable/disable opt type field according to requirement from the passed leg can be implemented by user

Parameters
leg
isEnable

◆ enableDisableStrikePrice()

virtual void BaseStrategyWrapper::enableDisableStrikePrice ( short  leg,
bool  isEnable 
)
inlinevirtual

enableDisableStrikePrice To enable/disable strike price field according to requirement from the passed leg can be implemented by user

Parameters
leg
isEnable

◆ enableNewPushButton()

virtual void BaseStrategyWrapper::enableNewPushButton ( bool  isEnable)
inlinevirtual

enableNewPushButton To Enable the new push button in the button panel if passed true can be implemented by user

Parameters
isEnable

◆ enableSymbolPanel()

virtual void BaseStrategyWrapper::enableSymbolPanel ( API2::LEGS  leg,
bool  isEnable,
bool  isAccountDetail = true,
bool  isNewButtonClicked = true 
)
inlinevirtual

enableSymbolPanel To enable the symbol panel fields of passed leg on pressing new push button can be overriden

Parameters
leg
isEnable
isAccountDetail
isNewButtonClicked

◆ fillDetailsFromAdminTokenId()

virtual QSqlQuery& BaseStrategyWrapper::fillDetailsFromAdminTokenId ( const UNSIGNED_LONG  adminTokenId,
QString  condition 
)
inlinevirtual

fillDetailsFromAdminTokenId To get the query containg the details of strategy using admin token id can be implemented by user

Parameters
adminTokenId
condition
Returns

◆ getAccountDetailFromDb()

virtual API2::AccountDetail BaseStrategyWrapper::getAccountDetailFromDb ( qlonglong  adminTokenId,
short  leg 
)
inlinevirtual

getAccountDetailFromDb To get the account details of the passed admin token id from the database of the passed leg can be implemented by user

Parameters
adminTokenId
leg
Returns

◆ getAccountDetailFromPortfolio()

virtual void BaseStrategyWrapper::getAccountDetailFromPortfolio ( API2::LEGS  leg,
const QStringList &  dataList,
QString &  accountDetail 
)
inlinevirtual

getAccountDetailFromPortfolio To get the account details from the passed datalist of the passed leg can be implemented by user

Parameters
leg
dataList
accountDetail

◆ getAccountDetailList()

virtual void BaseStrategyWrapper::getAccountDetailList ( qlonglong  adminTokenId,
QList< qlonglong > &  symbolIdList,
QStringList &  cCodePCodeList 
)
inlinevirtual

getAccountDetailList To get the list of all the accounts contianing passed admin token id in passed cCodePCodeList can be implemented by user

Parameters
adminTokenId
symbolIdList
cCodePCodeList

◆ getBidAsk()

virtual bool BaseStrategyWrapper::getBidAsk ( qlonglong  symbolId,
qlonglong &  bidPrice,
qlonglong &  askPrice,
int  position = 0 
)
inlinevirtual

getBidAsk To get the bid price and ask price of the passed symbol id from the market data of the passed position can be implemented by user

Parameters
symbolId
bidPrice
askPrice
position
Returns
default return value is false

◆ getBidAskQty()

virtual qlonglong BaseStrategyWrapper::getBidAskQty ( qlonglong  symbolId,
const short &  side,
int  position = 0 
)
inlinevirtual

getBidAskQty To get the bid quantity or ask quantity of the passed symbol id from the market data can be implemented by user

Parameters
symbolId
sideEither buy or sell
position
Returns
default return value is 0;

◆ getButtonPanel()

virtual QGroupBox* BaseStrategyWrapper::getButtonPanel ( )
inlinevirtual

getButtonPanel Gives Pointer to Button panel can be implemented by user

Returns
default return value is NULL

◆ getCashSymbolId()

virtual qlonglong BaseStrategyWrapper::getCashSymbolId ( QString  source,
QString  market,
QString  symbol 
)
inlinevirtual

CommonMethods.

getCashSymbolId To get the secuirity id of cash method from the scrip master containing the passed details can be implemented by user

Parameters
source
market
symbol
Returns
default return value is 0;

◆ getClientCodePortfolioIndex()

virtual int BaseStrategyWrapper::getClientCodePortfolioIndex ( API2::LEGS  leg)
inlinevirtual

getClientCodePortfolioIndex To get the client code from the portfolio of passed leg can be implemented by user

Parameters
leg
Returns
default return value is -1

◆ getCmFoMarket()

virtual QString BaseStrategyWrapper::getCmFoMarket ( QString  currentMarketId)
inlinevirtual

getCmFoMarket To Get NSECM or NSEFO or BSECM or BSEFO Market from the passed current market id can be implemented by user

Parameters
currentMarketId
Returns

◆ getCommandCategory()

virtual COMMAND_CATEGORY_TYPE BaseStrategyWrapper::getCommandCategory ( )
inlinevirtual

getCommandCategory To get the command category type can be implemented by user

Returns

◆ getCurrentExpiry()

virtual QString BaseStrategyWrapper::getCurrentExpiry ( API2::LEGS  leg)
inlinevirtual

getCurrentExpiry To get the current expiry details of passed leg can be implemented by user

Parameters
leg
Returns

◆ getCurrentIndex()

virtual QModelIndex BaseStrategyWrapper::getCurrentIndex ( )
inlinevirtual

getCurrentIndex To get the current index from the table view after maping to source can be implemented by user

Returns

◆ getCurrentInstrument()

virtual QString BaseStrategyWrapper::getCurrentInstrument ( short  leg)
inlinevirtual

getCurrentInstrument To get the current instrument from instrument field from the passed leg can be implemented by user

Parameters
leg
Returns

◆ getCurrentLotSize()

virtual int BaseStrategyWrapper::getCurrentLotSize ( short  leg)
inlinevirtual

getCurrentLotSize To get the current lot size from the lot size field of the passed leg can be implemented by user

Parameters
leg
Returns

◆ getCurrentMarket()

virtual QString BaseStrategyWrapper::getCurrentMarket ( API2::LEGS  leg)
inlinevirtual

getCurrentMarket To get the current market details of passed leg can be implemented by user

Parameters
leg
Returns

◆ getCurrentOptType()

virtual QString BaseStrategyWrapper::getCurrentOptType ( short  leg)
inlinevirtual

getCurrentOptType To get the current opt type from the opt type field of the passed leg can be implemented by user

Parameters
leg
Returns

◆ getCurrentStrike()

virtual QString BaseStrategyWrapper::getCurrentStrike ( short  leg)
inlinevirtual

getCurrentStrike To get the current strike price from the strike price field of the passed leg can be implemented by user

Parameters
leg
Returns

◆ getCurrentSymbol()

virtual QString BaseStrategyWrapper::getCurrentSymbol ( API2::LEGS  leg)
inlinevirtual

getCurrentSymbol To get the current symbol id of the passed leg can be implemented by user

Parameters
leg
Returns

◆ getDbIndex()

virtual int BaseStrategyWrapper::getDbIndex ( const QString  name)
inlinevirtual

getDbIndex To get the index of name from database can be implemented by user

Parameters
nameParameter name
Returns
index number By default return -1

◆ getEditableFieldData()

virtual void BaseStrategyWrapper::getEditableFieldData ( qlonglong  adminTokenId,
QSqlRecord &  records 
)
inlinevirtual

getEditableFieldData To get the data of all the editable columns of passed admin token id from the strategy table can be implemented by user

Parameters
adminTokenId
records

◆ getEditableModeRow()

virtual int BaseStrategyWrapper::getEditableModeRow ( )
inlinevirtual

getEditableModeRow Returns the row which is in currently being edited can be implemented by user

Returns

◆ getFieldCount()

virtual int BaseStrategyWrapper::getFieldCount ( )
inlinevirtual

getFieldCount Get the total number of parameters saved in parameter list can be implemented by user

Returns

◆ getFileName()

virtual QString BaseStrategyWrapper::getFileName ( )
inlinevirtual

getFileName To get the name of the file can be implemented by user

Returns

◆ getFilterWidgetComboBox()

virtual QComboBox* BaseStrategyWrapper::getFilterWidgetComboBox ( int  index)
inlinevirtual

CommonTableView.

getFilterWidgetComboBox To get the filter widget header in table view can be implemented by user

Parameters
index
Returns
default return value is NULL

◆ getFutureSymbolId()

virtual qlonglong BaseStrategyWrapper::getFutureSymbolId ( QString  source,
QString  market,
QString  symbol,
QString  strDate 
)
inlinevirtual

getFutureSymbolId To get the secuirity id of future method from the scrip master containing the passed deatils can be implemented by user

Parameters
source
market
symbol
strDate
Returns
default return value is 0;

◆ getGammaValue()

virtual double BaseStrategyWrapper::getGammaValue ( qlonglong  symbolId)
inlinevirtual

getGammaValue To get the rate of change between an option's delta and the underlying asset's price of the passed symbol id can be implemented by user

Parameters
symbolId
Returns

◆ getGreeksDelta()

virtual double BaseStrategyWrapper::getGreeksDelta ( qlonglong  symbolId)
inlinevirtual

getGreeksDelta To get rate of change between the option's price and a $1 change in the underlying asset's price of the passed symbol id can be implemented by user

Parameters
symbolId
Returns
default return value is 0

◆ getGtcOrderConfirmationVector()

virtual void BaseStrategyWrapper::getGtcOrderConfirmationVector ( QVector< RSP::OrderConfirmation * > &  orderConfirmationVector)
inlinevirtual

getGtcOrderConfirmationVector To get the good till order confirmation vector in the passed vector can be implemented by user

Parameters
orderConfirmationVector

◆ getIsLoadFromMarketWatch()

virtual bool BaseStrategyWrapper::getIsLoadFromMarketWatch ( )
inlinevirtual

getIsLoadFromMarketWatch Gives true if data model is loaded from market watch can be implemented by user

Returns
default return value is false

◆ getIsOldPositionUploadAllowed

virtual bool BaseStrategyWrapper::getIsOldPositionUploadAllowed ( )
inlinevirtualslot

getIsOldPositionUploadAllowed Gives true if old position upload is allowed can be implemented by user

Returns
default return value is false

◆ getIsSpreadPopAlreadyShown

virtual bool BaseStrategyWrapper::getIsSpreadPopAlreadyShown ( )
inlinevirtualslot

getIsSpreadPopAlreadyShown Gives true if spread pop up is already shown can be implemented by user

Returns
default return value is false

◆ getIvOrVegaVal()

virtual void BaseStrategyWrapper::getIvOrVegaVal ( qlonglong  symbolId,
qlonglong &  bidIv,
qlonglong &  askIv,
short  mode,
double &  bidVega,
double &  askVega,
bool  calculateVega,
qlonglong  underlyingSymbolId 
)
inlinevirtual

getIvOrVegaVal To get the bidIv and askIv and bidVega and askVega values after calculations in their references using the symbol id can be implemented by user

Parameters
symbolId
bidIv
askIv
mode
bidVega
askVega
calculateVega
underlyingSymbolId

◆ getIvVegaPrice()

virtual void BaseStrategyWrapper::getIvVegaPrice ( qlonglong  symbolId,
qlonglong  price,
short  ,
qlonglong  underlyingSymbolId,
qlonglong &  ivPrice,
double &  vega,
bool  isVegaCalculate 
)
inlinevirtual

getIvVegaPrice To get the ivPrice and vega after calculations using the symbol id and price can be implemented by user

Parameters
symbolId
price
underlyingSymbolId
ivPrice
vega
isVegaCalculate

◆ getLastLogOutTime()

virtual qlonglong BaseStrategyWrapper::getLastLogOutTime ( )
inlinevirtual

getLastLogOutTime To get the last log out time of current user can be implemented by user

Returns
default return value is 0

◆ getLastTradePrice()

virtual qlonglong BaseStrategyWrapper::getLastTradePrice ( qlonglong  symbolId)
inlinevirtual

getLastTradePrice To get last traded price of the passed symbol id from the the market can be implemented by user

Parameters
symbolId
Returns
default return value is -1

◆ getLegsSymbolId()

virtual qlonglong BaseStrategyWrapper::getLegsSymbolId ( API2::LEGS  leg)
inlinevirtual

getLegsSymbolId To get the symbol id of passed leg can be implemented by user

Parameters
leg
Returns
By default it retruns 0

◆ getLegType()

virtual API2::LEGS BaseStrategyWrapper::getLegType ( QString  str)
inlinevirtual

getLegType To get the enum value of leg type can be implemented by user

Parameters
strLeg type name
Returns

◆ getLegTypeStr()

virtual QString BaseStrategyWrapper::getLegTypeStr ( short  leg)
inlinevirtual

getLegTypeStr To get the string of leg type can be implemented by user

Parameters
legenum value of leg
Returns

◆ getNewParamsCommand

virtual API2::AbstractUserParams* BaseStrategyWrapper::getNewParamsCommand ( )
inlinevirtualslot

getNewParamsCommand To get the pointer object reference of abstract user params class can be implemented by user

Returns
default return value is NULL

◆ getOfflineConfirmationMap()

virtual void BaseStrategyWrapper::getOfflineConfirmationMap ( QHash< QString, RSP::OrderConfirmation * > &  orderBookConfirmationMap)
inlinevirtual

getOfflineConfirmationMap To get the confirmation of order from the passed order book confirmation map can be overriden

Parameters
orderBookConfirmationMap

◆ getOptionsConRevCombination

virtual QString BaseStrategyWrapper::getOptionsConRevCombination ( )
inlinevirtualslot

getOptionsConRevCombination To get the options con rev combination can be implemented by user

Returns

◆ getOptionSymbolId()

virtual qlonglong BaseStrategyWrapper::getOptionSymbolId ( QString  source,
QString  market,
QString  symbol,
QString  strDate,
QString  optionType,
QString  strikePrice 
)
inlinevirtual

getOptionSymbolId To get the secuirity id of option method from the scrip master containing the passed deatils can be implemented by user

Parameters
source
market
symbol
strDate
optionType
strikePrice
Returns
default return value is 0

◆ getOrderStatus()

virtual QString BaseStrategyWrapper::getOrderStatus ( short  orderStatus)
inlinevirtual

getOrderStatus To Get the order status string Confirmed Filled Pending Cancelled Rejected And some other can be implemented by user

Parameters
orderStatus
Returns

◆ getParamsCommand

virtual API2::AbstractUserParams* BaseStrategyWrapper::getParamsCommand ( )
inlinevirtualslot

getParamsCommand To get the data using pointer object of abstract user params can be overriden

Returns
default return value is NULL

◆ getPortfolioFieldCount

virtual int BaseStrategyWrapper::getPortfolioFieldCount ( )
inlinevirtualslot

getPortfolioFieldCount To Count and give the number of portfolio fields can be implemented by user

Returns
default return value is 0

◆ getPortFolioId()

virtual qlonglong BaseStrategyWrapper::getPortFolioId ( )
inlinevirtual

getPortFolioId To get the Portfolio id of the selected portfolio can be implemented by user

---------— Getters ------------—

Returns
default return value is -1

◆ getPortFolioName()

virtual QString BaseStrategyWrapper::getPortFolioName ( )
inlinevirtual

getPortFolioName To get the Portfolio name of the selected portfolio can be implemented by user

Returns

◆ getPortFolioRowFromPortfolioId()

virtual int BaseStrategyWrapper::getPortFolioRowFromPortfolioId ( const qlonglong &  portID)
inlinevirtual

getPortFolioRowFromPortfolioId To get the portfolio row value from the portfolio id can be implemented by user

Parameters
portID
Returns
default return value is -1

◆ getPrecisionAndMultiplier()

virtual void BaseStrategyWrapper::getPrecisionAndMultiplier ( qlonglong  symbolId,
double &  multiplier,
short &  precision 
)
inlinevirtual

getPrecisionAndMultiplier To get the multiplier and precision from the passed symbol id can be implemented by user

Parameters
symbolId
multiplier
precision

◆ getPriceMultiplier()

virtual double BaseStrategyWrapper::getPriceMultiplier ( qlonglong  symbolId)
inlinevirtual

getPriceMultiplier To get the price multiplier of the passed symbol id can be implemented by user

Parameters
symbolId
Returns
By default it returns 0

◆ getProxyModelIndex()

virtual QModelIndex BaseStrategyWrapper::getProxyModelIndex ( )
inlinevirtual

getProxyModelIndex To get the current index form strategy table can be implemented by user

Returns

◆ getpushButton()

virtual QPushButton* BaseStrategyWrapper::getpushButton ( short  button)
inlinevirtual

getpushButton To get the Pointer to passed button can be implemented by user

Parameters
buttonEnum value of button
Returns
default return value is NULL

◆ getRowCount()

virtual int BaseStrategyWrapper::getRowCount ( )
inlinevirtual

getRowCount To get the count of total number of rows present can be implemented by user

Returns
default return value is -1

◆ getScripName()

virtual QString BaseStrategyWrapper::getScripName ( qlonglong  symbolId)
inlinevirtual

getScripName To get the scrip name of the passed symbol id can be implemented by user

Parameters
symbolId
Returns

◆ getSpreadDetail()

virtual SpreadDetails* BaseStrategyWrapper::getSpreadDetail ( int  row)
inlinevirtual

getSpreadDetail To get the spread details of passed row can be implemented by user

Parameters
row
Returns
default return value is NULL

◆ getstrategyName()

virtual QString BaseStrategyWrapper::getstrategyName ( )
inlinevirtual

getstrategyName To get the strategy name can be implemented by user

Returns

◆ getStrategyRowFromAdminTokenId()

virtual int BaseStrategyWrapper::getStrategyRowFromAdminTokenId ( const qlonglong &  adminTokenId)
inlinevirtual

getStrategyRowFromAdminTokenId To get the admin token id value from the strategy row can be implemented by user

Parameters
adminTokenId
Returns
default return value is -1

◆ getStrategyState()

virtual QString BaseStrategyWrapper::getStrategyState ( int  row)
inlinevirtual

getStrategyState To get the strategy state of the passed row Run State Wait State Ready State can be overriden

Parameters
row
Returns

◆ getSymbolCombo()

virtual QComboBox* BaseStrategyWrapper::getSymbolCombo ( API2::LEGS  leg)
inlinevirtual

getSymbolCombo To get the symbol combo box on the strategy window of the passed leg can be implemented by user

Parameters
leg
Returns
default return value is NULL

◆ getSymbolIdDetail()

virtual const API2::SymbolDetail& BaseStrategyWrapper::getSymbolIdDetail ( qlonglong  symbolId)
inlinevirtual

getSymbolIdDetail To get all the details of the passed symbol id can be implemented by user

Parameters
symbolId
Returns

◆ getTableData()

virtual QVariant BaseStrategyWrapper::getTableData ( int  row,
int  col 
)
inlinevirtual

getTableData To get the data from table can be implemented by user

Parameters
rowRow number
colColumn number
Returns
Return data of any data type in that row and column

◆ getTableModel()

virtual QStandardItemModel* BaseStrategyWrapper::getTableModel ( )
inlinevirtual

getTableModel To get the structure of the table can be implemented by user By default return NULL

Returns

◆ getUhedgePortfolioId

virtual int BaseStrategyWrapper::getUhedgePortfolioId ( const QString &  portfolioName)
inlinevirtualslot

getUhedgePortfolioId To get the Uhedge Portfolio id from passed portfolio name can be implemented by user

Parameters
portfolioName
Returns
default return value is -1

◆ getUhedgePortfolioNameFromId

virtual const QString& BaseStrategyWrapper::getUhedgePortfolioNameFromId ( const int  portfolioId)
inlinevirtualslot

getUhedgePortfolioNameFromId To get the uhedge portfolio name from passed portfolio id can be implemented by user

Parameters
portfolioId
Returns

◆ getUnderlyingFutSymbolId()

virtual qlonglong BaseStrategyWrapper::getUnderlyingFutSymbolId ( qlonglong  symbolId)
inlinevirtual

getUnderlyingFutSymbolId To get the future symbol id in reference with passed symbol id can be implemented by user

Parameters
symbolId
Returns

◆ getUniqueSpreadKeyValuePair()

virtual QPair<QString,QString>& BaseStrategyWrapper::getUniqueSpreadKeyValuePair ( bool  isNew = false)
inlinevirtual

getUniqueSpreadKeyValuePair To get the unique spread key value pair If isNew is true then give the current unique key value pair Else give old unique key value pair can be implemented by user

Parameters
isNew
Returns

◆ getUserId()

virtual qlonglong BaseStrategyWrapper::getUserId ( )
inlinevirtual

getUserId To get the user id of the logged in user can be implemented by user

Returns
default return value is -1;

◆ getVolume()

virtual qlonglong BaseStrategyWrapper::getVolume ( qlonglong  symbolId)
inlinevirtual

getVolume To get the volume of the passed symbol id from the market can be implemented by user

Parameters
symbolId
Returns
default return value is -1

◆ hideButtons()

virtual void BaseStrategyWrapper::hideButtons ( API2::CTRL_BTN  btn)
inlinevirtual

hideButtons To hide the passed button from button panel can be implemented by user

Parameters
btn

◆ hideFeilds()

virtual void BaseStrategyWrapper::hideFeilds ( API2::LEGS  leg,
API2::SYM_PANEL  element 
)
inlinevirtual

hideFeilds To hide any particualr element from the symbol panel of the passed leg can be implemented by user

Parameters
leg
element

◆ hideShowColumns()

virtual void BaseStrategyWrapper::hideShowColumns ( QTableView *  tableView,
QString  title,
QList< int >  ,
QWidget *  parent,
bool  isColumn,
QStandardItemModel *  model 
)
inlinevirtual

hideShowColumns To show/hide the passed column from the table view can be implemented by user

Parameters
tableView
title
parent
isColumn
model

◆ hideShowCommonButtonPanelWidgets()

virtual void BaseStrategyWrapper::hideShowCommonButtonPanelWidgets ( API2::CTRL_BTN  hideShowCheckBox,
bool  isShowHide 
)
inlinevirtual

hideShowCommonButtonPanelWidgets To show/hide the hideshow check box on the button panel can be implemented by user

Parameters
hideShowCheckBox
isShowHide

◆ insertHashRowSymbolId() [1/3]

virtual void BaseStrategyWrapper::insertHashRowSymbolId ( int  row,
int  symbolIdIndex,
qlonglong  quantity,
int  orderModeIndex,
short  strategyType,
qlonglong  underlyingSymbolId = 0 
)
inlinevirtual

insertHashRowSymbolId Insert Row , symbol id index, quantity, order mode index and strategy type in the hash can be implemented by user

Parameters
rowRow to be inserted
symbolIdIndex
quantity
orderModeIndex
strategyType
underlyingSymbolId

◆ insertHashRowSymbolId() [2/3]

virtual void BaseStrategyWrapper::insertHashRowSymbolId ( BaseSymbolIds symbolIds,
int  row,
int  symbolIdIndex,
qlonglong  quantity,
int  orderModeIndex,
short  strategyType,
qlonglong  underlyingSymbolId = 0 
)
inlinevirtual

insertHashRowSymbolId Insert symbol ids, row, symbol ids, quantity, order mode index and strategy type in the hash can be implemented by user

Parameters
symbolIds
row
symbolIdIndex
quantity
orderModeIndex
strategyType
underlyingSymbolId

◆ insertHashRowSymbolId() [3/3]

virtual void BaseStrategyWrapper::insertHashRowSymbolId ( int  row,
int  symbolIdIndex,
qlonglong  quantity 
)
inlinevirtual

insertHashRowSymbolId Insert row, symbol id index and quantity in the hash can be implemented by user

Parameters
row
symbolIdIndex
quantity

◆ insertNewUniqueSpreadCheckEntry()

virtual void BaseStrategyWrapper::insertNewUniqueSpreadCheckEntry ( const QString &  uniqueKey,
const QString &  spreadKey 
)
inlinevirtual

insertNewUniqueSpreadCheckEntry To add the spread key at the unique key if it does not have the same If does not contain unique key then add both can be implemented by user

Parameters
uniqueKey
spreadKey

◆ insertTradeWiseTrackerList()

virtual void BaseStrategyWrapper::insertTradeWiseTrackerList ( QSharedPointer< API2::TradeWiseTrackerData > &  tradeWiseTrackerData)
inlinevirtual

insertTradeWiseTrackerList It appends the trade wise tracker data in the track wise tracker list can be implemented by user

Parameters
tradeWiseTrackerData

◆ isDisplayInLots()

virtual bool BaseStrategyWrapper::isDisplayInLots ( )
inlinevirtual

isDisplayInLots To check whether to show the lot size or quantity of lots can be implemented by user default return value is false

Returns

◆ isEditableColumn()

virtual bool BaseStrategyWrapper::isEditableColumn ( int  column)
inlinevirtual

isEditableColumn To get whether the passed column is editable form the strategy table view or not can be implemented by user

Parameters
column
Returns
default return value is false

◆ isEditState()

virtual bool BaseStrategyWrapper::isEditState ( )
inlinevirtual

isEditState Checks wheteher the edit push button in the button panel is enabled or not can be implemented by user

Returns
By default it retrurn false

◆ isGtcOrder()

virtual bool BaseStrategyWrapper::isGtcOrder ( short  orderValidity)
inlinevirtual

isGtcOrder Gives true if order validity is gtc(good till cancelled) can be implemented by user

Parameters
orderValidity
Returns
default return value is false

◆ isKeyExists()

virtual bool BaseStrategyWrapper::isKeyExists ( QString  clientCode,
qlonglong  symbolId 
)
inlinevirtual

isKeyExists To check whether the client contains the symbol id or not

Parameters
clientCode
symbolId
Returns
default return value is false

◆ isModifyState()

virtual bool BaseStrategyWrapper::isModifyState ( )
inlinevirtual

isModifyState Gives true if selected strategy is in run state and instead of run it shows modify can be implemented by user

Returns
default return value is false

◆ isProcessingDefaultValues()

virtual bool BaseStrategyWrapper::isProcessingDefaultValues ( )
inlinevirtual

isProcessingDefaultValues To check whether the processing field contains default values or not can be implemented by user

Returns
default return value is false

◆ isProcessingEvent()

virtual bool BaseStrategyWrapper::isProcessingEvent ( )
inlinevirtual

isProcessingEvent Checks whether if any event is under process or not can be implemented by user default return value is false

Returns

◆ isPushButtonEnabled()

virtual bool BaseStrategyWrapper::isPushButtonEnabled ( short  button)
inlinevirtual

isPushButtonEnabled To check whether given button is enabled/disabled in button panel can be implemented by user

Parameters
buttonenum value of button
Returns
default return value is false

◆ isSenderLeg()

virtual bool BaseStrategyWrapper::isSenderLeg ( API2::LEGS  leg,
QObject *  object 
)
inlinevirtual

isSenderLeg To check whether the passed object is present in the symbol panel list of the passed leg can be implemented by user

Parameters
leg
object
Returns
default return value is false

◆ isShowHideTradedQtyChecked()

virtual bool BaseStrategyWrapper::isShowHideTradedQtyChecked ( )
inlinevirtual

isShowHideTradedQtyChecked To check whether the traded quantity checkbox is shown or hidden in the button panel can be implemented by user

Returns
default return value is false

◆ isSpotMarket()

virtual bool BaseStrategyWrapper::isSpotMarket ( QString  currentMarketId)
inlinevirtual

isSpotMarket Gives true if passed market id is present in the data can be implemented by user

Parameters
currentMarketId
Returns
default return value is false

◆ isStrategyReadyState()

virtual bool BaseStrategyWrapper::isStrategyReadyState ( )
inlinevirtual

isStrategyReadyState To check whether the strategy is in ready state or not can be implemented by user

Returns
default return value is false

◆ isSymbolPanelInitialized()

virtual bool BaseStrategyWrapper::isSymbolPanelInitialized ( API2::LEGS  leg)
inlinevirtual

isSymbolPanelInitialized Gives true if symbol panel is initialized for passed leg can be implemented by user

Parameters
leg
Returns
default return value is false

◆ isTableViewFocused()

virtual bool BaseStrategyWrapper::isTableViewFocused ( )
inlinevirtual

isTableViewFocused To check whether table view has focus or not can be implemented by user

Returns
default return value is false

◆ isUnderLyingStock()

virtual bool BaseStrategyWrapper::isUnderLyingStock ( )
inlinevirtual

isUnderLyingStock Gives true if underlying type is stock can be implemented by user

Returns
default return value is false

◆ keyPressEvent()

virtual void BaseStrategyWrapper::keyPressEvent ( QKeyEvent *  event)
inlinevirtual

keyPressEvent Call the button panel functions if that button has focus and is enabled can be implemented by user

Parameters
event

◆ maturityDayMonYearToString()

virtual QString BaseStrategyWrapper::maturityDayMonYearToString ( int  day,
int  yearMon 
)
inlinevirtual

maturityDayMonYearToString To convert the passed day and yearmon in the string date format can be implemented by user

Parameters
day
yearMon
Returns

◆ modifyCancelOrders()

virtual void BaseStrategyWrapper::modifyCancelOrders ( qlonglong  strategyId,
API2::apiOrderBookParams apiBookParams = NULL 
)
inlinevirtual

modifyCancelOrders To modify/cancel the orders from the order book in orderontime can be implemented by user

Parameters
strategyId
apiBookParams

◆ movePortfolioIndex()

virtual void BaseStrategyWrapper::movePortfolioIndex ( QStringList &  dataList,
int  fromIndex,
int  toIndex 
)
inlinevirtual

movePortfolioIndex To move the portfolio in passed data list from passed fromindex to passed toindex can be implemented by user

Parameters
dataList
fromIndex
toIndex

◆ on_AddPushButton_Clicked

virtual bool BaseStrategyWrapper::on_AddPushButton_Clicked ( )
inlinevirtualslot

on_AddPushButton_Clicked Add the parameter values to the database Updates the strategy table can be implemented by user

Returns

◆ on_CommitPushButton_Clicked

virtual void BaseStrategyWrapper::on_CommitPushButton_Clicked ( bool  isModifyFromAltM = false)
inlinevirtualslot

on_CommitPushButton_Clicked Save the changes made to selected row in the database can be implemented by user

Parameters
isModifyFromAltM

◆ on_EditPushButton_Clicked

virtual void BaseStrategyWrapper::on_EditPushButton_Clicked ( int  row = -1)
inlinevirtualslot

on_EditPushButton_Clicked Edit the parameter values of any selected row can be implemented by user

Parameters
row

◆ onComboBoxOptTypeActivated()

virtual void BaseStrategyWrapper::onComboBoxOptTypeActivated ( short  leg,
QString  arg 
)
inlinevirtual

onComboBoxOptTypeActivated On combo box opt type activated of passed leg it gives values to strike price and expiry details canbe overridden

Parameters
leg
arg

◆ onComboSymbolActivated()

virtual void BaseStrategyWrapper::onComboSymbolActivated ( const QString &  symbol,
API2::LEGS  leg 
)
inlinevirtual

onComboSymbolActivated To emit signal on symbol combo box activated with passed symbol and leg can be implemented by user

Parameters
symbol
leg

◆ onComboSymbolLostFocus()

virtual void BaseStrategyWrapper::onComboSymbolLostFocus ( API2::LEGS  leg)
inlinevirtual

onComboSymbolLostFocus To emit the signal of focuslost on loosing focus on symbol combo box with passed leg can be implemented by user

Parameters
leg

◆ onLoadOldStrategies()

virtual void BaseStrategyWrapper::onLoadOldStrategies ( )
inlinevirtual

onLoadOldStrategies To Get the old strategies from database on starting strategy and decides what happens to them can be implemented by user

----------------— Setters ----------—

◆ populateAccountDetail()

virtual void BaseStrategyWrapper::populateAccountDetail ( API2::LEGS  leg,
qlonglong  symbolId 
)
inlinevirtual

populateAccountDetail To populate account details using passed symbol id and in the passed leg can be implemented by user

Parameters
leg
symbolId

◆ populateBaseSpread()

virtual void BaseStrategyWrapper::populateBaseSpread ( QComboBox *  baseSpread)
inlinevirtual

populateBaseSpread To add 2 leg/3 leg bid diff spred type "Hit Spread" "Try Spred" can be implemented by user

Parameters
baseSpreadCombo box widget object name

◆ populateBiddingLeg()

virtual void BaseStrategyWrapper::populateBiddingLeg ( QComboBox *  comboBoxBiddingLong,
short  legCount 
)
inlinevirtual

populateBiddingLeg To add the bidding leg in the combo box "First Leg" "Seconf Leg" "Third Leg" "Fourth Leg" can be implemented by user

Parameters
comboBoxBiddingLongCombo box widget object name
legCountNumber of legs to add

◆ populateExecutionStyle()

virtual void BaseStrategyWrapper::populateExecutionStyle ( QComboBox *  comboSpreadType)
inlinevirtual

populateExecutionStyle To add the execution style "TWAP" "POV" "PRICE BAND" "NO EXEC" can be implemented by user

Parameters
comboSpreadTypeCombo box widget object name

◆ populateHedgeMethods()

virtual void BaseStrategyWrapper::populateHedgeMethods ( QComboBox *  comboBoxHedgeMethod,
bool  isActualDiffAllowed = false 
)
inlinevirtual

populateHedgeMethods To add the hedge methods in the combo box "Market Order" "Best Bid/Ask" "Hit Bid/Ask" "Actual Diff IOC Best" "Actual Diff" "Actual Diff Limit Best" can be implemented by user

Parameters
comboBoxHedgeMethodCombo box widget object name
isActualDiffAllowedWhether to add Actual diff in the hedge methods

◆ populateHedgingPortfolio

virtual void BaseStrategyWrapper::populateHedgingPortfolio ( QComboBox *  comboBox)
inlinevirtualslot

populateHedgingPortfolio To populate hedge portfolio name list in the passed combo box can be implemented by user

Parameters
comboBox

◆ populateLeg()

virtual void BaseStrategyWrapper::populateLeg ( API2::LEGS  leg,
qlonglong  symbolId,
qlonglong  adminTokenId 
)
inlinevirtual

populateLeg To populate the details of passed symbol id with passed admin token id on the passed leg can be implemented by user

Parameters
leg
symbolId
adminTokenId

◆ populateOrderType()

virtual void BaseStrategyWrapper::populateOrderType ( QComboBox *  orderType)
inlinevirtual

populateOrderType To add the order types in the combo box "Limit" "Market" "Stop" "Stop Limit" can be implemented by user

Parameters
orderTypecombo box widget object name

◆ populateSpreadTerm()

virtual void BaseStrategyWrapper::populateSpreadTerm ( QComboBox *  spreadTerm)
inlinevirtual

populateSpreadTerm To add 2 leg spred type "ABS" "BPS" can be implemented by user

Parameters
spreadTermCombo box widget object name

◆ populateSpreadType()

virtual void BaseStrategyWrapper::populateSpreadType ( QComboBox *  comboSpreadType)
inlinevirtual

populateSpreadType To add 2 leg/3 leg spred type "Prod Diff" "Actual Diff" "Base Diff" can be implemented by user

Parameters
comboSpreadTypeCombo box widget object name

◆ populateStrategyFromPortfolio

virtual bool BaseStrategyWrapper::populateStrategyFromPortfolio ( )
inlinevirtualslot

populateStrategyFromPortfolio To check strategy is populated from portfolio or not can be implemented by user

Returns
By default it returns true

◆ populateSymbolPRO()

virtual void BaseStrategyWrapper::populateSymbolPRO ( API2::LEGS  leg,
qlonglong  symbolId 
)
inlinevirtual

populateSymbolPRO To populate the ui with details of passed symbol id and in the passed leg can be implemented by user

Parameters
leg
symbolId

◆ printSqlError() [1/2]

virtual void BaseStrategyWrapper::printSqlError ( QSqlQuery &  query)
inlinevirtual

printSqlError To print the error coming at the time of executing query can be implemented by user

Parameters
query

◆ printSqlError() [2/2]

virtual void BaseStrategyWrapper::printSqlError ( QSqlQuery &  query,
QString  fileName,
QString  funcName,
int  line 
)
inlinevirtual

printSqlError To get the address of the error coming while executing the query can be implemented by user

Parameters
query
fileName
funcName
line

◆ processMktData()

virtual void BaseStrategyWrapper::processMktData ( qlonglong  symbolId)
inlinevirtual

processMktData To process the market data of passed symbol if not processing Othnerwise update it can be implemented by user

Parameters
symbolId

◆ receiveApiResponse()

virtual void BaseStrategyWrapper::receiveApiResponse ( const API2::API2_Response &  api2_Response)
inlinevirtual

receiveApiResponse To get the front end design and to set the api index of user params can be implemented by user

Parameters
api2_Response

◆ receiveStrategyResponse

virtual void BaseStrategyWrapper::receiveStrategyResponse ( QSharedPointer< API2::Strategy >  strategyResponseSharedPtr)
inlinevirtualslot

receiveStrategyResponse Receives response from hft and if it is success then put it in the queue can be implemented by user

Parameters
strategyResponseSharedPtrShared Pointer containing the response

◆ removeUniqueSpreadKeyValue()

virtual void BaseStrategyWrapper::removeUniqueSpreadKeyValue ( const QString &  uniqueKey,
const QString &  spreadKey 
)
inlinevirtual

removeUniqueSpreadKeyValue To remove the spread key present at unique key can be implemented by user

Parameters
uniqueKey
spreadKey

◆ resetData()

virtual void BaseStrategyWrapper::resetData ( QString  str,
QComboBox *  combo 
)
inlinevirtual

resetData To reset the data of combo box containing str can be implemented by user

Parameters
str
combo

◆ resetWidgetStateOnValidation()

virtual void BaseStrategyWrapper::resetWidgetStateOnValidation ( API2::PORTFOLIO_STATE  state,
API2::PARAM strategyParam,
int  lotSize = 1 
)
inlinevirtual

resetWidgetStateOnValidation To reset the value of strategy parameters on user interface on validation Adding points to double value fields in UI can be implemented by user

Parameters
state
strategyParam
lotSize

◆ runStrategy()

virtual void BaseStrategyWrapper::runStrategy ( int  row = -1,
bool  isWriteMethod = false,
bool  isModifyFromAltM = false 
)
inlinevirtual

runStrategy To run the strategy and update the table layout can be implemented by user

Parameters
rowRow that has to run
isWriteMethodWhether to append the strategy details in queue Default value is false
isModifyFromAltMWhether to do some particular changes to button panel Default value is false

◆ serializeParamsCommand

virtual void BaseStrategyWrapper::serializeParamsCommand ( API2::AbstractUserParams *  genericPtr)
inlinevirtualslot

serializeParamsCommand To serialize the pointer objetc of abstract user params can be implemented by user

Parameters
genericPtr

◆ setApiPointer()

void BaseStrategyWrapper::setApiPointer ( APIWrapper ptr)
inline

setApiPointer To copy the value of one pointer to another

Parameters
ptrAnother pointer of APIWrapper Class carrying some value

◆ setColumnBackGround()

virtual void BaseStrategyWrapper::setColumnBackGround ( int  row,
int  colIndex,
QColor  color 
)
inlinevirtual

setColumnBackGround Sets given color in the background at that particular row and column can be implemented by user

Parameters
row
colIndex
color

◆ setCurrentIndexFromRow

virtual void BaseStrategyWrapper::setCurrentIndexFromRow ( int  row)
inlinevirtualslot

setCurrentIndexFromRow Select another row using passed row can be implemented by user

Parameters
row

◆ setCurrentInstrument() [1/2]

virtual void BaseStrategyWrapper::setCurrentInstrument ( short  leg,
const QString &  inst,
bool  isBlockSignal = false 
)
inlinevirtual

setCurrentInstrument To set the passed instrument text as the current text on the instrument field on the passed leg and whether to block signal while doing it or not can be implemented by user

Parameters
leg
inst
isBlockSignal

◆ setCurrentInstrument() [2/2]

virtual void BaseStrategyWrapper::setCurrentInstrument ( short  leg,
int  index,
bool  isBlockSignal = false 
)
inlinevirtual

setCurrentInstrument To set the passed instrument index as the current index on the instrument field on the passed leg and whether to block signal while doing it or not can be implemented by user

Parameters
leg
index
isBlockSignal

◆ setCurrentOptType()

virtual void BaseStrategyWrapper::setCurrentOptType ( short  leg,
short  index,
bool  isBlockSignal = false 
)
inlinevirtual

setCurrentOptType To set the passed opt type index as the current opt type in the opt type field of the passed leg can be implemented by user

Parameters
leg
index
isBlockSignal

◆ setCurrentOrderMode()

virtual void BaseStrategyWrapper::setCurrentOrderMode ( short  leg,
short  index,
bool  isBlockSignal = false 
)
inlinevirtual

setCurrentOrderMode To set the passed order mode index as the current order mode in the order mode field of the passed leg can be implemented by user

Parameters
leg
index
isBlockSignal

◆ setCurrentSpreadKeyValuePair()

virtual void BaseStrategyWrapper::setCurrentSpreadKeyValuePair ( const QString &  key,
const QString &  value 
)
inlinevirtual

setCurrentSpreadKeyValuePair To set the current spread key and value as passed can be implemented by user

Parameters
key
value

◆ setCurrentStrike() [1/2]

virtual void BaseStrategyWrapper::setCurrentStrike ( short  leg,
const QString &  strike,
bool  isBlockSignal = false 
)
inlinevirtual

setCurrentStrike To set the passed strike price text as the current strike price on the strike price field of the passed leg can be implemented by user

Parameters
leg
strike
isBlockSignal

◆ setCurrentStrike() [2/2]

virtual void BaseStrategyWrapper::setCurrentStrike ( short  leg,
int  index,
bool  isBlockSignal = false 
)
inlinevirtual

setCurrentStrike To set the passed strike price index as the current strike price on the strike price field of the passed leg can be implemented by user

Parameters
leg
index
isBlockSignal

◆ setDefaultValuesHash()

virtual void BaseStrategyWrapper::setDefaultValuesHash ( QHash< QString, QString > &  defaultValuesMap)
inlinevirtual

setDefaultValuesHash To set the default value to reset hash can be implemented by user

Parameters
defaultValuesMap

◆ setDelegateMinValue()

virtual void BaseStrategyWrapper::setDelegateMinValue ( double  minval,
short  elementType 
)
inlinevirtual

setDelegateMinValue To set the minimum possible value of the passed element type can be implemented by user

Parameters
minval
elementType

◆ setDelegateStepSize()

virtual void BaseStrategyWrapper::setDelegateStepSize ( double  stepSize,
short  elementType,
short  decimals = 2 
)
inlinevirtual

setDelegateStepSize To set the single step size of passed element type can be implemented by user

Parameters
stepSize
elementType
decimalsDecimals for double spin box

◆ setDVMFocusWiget()

virtual void BaseStrategyWrapper::setDVMFocusWiget ( QString  focusWidgetKey)
inlinevirtual

setDVMFocusWiget To set the focus on the passed focus widget key can be implemented by user

Parameters
focusWidgetKey

◆ setEditableModeRow()

virtual void BaseStrategyWrapper::setEditableModeRow ( int  row)
inlinevirtual

setEditableModeRow To set the passed row in editable mode can be implemented by user

Parameters
row

◆ setIsSpreadPopAlreadyShown()

virtual void BaseStrategyWrapper::setIsSpreadPopAlreadyShown ( bool  isEnable)
inlinevirtual

setIsSpreadPopAlreadyShown Set isspreadpopalreadyshown true if passed true can be implemented by user

Parameters
isEnable

◆ setItmStatus()

virtual void BaseStrategyWrapper::setItmStatus ( bool  itmStatue)
inlinevirtual

setItmStatus To set the opt type combo box activate and put default value to it can be implemented by user

Parameters
itmStatue

◆ setItrationQty

virtual void BaseStrategyWrapper::setItrationQty ( API2::Strategy  strategyResponse)
inlinevirtualslot

setItrationQty Empty functions can be implemented by user

Parameters
strategyResponse

◆ setLastLogOutTime()

virtual void BaseStrategyWrapper::setLastLogOutTime ( qlonglong  time)
inlinevirtual

setLastLogOutTime Saves the last logout time in the file canbe overridden

Parameters
timelast logout time

◆ setMarketAndSecurityId()

virtual void BaseStrategyWrapper::setMarketAndSecurityId ( qlonglong  symbolId)
inlinevirtual

setMarketAndSecurityId To set the market and security id using symbol id can be implemented by user

Parameters
symbolId

◆ setOldPositionUploadAllowed

virtual void BaseStrategyWrapper::setOldPositionUploadAllowed ( bool  isOldPositionUpload)
inlinevirtualslot

setOldPositionUploadAllowed Used to set old position uplaod allowed can be implemented by user

Parameters
isOldPositionUpload

◆ setOptionsConRevCombination

virtual void BaseStrategyWrapper::setOptionsConRevCombination ( QString  conRevCombination)
inlinevirtualslot

setOptionsConRevCombination To set the passed con rev combination in the options con rev combination can be implemented by user

Parameters
conRevCombination

◆ setRatioChecked()

virtual void BaseStrategyWrapper::setRatioChecked ( bool  ratio)
inlinevirtual

setRatioChecked To enable/disable the writing to table can be implemented by user

Parameters
ratio

◆ setSpreadPopOnAddPortfolio()

virtual void BaseStrategyWrapper::setSpreadPopOnAddPortfolio ( bool  flag)
inlinevirtual

setSpreadPopOnAddPortfolio To enable/disable the spread pop up on adding new portfolio can be implemented by user

Parameters
flag

◆ setStrategyContainer()

virtual void BaseStrategyWrapper::setStrategyContainer ( QGroupBox *  strategyContainer,
QPushButton *  showHideLegPushButton 
)
inlinevirtual

setStrategyContainer To Show/Hide the group box containing the strategy parameters can be implemented by user

Parameters
strategyContainerGroupbox widget name
showHideLegPushButtonMinimize Button widget name

◆ setStrategyInSingleRow()

virtual void BaseStrategyWrapper::setStrategyInSingleRow ( short  count)
inlinevirtual

setStrategyInSingleRow Make sure only single row is created at a time can be implemented by user

Parameters
count

◆ setSymbol()

virtual void BaseStrategyWrapper::setSymbol ( API2::LEGS  leg,
QString  symbol 
)
inlinevirtual

setSymbol To activate the search for entering text to match with any symbol and gives combo box features to it on the passed leg can be implemented by user

Parameters
leg
symbol

◆ setSymbolToolTip()

virtual void BaseStrategyWrapper::setSymbolToolTip ( API2::LEGS  leg,
const char *  tooltip 
)
inlinevirtual

symbolPanel

setSymbolToolTip To set the tool tip on the passed leg can be implemented by user

Parameters
leg
tooltip

◆ setTableData()

virtual void BaseStrategyWrapper::setTableData ( int  row,
int  col,
QVariant  data 
)
inlinevirtual

setTableData Used to set Particular data on particular column in a partical row can be implemented by user

Parameters
row
col
data

◆ showHidePanel()

virtual void BaseStrategyWrapper::showHidePanel ( API2::LEGS  leg,
bool  status 
)
inlinevirtual

showHidePanel To show symbol panel fields pass true and to hide pass false of passed leg can be implemented by user

Parameters
leg
status

◆ sortExpiryDate()

virtual void BaseStrategyWrapper::sortExpiryDate ( QStringList  expDateList,
QStringList &  sortedExpDateList 
)
inlinevirtual

sortExpiryDate To sort the expiry dates list and save it in the passed reference sortedExpDateList list can be implemented by user

Parameters
expDateList
sortedExpDateList

◆ subscribeSymbol()

virtual void BaseStrategyWrapper::subscribeSymbol ( qlonglong  symbolId)
inlinevirtual

subscribeSymbol Subscribe symbol to see all the feed of that particualar symbol using passed symbol id can be implemented by user

Parameters
symbolId

◆ symbolActivated()

virtual void BaseStrategyWrapper::symbolActivated ( API2::LEGS  leg)
inlinevirtual

symbolActivated To give the completion to the entered symbol in symbol combo box can be implemented by user

Parameters
leg

◆ terminateStrategy

virtual bool BaseStrategyWrapper::terminateStrategy ( int  row,
int  index = -1 
)
inlinevirtualslot

terminateStrateg Gives true if strategy is in run state and passed a valid row send terminate strategy signals can be implemented by user

Parameters
row
indexDefault value is -1
Returns
default return value is false

◆ updateAccountDetail()

virtual void BaseStrategyWrapper::updateAccountDetail ( const int  row)
inlinevirtual

updateAccountDetail To update the account deatils of the passed row of the database can be implemented by user

Parameters
row

◆ updateAccountDetailOnEdit()

virtual void BaseStrategyWrapper::updateAccountDetailOnEdit ( const int  row,
const int  col,
API2::LEGS  leg 
)
inlinevirtual

updateAccountDetailOnEdit To update account details of the row and column in the database of the passed leg can be implemented by user

Parameters
row
col
leg

◆ updateResponse()

virtual void BaseStrategyWrapper::updateResponse ( QSharedPointer< API2::Strategy >  strategyResponseSharedPtr)
inlinevirtual

updateResponse To get the response type and took action accordingly can be implemented by user

Parameters
strategyResponseSharedPtrPointer containing details of strategy

◆ updateSqlRecordOnEdit()

virtual void BaseStrategyWrapper::updateSqlRecordOnEdit ( int  row)
inlinevirtual

updateSqlRecordOnEdit To Update the Database records when commit the changes in the strategy table can be implemented by user

Parameters
row

◆ updateStrategyState()

virtual void BaseStrategyWrapper::updateStrategyState ( int  row)
inlinevirtual

updateStrategyState It updates the checkbox state and background colour On ready state it uncheck the checkbox of passed row and set color to red On run state it checks the check box of passed row and set color to green can be implemented by user

Parameters
row

◆ updateStrategyVsUhedgePortfolioMap

virtual void BaseStrategyWrapper::updateStrategyVsUhedgePortfolioMap ( long  strategyId,
const QString &  uhedgePortfolioName 
)
inlinevirtualslot

updateStrategyVsUhedgePortfolioMap To update the strategyvsuhedge portfolio of passed strategy id with passed uhedge portfolio name can be implemented by user

Parameters
strategyId
uhedgePortfolioName

◆ validateAccountDetailOnLoad()

virtual bool BaseStrategyWrapper::validateAccountDetailOnLoad ( const QString &  clientCode,
qlonglong  symbolId 
)
inlinevirtual

validateAccountDetailOnLoad Gives true if account details given at the time adding new strategy is valid can be implemented by user

Parameters
clientCode
symbolId
Returns
default return value is false

◆ validateData()

virtual bool BaseStrategyWrapper::validateData ( API2::LEGS  leg)
inlinevirtual

validateData Validate all the entered details and return true everything is valid on the passed leg can be implemented by user

Parameters
leg
Returns
default return value is false

◆ validateUniqueSpreadCheckEntry()

virtual bool BaseStrategyWrapper::validateUniqueSpreadCheckEntry ( const QString &  uniqueKey,
const QString &  spreadKey,
bool  isModify,
bool  showPopup = true 
)
inlinevirtual

validateUniqueSpreadCheckEntry To check whether the same spread value has been added to particular client or not can be implemented by user

Parameters
uniqueKey
spreadKey
isModify
showPopup
Returns
default return value is false

◆ writeOnSocket()

virtual void BaseStrategyWrapper::writeOnSocket ( char *  buffer,
qint64  bytes,
qint64 &  bytesWritten 
)
inlinevirtual

writeOnSocket To write the data on the buffer in connected state to pass it through the socket to backend can be implemented by user

Parameters
buffer
bytesTotal number of bytes
bytesWrittenTotal number of bytes already written in buffer

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