Skip to content

Commit

Permalink
Update SierraChart2.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
AndrewAMD authored Apr 14, 2021
1 parent d7f927c commit e45f7e9
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions SierraChart2/SierraChart2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,20 @@ s_Asset* get_asset_by_ZorroSymbol(const char* ZorroSymbol) {
}
return NULL;
}
if (strstr(ZorroSymbol, "?##")) {
s_Asset* bestmatch = NULL;
for (auto& a : g_mAssets) {
if (a.second.UnderlyingSymbol == ZorroSymbol) {
if (!bestmatch) {
bestmatch = &a.second;
}
else if (a.second.nExpiry < bestmatch->nExpiry) {
bestmatch = &a.second;
}
}
}
return bestmatch;
}
else {
return get_asset_by_SCSymbol(ZorroSymbol);
}
Expand Down Expand Up @@ -600,6 +614,7 @@ void get_history(s_HistData* pHD) {
if (cl_is_stopped(FEED_HIST)) { return; }
if (!is_binary) {
zprintf("%s: Server does not support binary encoding!", sN);
cl_shutdown(FEED_HIST);
return;
}
}
Expand Down

0 comments on commit e45f7e9

Please sign in to comment.