Bug Report: Muti-Symbol Testing
Bug Report: Muti-Symbol Testing
18 Dec 2022, 02:10
Hi
Trying to run this mutl-symbol sample script by Panagiotis:
The script lists some symbols and then subscribes them to the tick and bar events.
But if the symbol list contains USDCHF the backtest crashes on start with the message:
11/12/2022 22:01:00.000 | Failed to get symbol 'USDCHF': Symbol not found or has no quotes.
If I remove USDCHF from the list of symbols the script runs as expected. If I run a single symbol script on USDCHF it runs. Charts with USDCHF load fine.
Very odd.
Here's the most relevant part of the script:
protected override void OnStart()
{
// We get a symbol array for the following for symbols
MySymbols = Symbols.GetSymbols("USDCHF", "EURUSD", "GBPUSD", "USDJPY");
// We subscribe to the tick event for each symbol
foreach (var symbol in MySymbols)
{
symbol.Tick += Symbol_Tick;
}
// We subscribe to the bar event for each symbol for the current timeframe
foreach (var symbol in MySymbols)
{
var bars = MarketData.GetBars(TimeFrame, symbol.Name);
bars.BarOpened += Bars_BarOpened;
}
}
Replies
ghcaplan
20 Dec 2022, 02:52
RE:
This was on ICMarkets.
As I say, the symbol was working fine for charts in the desktop client, and for a single-symbol Robot.
It was only for your multi-symbol bot that the error occurred!
Just tried it again now the markets are open, and it's working as expected, so it seems it was some kind of strange artefact of weekend maintenance?
@ghcaplan
PanagiotisChar
20 Dec 2022, 09:42
Hi there,
Maybe :)
Need help? Join us on Telegram
Need premium support? Trade with us
@PanagiotisChar
PanagiotisChar
18 Dec 2022, 22:09
Hi there,
On which broker do you run this? Does the broker offer the symbol?
Aieden Technologies
Need help? Join us on Telegram
Need premium support? Trade with us
@PanagiotisChar