Replies

PanagiotisCharalampous
23 Mar 2020, 10:59

Hi,

I explained to you what is the problem with your code. If you don't know how to solve it or you are not familiar with C# programming, you can ask a professional to help you.

Best Regards,

Panagiotis 

Join us on Telegram


@PanagiotisCharalampous

PanagiotisCharalampous
23 Mar 2020, 10:26

Hi,

IsChecked is not an event handler but a property. It takes a boolean value. This is why you get the error. 

What are you trying to do?

Best Regards,

Panagiotis 

Join us on Telegram


@PanagiotisCharalampous

PanagiotisCharalampous
23 Mar 2020, 10:21

Hi,

If you mean the chart UI controls, then this is not possible. WinForms have their own controls. You can drag them on the form editor from Visual Studio toolbox.

Best Regards,

Panagiotis 

Join us on Telegram


@PanagiotisCharalampous

PanagiotisCharalampous
23 Mar 2020, 10:18

Hi Sascha,

See an example below

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; }

        Button _button;
        protected override void OnStart()
        {
            _button = new Button 
            {
                Text = "Click Me 1",
                Top = 100,
                Left = 100
            };
            var canvas = new Canvas 
            {
                            };
            canvas.AddChild(_button);
            Chart.AddControl(canvas);
            Chart.MouseMove += OnChartMouseMove;
        }

        void OnChartMouseMove(ChartMouseEventArgs obj)
        {
            _button.Top = obj.MouseY;
            _button.Left = obj.MouseX;
        }

        protected override void OnTick()
        {
            // Put your core logic here
        }

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

Best Regards,

Panagiotis 

Join us on Telegram

 


@PanagiotisCharalampous

PanagiotisCharalampous
23 Mar 2020, 09:35

Hi dannyilumi,

What should it do instead?

Best Regards,

Panagiotis 

Join us on Telegram

 


@PanagiotisCharalampous

PanagiotisCharalampous
23 Mar 2020, 09:22 ( Updated at: 21 Dec 2023, 09:21 )

RE: RE:

dordkash@gmail.com said:

PanagiotisCharalampous said:

Hi xavier.affringue,

See an example below

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

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

        private Form1 _f1;
        private Thread _thread;

        protected override void Initialize()
        {
            _f1 = new Form1();
            _thread = new Thread(() => _f1.ShowDialog());
            _thread.SetApartmentState(ApartmentState.STA);
            _thread.Start();

        }

        public override void Calculate(int index)
        {
            // Calculate value at specified index
            // Result[index] = ...
        }
    }
}


Best Regards,

Panagiotis

Dear PanagiotisCharalampous

Please paste this code with a button or Stakepanel
I'm confused and this is very helpful
Thankful

Hi,

Where do you want to add the button or stackpanel?

Best Regards,

Panagiotis 

Join us on Telegram

 


@PanagiotisCharalampous

PanagiotisCharalampous
23 Mar 2020, 09:17 ( Updated at: 21 Dec 2023, 09:21 )

RE: RE:

dordkash@gmail.com said:

ClickAlgo said:

I forgot to mention, you do not need to write the GUI (presentation) code, just create your form with the controls and open the Form.Designer.cs file and copy and paste into your Indicator, you can can then create nice and clean complex forms in a very short time.

HI

TextBoxes dont work

Please correct it
It can be very useful
Thankful

Hi,

Can you explain what do you mean?

Best Regards,

Panagiotis 

Join us on Telegram

 


@PanagiotisCharalampous

PanagiotisCharalampous
23 Mar 2020, 09:12

Hi TSepp,

Yes this is correct. cTrader Automate is only available in cTrader Desktop.

Best Regards,

Panagiotis 

Join us on Telegram

 


@PanagiotisCharalampous

PanagiotisCharalampous
23 Mar 2020, 09:06 ( Updated at: 21 Dec 2023, 09:21 )

Hi Sune,

ChartMouseEventArgs also has a YValue property. See below

Best Regards,

Panagiotis 

Join us on Telegram


@PanagiotisCharalampous

PanagiotisCharalampous
23 Mar 2020, 09:01

