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

Public Member Functions

virtual QString getNotApplicableStr ()
 getNotApplicableStr To get the string "N/A" can be implemented by user More...
 
virtual QString getTrueStr ()
 getTrueStr To get the string "True" can be implemented by user More...
 
virtual QString getStockStr ()
 getStockStr To get the string "Stock" can be implemented by user More...
 
virtual QString getFutureStr ()
 getFutureStr To get the string "Future" can be implemented by user More...
 
virtual QString getOptionStr ()
 getOptionStr To get the string "Option" can be implemented by user More...
 
virtual QString getSpreadStr ()
 getSpreadStr To get the string "Spread" can be implemented by user More...
 
virtual QString getProStr ()
 getProStr To get the string "Pro" can be implemented by user More...
 
virtual QString getClientStr ()
 getClientStr To get the string "Client" can be implemented by user More...
 
virtual QString getNormalStr ()
 getNormalStr To get the string "Normal" can be overeridden More...
 
virtual QString getMarket (const UNSIGNED_CHARACTER &exchangeId)
 getMarket To get the market name using exchange id can be implemented by user More...
 
virtual QString getInstrumentTypeBriefIndex ()
 getInstrumentTypeBriefIndex To get the string "I" can be implemented by user More...
 
virtual UNSIGNED_CHARACTER getExchangeId (const QString &market)
 getExchangeId To get the exchange id using markeet name can be implemented by user More...
 
virtual qlonglong gcd (qlonglong num1, qlonglong num2)
 gcd To get the greatest common divisor of num1 and num2 can be implemented by user More...
 
virtual qlonglong gcd (qlonglong num1, qlonglong num2, qlonglong num3)
 gcd To get the greatest common divisor of num1, num2 and num3 can be implemented by user More...
 
virtual qlonglong gcd (qlonglong num1, qlonglong num2, qlonglong num3, qlonglong num4)
 gcd To get the greatest common divisor of num1, num2, num3 and num4 can be implemented by user More...
 
virtual bool compareRatio (QList< int > &firstList, QVector< qlonglong > &secondList, int limit)
 compareRatio Converts firstlist to vector and checks whether their ratio is valid can be implemented by user More...
 
virtual bool compareRatio (QVector< qlonglong > &firstList, QVector< qlonglong > &secondList, int limit)
 compareRatio Checks whether first list ratio and second list ratio is valid can be implemented by user More...
 
virtual void removeFocusFromPushButton (QPushButton *button)
 removeFocusFromPushButton To remove the focus from the passeed push button can be implemented by user More...
 
virtual short getSecurityType (QString securityType)
 getSecurityType To get the security type, whether stock, option, futuer or spread can be implemented by user More...
 
virtual QString getTimeFromSec (UNSIGNED_LONG secSinceEpoch)
 getTimeFromSec To get the time in date time format by using passed seconds since epoch time can be implemented by user More...
 
virtual QString getOrderTypeStr (short orderType)
 getOrderTypeStr To get the order type string "Market", "Limit", "Stop" and "Stop Market" can be implemented by user More...
 
virtual void setItem (QStandardItemModel *tableModel, int row, int col, QVariant data, Qt::AlignmentFlag alignmentFlag=Qt::AlignCenter)
 setItem To set the passed data in the passed table model on the passed row and column with passed allignment flag can be overriden More...
 
virtual QString getOrderValidityStr (unsigned short orderValidity)
 getOrderValidityStr To get the order validity string "DAY", "IOC", "FOK", "GFS", "GFD", "GTD", "GTC", "GFA", "MOC", "GTS" and "AT CROSSING" can be overriden More...
 
virtual short getOrderValidity (QString orderValidity)
 getOrderValidity To get the enum value of passed order validity can be implemented by user More...
 
virtual QStandardItem * getItem (QVariant data, Qt::AlignmentFlag alignmentFlag=Qt::AlignCenter)
 getItem To get the pointer to QStandard item containing passed data with passed allignment can be implemented by user More...
 
virtual QStandardItem * getItem (QVariant data, QBrush &brush, Qt::AlignmentFlag alignmentFlag)
 getItem To get the pointer to QStandard item containing passed data with passed allignment and foreground set to passed brush can be implemented by user More...
 
virtual short getGenericBaseType (QString baseType)
 getGenericBaseType To get the enum value of generic base type of passed base type can be implemented by user More...
 
virtual QString getGenericBaseTypeStr (short baseType)
 getGenericBaseTypeStr To get the generic base type string "IV" or "INR" can be implemented by user More...
 
virtual short getGenericStrategyType (QString threeLegStrategy, short leg)
 getGenericStrategyType To get the generic strategy type enum value of passed three leg strategy can be implemented by user More...
 
virtual QString getGenericStrategyTypeStr (short threeLegStrategy)
 getGenericStrategyTypeStr To get the generic strategy type string "ITM", "IV", "Vol Spread", Straddle", "Strangle", "Butterfly", "CON-REV", "BOX", "Calender", "DM" and "Custom" can be implemented by user More...
 
virtual QString getSpreadTypeStr (short twoLegThreeLegSpreadType)
 getSpreadTypeStr To get the spread type string "Prod Diff", "Actual Diff" and "Base Diff" can be implemented by user More...
 
virtual QString getDiffTypeStr (short diffType)
 getDiffTypeStr To get the diff type string "IV" or "Vega" can be implemented by user More...
 
virtual QString getLegTypeStr (short leg)
 getLegTypeStr To get the leg type string "1L", "2L", "3L" and "4L" can be implemented by user More...
 
virtual short getLegType (QString str)
 getLegType To get the enum value of leg type can be implemented by user More...
 
virtual short getExecutionVolumn (QString type)
 getExecutionVolumn To get the enum value of passed execution volume type can be implemented by user More...
 
virtual QString getExecutionVolumnStr (short type)
 getExecutionVolumnStr To get the execution volume string "Max Volume", "Min Volume" and Specified Volume" can be implemented by user More...
 
