PanagiotisCharalampous's avatar
PanagiotisCharalampous
26 follower(s) 0 following 1006 subscription(s)
Replies

PanagiotisCharalampous
26 Oct 2018, 09:12

Hi Sasha,

Use IsOpened function.

Best Regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
24 Oct 2018, 12:46

Hi Adam,

cTrader Copy is a pure equity to equity platform. Therefore the invested amount will always be proportional to the amount invested by the strategy provider.

Best Regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
24 Oct 2018, 10:09

Hi lec0456,

Yes you can and you can use in conjunction with visual backtesting as well.

Best Regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
24 Oct 2018, 10:06

Hi netread2004,

MsgType(35)=G is not supported at the moment.

Best Regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
23 Oct 2018, 10:24

Hi deanblackfx,

What is the problem with TradersWay? I am not sure what do you mean with "no banner to connect strategies and copying is the only thing enabled". What banners are you reffering too? What do you mean "copying is the only thing enabled"? What else would you expect to see?

Best Regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
23 Oct 2018, 10:11

Hi Adam,

Why do you say so? Proportional equity is a feature of cTrader Copy.

Best Regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
23 Oct 2018, 10:05

Hi helex93,

Usually you get this error when the volume used in the order is not appropriate. However the information provided is not enough to determine the cause of the issue. Can you provide more information? Is this caused by a cBot? Can you share the cBot and cBot parameters? If we manage to reproduce the problem, then we might be able to provide an explanation.

Best Regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
22 Oct 2018, 14:33

Here is an example

            var dictionary = new Dictionary<int, int>();
            dictionary.Add(1, 3);
            dictionary.Add(2, 5);
            dictionary.Add(3, 1);
            dictionary.Add(4, 2);
            dictionary.Add(5, 9);
            dictionary.Add(6, 4);
            dictionary.Add(7, 7);
            dictionary.Add(8, 6);
            dictionary.Add(9, 10);
            dictionary.Add(10, 8);

            foreach (var v in dictionary.OrderBy(x => x.Value).Take(5))
            {
                Print("Index: " + v.Key + " Value: " + v.Value);
            }

Best Regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
22 Oct 2018, 14:24

If you will handle the form yourself and create the orders then you can still use the label.


@PanagiotisCharalampous

PanagiotisCharalampous
22 Oct 2018, 14:18

Ok, in this case you could consider using the comments. You can type a comment during order creation and then read it from the code and act accordingly


@PanagiotisCharalampous

PanagiotisCharalampous
22 Oct 2018, 11:19

Hi Sasha,

OrderBy will not sort the original list/dictionary. It will return a new sorted instance.

Best Regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
22 Oct 2018, 11:16

Hi Sasha,

You mean that your cBot should pick up on managing the order/position?

Best Regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
22 Oct 2018, 11:12 ( Updated at: 23 Jan 2024, 13:16 )

Hi deanblackfx,

Thanks for posting in our forum. Please find below the answers to your questions.

1. No, the entire copying process is taking place on our servers.
2. Performance fee (if it is set by the provider) are calculated based on profits of copied trades. Non copied trades are not considered. You can find more information here.
3. No, we do not have such plans.
4. Since cTrader Copy is an Equity to Equity model, there will not be such an option.
5. There is already an Equity Spot Loss feature. See more information [here].
6. cTrader Copy service offers strategies from various brokers. If you wish to white label cTrader Copy service and control which strategies will be provided in your service, then you should contact our sales department for more information about the available options.

Best Regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
22 Oct 2018, 10:38

Hi Sasha,

You can use the following tools

1. Dictionary. Add your entries as values and your index as keys.

2, Sort function. Sort your dictionary using the keys.

3. Take function. Take the top x entries of the sorted dictionary.

Let me know if the above helps.

Best Regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
22 Oct 2018, 10:28

Hi Sasha,

No there aren't such collections available.

Best Regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
22 Oct 2018, 10:25

Hi Sasha,

If you mean to execute an order manually while the cBot is running then yes, this is possible.

Best Regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
19 Oct 2018, 15:19

Hi freemangreat,

The Chart object is available in Spotware cTrader Beta 3.3. It will be rolled out to brokers soon.

Best Regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
19 Oct 2018, 14:41

