CBOT Error after update 4.3.8

Created at 08 Jul 2022, 08:07
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!
VE

velu130486

Joined 08.11.2019 Blocked

CBOT Error after update 4.3.8
08 Jul 2022, 08:07


Dear All,

Till yesterday I was using IC Market Ctrader 4.1 and my Cbot was working fine. Today I updated to Spotware CTrader 4.3.8 but after that I can't lod my Cbot and it is showing the below error.

So I tried to build the bot in .Net 4, I got the below error

Also I got the above error when I tried to build in both .Net 4 and .Net 6.

I am not a developer, and I had developed this Cbot with help of a another person and I could not reach that person.

So please help me to solve this problem. I posted the Cbot code as below

using System;
using System.Linq;
using cAlgo.API;
using cAlgo.API.Indicators;
using cAlgo.API.Internals;
using cAlgo.Indicators;

using FeatureFXlib;
using System.Collections;
using System.Collections.Generic;
using System.Threading;
using System.IO;
using System.Windows.Forms;
using cAlgo.API.Alert;
using cAlgo.API.Alert.Utility;
using WMPLib;

namespace cAlgo.Robots
{
    [Robot(TimeZone = TimeZones.UTC, AccessRights = AccessRights.FullAccess)]
    public class vadivelanZonev10 : Robot
    {
        [Parameter("Remove Olverlapping", Group = "FEATURE", DefaultValue = true)]
        public bool overlapping { get; set; }
        [Parameter("Sound Alert", Group = "FEATURE", DefaultValue = true)]
        public bool soundalert { get; set; }

        //-----------------CUSTOM PARAMETERS
        FeatureFX API = new FeatureFX();
        BarFX bar = new BarFX();
        Thread thread;
        //Form1 form = new Form1();
        //DataGridView table;

        ControlBase panel;
        int timeCount = 0;
        int alertCount = 0;
        int signalCount = 0;

        protected override void OnStart()
        {
            playDesktopAudio("FXaudio", "swiftly.mp3");
            bar.glob = MarketData;
            //table = form.dataGridView1;

            API.drawPanelButton("Execute", Chart, panel, IndicatorStart, VerticalAlignment.Bottom, cAlgo.API.HorizontalAlignment.Right);
            Chart.DrawIcon("start", ChartIconType.Circle, Bars.OpenTimes.LastValue, Bars.ClosePrices.LastValue, Color.White);
        }

        WMPLib.WindowsMediaPlayer player = new WMPLib.WindowsMediaPlayer();
        ChartRectangle drawRectangle(string id, DateTime t1, double y1, DateTime t2, double y2, Color clr)
        {
            var rec = Chart.DrawRectangle(id, t1, y1, t2, y2, clr);
            rec.Color = Color.FromArgb(80, clr.R, clr.G, clr.B);
            rec.IsFilled = true;
            return rec;
        }
        public void playDesktopAudio(string FolderName, string FileName)
        {
            var windowsFolder = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments);
            var path = Path.Combine(windowsFolder, FolderName, FileName);
            //cAlgo
            //Notifications.PlaySound(path);
            //System
            player.URL = path;
            player.controls.play();
        }
        void soundAlert()
        {
            if (soundalert)
                if (alertCount != timeCount)
                {
                    alertCount = timeCount;
                    playDesktopAudio("FXaudio", "swiftly.mp3");
                }
        }     
    }
}

Thanks and Regards

R. Vadivelan


Replies

velu130486
11 Jul 2022, 06:52 ( Updated at: 21 Dec 2023, 09:22 )

RE:

Dear All.

Could you please help me to solve this problem, since I can't use my CBOT after the Ctrader update.

Thanks and Regards

R. Vadivelan

velu130486 said:

Dear All,

Till yesterday I was using IC Market Ctrader 4.1 and my Cbot was working fine. Today I updated to Spotware CTrader 4.3.8 but after that I can't lod my Cbot and it is showing the below error.

So I tried to build the bot in .Net 4, I got the below error

Also I got the above error when I tried to build in both .Net 4 and .Net 6.

I am not a developer, and I had developed this Cbot with help of a another person and I could not reach that person.

