
Topics
Replies
PanagiotisCharalampous
24 Mar 2020, 08:32
( Updated at: 21 Dec 2023, 09:21 )
Hi travkinsm1,
It seems ok to me
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
24 Mar 2020, 08:25
Hi Nobody,
You can use Chart.DrawEquidistantChannel() method.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
24 Mar 2020, 07:58
Hi Shares4UsDevelopment,
I cannot reproduce the case with the zeros in the stats. Whenever you have some time, please provide us with the necessary information to look into this further.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
23 Mar 2020, 15:06
( Updated at: 21 Dec 2023, 09:21 )
Hi Sune,
cBot Log only appears after you add a cBot on the chart. See below
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
23 Mar 2020, 15:01
Hi Shares4UsDevelopment,
I still need cBot parameters, dates and optimization parameters so that we can reproduce the results you are seeing.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
23 Mar 2020, 11:39
Hi,
The button can be used alone.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
23 Mar 2020, 11:23
Hi Shares4UsDevelopment,
Please provide us with the cBot code, cBot parameters, dates and optimization parameters so that we can reproduce the results and explain the statistics.
Best Regards,
Panagiotis
@PanagiotisCharalampous
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
@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
@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
@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
@PanagiotisCharalampous
PanagiotisCharalampous
23 Mar 2020, 09:35
Hi dannyilumi,
What should it do instead?
Best Regards,
Panagiotis
@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
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
@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
@PanagiotisCharalampous
PanagiotisCharalampous
23 Mar 2020, 09:12
Hi TSepp,
Yes this is correct. cTrader Automate is only available in cTrader Desktop.
Best Regards,
Panagiotis
@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
@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
@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
@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
@PanagiotisCharalampous
PanagiotisCharalampous
24 Mar 2020, 08:44
Hi dannyilumi,
See below an example
Best Regards,
Panagiotis
Join us on Telegram
@PanagiotisCharalampous