Hi freemangreat,

Thanks, use the code below

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

namespace cAlgo
{
    [Indicator(IsOverlay = false, TimeZone = TimeZones.UTC, AccessRights = AccessRights.None)]
    public class Test : Indicator
    {
        [Parameter(DefaultValue = 0.0)]
        public double Parameter { get; set; }

        [Output("Main")]
        public IndicatorDataSeries Result { get; set; }


        protected override void Initialize()
        {
            // Initialize and create nested indicators
        }

        public override void Calculate(int index)
        {
            ChartObjects.DrawHorizontalLine("Test", Symbol.Bid, Colors.AliceBlue);
        }
    }
}

Best Regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
19 Oct 2018, 14:18

Hi nh.zadeh,

See below

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

namespace cAlgo.Indicators
{
    [Indicator(IsOverlay = true, TimeZone = TimeZones.UTC)]
    public class NasserMFT : Indicator
    {
        [Parameter(DefaultValue = 15)]
        public int Period1 { get; set; }

        [Parameter(DefaultValue = 30)]
        public int Period2 { get; set; }


        [Parameter("EMAs Timeframe1", DefaultValue = "Minute15")]
        public TimeFrame EMATimeframe1 { get; set; }

        [Parameter("EMAs Timeframe2", DefaultValue = "Hour4")]
        public TimeFrame EMATimeframe2 { get; set; }

        [Output("EMA1", Color = Colors.Red)]
        public IndicatorDataSeries EMA1 { get; set; }

        [Output("EMA2", Color = Colors.ForestGreen)]
        public IndicatorDataSeries EMA2 { get; set; }

        [Output("EMA3", Color = Colors.BlueViolet)]
        public IndicatorDataSeries EMA3 { get; set; }

        [Output("EMA4", Color = Colors.Violet)]
        public IndicatorDataSeries EMA4 { get; set; }

        private MarketSeries seriesM15;
        private MarketSeries seriesH4;

        private ExponentialMovingAverage Ema1;
        private ExponentialMovingAverage Ema2;
        private ExponentialMovingAverage Ema3;
        private ExponentialMovingAverage Ema4;

        protected override void Initialize()
        {
            seriesM15 = MarketData.GetSeries(EMATimeframe1);
            seriesH4 = MarketData.GetSeries(EMATimeframe2);

            Ema1 = Indicators.ExponentialMovingAverage(seriesM15.Close, Period1);
            Ema2 = Indicators.ExponentialMovingAverage(seriesM15.Close, Period2);
            Ema3 = Indicators.ExponentialMovingAverage(seriesH4.Close, Period1);
            Ema4 = Indicators.ExponentialMovingAverage(seriesH4.Close, Period2);
        }

        public override void Calculate(int index)
        {
            if (!IsLastBar)
            {
                var index1 = GetIndexByDate(seriesM15, MarketSeries.OpenTime[index]);
                if (index1 != -1)
                {
                    EMA1[index] = Ema1.Result[index1];
                }

                var index2 = GetIndexByDate(seriesM15, MarketSeries.OpenTime[index]);
                if (index2 != -1)
                {
                    EMA2[index] = Ema2.Result[index2];
                }

                var index3 = GetIndexByDate(seriesH4, MarketSeries.OpenTime[index]);
                if (index3 != -1)
                {
                    EMA3[index] = Ema3.Result[index3];
                }

                var index4 = GetIndexByDate(seriesH4, MarketSeries.OpenTime[index]);
                if (index4 != -1)
                {
                    EMA4[index] = Ema4.Result[index4];
                }
            }
            else
            {

                EMA1[index] = Ema1.Result.LastValue;

                EMA2[index] = Ema2.Result.LastValue;

                EMA3[index] = Ema3.Result.LastValue;

                EMA4[index] = Ema4.Result.LastValue;
            }



        }


        private int GetIndexByDate(MarketSeries series, DateTime time)
        {


            for (int i = series.Close.Count - 1; i > 0; i--)
            {
                if (time == series.OpenTime[i])
                    return i;
            }
            return -1;
        }
    }
}

Best Regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
19 Oct 2018, 14:09

Hi freemangreat,

Which version of cTrader do you use?

Best Regards,

Panagiotis


@PanagiotisCharalampous