Topics
23 Oct 2023, 22:43
 219
 2
19 Oct 2023, 13:04
 246
 4
01 Oct 2023, 22:33
 347
 1
13 Oct 2022, 10:20
 557
 2
24 Dec 2020, 04:37
 0
 755
 1
24 Dec 2020, 04:35
 0
 703
 1
24 Dec 2020, 04:34
 0
 712
 1
24 Dec 2020, 04:33
 1
 1155
 5
Replies

acrigney
02 May 2023, 08:40

RE:

Thanks mate, the debugger is not launched but the code says it was.

Also when I try and attach it says that no symbols have been loaded for the current document. 

As I said I have been doing this for years but ever since the upgrade to support .net 6 it has never worked.

Here is some sample code.

 

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 DummyBot6 : Robot
    {
        [Parameter(DefaultValue = "Hello world!")]
        public string Message { get; set; }

        [Parameter(DefaultValue = "Hello world!")]
        public string Message2 { get; set; }

        protected override void OnStart()
        {
            var result = System.Diagnostics.Debugger.Launch();

            if (result is false)
            {
                Print("Debugger launch failed");
            }
            else if (result is true)
            {
                Print("Debugger launched");
            }

            // To learn more about cTrader Automate visit our Help Center:
            // https://help.ctrader.com/ctrader-automate

            Print(Message);
            Print("onstart");
        }

        protected override void OnTick()
        {
            // Handle price updates here
        }
        
        protected override void OnBar()
        {
            double x = 0, y = 0, z = 0,p =0;
            Print("AddClose");
            for (int j = 0; j < 3; j++)
            {
                x = (float)Bars.ClosePrices.Last(j + 1);
                y = (float)Bars.OpenPrices.Last(j + 1);
                z = (float)Bars.HighPrices.Last(j + 1);
                p = (float)Bars.LowPrices.Last(j + 1);
            }
            Print(String.Format("lengths {0} {1} {2} {3}", x, y, z, p));


           

        }

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

PanagiotisChar said:

 

Hi there,

There are clear instructions here

Which step does not work for you?

Aieden Technologies

Need help? Join us on Telegram

Need premium support? Trade with us

 

 


@acrigney

acrigney
28 Apr 2023, 14:59

RE:

Yes mate my boss have FullAccess but still no luck with any of the recent versions including the latest my broker TopDx has which is 4.6.6

Can you post a video showing creating and debugging a bot please?

PanagiotisCharalampous said:

Hi acrigney,

Did you set your cBot's access rights to FullAccess?

Best Regards,

Panagiotis 

Join us on Telegram and Facebook

 


@acrigney

acrigney
28 Apr 2023, 00:59

RE:

Dear Alex,

                   I have developed a generic ML framework using Microsoft's ML.NET that uses templated types called generics. Not sure of your programming experience but that means that if you give me a data stream I can very quickly build models. With Python ML there is no generic interface for the ML libraries so they have to copy and paste their code for every problem. This makes it very hard to build generic solutions! I have used my ML framework for trading for about 2 years now but you also need the catching/recovery/filtering options which are just as important. However I found that the minute data was not accurate enough with ctrader and I have tried using the tick data but this gave models that converged nicely but gave inconsistent results. So now I am back to using minute data but I have added renko data and also derivatives. I have many types of models too, but I have not used models on multi timeframes and maybe I should do that. There was another problem that it was a huge change to move to .net 6. I have had to rebuild a very large amount of code, it should have been easy but many issues had to be fixed and also I am still unable to attach the debugger to my bots and I have complained to ctrader many times but they just say it works and a lot of other people have this problem too. I don't think chatgpt is going to work unless you are thinking of long term trades as in over days or hrs. I think the longest timeframe you can trade is a minute as the market can move so fast. But I want to incorporate chatgpt too as well maybe for stock/options trading. I trade on the index markets.

I would love you to join me in my efforts and testing, its been very hard to find traders who are interested in using ML!! My ML uses AutoML, that means that it will find the best mode and auto feature engineering while the model is being built. Also it can tell you why it has made the prediction for every prediction. 

Best Regards,

                         Alistair

 

 

 

 

alexsanramon said:

Good Day,

 

I hope this message finds you well. I am writing to respectfully request your assistance on building a simple indicator that has machine learning capability. Suppose a momentum indicator that has been fed with 2 years of machine learning data and can forecast only 1 bar of future data.

I understand that your time is valuable, but I would greatly appreciate any guidance or insight you can provide on this matter.

Thank you for your consideration.

Sincerely, 

Alex

 


@acrigney

acrigney
19 Apr 2023, 14:04

RE: Global package references not found with .net 6 bot

Not to mention that I still cannot get debugging to work in VS2022, no version works I am using VS2022 17.6.0 Preview 3 

acrigney said:

Guys I have had a lot of issues with upgrading my bots to .net 6 and my latest problem is that my nuget references are not found when the bots run.

With .net 6 we are now using PackageReference as explained here

  • Performance improvements: When using PackageReference, packages are maintained in the global-packages folder (as described on Managing the global packages and cache folders rather than in a packages folder within the solution. As a result, PackageReference performs faster and consumes less disk space.

But I have found that I have had to manually add the references to get this to work. And this was the old way as well from reading a previous post. Moving forward manually having to add package references is really a pain when the references should just be found from the global reference. I am surprised that others don't seem to have had this problem recently?

Best Regards,

                       Alistair

 


@acrigney

acrigney
19 Apr 2023, 13:57

RE: RE: Global package references not found with .net 6 bot

I see other people are getting their questions answered. I fixed the issue as I found that the normal package references are not supported and you have to include all of the references that a package has internally, I was hoping that they could be picked up by the global references but they are not.

Also it seems that the robustness of ctrader has suffered since the upgrade to .net 6, e.g now I have to build twice, once in visual studio but ctrader still says that the bot has changed and needs to be rebuilt so I have to click the build button in ctrader. Actually the compile speed was has greatly improved thought!

acrigney said:

I have added the nuget references directly by finding their locations and using add reference for the dlls but still at runtime the correct versions of the dlls are not found.

So the hint path is being ignored. Apparently the hint path is only for the compiler so its not used at run time.

<Reference Include="Microsoft.ML.Data">
      <HintPath>..\..\..\..\..\..\.nuget\packages\microsoft.ml\2.0.1-preview.22573.9\lib\netstandard2.0\Microsoft.ML.Data.dll</HintPath>
      <SpecificVersion>True</SpecificVersion>
    </Reference>

I have tried with and without the specific version but I still get the error that the version of the dll is not found, 

So I get errors like this

 Could not load file or assembly 'Microsoft.ML.Data, Version=1.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'. The system cannot find the file specified.

acrigney said:

Guys I have had a lot of issues with upgrading my bots to .net 6 and my latest problem is that my nuget references are not found when the bots run.

With .net 6 we are now using PackageReference as explained here

  • Performance improvements: When using PackageReference, packages are maintained in the global-packages folder (as described on Managing the global packages and cache folders rather than in a packages folder within the solution. As a result, PackageReference performs faster and consumes less disk space.

But I have found that I have had to manually add the references to get this to work. And this was the old way as well from reading a previous post. Moving forward manually having to add package references is really a pain when the references should just be found from the global reference. I am surprised that others don't seem to have had this problem recently?

Best Regards,

                       Alistair

 

 


@acrigney

acrigney
17 Apr 2023, 15:49

RE: RE: Global package references not found with .net 6 bot

Guys can someone pick this up, I can pay someone to fix this?

acrigney said:

I have added the nuget references directly by finding their locations and using add reference for the dlls but still at runtime the correct versions of the dlls are not found.

So the hint path is being ignored. Apparently the hint path is only for the compiler so its not used at run time.

<Reference Include="Microsoft.ML.Data">
      <HintPath>..\..\..\..\..\..\.nuget\packages\microsoft.ml\2.0.1-preview.22573.9\lib\netstandard2.0\Microsoft.ML.Data.dll</HintPath>
      <SpecificVersion>True</SpecificVersion>
    </Reference>

I have tried with and without the specific version but I still get the error that the version of the dll is not found, 

So I get errors like this

 Could not load file or assembly 'Microsoft.ML.Data, Version=1.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'. The system cannot find the file specified.

acrigney said:

Guys I have had a lot of issues with upgrading my bots to .net 6 and my latest problem is that my nuget references are not found when the bots run.

With .net 6 we are now using PackageReference as explained here

  • Performance improvements: When using PackageReference, packages are maintained in the global-packages folder (as described on Managing the global packages and cache folders rather than in a packages folder within the solution. As a result, PackageReference performs faster and consumes less disk space.

But I have found that I have had to manually add the references to get this to work. And this was the old way as well from reading a previous post. Moving forward manually having to add package references is really a pain when the references should just be found from the global reference. I am surprised that others don't seem to have had this problem recently?

Best Regards,

                       Alistair

 

 


@acrigney

acrigney
15 Apr 2023, 04:35

RE: Global package references not found with .net 6 bot

I have added the nuget references directly by finding their locations and using add reference for the dlls but still at runtime the correct versions of the dlls are not found.

So the hint path is being ignored. Apparently the hint path is only for the compiler so its not used at run time.

<Reference Include="Microsoft.ML.Data">
      <HintPath>..\..\..\..\..\..\.nuget\packages\microsoft.ml\2.0.1-preview.22573.9\lib\netstandard2.0\Microsoft.ML.Data.dll</HintPath>
      <SpecificVersion>True</SpecificVersion>
    </Reference>

I have tried with and without the specific version but I still get the error that the version of the dll is not found, 

So I get errors like this

 Could not load file or assembly 'Microsoft.ML.Data, Version=1.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'. The system cannot find the file specified.

acrigney said:

Guys I have had a lot of issues with upgrading my bots to .net 6 and my latest problem is that my nuget references are not found when the bots run.

With .net 6 we are now using PackageReference as explained here

  • Performance improvements: When using PackageReference, packages are maintained in the global-packages folder (as described on Managing the global packages and cache folders rather than in a packages folder within the solution. As a result, PackageReference performs faster and consumes less disk space.

But I have found that I have had to manually add the references to get this to work. And this was the old way as well from reading a previous post. Moving forward manually having to add package references is really a pain when the references should just be found from the global reference. I am surprised that others don't seem to have had this problem recently?

Best Regards,

                       Alistair

 


@acrigney

acrigney
14 Apr 2023, 01:32

Global package references not found with .net 6 bot

Guys I have had a lot of issues with upgrading my bots to .net 6 and my latest problem is that my nuget references are not found when the bots run.

With .net 6 we are now using PackageReference as explained here

  • Performance improvements: When using PackageReference, packages are maintained in the global-packages folder (as described on Managing the global packages and cache folders rather than in a packages folder within the solution. As a result, PackageReference performs faster and consumes less disk space.

But I have found that I have had to manually add the references to get this to work. And this was the old way as well from reading a previous post. Moving forward manually having to add package references is really a pain when the references should just be found from the global reference. I am surprised that others don't seem to have had this problem recently?

Best Regards,

                       Alistair


@acrigney

acrigney
28 Mar 2023, 15:16

RE:

So in the OnBars or OnTicks functions I could use any of these? where the DataSeries are the Renko values i.e irrespective of time.

DataSeries HighPrices { get; }
       .
        DataSeries OpenPrices { get; }
        //
        // Summary:
        //     Gets the Weighted prices data (High + Low + 2 * Close) / 4.
        DataSeries WeightedPrices { get; }
        //
        // Summary:
        //     Gets the Low price bars data.
        DataSeries LowPrices { get; }
        //
        // Summary:
        //     Gets the Close price bars data.
        DataSeries ClosePrices { get; }
        //
        // Summary:
        //     Gets the Tick volumes data.
        DataSeries TickVolumes { get; }
        //
        // Summary:
        //     Gets the Median prices data (High + Low) / 2.
        DataSeries MedianPrices { get; }
        //
        // Summary:
        //     Gets the Typical prices data (High + Low + Close) / 2.
        DataSeries TypicalPrices { get; }

 

PanagiotisChar said:

Hi there,

OnBar() works for Renko and Range bars too.

Aieden Technologies

Need help? Join us on Telegram

Need premium support? Trade with us

 

 


@acrigney

acrigney
22 Mar 2023, 23:55

Memory Leaks

Guys what exact steps did you use to create your memory leaks? You must have at least opened a chart?


@acrigney

acrigney
26 Nov 2022, 00:08

RE:

I am still completely unable to get debugging to work and my broker Fondex said that it was an issue with the latest version and will be fixed in this new version.

And I think its a ridiculous idea that you would have to rebuild a bot just to debug it. 

Spotware said:

Dear traders,

We are not able to reproduce any of the aforementioned issues. If you can record a video with the exact steps you are following, we are happy to have a look and advise.

Best Regards,

cTrader Team

 


@acrigney

acrigney
17 Nov 2022, 15:38

Still not working for me With VS2022 17.3.4 and Ctrader Automate version 1.0.4 (which is the latest version)

With Ctrader 4.4.19 a new fresh bot and when you hit start you still see no symbols have been loaded.

Shares4us said:

Problem solved with the newest nuget automate release :-)

 

 


@acrigney

acrigney
17 Nov 2022, 14:52

RE: RE:

This is definitely a problem for me now, I setup one of my traders today on a new machine and the backtest data was not cached.

jaydcrowe1989 said:

Spotware said:

Dear Jay,

Thank you for reporting this issue. Can you please record a video demonstrating this behavior?

Best Regards,

cTrader Team

Is there any update on this please?

 


@acrigney

acrigney
02 Nov 2022, 13:54

RE: Freezes happen all the time

Guys its been months now and still the stability of the new versions that you added for support of .net 6 have made the platform very unstable.

I have very high performance computers colocated in NY and London and my PC at home and I regularly am seeing the screen freeze when I change bot instances and I am still unable to debug ANY old bot or new bot built with .net 6.

PanagiotisCharalampous said:

Hi procumulative@gmail.com,

Thanks for the feedback, I will forward to the product team for investigation. Note that cTrader 3.0 was in Beta for the last three months. I would also suggest that you make a clean installation and let us know if it resolves the issues.

Best Regards,

Panagiotis

 


@acrigney

acrigney
25 Oct 2022, 15:30

RE:

This is not an issue for me but how do you select the Automate package you want to use, is this a nuget reference?

Spotware said:

Dear trader, 

Thanks for reporting this issue. The team is aware of it and working on a solution. In the meanwhile, you need to downgrade the cTrader Automate package to 1.0.2.

Best regards,

cTrader Team

 


@acrigney

acrigney
25 Oct 2022, 15:27 ( Updated at: 26 Oct 2022, 08:55 )

RE:

Yes this is an issue, I have seen many new bugs created since the new version came out, e.g. being unable to debug which was working fine for 3 years, freezing of the screen when you change instances, bots suddenly requiring to be recompiled. The trader needs to select when they want to try updates. Also ctrader is up to much higher versions but my broker Fondex is not up to the latest version anyway, is this as they need time to test new versions, and it looks like their testing is inadequate. Also myself and others have raised these issues recently but they are still not fixed. CTrader was very stable until the release of the .net 6 versions!!

babakzahedi7141 said:

I just want to know why? and What Is the issue with That? 

 


@acrigney

acrigney
11 Oct 2022, 09:38

RE: RE: RE: RE: RE: RE:

Waxy said:

and where should I see that? I only see that the symbols fail to load.

really hope we can fix this urgently my clients are waiting!

The problem is that this message is always showing up since last updates, I would like to have it fixed:

System.Private.CoreLib.pdb not included

 


@acrigney

acrigney
10 Oct 2022, 16:56

RE:

There must be some other config settings?

PanagiotisChar said:

Weird,

Looks good on my side 

https://pcharalampous-spotware.tinytake.com/msc/NzQzOTEwMl8yMDM0MDMxMg

Aieden Technologies

Trade with us

 


@acrigney

acrigney
10 Oct 2022, 14:56 ( Updated at: 21 Dec 2023, 09:22 )

RE: RE:

This is exactly what I see except he did not show the attempt to debug which then does not work for a .net 6 bot or a .net 4.8 bot. And beak points are not hit on start or when backtesting.

Shares4us said:

this video shows vs2022 build is not updating cTrader executables


@acrigney

acrigney
08 Oct 2022, 05:40

RE: RE: RE: RE:

Guys I rebuilt with Ctrader but still can't debug. Could someone post a youtube of how to debug with the latest version of cTrader?

Shares4us said:

I checked and alterred the rights to FullAccess. That worked partially.
The debugger wil now Launch but ....

When build in vs2022 the created binary is still not used. (See the version problem (See initial Post at  "
The indicator is still version 1.0 instead of the expected 1.1."

So debugging still not possible.

The problem boils down to:

When building by means of VS2022, the .dll is updated but no .algo file is created in the indicators directory

When building by means of cTrader, the .dll is updated and a .algo file is created in the indicators directory

 

Nasty !

 


@acrigney