Topics
23 Oct 2023, 22:43
 371
 2
19 Oct 2023, 13:04
 456
 5
01 Oct 2023, 22:33
 575
 1
13 Oct 2022, 10:20
 724
 2
24 Dec 2020, 04:37
 0
 910
 1
24 Dec 2020, 04:35
 0
 886
 1
24 Dec 2020, 04:34
 0
 897
 1
24 Dec 2020, 04:33
 1
 1350
 5
Replies

acrigney
02 Jul 2018, 07:11

Any update on this guys?


@acrigney

acrigney
04 Jun 2018, 03:51

No symbols loaded for cTrader 3.0

Please help!

I have installed the latest cBots from the visual studio market place but I am unable to debug my cbots, I get No symbols loaded.

I created a new cBot and I am still unable to set a break point in the OnStart() event or OnBar events

I tried all of these options.

https://stackoverflow.com/questions/2155930/how-do-i-remedy-the-the-breakpoint-will-not-currently-be-hit-no-symbols-have-b

 

But there are no pdb files generated in the bin folder of the project, the name.algo file gets generated in the Robots folder ok.

 

Best Regards,

                    Alistair


@acrigney

acrigney
25 May 2018, 02:24

RE:

I was unable to get VS2017 working again with cAlgo on my new machine, can you send me your mainfest file. I am using VS2017 Version 15.5.3

Panagiotis Charalampous said:

Hi juangmez87,

I have both versions and did not experience this issue. Anyway, by next week you should have received cTrader 3.0 for ICMarkets as well, therefore you should not have this issue anymore.

Best Regards,

Panagiotis

 


@acrigney

acrigney
10 Aug 2017, 08:59

RE:

Sorry I tried this new version and it did not work. When I went to install i.e double click the vsx file it found the VS2017 community version but then it said if I installed the extension was not compatible with VS2017 and would make VS2017 unstable

 

Spotware said:

Dear acrigney,

You should modify the vsixmanifest by adding the node for the VS2107 edition. The edition version is 15.1. See the following example

<?xml version="1.0" encoding="utf-8"?>

<Vsix Version="1.0.0" xmlns="http://schemas.microsoft.com/developer/vsx-schema/2010">
  <Identifier Id="2c72cc50-6c69-4b16-b1f4-ab470673f284">
    <Name>cBots and Custom Indicators</Name>
    <Author>Spotware</Author>
    <Version>1.4</Version>
    <License>EULA.txt</License>
    <Description xml:space="preserve">Building cBots and Custom Indicators in Visual Studio</Description>
    <Locale>1033</Locale>
    <InstalledByMsi>false</InstalledByMsi>
    <SupportedProducts>
      <VisualStudio Version="10.0">
        <Edition>Pro</Edition>
      </VisualStudio>
      <VisualStudio Version="11.0">
        <Edition>Pro</Edition>
      </VisualStudio>
      <VisualStudio Version="12.0">
        <Edition>Pro</Edition>
      </VisualStudio>
<VisualStudio Version="13.0">
  <Edition>Community</Edition>
</VisualStudio>
<VisualStudio Version="14.0">
  <Edition>Community</Edition>
</VisualStudio>
<VisualStudio Version="15.0">
  <Edition>Community</Edition>
</VisualStudio>
<VisualStudio Version="15.1">
  <Edition>Community</Edition>
</VisualStudio>
    </SupportedProducts>
    <SupportedFrameworkRuntimeEdition MinVersion="4.0" MaxVersion="4.0" />
  </Identifier>
  <References>
    <Reference Id="Microsoft.VisualStudio.MPF" MinVersion="10.0">
      <Name>Visual Studio MPF</Name>
    </Reference>
  </References>
  <Content>
    <VsPackage>VSExtension.pkgdef</VsPackage>
  </Content>
</Vsix>

Best Regards,

cTrader Team

 


@acrigney

acrigney
02 Aug 2017, 06:52

RE:

Sorry guys its all good now. I am was just testing the indicators. I have big plans for your tool with AI stuff!!

Spotware said

using System;
using System.Linq;
using cAlgo.API;
using cAlgo.API.Indicators;
using cAlgo.API.Internals;
using cAlgo.Indicators;
using GA.DataTypes;
using System.Diagnostics;
using AroonUpDownIndicator;
using GA.GATrader;
using GA.Algorithm.Strategies;