virtual QString getStrategyExecTypeStr (short strategyExecType)
 getStrategyExecTypeStr To get the strategy execution type string "BID", "IOC" and "MUL IOC" can be implemented by user More...
 
virtual short getStrategyExecType (QString strategyExecType)
 getStrategyExecType To get the enum value of passed strategy execution type can be implemented by user More...
 
virtual QString getInstrumentTypeString (short securityType)
 getInstrumentTypeString To get the instrument type string "STOCK", "FUTURE", "OPTION" and "SPREAD" using passed security type can be implemented by user More...
 
virtual QString getInstrumentTypeStr (QString instrument)
 getInstrumentTypeStr To get the instrument type string "Stock", "Future" and "Option" using passed instrument can be implemented by user More...
 
virtual QString getInstrumentTypeStr (short securityType)
 getInstrumentTypeStr To get the instrument type string "Stock", "Future", "Option" and "Spread" using passed security type can be implemented by user More...
 
virtual QString getInstrumentStr (short securityType)
 getInstrumentStr To get the instrument type string "C", "F", "O" and "S" using passed security type can be implemented by user More...
 
virtual QString getInstrumentTypeFromName (QString instrument)
 getInstrumentTypeFromName To get the instrument type string "C", "F", "O" and "S" using passed instrument string can be implemented by user More...
 
virtual QString getTwoLegArbitHedgeMethod (short hedgeMethod)
 getTwoLegArbitHedgeMethod To get the two leg arbit hedge method string "Market Order", "Best Bid/Ask", "Hit Bid/Ask", "Actual Diff IOC Best", "Actual Diff" and "Actual Diff Limit Best" can be implemented by user More...
 
virtual short getTwoLegArbitHedgeMethod (QString hedgeMethod)
 getTwoLegArbitHedgeMethod To get the enum value of the passed hedge method string can be implemented by user More...
 
virtual QString getOrderMode (short orderMode)
 getOrderMode To get the order mode string "Buy" or "Sell" can be implemented by user More...
 
virtual short getOrderMode (QString orderMode)
 getOrderMode To get the enum value of passed order mode string can be implemented by user More...
 
virtual QString getTwoLegThreeLegSpreadTypeStr (short twoLegThreeLegSpreadType)
 getTwoLegThreeLegSpreadTypeStr To get the two leg three leg spread type string "Prod Diff", "Actual Diff" and "Base Diff" can be implemented by user More...
 
virtual short getTwoLegThreeLegSpreadType (QString strSpreadType)
 getTwoLegThreeLegSpreadType To get the enum value of passed spread type string can be implemented by user More...
 
virtual QString getStrategyState (short responseType)
 getStrategyState To get the strategy type string "RUN", "FAILURE", "SHUTDOWN", "SHUTDOWN SQUAREOFF", "PAUSE", "READY" and "WAIT" can be implemented by user More...
 
virtual short getGenericExecutionStyle (QString baseType)
 getGenericExecutionStyle To get the enum value of passed base type string can be implemented by user More...
 
virtual QString getGenericExecutionStyleStr (short baseType)
 getGenericExecutionStyleStr To get the generic execution style string "TWAP", "POV", "PRICE BAND" and "NO EXEC" can be implemented by user More...
 
virtual QString getOptionModeStr (short optMode)
 getOptionModeStr To get the option mode string "Put" or "Call" can be implemented by user More...
 
virtual QString getOptionModeStr (QString optMode)
 getOptionModeStr To get the option mode string "Put" or "Call" using passed opt mode string can be implemented by user More...
 
virtual short getOptionMode (QString optionType)
 getOptionMode To get the enum value of passed option type string can be implemented by user More...
 
virtual QString getOptionType (QString optionTypeStr)
 getOptionType To get the option type string "P" or "C" can be implemented by user More...
 
virtual short getContinuousHedgeMode (QString mode)
 getCommonMethodsWrapper()->getContinuousHedgeMode To get the enum value of continuous hedging mode can be implemented by user More...
 
virtual QString getContinuousHedgeModeStr (short mode)
 getCommonMethodsWrapper()->getContinuousHedgeModeStr To get the continuous hedging mode string "SAME SIDE" or "BOTH SIDE" can be implemented by user More...
 
virtual void updateTableView (QTableView *tableview)
 updateTableView To update the table view after any change can be implemented by user More...
 
virtual QString getStrategyVersion ()
 getStrategyVersion To get the strategy version of the strategy type can be implemented by user More...
 
virtual int getCurrentExpiryIndexSpread (QComboBox *comboBoxExpiry)
 getCurrentExpiryIndexSpread To get the current selected expiry index spread of the passed combo box expiry can be implemented by user More...
 
virtual void showMessage (QWidget *parent, QString title, QString message)
 showMessage To show the message box on the parent widget with passed title and passed message can be implemented by user More...
 
virtual bool isClientCodePresent (const QString &market, const QString &inst)
 isClientCodePresent Checks Whether any client code is present for the passed market with passed instrument can be implemented by user More...
 
virtual qlonglong getClosePrice (qlonglong symbolId)
 getClosePrice To get the close price of the passed symbol id from the market data can be implemented by user More...
 
virtual QString maturityDayMonYearToDate (int day, int yearMon, const QString &format=QString("dd MMM yyyy"))
 maturityDayMonYearToDate To get the maturity date including passed day and yearmon in the passed format can be implemented by user More...
 
virtual qlonglong getCurrentMonthFutureSymbolId (const QString &source, const QString &market, const QString &symbol)
 getCurrentMonthFutureSymbolId To get the future id symbol id using passed source, market and symbol name can be implemented by user More...
 
virtual bool eventFilterStrikePriceCombobox (QObject *object, QEvent *event, QHash< QObject *, QString > &hashComboSearchedString, qlonglong &keyPressEventTimer)
 eventFilterStrikePriceCombobox To check whether event filter is active on strike price combo box or not can be implemented by user More...
 
