Replies

d.asteriti
05 Nov 2024, 17:10

RE: RE: Workspace disabled after few minutes

bastaras said: 

Asgard said: 

Hello Pnogowski,

I have exactly the same problem.
I can work normally for 15 minutes and the workspace is saved. However, the software loses the connection to the CTrader ID service and cannot be re-established afterwards. The workspace button can no longer be clicked and watchlists can no longer be created. All work can no longer be saved.

I hope someone has a solution!?

Version 5.0.40
System: Windows 10 pro

Best regards

 

Same problem.. please fix it asap thanks


@d.asteriti

d.asteriti
22 Jun 2023, 16:21

RE:

PanagiotisChar said:

Hi there,

Are you running your cBot on any virtualization technology (VPS, Parallels etc)? Try giving full access to your code and see if it solves the problem

Aieden Technologies

Need help? Join us on Telegram

 

I'm not running my cBot on any virtualization technology. I'snt a good solution giving full access at cBots, Do you suggest another solution?


@d.asteriti

d.asteriti
22 Jun 2023, 12:50

RE:

PanagiotisChar said:

Hi there,

You need to share the cBot code and your cTrader's version to get further assistance.

Aieden Technologies

Need help? Join us on Telegram

 

 

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

 

cTrader Version 4.7.12.17878


@d.asteriti