namespace cAlgo
{
    [Robot(TimeZone = TimeZones.UTC, AccessRights = AccessRights.FullAccess)]
    public partial class GATraderNew : Robot
    {
        private InstrumentPopulation _forexPopulation;
        [Parameter()]
        public DataSeries SourceSeries { get; set; }

        [Parameter("Slow Periods", DefaultValue = 10)]
        public int SlowPeriods { get; set; }

        [Parameter("Fast Periods", DefaultValue = 5)]
        public int FastPeriods { get; set; }

        [Parameter("Quantity (Lots)", DefaultValue = 1, MinValue = 0.01, Step = 0.01)]
        public double Quantity { get; set; }

        private MovingAverage slowMa;
        private MovingAverage fastMa;
        private const string label = "Sample Trend cBot";
        private AcceleratorOscillator _acceleratorOscillator;

        private AccumulativeSwingIndex _accumulativeSwingIndex;
        [Parameter("Limit Move", DefaultValue = 12)]
        public int LimitMove { get; set; }
        [Output("Main")]
        public IndicatorDataSeries Result { get; set; }
        private AroonUpDown _aroonUpDownIndicator;

        [Parameter("AroonPeriods", DefaultValue = 25)]
        public int AroonPeriods { get; set; }

        private AverageTrueRange _averageTrueRange;
        [Parameter(DefaultValue = 14)]
        public int AverageTrueRangePeriods { get; set; }
        [Parameter(DefaultValue = 0.002)]
        public double SimpleATRValue { get; set; }
        [Parameter("AverageTrueRange MA Type", DefaultValue = MovingAverageType.Simple)]
        public MovingAverageType AverageTrueRangeMAType { get; set; }

        [Parameter("MovingAveragePeriods", DefaultValue = 25)]
        public int MovingAveragePeriods { get; set; }

        [Parameter("MovingAverageMAType MA Type", DefaultValue = MovingAverageType.Simple)]
        public MovingAverageType MovingAverageMAType { get; set; }

        private MovingAverage _movingAverage;

        protected override void OnStart()
        {
            Tech.IndicatorsAccessor = Indicators;
            _acceleratorOscillator = Indicators.AcceleratorOscillator();
            //var xx =acceleratorOscillator.;
            double value = _acceleratorOscillator.Result[0];
            //Debug.WriteLine("AcceleratorOscillator = {0}", value);
            _accumulativeSwingIndex = Indicators.AccumulativeSwingIndex(LimitMove);

            var x = _accumulativeSwingIndex.Result[0];

            string res = String.Format("ASI {0}, {1} {2}", _accumulativeSwingIndex.Result.LastValue, _accumulativeSwingIndex.Result.Maximum(_accumulativeSwingIndex.Result.Count - 1), DateTime.Now.ToLocalTime());
            Print(res);

            _aroonUpDownIndicator = Indicators.GetIndicator<AroonUpDown>(AroonPeriods);

            x = _aroonUpDownIndicator.ResultAroonUp[0];
            var y = _aroonUpDownIndicator.ResultAroonUp[0];
            int c = _aroonUpDownIndicator.ResultAroonUp.Count;

            res = String.Format("AroonUpDownIndicator Up {0}, AroonUpDownIndicator down {1}, {2} count= {3}", _aroonUpDownIndicator.ResultAroonUp.LastValue, _aroonUpDownIndicator.ResultAroonDown.LastValue, DateTime.Now.ToLocalTime(), c);
            Print(res);

            _averageTrueRange = Indicators.AverageTrueRange(AverageTrueRangePeriods, AverageTrueRangeMAType);

            x = _averageTrueRange.Result[0];

            res = String.Format("AverageTrueRange {0} {1} count= {2}", _averageTrueRange.Result.LastValue, DateTime.Now.ToLocalTime(), _averageTrueRange.Result.Count);
            Print(res);

            _movingAverage = Indicators.MovingAverage(SourceSeries, MovingAveragePeriods, MovingAverageMAType);

            res = String.Format("MovingAverage {0} {1} count= {2}", _movingAverage.Result.LastValue, DateTime.Now.ToLocalTime(), _movingAverage.Result.Count);
            Print(res);

            //Indicators.Aroon(AroonPeriods);
            //fastMa = Indicators.MovingAverage(Source, FastPeriods, MAType);
            //Tech.FastMa = fastMa;
            //var x = Indicators.AverageTrueRange(AverageTrueRangePeriods, AverageTrueRangeMovingAverageType);
            //Indicators.Aroon(AroonPeriods);
            //Indicators.Aroon(AroonPeriods);
            //Indicators.Aroon(AroonPeriods);
            //Indicators.Aroon(AroonPeriods);
            //Indicators.Aroon(AroonPeriods);
            //sma = Indicators.GetIndicator<SampleSMA>(Source, SmaPeriod);

        }