virtual short getSegmentFromInstrument (const QString &instrument)
 getSegmentFromInstrument Gives the enum value of segment type CM or FO using the passed instrument can be implemented by user More...
 
virtual bool isQuoteAvailable (qlonglong symbolId)
 isQuoteAvailable To check whether quote is available for passed symbol id in the market data or not can be implemented by user More...
 
virtual int getSpreadTimer ()
 getSpreadTimer To get the value of spread timer can be implemented by user More...
 
virtual int getQuoteWaitCounter ()
 getQuoteWaitCounter To get the value of quote wait counter can be implemented by user More...
 
virtual short getExpiryInclusionExclusion ()
 getExpiryInclusionExclusion To get the value of expiry inclusion exclusion can be implemented by user More...
 
virtual void getTrades (qlonglong symbolId, qlonglong strategyId, qlonglong &filledBuyQty, float &filledBuyPrice, qlonglong &filledSellQty, float &filledSellPrice, QString &buyPriceStr, QString &sellPriceStr)
 getTrades To get the total traded quantity of sell and buy with total price of sell and buy inthe passed references of the passed symbol id and strategy id can be implemented by user More...
 
virtual QSortFilterProxyModel * getSortFilterProxyModel (QList< short > &filterColList, QObject *parent=0)
 getSortFilterProxyModel To get the sort filter proxy model to apply when filter is used can be implemented by user More...
 
virtual QHeaderView * getFilterHeaderView (QVector< short > &filterTypeList, QTableView *tableView)
 getFilterHeaderView To get the header view of the filter enable columns in the table view using the passed filter type list can be implemented by user More...
 
virtual QWidget * getFilterHeaderViewWidget (QHeaderView *headerView, short filterWidget)
 getFilterHeaderViewWidget To get the passed filter widget in the header view for the filter enable column can be implemented by user More...
 
virtual void onTextFilterChanged (QSortFilterProxyModel *proxyModel, QHeaderView *headerView, QList< short > &filterColList)
 onTextFilterChanged To call it when the text is changed in the filter widget can be implemented by user More...
 
virtual void setFilterActive (QSortFilterProxyModel *proxyModel, bool isFilterActive)
 setFilterActive To set the filter active or diable according to passed isfilteractive can be implemented by user More...
 
virtual void setFilterVisible (QHeaderView *headerView, bool isFilterActive)
 setFilterVisible To set the filters active in the header view If already active then it hide them can be implemented by user More...
 
virtual void convertBPSToSpread (qlonglong &spread, short orderMode, qlonglong price, qlonglong dividend=0)
 convertBPSToSpread To convert the Basis Point, the passed price to spread can be implemented by user More...
 
virtual qlonglong getOppositePrice (qlonglong symbolId, short orderMode)
 getOppositePrice To get the best buy or sell price from the market data of passed symbol id For buy mode it gives best sell price For sell mode it gives best buy price can be implemented by user More...
 
virtual qlonglong getSymbolIdFromISIN (const QString &ISIN, short exchangeId)
 getSymbolIdFromISIN To get the symbol id from the passed ISIN number and exchange id from the scrip master can be implemented by user More...
 
virtual void convertToMultipleOfTickSize (qlonglong &hitSpread, qlonglong symbolId)
 convertToMultipleOfTickSize To convert the passed hit spread multiple of symbol id's tick size can be implemented by user More...
 
virtual void getCurrentMonthExpiry (QComboBox *comboBox)
 getCurrentMonthExpiry To set the index of current month in the combo box can be implemented by user More...
 
virtual void getNextMonthExpiry (QComboBox *comboBox)
 getNextMonthExpiry To set the index in the combo box for the next month from the current one can be implemented by user More...
 
virtual bool checkForBannedScrips (qlonglong symbolId)
 checkForBannedScrips To check whether the passed symbol id is banned through dealer or globally or not can be implemented by user More...
 
virtual void getExpiryList (const QString &symbol, const QString &market, QStringList &expiryList)
 getExpiryList To get the expiry list of passed symbol and market of the non stock instrument type in the passed reference can be implemented by user More...
 
virtual void getClientInfoFromConfirmation (const RSP::OrderConfirmation &confirmation, QString &parentClCode, QString &childClCode, QString &partCode)
 getClientInfoFromConfirmation To get the parent client code, child client code and part code from the passed order confirmation in the passed references can be implemented by user More...
 
virtual void getPriceAccordingToTicksize (qlonglong &price, int ticksize, short orderMode)
 getPriceAccordingToTicksize To get the price according to tick size of passed order mode For a miultiple of tick size put the same in the price For otherwise make it a multiple of tick size by decreasing it can be implemented by user More...
 
virtual void setInstrTypeFromMkt (QComboBox *comboBox, QString market)
 setInstrTypeFromMkt To set the current index of the instrument type from the passed market For spot matket set common stock For others set Future can be implemented by user More...
 
virtual void printSqlError (QSqlQuery &query)
 printSqlError To print the deatils of the sql error like executed query, error, file name, function name and error line can be implemented by user More...
 
virtual const API2::SymbolDetailgetSymbolIdDetail (qlonglong symbolId)
 getSymbolIdDetail To get the symbol detail pointer containing market id, secuirity id and each and every detail of the passed symbol id can be implemented by user More...
 
virtual void getPrecisionAndMultiplier (qlonglong symbolId, double &multiplier, short &precision)
 getPrecisionAndMultiplier To get the precision and multiplier of the passed symbol id in the passed reference can be implemented by user More...
 
virtual short configFileValue (const char *str)
 configFileValue To get the value of passed string pointer from the configuration file 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 IV and Vega price of the passed symbol id in the passed reference can be implemented by user More...
 
virtual void insertTradeWiseTrackerList (QSharedPointer< API2::TradeWiseTrackerData > &tradeWiseTrackerData)
 insertTradeWiseTrackerList To insert the trade data in trade wise tracker table after each iteration can be implemented by user More...
 

