Replies

PanagiotisCharalampous
19 Jun 2018, 09:22

Hi leohermoso,

This is not normal behavior. Can you please send troubleshooting information to us. Please press Ctrl+Alt+Shift+T, put the link to this discussion in the text box and press Submit.

Best Regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
18 Jun 2018, 17:06

Hi zedodia,

cBots should continue working even if you change tabs. You can work with cBots in both applications, as you did when the two applications were separated.

Best Regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
18 Jun 2018, 16:28

Hi sebo1999,

Could you be more specific on what example do you need? You can get the trading sessions from the  Symbol.MarketHours.Sessions property.

Best Regards,

Panagiotis

 


@PanagiotisCharalampous

PanagiotisCharalampous
18 Jun 2018, 15:24

Hi swingfish,

I tried it but I did not notice any problem. Positions are considered properly even if direction is reserved. Here is the code I used

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

namespace cAlgo.Robots
{
    [Robot(TimeZone = TimeZones.UTC, AccessRights = AccessRights.None)]
    public class NewcBot : Robot
    {
        [Parameter(DefaultValue = 0.0)]
        public double Parameter { get; set; }

        protected override void OnStart()
        {
            // Put your initialization logic here
        }

        protected override void OnTick()
        {
            long VolumeBuy = Positions.Where(x => x.TradeType == TradeType.Buy).Sum(x => -x.Volume);
            long VolumeSell = Positions.Where(x => x.TradeType == TradeType.Sell).Sum(x => x.Volume);
            Print("Buy: " + VolumeBuy);
            Print("Sell: " + VolumeSell);
        }

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

Best Regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
18 Jun 2018, 15:13

Hi Astroke,

cTrader accounts need to be linked to a cTID. So to get rid of an account, you should either link it to another email address or delete it. So if you do not wish to have an account anymore, you could also ask your broker to delete your account. But if your account is deleted then you will not be able to relink it or restore it. However it is still at the discretion of the broker to delete/unlink accounts.

Best Regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
18 Jun 2018, 14:29 ( Updated at: 21 Dec 2023, 09:20 )

Hi irmscher9,

I did...

Best Regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
18 Jun 2018, 09:37

Hi Patrick,

Here it is.

Best Regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
15 Jun 2018, 17:12 ( Updated at: 21 Dec 2023, 09:20 )

Dear Trader,

Here it is

Best Regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
15 Jun 2018, 17:01

Hi Carlos,

Please send me the indicator if possible and rename the cBot to something else. Also make sure that you reference the custom indicator.

Best Regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
15 Jun 2018, 16:54

Hi Carlos,

WedgeVolume is not an indicator, it is the robot itself. What are you trying to do with the above code?

Best Regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
15 Jun 2018, 09:35

Hi Carlos,

See below how to reference an indicator in a cBot

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

namespace cAlgo
{
    [Robot(TimeZone = TimeZones.UTC, AccessRights = AccessRights.None)]
    public class SamplecBotReferenceSMA : Robot
    {
        [Parameter("Source")]
        public DataSeries Source { get; set; }

        [Parameter("SMA Period", DefaultValue = 14)]
        public int SmaPeriod { get; set; }

        private SampleSMA sma;

        protected override void OnStart()
        {
            sma = Indicators.GetIndicator<SampleSMA>(Source, SmaPeriod);
        }

        protected override void OnTick()
        {
            Print("{0}", sma.Result.LastValue);
        }
    }
}

Best Regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
15 Jun 2018, 09:33

Hi leohermoso,

Please try rounding your TP to one decimal place and let me know if this fixes the error.

Best Regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
15 Jun 2018, 09:31

Dear Khalil,

Thanks for posting in our forum. This is currently not possible in cTrader. You could consider posting a suggestion in the Suggestions section of the forum.

Best Regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
15 Jun 2018, 09:17

Hi ycomp,

Currently you cannot add buttons on the charts. It is in our plans to incorporate such functionality in cAlgo.API. 

Best Regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
15 Jun 2018, 09:15

Hi rotcehmnz,

Thanks for posting in our forum. Could you please share with us some more information about the issue? Can you post a screenshot of what you say and makes you believe it is wrong?

Best Regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
14 Jun 2018, 15:53

Hi ycomp,

There is no such functionality currently.

Best Regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
14 Jun 2018, 11:51

Hi irmscher9,

This issue has been resolved with the latest update and I cannot reproduce it. Can you make sure you got the updates? If yes, can you please send a complete screenshot and try to reproduce it with a simpler setting i.e. only with a moving average?

Best Regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
14 Jun 2018, 10:37

17 bars? If yes, you can use the code I posted


@PanagiotisCharalampous

PanagiotisCharalampous
14 Jun 2018, 10:24

Hi hamidrtafx@gmail.com,

What does -17 represent? Bars, hours, anything else?

Best Regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
14 Jun 2018, 10:14

Hi hamidrtafx@gmail.com,

Here it is 

hartObjects.DrawVerticalLine("test", MarketSeries.Close.Count - 17, Colors.Red, 2);

Best Regards,

Panagiotis


@PanagiotisCharalampous