        //protected override void OnTick()
        //{
        //    Print("Current value {0}", MarketSeries.Open.Last(0));
        //    // current value
        //    Print("Previous value {0}", MarketSeries.High.Last(1));
        //    // previous value
        //    Print("The server time is: {0}", Server.Time);
        //    Print(String.Format("tick start {0}", DateTime.Now.ToLocalTime()));
        //    //_acceleratorOscillator = Indicators.AcceleratorOscillator();
        //    ////var xx =acceleratorOscillator.;
        //    //double value = _acceleratorOscillator.Result[0];
        //    //Debug.WriteLine("AcceleratorOscillator = {0}", value);
        //    //_accumulativeSwingIndex = Indicators.AccumulativeSwingIndex(LimitMove);

        //    //var x = _accumulativeSwingIndex.Result[0];

        //    //string res = String.Format("ASI {0}, {1} {2}", _accumulativeSwingIndex.Result.LastValue, _accumulativeSwingIndex.Result.Maximum(_accumulativeSwingIndex.Result.Count - 1), DateTime.Now.ToLocalTime());
        //    //Print(res);

        //    //x = _aroonUpDownIndicator.ResultAroonUp[0];
        //    //var y = _aroonUpDownIndicator.ResultAroonUp[0];
        //    //int c = _aroonUpDownIndicator.ResultAroonUp.Count;

        //    //res = String.Format("AroonUpDownIndicator Up {0}, AroonUpDownIndicator down {1}, {2} count= {3}", _aroonUpDownIndicator.ResultAroonUp.LastValue, _aroonUpDownIndicator.ResultAroonDown.LastValue, DateTime.Now.ToLocalTime(), c);
        //    //Print(res);
        //    //x = _averageTrueRange.Result[0];

        //    //res = String.Format("AverageTrueRange {0} {1} count= {2}", _averageTrueRange.Result.LastValue, DateTime.Now.ToLocalTime(), _averageTrueRange.Result.Count);
        //    //Print(res);

        //    //res = String.Format("MovingAverage {0} {1} count= {2}", _movingAverage.Result.LastValue, DateTime.Now.ToLocalTime(), _movingAverage.Result.Count);
        //    //Print(res);
        //    //Print(String.Format("hello {0}", DateTime.Now.ToLocalTime()));
        //    ////Indicators.Aroon(AroonPeriods);
        //    ////fastMa = Indicators.MovingAverage(Source, FastPeriods, MAType);
        //    ////Tech.FastMa = fastMa;
        //    ////var x = Indicators.AverageTrueRange(AverageTrueRangePeriods, AverageTrueRangeMovingAverageType);
        //    ////Indicators.Aroon(AroonPeriods);
        //    ////Indicators.Aroon(AroonPeriods);
        //    ////Indicators.Aroon(AroonPeriods);
        //    ////Indicators.Aroon(AroonPeriods);
        //    ////Indicators.Aroon(AroonPeriods);
        //    ////sma = Indicators.GetIndicator<SampleSMA>(Source, SmaPeriod);
        //}