Member Function Documentation

◆ checkForBannedScrips()

virtual bool CommonMethodsWrapper::checkForBannedScrips ( qlonglong  symbolId)
inlinevirtual

checkForBannedScrips To check whether the passed symbol id is banned through dealer or globally or not can be implemented by user

Parameters
symbolId
Returns
default return value is false

◆ compareRatio() [1/2]

virtual bool CommonMethodsWrapper::compareRatio ( QList< int > &  firstList,
QVector< qlonglong > &  secondList,
int  limit 
)
inlinevirtual

compareRatio Converts firstlist to vector and checks whether their ratio is valid can be implemented by user

Parameters
QList<qlonglong>&firstList
QList<qlonglong>&secondList
intlimit default return value is false

◆ compareRatio() [2/2]

virtual bool CommonMethodsWrapper::compareRatio ( QVector< qlonglong > &  firstList,
QVector< qlonglong > &  secondList,
int  limit 
)
inlinevirtual

compareRatio Checks whether first list ratio and second list ratio is valid can be implemented by user

Parameters
firstList
secondList
limit
Returns
default return value is false

◆ configFileValue()

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

configFileValue To get the value of passed string pointer from the configuration file can be implemented by user

Parameters
str
Returns
default return value is -1

◆ convertBPSToSpread()

virtual void CommonMethodsWrapper::convertBPSToSpread ( qlonglong &  spread,
short  orderMode,
qlonglong  price,
qlonglong  dividend = 0 
)
inlinevirtual

convertBPSToSpread To convert the Basis Point, the passed price to spread can be implemented by user

Parameters
spread
orderMode
price
dividend

◆ convertToMultipleOfTickSize()

virtual void CommonMethodsWrapper::convertToMultipleOfTickSize ( qlonglong &  hitSpread,
qlonglong  symbolId 
)
inlinevirtual

convertToMultipleOfTickSize To convert the passed hit spread multiple of symbol id's tick size can be implemented by user

Parameters
hitSpread
symbolId

◆ eventFilterStrikePriceCombobox()

virtual bool CommonMethodsWrapper::eventFilterStrikePriceCombobox ( QObject *  object,
QEvent *  event,
QHash< QObject *, QString > &  hashComboSearchedString,
qlonglong &  keyPressEventTimer 
)
inlinevirtual

eventFilterStrikePriceCombobox To check whether event filter is active on strike price combo box or not can be implemented by user

Parameters
object
event
hashComboSearchedString
keyPressEventTimer
Returns
default return value is false

◆ gcd() [1/3]

virtual qlonglong CommonMethodsWrapper::gcd ( qlonglong  num1,
qlonglong  num2 
)
inlinevirtual

gcd To get the greatest common divisor of num1 and num2 can be implemented by user

Parameters
num1
num2
Returns
By default it returns 1

◆ gcd() [2/3]

virtual qlonglong CommonMethodsWrapper::gcd ( qlonglong  num1,
qlonglong  num2,
qlonglong  num3 
)
inlinevirtual

gcd To get the greatest common divisor of num1, num2 and num3 can be implemented by user

Parameters
num1
num2
num3
Returns
By default it returns 1

◆ gcd() [3/3]

virtual qlonglong CommonMethodsWrapper::gcd ( qlonglong  num1,
qlonglong  num2,
qlonglong  num3,
qlonglong  num4 
)
inlinevirtual

gcd To get the greatest common divisor of num1, num2, num3 and num4 can be implemented by user

Parameters
num1
num2
num3
num4
Returns
By default it returns 1

◆ getClientInfoFromConfirmation()

virtual void CommonMethodsWrapper::getClientInfoFromConfirmation ( const RSP::OrderConfirmation confirmation,
QString &  parentClCode,
QString &  childClCode,
QString &  partCode 
)
inlinevirtual

getClientInfoFromConfirmation To get the parent client code, child client code and part code from the passed order confirmation in the passed references can be implemented by user

Parameters
confirmation
parentClCode
childClCode
partCode

◆ getClientStr()

virtual QString CommonMethodsWrapper::getClientStr ( )
inlinevirtual

getClientStr To get the string "Client" can be implemented by user

Returns

◆ getClosePrice()

virtual qlonglong CommonMethodsWrapper::getClosePrice ( qlonglong  symbolId)
inlinevirtual

getClosePrice To get the close price of the passed symbol id from the market data can be implemented by user

Parameters
symbolId
Returns
default return value is 0

◆ getContinuousHedgeMode()

virtual short CommonMethodsWrapper::getContinuousHedgeMode ( QString  mode)
inlinevirtual

getCommonMethodsWrapper()->getContinuousHedgeMode To get the enum value of continuous hedging mode can be implemented by user

Parameters
QStringmode
Returns
CMD::CONT_HEDGING_MODE EnumMapping default return value is -1

◆ getContinuousHedgeModeStr()

virtual QString CommonMethodsWrapper::getContinuousHedgeModeStr ( short  mode)
inlinevirtual

getCommonMethodsWrapper()->getContinuousHedgeModeStr To get the continuous hedging mode string "SAME SIDE" or "BOTH SIDE" can be implemented by user

Parameters
CMD::CONT_HEDGING_MODEmode
Returns
QString

◆ getCurrentExpiryIndexSpread()

virtual int CommonMethodsWrapper::getCurrentExpiryIndexSpread ( QComboBox *  comboBoxExpiry)
inlinevirtual

getCurrentExpiryIndexSpread To get the current selected expiry index spread of the passed combo box expiry can be implemented by user

Parameters
comboBoxExpiry
Returns
default return value is 0

◆ getCurrentMonthExpiry()

virtual void CommonMethodsWrapper::getCurrentMonthExpiry ( QComboBox *  comboBox)
inlinevirtual

getCurrentMonthExpiry To set the index of current month in the combo box can be implemented by user

