Error #B089668F accessing PerformanceCounters

Created at 08 Apr 2022, 09:09
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!
GE

gennimatas

Joined 19.09.2018

Error #B089668F accessing PerformanceCounters
08 Apr 2022, 09:09


 Getting error #B089668F accessing any PerformanceCounter.

Debugger reports access denied.

Regards

 

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 TestPerformanceCounters
{
    [Indicator(AccessRights = AccessRights.FullAccess)]
    public class TestPerformanceCounters : Indicator
    {

        
        System.Diagnostics.PerformanceCounter MemoryCounter = new System.Diagnostics.PerformanceCounter("Memory", "Available MBytes");
        // Indicator crashed with error #B089668F.

        protected override void Initialize()
        {
        }

        public override void Calculate(int index)
        {
        }

    }
}

 


@gennimatas