'Symbol cached data not available or corrupted' Error When Using .NET 6 with cBot

Created at 10 Aug 2023, 20:44
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!
HG

hgrams

Joined 22.02.2018

'Symbol cached data not available or corrupted' Error When Using .NET 6 with cBot
10 Aug 2023, 20:44


Hello,

I'm encountering an issue when using .NET 6 with my cBot in cTrader. The code runs flawlessly when compiled with .NET Framework 4. However, upon switching to .NET 6, I'm faced with the "Symbol cached data not available or corrupted" error.

Technical Details:

  • cTrader Version: Spotware 4.8.19
  • Operating System: Windows 11 Pro | 22H2 | 22621.2134

Below is a simplified version of the code I'm using:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using cAlgo.API;
using cAlgo.API.Collections;
using cAlgo.API.Indicators;
using cAlgo.API.Internals;

namespace cAlgo.Robots
{
    [Robot(AccessRights = AccessRights.None)]
    public class cBotClean : Robot
    {
        [Parameter(DefaultValue = "Hello world!")]
        public string Message { get; set; }

        protected override void OnStart()
        {
            // To learn more about cTrader Automate visit our Help Center:
            // https://help.ctrader.com/ctrader-automate

            Print(Message);
        }

        protected override void OnTick()
        {
            // Handle price updates here
        }

        protected override void OnStop()
        {
            // Handle cBot stop here
        }
    }
}

 

.Net 6.0

 

.Net 4.x

 

Any insights or fixes would be greatly appreciated.

Thank you!


@hgrams
Replies

... Deleted by UFO ...

Spotware
11 Aug 2023, 05:08 ( Updated at: 21 Dec 2023, 09:23 )

Dear trader,

Thank you for reporting this issue. In order to assist you we will need some more information. Therefore please follow the steps below

  1. Try to reproduce the issue once more and send us send us some troubleshooting information. Paste a link to this discussion inside the text box/
  2. Please reset your local data and try again. Let us know if this resolves the issue 
  3. Please let us know if you are using two different versions side by side.

Best regards,

cTrader Team


@Spotware

hgrams
11 Aug 2023, 08:05 ( Updated at: 21 Dec 2023, 09:23 )

RE: 'Symbol cached data not available or corrupted' Error When Using .NET 6 with cBot

Spotware said: 

Dear trader,

Thank you for reporting this issue. In order to assist you we will need some more information. Therefore please follow the steps below

  1. Try to reproduce the issue once more and send us send us some troubleshooting information. Paste a link to this discussion inside the text box/
  2. Please reset your local data and try again. Let us know if this resolves the issue 
  3. Please let us know if you are using two different versions side by side.

Best regards,

cTrader Team

1. Sent 
2. Data reset and the error persists 
3. I have installed the versions of ctrader from the brokers, however, I am only running the official version (Spotware).

Thanks!


@hgrams

Shares4UsDevelopment
04 Apr 2024, 14:57

try AccessRights = AccessRights.FullAccess

try  AccessRights = AccessRights.FullAccess


@Shares4UsDevelopment