Parameters
comboBox

◆ getCurrentMonthFutureSymbolId()

virtual qlonglong CommonMethodsWrapper::getCurrentMonthFutureSymbolId ( const QString &  source,
const QString &  market,
const QString &  symbol 
)
inlinevirtual

getCurrentMonthFutureSymbolId To get the future id symbol id using passed source, market and symbol name can be implemented by user

Parameters
source
market
symbol
Returns
default return value is 0

◆ getDiffTypeStr()

virtual QString CommonMethodsWrapper::getDiffTypeStr ( short  diffType)
inlinevirtual

getDiffTypeStr To get the diff type string "IV" or "Vega" can be implemented by user

Parameters
diffType
Returns

◆ getExchangeId()

virtual UNSIGNED_CHARACTER CommonMethodsWrapper::getExchangeId ( const QString &  market)
inlinevirtual

getExchangeId To get the exchange id using markeet name can be implemented by user

Parameters
market
Returns

◆ getExecutionVolumn()

virtual short CommonMethodsWrapper::getExecutionVolumn ( QString  type)
inlinevirtual

getExecutionVolumn To get the enum value of passed execution volume type can be implemented by user

Parameters
type
Returns
default return value is -1

◆ getExecutionVolumnStr()

virtual QString CommonMethodsWrapper::getExecutionVolumnStr ( short  type)
inlinevirtual

getExecutionVolumnStr To get the execution volume string "Max Volume", "Min Volume" and Specified Volume" can be implemented by user

Parameters
type
Returns

◆ getExpiryInclusionExclusion()

virtual short CommonMethodsWrapper::getExpiryInclusionExclusion ( )
inlinevirtual

getExpiryInclusionExclusion To get the value of expiry inclusion exclusion can be implemented by user

Returns
default return value is -1

◆ getExpiryList()

virtual void CommonMethodsWrapper::getExpiryList ( const QString &  symbol,
const QString &  market,
QStringList &  expiryList 
)
inlinevirtual

getExpiryList To get the expiry list of passed symbol and market of the non stock instrument type in the passed reference can be implemented by user

Parameters
symbol
market
expiryList

◆ getFilterHeaderView()

virtual QHeaderView* CommonMethodsWrapper::getFilterHeaderView ( QVector< short > &  filterTypeList,
QTableView *  tableView 
)
inlinevirtual

getFilterHeaderView To get the header view of the filter enable columns in the table view using the passed filter type list can be implemented by user

Parameters
filterTypeList
tableView
Returns
default return value is NULL

◆ getFilterHeaderViewWidget()

virtual QWidget* CommonMethodsWrapper::getFilterHeaderViewWidget ( QHeaderView *  headerView,
short  filterWidget 
)
inlinevirtual

getFilterHeaderViewWidget To get the passed filter widget in the header view for the filter enable column can be implemented by user

Parameters
headerView
filterWidget
Returns
default return value is NULL

◆ getFutureStr()

virtual QString CommonMethodsWrapper::getFutureStr ( )
inlinevirtual

getFutureStr To get the string "Future" can be implemented by user

Returns

◆ getGenericBaseType()

virtual short CommonMethodsWrapper::getGenericBaseType ( QString  baseType)
inlinevirtual

getGenericBaseType To get the enum value of generic base type of passed base type can be implemented by user

Parameters
baseType
Returns
default return value is -1

◆ getGenericBaseTypeStr()

virtual QString CommonMethodsWrapper::getGenericBaseTypeStr ( short  baseType)
inlinevirtual

getGenericBaseTypeStr To get the generic base type string "IV" or "INR" can be implemented by user

Parameters
baseType
Returns

◆ getGenericExecutionStyle()

virtual short CommonMethodsWrapper::getGenericExecutionStyle ( QString  baseType)
inlinevirtual

getGenericExecutionStyle To get the enum value of passed base type string can be implemented by user

Parameters
baseType
Returns
default return value is -1

◆ getGenericExecutionStyleStr()

virtual QString CommonMethodsWrapper::getGenericExecutionStyleStr ( short  baseType)
inlinevirtual

getGenericExecutionStyleStr To get the generic execution style string "TWAP", "POV", "PRICE BAND" and "NO EXEC" can be implemented by user

Parameters
baseType
Returns

◆ getGenericStrategyType()

virtual short CommonMethodsWrapper::getGenericStrategyType ( QString  threeLegStrategy,
short  leg 
)
inlinevirtual

getGenericStrategyType To get the generic strategy type enum value of passed three leg strategy can be implemented by user

Parameters
threeLegStrategy
leg
Returns
default return value is -1

◆ getGenericStrategyTypeStr()

virtual QString CommonMethodsWrapper::getGenericStrategyTypeStr ( short  threeLegStrategy)
inlinevirtual

getGenericStrategyTypeStr To get the generic strategy type string "ITM", "IV", "Vol Spread", Straddle", "Strangle", "Butterfly", "CON-REV", "BOX", "Calender", "DM" and "Custom" can be implemented by user

Parameters
threeLegStrategy
Returns

◆ getInstrumentStr()

virtual QString CommonMethodsWrapper::getInstrumentStr ( short  securityType)
inlinevirtual

getInstrumentStr To get the instrument type string "C", "F", "O" and "S" using passed security type can be implemented by user

Parameters
securityType
Returns

◆ getInstrumentTypeBriefIndex()

virtual QString CommonMethodsWrapper::getInstrumentTypeBriefIndex ( )
inlinevirtual

getInstrumentTypeBriefIndex To get the string "I" can be implemented by user

Returns

◆ getInstrumentTypeFromName()

virtual QString CommonMethodsWrapper::getInstrumentTypeFromName ( QString  instrument)
inlinevirtual

getInstrumentTypeFromName To get the instrument type string "C", "F", "O" and "S" using passed instrument string can be implemented by user

Parameters
instrument
Returns

◆ getInstrumentTypeStr() [1/2]

