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

PanagiotisCharalampous
07 Nov 2018, 09:36

Hi anghenly,

When this happens, can you please send troubleshooting information to us. To do so, when in cTrader press Ctrl+Alt+Shift+T, paste the link to this discussion in the text box and press Submit.

Best Regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
06 Nov 2018, 10:52

Hi work.halligan,

Unfortunately we can still not reproduce it. Can you record a short video? Maybe you are doing something we are not.

Best Regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
06 Nov 2018, 10:35

Hi hsbcstor,

1) No this is the proxy for v1.0. For v2.0 you need to use demo.ctraderapi.com for demo accounts and live.ctraderapi.com for live accounts. You can also find an example in C# here

2) Which broker's account is it? Does this happen every time you send this message or was it something temporary?

Best Regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
06 Nov 2018, 10:07

Hi hsbcstor,

Thanks for posting in our forum. Regarding your questions.

1) Open API v2.0 has not been officially released yet, however it has been deployed on production servers and being tested and used by some major partners. The message you receive indicates that you are not using the correct proxy. Can you please advise which proxy do you use?

2) Yes you can use FIX API with demo accounts.

Best Regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
06 Nov 2018, 09:46

Hi equantfx,

Thanks for reporting issue 1. We will have a look into it and fix it. 

Regarding issue 2, this is not how things work. Position entry price changes when position size increases but not when it partially closes. Therefore when ATP1 1 is hit, the profitability of the position in terms of pips will not be affected and ATP2 will still be triggered 10 pips above the entry price.

Best Regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
05 Nov 2018, 17:38

Hi work.halligan,

Unfortunately I cannot reproduce. Any chance you can record a short video and send it to us?

Best Regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
05 Nov 2018, 14:35

Hi 1222Ht,

I would not advise you to use such methods as they are not officially supported. Element names could change at any time.

Best Regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
05 Nov 2018, 14:20

Hi Alexander,

You can have a flag in your cBot and make it true or false each time you start and stop your cBot.

Best Regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
05 Nov 2018, 12:53

Hi anghenly,

Currently It is not possible to remove the buttons on the left.

Best Regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
05 Nov 2018, 12:33

Hi rolycpt,

Thank you for posting in our forum. There is a plan to incorporate cTrader Copy in the desktop application but there are no estimations yet about when will this happen.

Best Regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
05 Nov 2018, 12:18 ( Updated at: 21 Dec 2023, 09:20 )

Hi anghenly,

There is a special button for this. See below

Best Regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
05 Nov 2018, 12:15 ( Updated at: 21 Dec 2023, 09:20 )

Hi tasr1r1,

There is a special button that allows you to reattach the chart. See below

Best Regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
05 Nov 2018, 10:43

Hi Alexander,

It should be easy to convert it to an Indicator. Regarding the trasparency, you can use FromARGB and adjust the alpha of your color. 

Best Regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
05 Nov 2018, 10:32

Hi Sasha,

We do not have plans to develop this. You can develop it yourself by using the Chart.MouseDown event to read the price level when the mouse is clicked. See below an example.

using cAlgo.API;
using cAlgo.API.Internals;
using System;
using System.Collections.Generic;
using System.Linq;

namespace cAlgo.Robots
{
    [Robot(TimeZone = TimeZones.RussianStandardTime, AccessRights = AccessRights.FullAccess)]
    public class newcBot : Robot
    {

        protected override void OnStart()
        {          
            Chart.MouseDown += Chart_MouseDown;          
        }

        private void Chart_MouseDown(ChartMouseEventArgs obj)
        {
            Print("Price: " + obj.YValue);
        }
    }
}

Best Regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
05 Nov 2018, 10:07

Hi kontdospamu5,

Since there are more than one issues discussed in this thread could you please explicitely state which problem are you referring to? At the moment, cTrader Automate API is not thread safe.

Best Regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
05 Nov 2018, 10:01

Hi kontodospamu5,

The above is just an example and assumes that you will develop your UpdateLabel() function. The function will be a part of the form and will update your label or anything else you wish it to do. 

Best Regards,

Panagiotis

 


@PanagiotisCharalampous

PanagiotisCharalampous
05 Nov 2018, 09:36

Hi Alex, 

We have already started rolling out 3.3 to brokers.

Best Regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
05 Nov 2018, 09:30

Hi Mastah1238,

Thank you for posting in our forum. If you need professional help, you can consider posting a Job or contacting a Consultant.

Best Regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
02 Nov 2018, 15:39

Is it this what you need?

using cAlgo.API;
using cAlgo.API.Internals;
using System;
using System.Collections.Generic;
using System.Linq;

namespace cAlgo.Robots
{
    [Robot(TimeZone = TimeZones.RussianStandardTime, AccessRights = AccessRights.FullAccess)]
    public class SandDTrader3 : Robot
    {
        [Parameter("Source")]
        public DataSeries Source { get; set; }

        [Parameter("LookBackDays", DefaultValue = 800)]
        public int Bars { get; set; }

        private Dictionary<int, double> highsDict = new Dictionary<int, double>();
        private Dictionary<int, double> lowsDict = new Dictionary<int, double>();
        private int index, _index;
        private double high, low, value, _high, _low;
        private Colors color;

        protected override void OnStart()
        {
            for (int k = 1; k < Bars; k++)
            {
                highsDict.Add(k, MarketSeries.High.Last(k));
                lowsDict.Add(k, MarketSeries.Low.Last(k));
            }          

            var high = highsDict.OrderByDescending(x => x.Value).First();          
            ChartObjects.DrawLine("High" + high.Key, MarketSeries.OpenTime.Last(high.Key), high.Value, MarketSeries.OpenTime.Last(0), high.Value, Colors.Aqua, 1, LineStyle.Solid);
            ChartObjects.DrawText(high.Key.ToString(), "Price = " + high.Value, _index, high.Value, VerticalAlignment.Top, HorizontalAlignment.Right, Colors.DarkGray);

            var low = lowsDict.OrderBy(x => x.Value).First();           
            ChartObjects.DrawLine("Low" + low.Key, MarketSeries.OpenTime.Last(low.Key), low.Value, MarketSeries.OpenTime.Last(0), low.Value, Colors.Red, 1, LineStyle.Solid);
            ChartObjects.DrawText(low.Key.ToString(), "Price = " + low.Value, _index, low.Value, VerticalAlignment.Top, HorizontalAlignment.Right, Colors.DarkGray);
        }
    }
}

Best Regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
02 Nov 2018, 15:19

Hi Alexander,

Can you please confirm that what you are looking for is the highest and lowest values for a number of bars? It is hard to understand from the code what are you trying to do.

Best Regards,

Panagiotis


@PanagiotisCharalampous