Replies

trader.calgo
07 May 2019, 12:31

Thank you for doing this work for me. Now I know that the error is somewhere in my system. I am very grateful to you, then I'll figure it out myself.
P.S. Do not change the design of the beta version of cTrader, it is much better than before.))


@trader.calgo

trader.calgo
06 May 2019, 19:45 ( Updated at: 21 Dec 2023, 09:21 )

RE:

Panagiotis Charalampous said:

Hi trader.calgo,

Seems some files are needed as well.

Best Regards,

Panagiotis

These files are generated by the advisor itself in the appropriate modes of operation for collecting training data. Here are the files. 

https://yadi.sk/d/RXDtvfkTNRwWzg

This error is not related to the absence of a library in the project. I think the reason is either in NETstandart 2.0 or in x64 architecture.

Please try to understand the reason.


@trader.calgo

trader.calgo
03 May 2019, 20:20

Dear Panagiotis,

Perhaps I was mistaken in the cause of the error, but I could not understand it on my own. I hope you can find out the reason and write if you can correct the error or not.

public ITransformer Train(MLContext mlContext, string dataPath)
        {
            IDataView dataView = mlContext.Data.LoadFromTextFile<BarLoad>(dataPath, hasHeader: true, separatorChar: ';');

            var pipeline = mlContext.Transforms.CopyColumns(outputColumnName: "Label", inputColumnName: "IsTrue").Append(mlContext.Transforms.Concatenate("Features", "signalup", "signaldown", "isbullish", "msclose", "mshigh", "mslow", "atr", "dpo", "lrrs",
            "mai", "rsi")).Append(mlContext.BinaryClassification.Trainers.AveragedPerceptron());

            var model = pipeline.Fit(dataView);
            Chart.DrawStaticText("LabelCast12", "\n==================== End of training ====================", VerticalAlignment.Top, cAlgo.API.HorizontalAlignment.Left, "Blue");
            SaveModelAsFile(mlContext, model, dataView);

            return model;
        }

AveragedPerceptron() calls the CpuMath library, and therefore an error occurs.

Source of the project attached.

ML.NET is a simple library, it is simply created to add machine learning to cTrader advisors. I hope this error is solved.


@trader.calgo

trader.calgo
23 Apr 2019, 17:59

Unfortunately, this method leaves a trail of inconsistency with the cBot copy in cTrader, in turn, cTrader suggests recompiling or running the x86 version. Accordingly, in both cases, the process ends with a version error.


@trader.calgo

trader.calgo
23 Apr 2019, 17:26

Hi,

I am currently working with ML.NET and the main data type is float there. In this library there are custom solutions CpuMath and other dll written only for version x64. For the further development of cTrader-based neural networks, it is very important to add a compiler for x64 processors!


@trader.calgo

trader.calgo
14 Apr 2019, 13:40

По идее нет проблем. Есть 2 варианта:

1-скачать бесплатный копир или купить платный. и тех и тех в сети достаточно.

2-написать такой копир самому и тут 2 пути либо писать все в оперативу а мт4 проверять через заданный промежуток времени, либо стримить сделки на порт а мт4 слушать данный порт

 

Я решил не скачивать а написать свой, как напишу выкину результат в сеть.


@trader.calgo

trader.calgo
19 Mar 2019, 22:21

Please realize API PositionSelectedEvenArgs pos, if you have free time


@trader.calgo

trader.calgo
16 Mar 2019, 09:17

thanks for idia, im use OnChartMouseDown. Is not beauty realization but is work. Please realize API PositionSelectedEvenArgs pos, if you have free time ))


@trader.calgo

trader.calgo
08 Mar 2019, 12:15

PLS. Tell me if anyone knows how to find positioon selected by mouse.


@trader.calgo

trader.calgo
05 Mar 2019, 16:58


it's great! Thanks you


@trader.calgo

trader.calgo
04 Mar 2019, 21:00

RE:

Panagiotis Charalampous said:

Hi trader.calgo,

Here is how to return the value of Y for a horizontal line. To make a chart object interactive, use IsInteractive property.

Best Regards,

Panagiotis

Dear Panagiotis Charalampous, thanks to your prompts, the manual strategy tester has earned. I will add a couple of methods the other day and I can throw off the sources if you need them. Only mind you do not laugh at the wretchedness of the code, I tried.


@trader.calgo

trader.calgo
03 Mar 2019, 23:20

RE:

lec0456 said:

You should check out the cBot I posted here: https://ctrader.com/algos/cbots/show/1849

You have to pass the cBot object to the form:

counter = new frmCandleCountdown(this, paramOnTop);

the "this" key word is the object.

So, you have to modify the default windows method something like this:

        public frmCandleCountdown(myCandleCountDown _caller, bool _alwaysOnTop)
        {
            alwaysOnTop = _alwaysOnTop;
            caller = _caller;
            InitializeComponent();
        }

You also have to declare your cBot obkect in the windows form like this:

myCandleCountDown caller;

Then create a function in your cBot to execute a trade.

Then call the function OnClick

 

I appreciate your answer. Thanks you.


@trader.calgo

trader.calgo
03 Mar 2019, 21:38

RE:

Panagiotis Charalampous said:

Hi kontodospamu5,

You can expose a public method that will update the form's label and call it on tick as below

using System;
using System.Linq;
using System.Threading;
using System.Windows.Forms;
using cAlgo.API;
using cAlgo.API.Indicators;
using cAlgo.API.Internals;
using cAlgo.Indicators;
 
namespace cAlgo.Robots
{
    [Robot(TimeZone = TimeZones.UTC, AccessRights = AccessRights.FullAccess)]
    public class NewcBot : Robot
    {
        [Parameter(DefaultValue = 0.0)]
        public double Parameter { get; set; }
        private Thread _thread;
        private Form _f1;
        protected override void OnStart()
        {
            _f1 = new Form();
            _thread = new Thread(() => _f1.ShowDialog());
            _thread.SetApartmentState(ApartmentState.STA);
            _thread.Start();
        }
 
        protected override void OnTick()
        {
            _thread = new Thread(() => _f1.UpdateLabel("label"));
            _thread.SetApartmentState(ApartmentState.STA);
            _thread.Start();
        }
 
        protected override void OnStop()
        {
            // Put your deinitialization logic here
        }
    }
}

Let me know if this helps,

Best Regards,

Panagiotis

Please, tell me how I can execute an order by pressing a button in this new form.


@trader.calgo