Replies

J.Lo
16 Jul 2023, 00:54

RE: RE:

Thanks! This seems to be fixed in 4.8  *thumbs up emoji

 


@J.Lo

J.Lo
25 May 2023, 01:48

RE:

Spotware said:

Dear J.Lo,

Thanks for the code sample. We were able to reproduce this behavior and it will be investigated further by the product team

Best regards,

cTrader Team

Thanks..

side note. simply saving a change to the *.sln /  *cproj file also produces this behavior (i.e. doesn't need a build)


@J.Lo

J.Lo
19 May 2023, 02:13 ( Updated at: 21 Dec 2023, 09:23 )

RE:

Spotware said:

Dear trader,

Thanks for reporting this issue. In order to investigate this further, we would need the source code of the cBot you are using.

Best regards,

cTrader Team

Here you go .. i just created a sample. simply add a new unit test and run it.. Although not as extreme as my real bot, you should notice the RAM going up but never coming back down 

I can't see a place to attach a zip file *shrug

just used a sample 


using cAlgo.API;
using cAlgo.API.Indicators;

namespace cAlgo
{
    [Robot(TimeZone = TimeZones.UTC, AccessRights = AccessRights.None)]
    public class SampleRSIcBot : Robot
    {
        [Parameter("Quantity (Lots)", Group = "Volume", DefaultValue = 1, MinValue = 0.01, Step = 0.01)]
        public double Quantity { get; set; }

        [Parameter("Source", Group = "RSI")]
        public DataSeries Source { get; set; }

        [Parameter("Periods", Group = "RSI", DefaultValue = 14)]
        public int Periods { get; set; }

        private RelativeStrengthIndex rsi;

        protected override void OnStart()
        {
            rsi = Indicators.RelativeStrengthIndex(Source, Periods);
        }

        protected override void OnTick()
        {
            if (rsi.Result.LastValue < 30)
            {
                Close(TradeType.Sell);
                Open(TradeType.Buy);
            }
            else if (rsi.Result.LastValue > 70)
            {
                Close(TradeType.Buy);
                Open(TradeType.Sell);
            }
        }

        private void Close(TradeType tradeType)
        {
            foreach (var position in Positions.FindAll("SampleRSI", SymbolName, tradeType))
                ClosePosition(position);
        }

        private void Open(TradeType tradeType)
        {
            var position = Positions.Find("SampleRSI", SymbolName, tradeType);
            var volumeInUnits = Symbol.QuantityToVolumeInUnits(Quantity);

            if (position == null)
                ExecuteMarketOrder(tradeType, SymbolName, volumeInUnits, "SampleRSI");
        }
    }
}

 

 

Then the Unit Test Project 

namespace TestProject1
{
    [TestClass]
    public class UnitTest1
    {
        [TestMethod]
        public void TestMethod1()
        {

            Assert.IsTrue(true);
        }

        [TestMethod]
        public void TestMethod2()
        {
            for(int i=0; i < 100000000; i++)
            {
                string debug = i.ToString();
            }
            Assert.IsTrue(true);
        }
    }
}

 


@J.Lo

J.Lo
06 Mar 2023, 05:36 ( Updated at: 21 Dec 2023, 09:23 )

RE: RE:

J.Lo said:

PanagiotisChar said:

Hi there,

Looks good to me

Aieden Technologies

Need help? Join us on Telegram

Need premium support? Trade with us

 

What version are you running?

any specific settings you needed to toggle?

Ahh, i found the setting for those who run into the same issue.

The setting is called "Deal Map", it needs to be ticked

 


@J.Lo

J.Lo
06 Mar 2023, 03:43 ( Updated at: 21 Dec 2023, 09:23 )

RE:

PanagiotisChar said:

Hi there,

Looks good to me

Aieden Technologies

Need help? Join us on Telegram

Need premium support? Trade with us

 

What version are you running?

any specific settings you needed to toggle?


@J.Lo

J.Lo
18 Jan 2023, 03:03

RE:

fyi Just ran a fresh install with windows 11. i got a similar issue.

I had to install the .netRuntime 6 on the machine and restart my pc. I also ran the program under admin privalages for the first time.

seems fixed now

 

 


@J.Lo

J.Lo
08 Jan 2023, 23:35

RE:

I might have uncovered a contributing factor

unfortunately cTrader is installed in the documents folder . this is the same folder that automatically is added to Microsoft OneDrive (new pc install for windows 10). all these files are then synced and managed by Microsoft. I would be nervous trying to run an application with source files located in a onedrive location *shrug

fyi,  i changed my default one drive location and the stability and memory allocation has improved 


@J.Lo

J.Lo
30 Dec 2022, 22:21 ( Updated at: 21 Dec 2023, 09:23 )

RE:

J.Lo said:

Fyi, running into this issue. I just start the trader and let it sit idle for a while. (no trades, no back testing)

however there are clearly memory leaks, any ideas/fixes? 

 

Side note: After approximately 5-10 min (again siting idle, the memory consumption has dropped to 965MB).

And its jumped back to over 12GB memory. something weird is going on *shrug

Side note: i did recently upgrade my bot to .net 6. (but as i stated previously, i just opened ctrader and let it run idle)


@J.Lo