virtual QString CommonMethodsWrapper::getInstrumentTypeStr ( QString  instrument)
inlinevirtual

getInstrumentTypeStr To get the instrument type string "Stock", "Future" and "Option" using passed instrument can be implemented by user

Parameters
instrument
Returns

◆ getInstrumentTypeStr() [2/2]

virtual QString CommonMethodsWrapper::getInstrumentTypeStr ( short  securityType)
inlinevirtual

getInstrumentTypeStr To get the instrument type string "Stock", "Future", "Option" and "Spread" using passed security type can be implemented by user

Parameters
securityType
Returns

◆ getInstrumentTypeString()

virtual QString CommonMethodsWrapper::getInstrumentTypeString ( short  securityType)
inlinevirtual

getInstrumentTypeString To get the instrument type string "STOCK", "FUTURE", "OPTION" and "SPREAD" using passed security type can be implemented by user

Parameters
securityType
Returns

◆ getItem() [1/2]

virtual QStandardItem* CommonMethodsWrapper::getItem ( QVariant  data,
Qt::AlignmentFlag  alignmentFlag = Qt::AlignCenter 
)
inlinevirtual

getItem To get the pointer to QStandard item containing passed data with passed allignment can be implemented by user

Parameters
data
alignmentFlag
Returns
default return value is NULL

◆ getItem() [2/2]

virtual QStandardItem* CommonMethodsWrapper::getItem ( QVariant  data,
QBrush &  brush,
Qt::AlignmentFlag  alignmentFlag 
)
inlinevirtual

getItem To get the pointer to QStandard item containing passed data with passed allignment and foreground set to passed brush can be implemented by user

Parameters
data
brush
alignmentFlag
Returns
default return value is NULL

◆ getIvVegaPrice()

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

getIvVegaPrice To get the IV and Vega price of the passed symbol id in the passed reference can be implemented by user

Parameters
symbolId
price
underlyingSymbolId
ivPrice
vega
isVegaCalculate

◆ getLegType()

virtual short CommonMethodsWrapper::getLegType ( QString  str)
inlinevirtual

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

Parameters
str
Returns
default return value is -1

◆ getLegTypeStr()

virtual QString CommonMethodsWrapper::getLegTypeStr ( short  leg)
inlinevirtual

getLegTypeStr To get the leg type string "1L", "2L", "3L" and "4L" can be implemented by user

Parameters
leg
Returns

◆ getMarket()

virtual QString CommonMethodsWrapper::getMarket ( const UNSIGNED_CHARACTER &  exchangeId)
inlinevirtual

getMarket To get the market name using exchange id can be implemented by user

Parameters
exchangeId
Returns

◆ getNextMonthExpiry()

virtual void CommonMethodsWrapper::getNextMonthExpiry ( QComboBox *  comboBox)
inlinevirtual

getNextMonthExpiry To set the index in the combo box for the next month from the current one can be implemented by user

Parameters
comboBox

◆ getNormalStr()

virtual QString CommonMethodsWrapper::getNormalStr ( )
inlinevirtual

getNormalStr To get the string "Normal" can be overeridden

Returns

◆ getNotApplicableStr()

virtual QString CommonMethodsWrapper::getNotApplicableStr ( )
inlinevirtual

getNotApplicableStr To get the string "N/A" can be implemented by user

Returns

◆ getOppositePrice()

virtual qlonglong CommonMethodsWrapper::getOppositePrice ( qlonglong  symbolId,
short  orderMode 
)
inlinevirtual

getOppositePrice To get the best buy or sell price from the market data of passed symbol id For buy mode it gives best sell price For sell mode it gives best buy price can be implemented by user

Parameters
symbolId
orderMode
Returns
default return value is 0

◆ getOptionMode()

virtual short CommonMethodsWrapper::getOptionMode ( QString  optionType)
inlinevirtual

getOptionMode To get the enum value of passed option type string can be implemented by user

Parameters
optionType
Returns
default return value is -1

◆ getOptionModeStr() [1/2]

virtual QString CommonMethodsWrapper::getOptionModeStr ( short  optMode)
inlinevirtual

getOptionModeStr To get the option mode string "Put" or "Call" can be implemented by user

Parameters
optMode
Returns

◆ getOptionModeStr() [2/2]

virtual QString CommonMethodsWrapper::getOptionModeStr ( QString  optMode)
inlinevirtual

getOptionModeStr To get the option mode string "Put" or "Call" using passed opt mode string can be implemented by user

Parameters
optMode
Returns

◆ getOptionStr()

virtual QString CommonMethodsWrapper::getOptionStr ( )
inlinevirtual

getOptionStr To get the string "Option" can be implemented by user

Returns

◆ getOptionType()

virtual QString CommonMethodsWrapper::getOptionType ( QString  optionTypeStr)
inlinevirtual

getOptionType To get the option type string "P" or "C" can be implemented by user

Parameters
optionTypeStr
Returns

◆ getOrderMode() [1/2]

virtual QString CommonMethodsWrapper::getOrderMode ( short  orderMode)
inlinevirtual

getOrderMode To get the order mode string "Buy" or "Sell" can be implemented by user

Parameters
orderMode
Returns

◆ getOrderMode() [2/2]

virtual short CommonMethodsWrapper::getOrderMode ( QString  orderMode)
inlinevirtual

getOrderMode To get the enum value of passed order mode string can be implemented by user

Parameters
orderMode
Returns
default return value is -1

◆ getOrderTypeStr()

virtual QString CommonMethodsWrapper::getOrderTypeStr ( short  orderType)
inlinevirtual

getOrderTypeStr To get the order type string "Market", "Limit", "Stop" and "Stop Market" can be implemented by user

Parameters
orderType
Returns

◆ getOrderValidity()

virtual short CommonMethodsWrapper::getOrderValidity ( QString  orderValidity)
inlinevirtual

getOrderValidity To get the enum value of passed order validity can be implemented by user