So please help me to solve this problem. I posted the Cbot code as below

using System;
using System.Linq;
using cAlgo.API;
using cAlgo.API.Indicators;
using cAlgo.API.Internals;
using cAlgo.Indicators;

using FeatureFXlib;
using System.Collections;
using System.Collections.Generic;
using System.Threading;
using System.IO;
using System.Windows.Forms;
using cAlgo.API.Alert;
using cAlgo.API.Alert.Utility;
using WMPLib;

namespace cAlgo.Robots
{
    [Robot(TimeZone = TimeZones.UTC, AccessRights = AccessRights.FullAccess)]
    public class vadivelanZonev10 : Robot
    {
        [Parameter("Remove Olverlapping", Group = "FEATURE", DefaultValue = true)]
        public bool overlapping { get; set; }
        [Parameter("Sound Alert", Group = "FEATURE", DefaultValue = true)]
        public bool soundalert { get; set; }

        //-----------------CUSTOM PARAMETERS
        FeatureFX API = new FeatureFX();
        BarFX bar = new BarFX();
        Thread thread;
        //Form1 form = new Form1();
        //DataGridView table;

        ControlBase panel;
        int timeCount = 0;
        int alertCount = 0;
        int signalCount = 0;

        protected override void OnStart()
        {
            playDesktopAudio("FXaudio", "swiftly.mp3");
            bar.glob = MarketData;
            //table = form.dataGridView1;

            API.drawPanelButton("Execute", Chart, panel, IndicatorStart, VerticalAlignment.Bottom, cAlgo.API.HorizontalAlignment.Right);
            Chart.DrawIcon("start", ChartIconType.Circle, Bars.OpenTimes.LastValue, Bars.ClosePrices.LastValue, Color.White);
        }

        WMPLib.WindowsMediaPlayer player = new WMPLib.WindowsMediaPlayer();
        ChartRectangle drawRectangle(string id, DateTime t1, double y1, DateTime t2, double y2, Color clr)
        {
            var rec = Chart.DrawRectangle(id, t1, y1, t2, y2, clr);
            rec.Color = Color.FromArgb(80, clr.R, clr.G, clr.B);
            rec.IsFilled = true;
            return rec;
        }
        public void playDesktopAudio(string FolderName, string FileName)
        {
            var windowsFolder = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments);
            var path = Path.Combine(windowsFolder, FolderName, FileName);
            //cAlgo
            //Notifications.PlaySound(path);
            //System
            player.URL = path;
            player.controls.play();
        }
        void soundAlert()
        {
            if (soundalert)
                if (alertCount != timeCount)
                {
                    alertCount = timeCount;
                    playDesktopAudio("FXaudio", "swiftly.mp3");
                }
        }     
    }
}

Thanks and Regards

R. Vadivelan

 


PanagiotisCharalampous
11 Jul 2022, 15:39

Hi there,

The components that throw the exceptions are not part of cTrader. You either need to contact the original developer or pass the complete solution to another developer to fix the problem.

Best Regards,

Panagiotis 

Join us on Telegram and Facebook


@PanagiotisCharalampous

velu130486
12 Jul 2022, 03:49

RE:

Hi Panagiotis,

This Bot was working fine in Ctrader 4.1. I got this error after update to 4.3.8. Now I can't contact the previous developer, so before passing this to new developer could you please help me to identify which section is causing the error because I already invested a lot of money for this bot. As I understood the error is coming from Alert feature, I am ok to run the bot even with alert facility. Please help me to fix this.

Thanks and Regards

R. Vadivelan

PanagiotisCharalampous said:

Hi there,

The components that throw the exceptions are not part of cTrader. You either need to contact the original developer or pass the complete solution to another developer to fix the problem.

Best Regards,

Panagiotis 

Join us on Telegram and Facebook

 


PanagiotisCharalampous
12 Jul 2022, 08:46

Hi Vadivelan,

The error message clearly states what is the problem. cAlgo.API.Alert package in not supported by the update. Now, somebody familiar with this package needs to check why this happens. Did you try contacting somebody else, like ClickAlgo?

Best Regards,

Panagiotis 

Join us on Telegram and Facebook


@PanagiotisCharalampous