Cloud issue: OnException Indicator <Indicators name> Type not found

Created at 06 Feb 2025, 10:20
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!
FMogyi's avatar

FMogyi

Joined 13.10.2015

Cloud issue: OnException Indicator <Indicators name> Type not found
06 Feb 2025, 10:20


When the cBot uses an indicator in Cloud the following Exception generated:  Indicator <Indicator name> Type not found. 

In Local Mode:  no Exception.

This cBot uses  a simple RSI and a custom indicator (gives allways Result=1) to demonstrate the problem for you.

Here you can see the result and the source. 

 

 

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

namespace cAlgo.Robots
{
    [Robot(AccessRights = AccessRights.None, AddIndicators = true)]
    public class CustomIndicator : Robot
    {
    private BarSample barSample;
    private RelativeStrengthIndex rsi;
//--------------------------------------------------
protected override void OnStart()
//--------------------------------------------------
        {
            rsi = Indicators.RelativeStrengthIndex(Bars.ClosePrices, 14);
            barSample = Indicators.GetIndicator<BarSample>();
            Print(rsi.Result.LastValue);
            Print(barSample.Result.LastValue);
        }
//--------------------------------------------------------------------------
protected override void OnException(Exception e) 
//--------------------------------------------------------------------------
{
    Print("OnException {0}" , e.Message);            
}        
//--------------------------------------------------
    }
}


@FMogyi