Bug Report: Muti-Symbol Testing

Created at 18 Dec 2022, 02:10
How’s your experience with the cTrader Platform?
Your feedback is crucial to cTrader's development. Please take a few seconds to share your opinion and help us improve your trading experience. Thanks!
GH

ghcaplan

Joined 15.08.2019

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;
            }
        }

 


@ghcaplan
Replies

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

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