Parameters
orderValidity
Returns
default return value is -1

◆ getOrderValidityStr()

virtual QString CommonMethodsWrapper::getOrderValidityStr ( unsigned short  orderValidity)
inlinevirtual

getOrderValidityStr To get the order validity string "DAY", "IOC", "FOK", "GFS", "GFD", "GTD", "GTC", "GFA", "MOC", "GTS" and "AT CROSSING" can be overriden

Parameters
orderValidity
Returns

◆ getPrecisionAndMultiplier()

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

getPrecisionAndMultiplier To get the precision and multiplier of the passed symbol id in the passed reference can be implemented by user

Parameters
symbolId
multiplier
precision

◆ getPriceAccordingToTicksize()

virtual void CommonMethodsWrapper::getPriceAccordingToTicksize ( qlonglong &  price,
int  ticksize,
short  orderMode 
)
inlinevirtual

getPriceAccordingToTicksize To get the price according to tick size of passed order mode For a miultiple of tick size put the same in the price For otherwise make it a multiple of tick size by decreasing it can be implemented by user

Parameters
price
ticksize
orderMode

◆ getProStr()

virtual QString CommonMethodsWrapper::getProStr ( )
inlinevirtual

getProStr To get the string "Pro" can be implemented by user

Returns

◆ getQuoteWaitCounter()

virtual int CommonMethodsWrapper::getQuoteWaitCounter ( )
inlinevirtual

getQuoteWaitCounter To get the value of quote wait counter can be implemented by user

Returns
default return value is 0

◆ getSecurityType()

virtual short CommonMethodsWrapper::getSecurityType ( QString  securityType)
inlinevirtual

getSecurityType To get the security type, whether stock, option, futuer or spread can be implemented by user

Parameters
securityType
Returns
default return value is -1

◆ getSegmentFromInstrument()

virtual short CommonMethodsWrapper::getSegmentFromInstrument ( const QString &  instrument)
inlinevirtual

getSegmentFromInstrument Gives the enum value of segment type CM or FO using the passed instrument can be implemented by user

Parameters
instrument
Returns
default return value is -1

◆ getSortFilterProxyModel()

virtual QSortFilterProxyModel* CommonMethodsWrapper::getSortFilterProxyModel ( QList< short > &  filterColList,
QObject *  parent = 0 
)
inlinevirtual

getSortFilterProxyModel To get the sort filter proxy model to apply when filter is used can be implemented by user

Parameters
filterColList
parent
Returns
default return value is NULL

◆ getSpreadStr()

virtual QString CommonMethodsWrapper::getSpreadStr ( )
inlinevirtual

getSpreadStr To get the string "Spread" can be implemented by user

Returns

◆ getSpreadTimer()

virtual int CommonMethodsWrapper::getSpreadTimer ( )
inlinevirtual

getSpreadTimer To get the value of spread timer can be implemented by user

Returns
default return value is 0

◆ getSpreadTypeStr()

virtual QString CommonMethodsWrapper::getSpreadTypeStr ( short  twoLegThreeLegSpreadType)
inlinevirtual

getSpreadTypeStr To get the spread type string "Prod Diff", "Actual Diff" and "Base Diff" can be implemented by user

Parameters
twoLegThreeLegSpreadType
Returns

◆ getStockStr()

virtual QString CommonMethodsWrapper::getStockStr ( )
inlinevirtual

getStockStr To get the string "Stock" can be implemented by user

Returns

◆ getStrategyExecType()

virtual short CommonMethodsWrapper::getStrategyExecType ( QString  strategyExecType)
inlinevirtual

getStrategyExecType To get the enum value of passed strategy execution type can be implemented by user

Parameters
strategyExecType
Returns
default return value is -1

◆ getStrategyExecTypeStr()

virtual QString CommonMethodsWrapper::getStrategyExecTypeStr ( short  strategyExecType)
inlinevirtual

getStrategyExecTypeStr To get the strategy execution type string "BID", "IOC" and "MUL IOC" can be implemented by user

Parameters
strategyExecType
Returns

◆ getStrategyState()

virtual QString CommonMethodsWrapper::getStrategyState ( short  responseType)
inlinevirtual

getStrategyState To get the strategy type string "RUN", "FAILURE", "SHUTDOWN", "SHUTDOWN SQUAREOFF", "PAUSE", "READY" and "WAIT" can be implemented by user

Parameters
responseType
Returns

◆ getStrategyVersion()

virtual QString CommonMethodsWrapper::getStrategyVersion ( )
inlinevirtual

getStrategyVersion To get the strategy version of the strategy type can be implemented by user

Returns

◆ getSymbolIdDetail()

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

getSymbolIdDetail To get the symbol detail pointer containing market id, secuirity id and each and every detail of the passed symbol id can be implemented by user

Parameters
symbolId
Returns

◆ getSymbolIdFromISIN()

virtual qlonglong CommonMethodsWrapper::getSymbolIdFromISIN ( const QString &  ISIN,
short  exchangeId 
)
inlinevirtual

getSymbolIdFromISIN To get the symbol id from the passed ISIN number and exchange id from the scrip master can be implemented by user

Parameters
ISIN
exchangeId
Returns
default return value is 0

◆ getTimeFromSec()

virtual QString CommonMethodsWrapper::getTimeFromSec ( UNSIGNED_LONG  secSinceEpoch)
inlinevirtual

getTimeFromSec To get the time in date time format by using passed seconds since epoch time can be implemented by user

Parameters
secSinceEpoch
Returns

◆ getTrades()

virtual void CommonMethodsWrapper::getTrades ( qlonglong  symbolId,
qlonglong  strategyId,
qlonglong &  filledBuyQty,
float &  filledBuyPrice,
qlonglong &  filledSellQty,
float &  filledSellPrice,
QString &  buyPriceStr,
QString &  sellPriceStr 
)
inlinevirtual