        protected override void OnBar()
        {
            Print("On Bar Start");
            _acceleratorOscillator = Indicators.AcceleratorOscillator();
            //var xx =acceleratorOscillator.;
            double value = _acceleratorOscillator.Result[0];
            Debug.WriteLine("AcceleratorOscillator = {0}", value);
            _accumulativeSwingIndex = Indicators.AccumulativeSwingIndex(LimitMove);

            var x = _accumulativeSwingIndex.Result[0];

            string res = String.Format("ASI {0}, {1} {2}", _accumulativeSwingIndex.Result.LastValue, _accumulativeSwingIndex.Result.Maximum(_accumulativeSwingIndex.Result.Count - 1), DateTime.Now.ToLocalTime());
            Print(res);

            x = _aroonUpDownIndicator.ResultAroonUp[0];
            var y = _aroonUpDownIndicator.ResultAroonUp[0];
            int c = _aroonUpDownIndicator.ResultAroonUp.Count;

            res = String.Format("AroonUpDownIndicator Up {0}, AroonUpDownIndicator down {1}, {2} count= {3}", _aroonUpDownIndicator.ResultAroonUp.LastValue, _aroonUpDownIndicator.ResultAroonDown.LastValue, DateTime.Now.ToLocalTime(), c);
            Print(res);
            x = _averageTrueRange.Result[0];

            res = String.Format("AverageTrueRange {0} {1} count= {2}", _averageTrueRange.Result.LastValue, DateTime.Now.ToLocalTime(), _averageTrueRange.Result.Count);
            Print(res);

            res = String.Format("MovingAverage {0} {1} count= {2}", _movingAverage.Result.LastValue, DateTime.Now.ToLocalTime(), _movingAverage.Result.Count);
            Print(res);
            Print(String.Format("hello {0}", DateTime.Now.ToLocalTime()));
            Print("On Bar Stop");
            //Indicators.Aroon(AroonPeriods);
            //fastMa = Indicators.MovingAverage(Source, FastPeriods, MAType);
            //Tech.FastMa = fastMa;
            //var x = Indicators.AverageTrueRange(AverageTrueRangePeriods, AverageTrueRangeMovingAverageType);
            //Indicators.Aroon(AroonPeriods);
            //Indicators.Aroon(AroonPeriods);
            //Indicators.Aroon(AroonPeriods);
            //Indicators.Aroon(AroonPeriods);
            //Indicators.Aroon(AroonPeriods);
            //sma = Indicators.GetIndicator<SampleSMA>(Source, SmaPeriod);
        }

        protected override void OnStop()
        {
            // Put your deinitialization logic here
        }
    }
}

Dear acrigney,

Thanks for posting your question in the forum. We tried to run your cBot but the build fails with 11 errors. Community members will probably not spend their time fixing the cBot. You will increase your chances of getting an answer if you provide a cBot that is working and make your questions more specific. For example, you say that you don't get valid numbers for the indicators. What numbers do you get and what would you expect to get?

If you could provide us with a working cBot as well as some numbers that you think are not valid, we would be more than happy to have a look at it.

Best Regards,

cTradet Team

 


@acrigney

acrigney
02 Aug 2017, 06:48

RE:

Spotware said:

Dear acrigney,

Many thanks for your nice words. We plan to start working on officially supporting Visual Studio 2015 and 2017 soon. Until official support is released, you can use this workaround provided by the community /forum/calgo-support/8514. We have tested it as well and it works fine.

Best Regards,

cTrader Team

Yes it works for VS2015 fine but not with VS2017 when I last tried it.


@acrigney

acrigney
20 Jul 2017, 11:37

RE:

ctid320188 said:

Hi,

I've got my robot all working and it references several external DLL's e.g. Newtonsoft.Json. This all works for me but when I build the robot as it puts absolute paths to these dll's e.g. 

C:\Users\Fred\Documents\cAlgo\Sources\Robots\MyBot\MyBot\dll\Newtonsoft.Json.dll

This is all fine for my pc but if I want to then distribute this robot to other users their paths will be different or different drive letter etc.

Is there a way to make this relative to the location of the robot algo file? or combine these dll's into a production algo file with the robot?

Thanks

Even better if you could make it a cloud service that people could publish to their own PC or external servers or cloud server?


@acrigney

acrigney
14 Jul 2017, 05:56

RE:

Spotware said:

Dear Trader,

It will be available in the near future. However, we cannot provide you with an ETA.

 

Love your work guys!!

But any update on when there will be support for VS2017 and when will debugging with VS2015/2017 will be available?

Best Regards,

                      Alistair


@acrigney