Hi tb135qet13,

There is no such option for this method. you can try Chart.DrawText() instead which allows you to draw text at a specific bar index and price level.

Best Regards,

Panagiotis 

Join us on Telegram

 


@PanagiotisCharalampous

PanagiotisCharalampous
23 Mar 2020, 08:54 ( Updated at: 21 Dec 2023, 09:21 )

RE: RE:

dordkash@gmail.com said:

 

var checkBox = new CheckBox()
{
    Text = "Show Volume",
    IsChecked = Chart.DisplaySettings.TickVolume,
    VerticalAlignment = VerticalAlignment.Top,
    HorizontalAlignment = HorizontalAlignment.Left,
    Margin = 5
};
checkBox.Click += e => Chart.DisplaySettings.TickVolume = e.CheckBox.IsChecked.Value;
Chart.AddControl(checkBox);

Hi
what is the problem?

            var checkBox = new CheckBox 
            {

                Text = "Show SYMBOLS",
                IsChecked = Chart.AddControl(STMU),
                VerticalAlignment = VerticalAlignment.Top,
                HorizontalAlignment = HorizontalAlignment.Left,
                Margin = "70 0"
            };
            checkBox.Click += e => Chart.AddControl(STMU) = e.CheckBox.IsChecked.Value;
            Chart.AddControl(checkBox);

Error CS0029: Cannot implicitly convert type 'void' to 'bool?'

Error CS0131: The left-hand side of an assignment must be a variable, property or indexer

Error CS0029: Cannot implicitly convert type 'bool' to 'void'

Hi,

Your problem is here

 IsChecked = Chart.AddControl(STMU)

What are you trying to do?

Best Regards,

Panagiotis 

Join us on Telegram

 


@PanagiotisCharalampous

PanagiotisCharalampous
23 Mar 2020, 08:49 ( Updated at: 21 Dec 2023, 09:21 )

Hi colel1410,

Go to your Backtesting Settings and choose Tick Data from Server

Best Regards,

Panagiotis 

Join us on Telegram

 


@PanagiotisCharalampous

PanagiotisCharalampous
23 Mar 2020, 08:46

Hi Sune,

Can you provide us with some screenshots showing this?

Best Regards,

Panagiotis 

Join us on Telegram

 


@PanagiotisCharalampous

PanagiotisCharalampous
23 Mar 2020, 08:40 ( Updated at: 21 Dec 2023, 09:21 )

Hi travkinsm1,

It seems ok to me

Can you provide more information regarding what do you think is the problem?

Best Regards,

Panagiotis 

Join us on Telegram

 


@PanagiotisCharalampous

PanagiotisCharalampous
23 Mar 2020, 08:27

Hi douglascvas.

There is no such feature at the moment.

Best Regards,

Panagiotis 

Join us on Telegram

 


@PanagiotisCharalampous

PanagiotisCharalampous
23 Mar 2020, 08:26

Hi daianevinhas,

Can you explain what do you mean when you say "moving media"? How do you want to add it to the MACD indicator? As an additional output?

Best Regards,

Panagiotis 

Join us on Telegram

 


@PanagiotisCharalampous

PanagiotisCharalampous
23 Mar 2020, 08:23

Hi there,

Can you provide the complete source code and explain what is the problem?

Best Regards,

Panagiotis 

Join us on Telegram


@PanagiotisCharalampous

PanagiotisCharalampous
23 Mar 2020, 08:20

Hi Timothe,

Which broker's application do you use?

Best Regards,

Panagiotis 

Join us on Telegram

 


@PanagiotisCharalampous

PanagiotisCharalampous
23 Mar 2020, 08:19

Hi Pakab,

Please check your spam folder. If the email is not there make sure that noreply@ctrader.com is added itothe safe senders list and try again.

Best Regards,

Panagiotis 

Join us on Telegram

 


@PanagiotisCharalampous

PanagiotisCharalampous
20 Mar 2020, 17:09

Hi AlgoTraderHu,

Can you check now?

Best Regards,

Panagiotis 

Join us on Telegram


@PanagiotisCharalampous