getTrades To get the total traded quantity of sell and buy with total price of sell and buy inthe passed references of the passed symbol id and strategy id can be implemented by user

Parameters
symbolId
strategyId
filledBuyQty
filledBuyPrice
filledSellQty
filledSellPrice
buyPriceStr
sellPriceStr

◆ getTrueStr()

virtual QString CommonMethodsWrapper::getTrueStr ( )
inlinevirtual

getTrueStr To get the string "True" can be implemented by user

Returns

◆ getTwoLegArbitHedgeMethod() [1/2]

virtual QString CommonMethodsWrapper::getTwoLegArbitHedgeMethod ( short  hedgeMethod)
inlinevirtual

getTwoLegArbitHedgeMethod To get the two leg arbit hedge method string "Market Order", "Best Bid/Ask", "Hit Bid/Ask", "Actual Diff IOC Best", "Actual Diff" and "Actual Diff Limit Best" can be implemented by user

Parameters
hedgeMethod
Returns

◆ getTwoLegArbitHedgeMethod() [2/2]

virtual short CommonMethodsWrapper::getTwoLegArbitHedgeMethod ( QString  hedgeMethod)
inlinevirtual

getTwoLegArbitHedgeMethod To get the enum value of the passed hedge method string can be implemented by user

Parameters
hedgeMethod
Returns
default return value is -1

◆ getTwoLegThreeLegSpreadType()

virtual short CommonMethodsWrapper::getTwoLegThreeLegSpreadType ( QString  strSpreadType)
inlinevirtual

getTwoLegThreeLegSpreadType To get the enum value of passed spread type string can be implemented by user

Parameters
strSpreadType
Returns
default return value is -1

◆ getTwoLegThreeLegSpreadTypeStr()

virtual QString CommonMethodsWrapper::getTwoLegThreeLegSpreadTypeStr ( short  twoLegThreeLegSpreadType)
inlinevirtual

getTwoLegThreeLegSpreadTypeStr To get the two leg three leg spread type string "Prod Diff", "Actual Diff" and "Base Diff" can be implemented by user

Parameters
twoLegThreeLegSpreadType
Returns

◆ insertTradeWiseTrackerList()

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

insertTradeWiseTrackerList To insert the trade data in trade wise tracker table after each iteration can be implemented by user

Parameters
tradeWiseTrackerDatatrade wise tracker shared pointer

◆ isClientCodePresent()

virtual bool CommonMethodsWrapper::isClientCodePresent ( const QString &  market,
const QString &  inst 
)
inlinevirtual

isClientCodePresent Checks Whether any client code is present for the passed market with passed instrument can be implemented by user

Parameters
market
inst
Returns
default return value is false

◆ isQuoteAvailable()

virtual bool CommonMethodsWrapper::isQuoteAvailable ( qlonglong  symbolId)
inlinevirtual

isQuoteAvailable To check whether quote is available for passed symbol id in the market data or not can be implemented by user

Parameters
symbolId
Returns
default return value is false

◆ maturityDayMonYearToDate()

virtual QString CommonMethodsWrapper::maturityDayMonYearToDate ( int  day,
int  yearMon,
const QString &  format = QString("dd MMM yyyy") 
)
inlinevirtual

maturityDayMonYearToDate To get the maturity date including passed day and yearmon in the passed format can be implemented by user

Parameters
day
yearMon
format
Returns

◆ onTextFilterChanged()

virtual void CommonMethodsWrapper::onTextFilterChanged ( QSortFilterProxyModel *  proxyModel,
QHeaderView *  headerView,
QList< short > &  filterColList 
)
inlinevirtual

onTextFilterChanged To call it when the text is changed in the filter widget can be implemented by user

Parameters
proxyModel
headerView
filterColList

◆ printSqlError()

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

printSqlError To print the deatils of the sql error like executed query, error, file name, function name and error line can be implemented by user

Parameters
query

◆ removeFocusFromPushButton()

virtual void CommonMethodsWrapper::removeFocusFromPushButton ( QPushButton *  button)
inlinevirtual

removeFocusFromPushButton To remove the focus from the passeed push button can be implemented by user

Parameters
button

◆ setFilterActive()

virtual void CommonMethodsWrapper::setFilterActive ( QSortFilterProxyModel *  proxyModel,
bool  isFilterActive 
)
inlinevirtual

setFilterActive To set the filter active or diable according to passed isfilteractive can be implemented by user

Parameters
proxyModel
isFilterActive

◆ setFilterVisible()

virtual void CommonMethodsWrapper::setFilterVisible ( QHeaderView *  headerView,
bool  isFilterActive 
)
inlinevirtual

setFilterVisible To set the filters active in the header view If already active then it hide them can be implemented by user

Parameters
headerView
isFilterActive

◆ setInstrTypeFromMkt()

virtual void CommonMethodsWrapper::setInstrTypeFromMkt ( QComboBox *  comboBox,
QString  market 
)
inlinevirtual

setInstrTypeFromMkt To set the current index of the instrument type from the passed market For spot matket set common stock For others set Future can be implemented by user

Parameters
comboBox
market

◆ setItem()

virtual void CommonMethodsWrapper::setItem ( QStandardItemModel *  tableModel,
int  row,
int  col,
QVariant  data,
Qt::AlignmentFlag  alignmentFlag = Qt::AlignCenter 
)
inlinevirtual

setItem To set the passed data in the passed table model on the passed row and column with passed allignment flag can be overriden

Parameters
tableModel
row
col
data
alignmentFlag

◆ showMessage()

virtual void CommonMethodsWrapper::showMessage ( QWidget *  parent,
QString  title,
QString  message 
)
inlinevirtual

showMessage To show the message box on the parent widget with passed title and passed message can be implemented by user

Parameters
parent
title
message

◆ updateTableView()

virtual void CommonMethodsWrapper::updateTableView ( QTableView *  tableview)
inlinevirtual

updateTableView To update the table view after any change can be implemented by user

Parameters
tableview

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