Getting Method not found errors on indicators

Created at 12 Oct 2013, 00:07
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!
PE

pennyfx

Joined 27.09.2012

Getting Method not found errors on indicators
12 Oct 2013, 00:07


I'm using version 1.10.34111

I just noticed that one of my bots no longer works and is giving me this error.

"Crashed in OnTick with MissingMethodException: Method not Found: 'cAlgo.API.Indicators.WellesWilderSmoothing.get_Result()'"

 

I'm using Visual Studio to build my robots and everything has worked fine until recently.  I noticed that you changes some DLL files that I usually reference.  I used to reference cAlgo.Indicators.dll and cAlgo.API.dll.  It looks like cAlgo.Indicators has been renamed to Frontend.Indicators, so I updated my references in VS and everything compiles.   I run my bots in cAlgo by setting my bot as a base class of a bot in cAlgo.   This way of doing things used to work fine in the past.   Here's my code.  

 

//#reference: C:\fxbots\resources\CarbonFx.dll

using System;
using cAlgo.API;
using cAlgo.API.Indicators;
using cAlgo.API.Requests;
using cAlgo.Indicators;
using CarbonFx.cAlgo.Robots;

namespace cAlgo.Robots
{
    [Robot(TimeZone = TimeZones.UTC)]
    public class CarbonTrendChannel2 : TrendChannelHedge1
    {
        [Parameter("Version", DefaultValue = "")]
        public string Version { get; set; }

        [Parameter("Channel Period", DefaultValue = 20)]
        public int mChannelPeriod { get; set; }

        [Parameter("MA Period", DefaultValue = 100)]
        public int mMAPeriod { get; set; }

        protected override void OnStart()
        {
            base.Label = this.Version;
            base.ChannelPeriod = mChannelPeriod;
            base.MAPeriod = mMAPeriod;
            base.RobotName = "debug";
            base.SettingKeyName = "testing";
            base.OnStart();
        }
    }
}

 


@pennyfx
Replies

Spotware
14 Oct 2013, 10:49

RE:

pennyfx said:

I'm using version 1.10.34111

I just noticed that one of my bots no longer works and is giving me this error.

"Crashed in OnTick with MissingMethodException: Method not Found: 'cAlgo.API.Indicators.WellesWilderSmoothing.get_Result()'"

There is no method get_Result() in the definition of WellesWilderSmoothing Indicator.

The correct syntax would be:

WellesWilderSmoothing wws;
...
wws = Indicators.WellesWilderSmoothing(source, period);
...
var lastValue = wws.Result.LastValue;

 

I'm using Visual Studio to build my robots and everything has worked fine until recently.  I noticed that you changes some DLL files that I usually reference.  I used to reference cAlgo.Indicators.dll and cAlgo.API.dll.  It looks like cAlgo.Indicators has been renamed to Frontend.Indicators, so I updated my references in VS and everything compiles.   I run my bots in cAlgo by setting my bot as a base class of a bot in cAlgo.   This way of doing things used to work fine in the past.   Here's my code.  

cAlgo.API.dll is the only reference you need in visual studio.


@Spotware

pennyfx
15 Oct 2013, 06:53

RE: RE:

I'm using the correct syntax.

 

ma = Indicators.WellesWilderSmoothing(this.MarketSeries.Close, 90);

int idx = ma.Result.Count-2;
double s1 = ma.Result[idx],
  s2 = ma.Result[idx - 1];


@pennyfx

Spotware
15 Oct 2013, 10:56

You can send us your full code to engage@spotware.com if you like, so that we can identify the error.


@Spotware

pennyfx
16 Oct 2013, 23:56

RE:

I just switched to a different moving average and everything worked.


@pennyfx

Spotware
17 Oct 2013, 10:30

RE: RE:

pennyfx said:

I just switched to a different moving average and everything worked.

Please try recompiling your code. There was a modification but if you recompile it should not give you any errors. 


@Spotware