You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I try to trace the code of SymbolAnalyzer::buildCurrencyIndex of FxSymbol module then find symbol is added into m_spacials HashMap rather than building m_index if Base currency equals to Profit currency of the given symbol.
However, broker "IG Market" provides symbols all having Base currency being the same to Profit currency, which cause zero size to m_index HashMap, so Invalid Point access error occurs when calling SymbolAnalyzer::getConversionSymbol, as the member function uses pointers to refer to a zero-size map (i.e., m_index).
May I know what is m_spacials used for? as I don't see any access or operation to it on given code. appreciated if you would like to provide example or explanation to SymbolAnalyzer
The text was updated successfully, but these errors were encountered:
I modify getBaseCurrency member function in FxSymbol class as the workaround to fix the issue that broker falsely return a wrong base currency via SymbolInfoString(symbol,SYMBOL_CURRENCY_BASE)
static string getBaseCurrency(string symbol) { string s ; s = SymbolInfoString(symbol,SYMBOL_CURRENCY_BASE); if(FxSymbol::getMarginCalcMode(symbol) == 0 && StringCompare(s, SymbolInfoString(symbol,SYMBOL_CURRENCY_PROFIT))== 0) { s = StringSubstr(symbol, 0, 3) ; } return(s); }
I try to trace the code of
SymbolAnalyzer::buildCurrencyIndex
ofFxSymbol
module then find symbol is added intom_spacials
HashMap rather than buildingm_index
if Base currency equals to Profit currency of the given symbol.However, broker "IG Market" provides symbols all having Base currency being the same to Profit currency, which cause zero size to m_index HashMap, so Invalid Point access error occurs when calling
SymbolAnalyzer::getConversionSymbol
, as the member function uses pointers to refer to a zero-size map (i.e.,m_index
).May I know what is
m_spacials
used for? as I don't see any access or operation to it on given code. appreciated if you would like to provide example or explanation toSymbolAnalyzer
The text was updated successfully, but these errors were encountered: