Topics
08 Dec 2023, 16:21
 479
 0
05 Jan 2023, 08:04
 680
 3
23 May 2021, 13:59
 1540
 9
27 Sep 2020, 13:26
 1229
 3
Replies

ctid2032775
17 Feb 2024, 08:37

Hi,

just wanted to ask if there are any news for this issue…

BR,
Christian


@ctid2032775

ctid2032775
12 Feb 2024, 08:23

RE: Wrong account id in OnProtoOAGetTrendbarsRes

 

PanagiotisCharalampous said: 

Hi there,

There is no known bug in cTrader API. If you can reproduce the issue with any of the .Net examples I would be happy to have a look as well.

Best regards,

Panagiotis

Hi Panagiotis,

just now I could reproduce this issue with the .Net Console.Sample…

This is the reply of ProtoOASymbolsListReq with the correct account id:

And this is the reply of ProtoOAGetTrendbarsReq:

In both requests I used the same account id as part of the command line options…

Best regards,
Christian


@ctid2032775

ctid2032775
29 Aug 2023, 05:16

RE: cTrader and JetBrains Rider

josef.van.niekerk said: 

Thanks Christian, I'm using the “Attach to Process” from Rider, then I just select the “algohost” process. It's a bit fiddly, would have hoped the JIT debug dialog would allow selecting Rider as an option, like it does with Visual Studio.

Hi Josef,

you can add the following code snippet at the beginning of the method OnStart() …

var result = System.Diagnostics.Debugger.Launch();
if (result is false)
{
    Print("Debugger launch failed");
}

… and configure Rider as the default JIT debugger (File | Settings | Build, Execution, Deployment | Debugger).

When you then start the cBot the JIT debug dialog is shown …

Hope this helps!

BR, Christian


@ctid2032775

ctid2032775
22 Aug 2023, 12:23

RE: cTrader and JetBrains Rider

josef.van.niekerk said: 

Hi Christian, I'm a bit late to the party. However, I see the new cTrader 4.8 update allows you to open your project in Rider and VS Code as well.

Quick question though, are you actually able to debug your code with Rider as well?

Hi Josef,

thanks and no problem, I completely forgot about this post and already found out that cTrader 4.8 supports Rider…

And yes, I am actually able to debug my code with Rider but sometimes I get strange errors no matter if I select an already running or a new Rider instance.

Best regards,
Christian


@ctid2032775

ctid2032775
06 Feb 2023, 19:40

RE: RE:

ctid3999979 said:

PanagiotisChar said:

Hi there,

Open the project in Visual Studio and check if the packages are in place

 

If it works in VS, you should be fine

Aieden Technologies

Need help? Join us on Telegram

Need premium support? Trade with us

Thanks. The bot does appear to run properly (on an external monitor but see my other thread regarding that wieird issue).

Do you have any good resources for ML.Net? The vast, vast majority of resources I can find cater to Python. I even have my own subscription to O'Reilly but there isn't even very much on there.

Hi,

I've developed a cBot that uses ML.NET Decision Trees (FastForest) for predicting profits and losses and for me it worked fine, as well.

With respect to the C# resources I can recommend the "original" Microsoft learning center where I found the best documents, tutorials and examples. You can use most of the code snippets for your own cBots...

Just one additional recommendation - you should build your solution in Visual Studio to get more detailed error descriptions and access to the corresponding docs from Microsoft!

I hope this helps to get your cBot up and running.

Best regards,
Christian


@ctid2032775

ctid2032775
05 Jan 2023, 08:55 ( Updated at: 21 Dec 2023, 09:23 )

RE:

Spotware said:

Hi Christian,

Can you please share some screenshots of this issue so that we can investigate what the problem is?

Best regards,

cTrader Team

Hi,

as requested please find attached some screenshots...

History Filter:

History (list):

Closing time - first trade from the above list:

Closing time - second trade from the above list:

I would have been expected that it would be exactly the other way round (ascending -> 30/12/2022, 05/01/2023)...

Best regards,
Christian


@ctid2032775

ctid2032775
11 Dec 2022, 11:50

RE: RE: RE:

ctid3999979 said:

ctid2032775 said:

ctid2032775 said:

Dear all,

being curious I just wanted to play around with the new beta version cTrader 4.2 to decide it I should go with it but ran into an issue.

Environment (running in a virtual machine with VirtualBox):

  • Windows 10 with latest updates
  • .NET SDK 6.0.202 (latest version)
  • Visual Studio 2022 17.1.4 (latest version)
  • cTrader 4.2.1 (latest version)

When I create a new cBot - and without changing anything of the automatically created code - it behaves as follows:

  • Target framework 4 (embedded)
    • Working as expected and printing the "Hello World!" message
  • Target framework 6.0 (embedded)
    • Does not print the message!
  • Target framework 6.0 (SDK; as mentioned above)
    • Does not print the message!

In addition to that it does not make any difference if the cBot is directly compiled in cTrader or using Visual Studio.

A little bit strange is that as soon as I switch to .NET 6, run any bot and close the cTrader application the cTrader process is not terminated, as well.

To guarantee that it does not be caused by my development machine I installed a complete new and clean virtual machine with the same environment as mentioned above and faced exactly the same issue as described above...

Please keep me updated if you were able to reproduce this issue and how to fix it.

Many thanks and regards,
Christian

 

 

Dear all,

just to keep you updated and deliver good news - with the currently latest version (4.5.1) it's working for me in Windows 10 Professional, as well!

Many thanks and regards,
Christian

Hi Christian.

The problem you have sounds very similar to a problem I have. Did yuo do anything else other than install 4.5.1?

https://ctrader.com/forum/calgo-support/39363

I'm having the above issue, although now even with .NET 4, I can see the Price level moving but the candles don't update on the chart unless I right-click. I reimaged my Surface twice today and freshly installed everything but I still get the same problem.

I even installed cTrader 4.5.1 and nothing else after installing Windows and still the same problem.

Running Windows 11 Ent x64 22H2

Even though I'm not a professional developer, I'm a Network Engineer by trade with multiple Cisco certs including their new DevNet cert dealing with network automation with Python so I have troubleshooting skills.

Hi,

I'm not sure if this is the same issue (but maybe the same reason)...

In my case not a single cBot was executing with .NET6 and after closing the UI the (background) process was not automatically terminated. This issue only happened on all my Windows 10 Professional machines - both physical and virtual and on different hardware - but always worked in any Windows 10 Home environment and in all mentioned environments when switching to .NET 4.8.

But to answer your question - on my trading machine (i. e. minix neo with Windows 10 Pro) I just installed all Windows 10 Professional updates and the latest cTrader version (4.5.1) but didn't change anything else and now it's working as expected.

BR,
Christian


@ctid2032775

ctid2032775
10 Dec 2022, 15:26

RE:

ctid2032775 said:

Dear all,

being curious I just wanted to play around with the new beta version cTrader 4.2 to decide it I should go with it but ran into an issue.

Environment (running in a virtual machine with VirtualBox):

  • Windows 10 with latest updates
  • .NET SDK 6.0.202 (latest version)
  • Visual Studio 2022 17.1.4 (latest version)
  • cTrader 4.2.1 (latest version)

When I create a new cBot - and without changing anything of the automatically created code - it behaves as follows:

  • Target framework 4 (embedded)
    • Working as expected and printing the "Hello World!" message
  • Target framework 6.0 (embedded)
    • Does not print the message!
  • Target framework 6.0 (SDK; as mentioned above)
    • Does not print the message!

In addition to that it does not make any difference if the cBot is directly compiled in cTrader or using Visual Studio.

A little bit strange is that as soon as I switch to .NET 6, run any bot and close the cTrader application the cTrader process is not terminated, as well.

To guarantee that it does not be caused by my development machine I installed a complete new and clean virtual machine with the same environment as mentioned above and faced exactly the same issue as described above...

Please keep me updated if you were able to reproduce this issue and how to fix it.

Many thanks and regards,
Christian

 

 

Dear all,

just to keep you updated and deliver good news - with the currently latest version (4.5.1) it's working for me in Windows 10 Professional, as well!

Many thanks and regards,
Christian


@ctid2032775

ctid2032775
18 Jul 2022, 19:35

Hi,

sounds similar to the issue I reported (Issue with cBot using target framework .NET 6)...

I am curious about the results of the checks.

BR,
Christian


@ctid2032775

ctid2032775
26 Jun 2022, 17:38

RE: RE: RE: RE: RE: RE:

genappsforex said:

firemyst said:

I think what would help the @Spotware crew is if you can record your desktop (or whatever) while reproducing the cTrader issue. This way, their team can see it actually happening.

I think the Christian gave a lot of info.
The only thing you can see looking at a screenrecording is that it realy happens; So do you think this guy is doing al that work to tell cTrader what is wrong when it does not happen? What would be the fun there?
Why are they always asking for tons of info while most of the times looking into their source would show them the problem.
urthermore: It's their product as they've stated many times before, so they should do thourough investigation when someone point them at failures, it's their lifelyhood.
Christian even switched over to MT5 of all places because of it.
Spotware should treasure any developer that shows them a flaw. it enables them to make their product less buggy.
Here we've diverted our development away from cTrader too. Since over a year I'm the only 'cTrader person' in the company. Reasons: Sticking to old /net versions way too long, not thread safe, Buginess and, Badly accessible/searchable/usable forum, No real acknowledgement of the added value of developers for the platform.

I couldn't have written it better...


@ctid2032775

ctid2032775
25 Jun 2022, 11:10

RE: RE: RE:

amusleh said:

genappsforex said:

ctid2032775 said:

 A little bit strange is that as soon as I switch to .NET 6, run any bot and close the cTrader application the cTrader process is not terminated, as well.

I noticed that too, This behaviour eats Memory and CPU . Think they're forgetting to clean up/Close old threads.

Hi,

We can only help you if we were able to reproduce the issues you are facing, if we can't then there is no way for us to know what's going wrong.

 

Hi,

after quite a frustrating time I stopped development in ctrader and migrated the project to MetaTrader 5. The trading part is written in MQL, the machine learning part was developed as an external library in C# and there everything is working as expected (on the same environment (!)).

As this part is now finished I got curious and did some further investigation...

What I found out is that it's working in any Windows 10 Home environment (both on an Acer gaming notebook and in a virtual environment (VirtualBox)) but I never got it to work on Windows 10 Professional or Enterprise (both x64 clean installations)!

The problem is that the bot needs to run on a Minix Neo with Windows 10 Pro installed where it's not possible to "downgrade" to home edition (and even if it would be possible I wouldn't do this...).

Accordingly, I kindly ask you to verify possible reasons and keep me updated about the solution.

Many thanks and regards,
Christian


@ctid2032775

ctid2032775
20 May 2022, 16:27

RE: RE: RE:

amusleh said:

ctid2032775 said:

amusleh said:

Hi,

Thanks for providing the details, we are investigating the issue now and if we were able to replicate it we will fix it.

Hi,

any news regarding this issue?

Thx & BR
Christian

Hi,

We tried everything to reproduce the issue you are facing but we couldn't.

Hi,

did you at least find something in the logs that helps to find the reason of the issue?

Thx & BR
Christian


@ctid2032775

ctid2032775
07 May 2022, 08:32

RE:

amusleh said:

Hi,

Thanks for providing the details, we are investigating the issue now and if we were able to replicate it we will fix it.

Hi,

any news regarding this issue?

Thx & BR
Christian


@ctid2032775

ctid2032775
28 Apr 2022, 13:18

RE: RE: RE:

amusleh said:

ctid2032775 said:

Hi,

just to eliminate that this is caused by the virtual machine I installed the same version on a dedicated Windows 10 Pro notebook and had exactly the same issue...

So just a few question:

  • What are the "minimum requirements" to run cBots compiled with .NET 6 on a "clean" Windows 10 installation?
  • Are there logs available to find out the reason of this behavior? (keep in mind that in my case the log tab doesn't show any information)
  • What could be the reason that the frondend can be closed after a cBot compiled with .NET 6 was started but the process itself isn't terminated?
  • How can I provide you with more detailed information to reproduce the issue and find a fix?
  • And finally, does this mean that the current beta version was deployed to be tested by the users and only the "official" broker version will be stable and fully functioning?

Many thanks and regards,
Christian

Hi,

There is no minimum requirements for running or compiling a cBot, as long as cTrader desktop works on your system you should be able to compile and run cBots.

The beta version is for testing, cTrader 4.2 stable version is not released yet for brokers.

Regarding your issue:

1. Which edition of Windows you are using? x64/x86?

2. Rebuild, and run the cBot instance, then submit a troubleshoot report by pressing Ctrl+Alt+Shift+T and paste the forum thread URL on the report text box.

Hi,

ad 1. - I am using Windows 10 Enterprise x64

ad 2. - done

BR
Christian


@ctid2032775

ctid2032775
24 Apr 2022, 12:08

RE:

amusleh said:

Hi,

I just tested and it worked fine, with both .NET 6 and .NET framework targets and embedded/SDK compilation.

Hi,

just to eliminate that this is caused by the virtual machine I installed the same version on a dedicated Windows 10 Pro notebook and had exactly the same issue...

So just a few question:

  • What are the "minimum requirements" to run cBots compiled with .NET 6 on a "clean" Windows 10 installation?
  • Are there logs available to find out the reason of this behavior? (keep in mind that in my case the log tab doesn't show any information)
  • What could be the reason that the frondend can be closed after a cBot compiled with .NET 6 was started but the process itself isn't terminated?
  • How can I provide you with more detailed information to reproduce the issue and find a fix?
  • And finally, does this mean that the current beta version was deployed to be tested by the users and only the "official" broker version will be stable and fully functioning?

Many thanks and regards,
Christian


@ctid2032775

ctid2032775
25 Sep 2021, 10:54

RE: RE:

ctid2032775 said:

PanagiotisCharalampous said:

Hi Christian,

All changes for drawings are accumulated when user's code is executed and the text is drawn after the code completes execution. There is no command to force update.

A workaround is to you can push some action to the queue so it will be executed later  in the following way.

 

  1. Call Chart.DrawStaticText
  2. Call BeginInvokeOnMainThread and pass an action as an argument that will start optimization work. This method will be called after the current method has finished.

See below an example

protected override void OnStart()
{
    Chart.DrawStaticText("status", "Preparing...", VerticalAlignment.Top, HorizontalAlignment.Left, Color.White);
    BeginInvokeOnMainThread(DoHeavyWork);
    // OnStart method will be finished and DoHeavyWork() will be called later
}

private void DoHeavyWork()
{
    var endTime = DateTime.Now.AddSeconds(4);
    while (DateTime.Now < endTime)
        System.Threading.Thread.Sleep(100);

    Chart.DrawStaticText("status", "Started", VerticalAlignment.Top, HorizontalAlignment.Left, Color.White);
}

Best Regards,

Panagiotis 

Join us on Telegram and Facebook

Hi Panagiotis,

many thanks for your reply and great support - I'll give it a try...

Best regards,
Christian

Hi Panagiotis,

sorry for my late reply - I tested this and it's working as expected.

Just one final question or more a confirmation of my observations:

  • When I run this cBot while market opening hours I get (just) one tick after DoHeavyWork is finally finished.
  • When I do the same during the weekend I get no ticks (but this is logical).

Does this mean that this technique suspends all ticks received while DoHeavyWork is running and then executes the last - i. e. current active - tick event?

If yes, this would exactly meet my expectations and work as required for the functionality of my cBot(s)...

Many thanks and regards,
Christian


@ctid2032775

ctid2032775
01 Sep 2021, 10:20

RE:

PanagiotisCharalampous said:

Hi Christian,

All changes for drawings are accumulated when user's code is executed and the text is drawn after the code completes execution. There is no command to force update.

A workaround is to you can push some action to the queue so it will be executed later  in the following way.

 

  1. Call Chart.DrawStaticText
  2. Call BeginInvokeOnMainThread and pass an action as an argument that will start optimization work. This method will be called after the current method has finished.

See below an example

protected override void OnStart()
{
    Chart.DrawStaticText("status", "Preparing...", VerticalAlignment.Top, HorizontalAlignment.Left, Color.White);
    BeginInvokeOnMainThread(DoHeavyWork);
    // OnStart method will be finished and DoHeavyWork() will be called later
}

private void DoHeavyWork()
{
    var endTime = DateTime.Now.AddSeconds(4);
    while (DateTime.Now < endTime)
        System.Threading.Thread.Sleep(100);

    Chart.DrawStaticText("status", "Started", VerticalAlignment.Top, HorizontalAlignment.Left, Color.White);
}

Best Regards,

Panagiotis 

Join us on Telegram and Facebook

Hi Panagiotis,

many thanks for your reply and great support - I'll give it a try...

Best regards,
Christian


@ctid2032775

ctid2032775
31 Aug 2021, 09:49

RE: RE:

firemyst said:

ctid2032775 said:

Dear all,

maybe I am doing something wrong and someone of you can point me into the right direction...

My cBot runs an integrated optimization process OnStart and on specific circumstances (e. g. MDD increasing) that takes a lot of CPU and memory - i. e. quite "resource hungry". After this process is successfully finished the cBot is switched into "Trading" mode and starts trading OnBar.

At the beginning of the optimization process I want to print a static text (e. g. "Optimizing - EURUSD") and before start trading I want to print another static text (e. g. "Trading - EURUSD - Par1 = xxx - Par2 = yyy"; Par1 and Par2 are the results of the optimization) to the chart.

The small "beauty mistake" now is that the optimizing text is not output to the chart - is there a way to "force" the output even while the cBot is quite busy?

Many thanks in advance and best regards,
Christian

I would write the information out to the log because not all text/drawings on the chart are supported during back-testing as far as I'm aware.

Eg, if (IsBacktesting) { ... print your text to the log... } else { drawstatictext on chart }

First of all many thanks for your reply!

As mentioned in my original post this cBot is running an "integrated" optimization process and not the "built-in" one (maybe this was a little bit misleading). This is done by looping through the parameters (e. g. Par1, Par2), simulating the trades and tracking the profit to find the optimal combination of Par1 and Par2 (i. e. maximum profit).

The reason for this procedure is that it's a dynamic process and not just executed before the cBot is started (afaik the "built-in" optimization cannot be triggered from the cBot itself). E. g. when MDD exceeds some specific threshold the trading is stopped, the optimization process is started again and then the trading is started with the "new" combination of Par1 and Par2 - but all of this is automatically executed by the cBot itself without any user interaction.

Therefore, as the cBot is always running in RunningMode = RealTime (see above) IsBacktesting would always return FALSE...

BR,
Christian


@ctid2032775

ctid2032775
12 Jun 2021, 16:21 ( Updated at: 12 Jun 2021, 16:23 )

RE: RE:

ClickAlgo said:

Hi, Christian,

Can you supply your architecture document or class diagram in something like UML, this would help to see how it all fits together, it looks like at this stage you need design help and not specific code implementation.

Paul.

 

Hi Paul,

many thanks for your reply - I guess it's a combination of design and code issue.

Therefore, I think it's better to share the relevant code snippets instead of class diagrams:

MainClass (i. e. real trading):

using cAlgo.API;
using System;

namespace cAlgo.Robots
{
    [Robot(TimeZone = TimeZones.UTC, AccessRights = AccessRights.None)]
    public class MainClass : Robot
    {
        // class properties

        // class variables

        protected override void OnStart()
        {
            // run optimizer
            this.RunOptimizer();
        }

        // TODO - shorten method by prob. extract some functions, optimize algorithm, ...
        protected override void OnBar()
        {
			var _trendStatus = trend.CheckTrend(_dateTime, _midPrice);	// this is part of the algorithm
			var _position = Positions.Find("MainClass", Symbol.Name);

			if ((_trendStatus == ETrendStatus.ReversalUp) && (_position != null))
			{
				var _result = ClosePosition(_position);
				if (_result.IsSuccessful)
				{
					Print("Position {0} successfully closed!", _result.Position);
					_position = null;
				}

				if (Account.Balance > balanceMax)
				{
					balanceMax = Account.Balance;
				}
				else
				{
					var _drawDown = (balanceMax - Account.Balance) / balanceMax;
					if (_drawDown > optimize.BalanceDrawDownMax)
					{
						// run optimizer
						this.RunOptimizer();
					}
				}
			}
			else if ((trend.TrendDirection == ETrendDirection.Down) && ... && (_position == null))	// trend is part of the algorithm
			{
				var _tradeSize = Symbol.NormalizeVolumeInUnits(((riskTrade * Account.Balance) / (Symbol.PipValue / Symbol.PipSize)) / (StoppLoss * Symbol.PipSize) / Symbol.LotSize);

				var _result = ExecuteMarketOrder(TradeType.Buy, Symbol.Name, _tradeSize, "MainClass");
				if (_result.IsSuccessful)
				{
					Print("Position {0} successfully opened!", _result.Position);
				}
			}
        }

        protected override void OnStop()
        {

        }

        private void RunOptimizer()
        {
            // run optimizer
            var _optimizer = new Optimizer(this, BalanceOptimize, RiskOptimize, StoppLoss);
            optimize = _optimizer.RunOptimizer();

            // perform initial optimization
            riskTrade = Math.Round(BalanceSecurityFactorTrade * RiskOptimize * BalanceDrawDownMaxTrade / (optimize.BalanceDrawDownMax > 0.0 ? optimize.BalanceDrawDownMax : BalanceDrawDownMaxTrade), 2);
            trend = new Trend(this);
            balanceMax = Account.Balance;
            firstRun = true;
        }
    }
}

OptimizeClass (i. e. simulated trading for automized optimization):

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

namespace cAlgo
{
    public class Optimize
    {
        // class properties

        // class constructors
        public Optimize(double profit) : this(0.0, 0.0, profit, 0.0, 0) { }
        public Optimize(..., double profit, double balanceDrawDownMax, int numberOfTrades)
        {
        }
    }

    public class Optimizer
    {
        // class properties
        private readonly Robot CurrentRobot;
        private readonly Chart CurrentChart;

        private readonly double BalanceStart;
        private readonly double Risk;
        private readonly double StoppLoss;

        // class constructors
        public Optimizer(Robot robot, double balanceStart, double risk, double stoppLoss)
        {
            CurrentRobot = robot;
            CurrentChart = CurrentRobot.Chart;
            BalanceStart = balanceStart;
            Risk = risk;
            StoppLoss = stoppLoss;
        }

        // optimization
        public Optimize RunOptimizer()
        {
            var _dateTimeFrom = CurrentChart.Bars.LastBar.OpenTime.AddYears(-1);
            var _listAskBid = new List<AskBid>();
            GetAskBid(_listAskBid, _dateTimeFrom);

            var _listOptimize = new List<Optimize>();

			foreach (var _askBid in _listAskBid)
			{
				var _trendStatus = _trend.CheckTrend(_dateTime, _midPrice);	// part of the algorithm

				if ((_trendStatus == ETrendStatus.ReversalUp) && (_trade.Position == true))
				{
					_trade.ClosePosition(_dateTime, _askBid.Bid);

					var _profit = Math.Round((_trade.ClosePrice - _trade.OpenPrice) * CurrentChart.Symbol.LotSize * _trade.TradeSize, 2);
					_balance += _profit;

					if (_balance > _balanceMax)
					{
						_balanceMax = _balance;
					}
					else
					{
						var _balanceDrawDown = (_balanceMax - _balance) / _balanceMax;
						if (_balanceDrawDown > _balanceDrawDownMax)
						{
							_balanceDrawDownMax = _balanceDrawDown;
						}
					}

					_totalTrades++;
				}
				else if ((_trend.TrendDirection == ETrendDirection.Down) && ... && (_trade.Position == false))	// _trend is part of the algorithm
				{
					double _tradeSize = Math.Round(((Risk * _balance) / (CurrentChart.Symbol.PipValue / CurrentChart.Symbol.PipSize)) / 
						(StoppLoss * CurrentChart.Symbol.PipSize) / CurrentChart.Symbol.LotSize, 2);
					
					_trade.OpenBuy(_tradeSize, _dateTime, _askBid.Ask);
				}
			}

			// calculate total profit
			var _totalProfit = Math.Round(_balance - BalanceStart, 2);

			// add optimization
			_listOptimize.Add(new Optimize(..., _totalProfit, _balanceDrawDownMax, _totalTrades));

            // detect the "best" optimization result
            var _optimizeQuery =
                from _optimize in _listOptimize
                orderby _optimize.Profit descending, _optimize.BalanceDrawDownMax
                select _optimize;

            return _optimizeQuery.FirstOrDefault();
        }

        // fetch market data
        private void GetAskBid(List<AskBid> listAskBid, DateTime dateFrom)
        {
            var _bars = CurrentRobot.MarketData.GetBars(CurrentChart.TimeFrame, CurrentChart.Symbol.Name);
            var i = _bars.Count;
            while ((_bars[0].OpenTime >= dateFrom) && (i > 0))
            {
                i = _bars.LoadMoreHistory();
            }

            var _count = _bars.Count;
            if (_count > 0)
            {
                foreach (var _bar in _bars)
                {
                    if (_bar.OpenTime < dateFrom) // prob. change to LINQ (?)
                    {
                        continue;
                    }
                    listAskBid.Add(new AskBid(_bar.OpenTime, _bar.Open + CurrentChart.Symbol.Spread, _bar.Open));
                }
            }
        }
    }
}

As you can see both classes are using the same logic to create open (buy) and close (sell) signals. The "real" logic is more complex and in addition to that will get more complex with the planned extensions.

The goal is now to merge this into some kind of strategy class with the central logic and use it for both optimization and real trading! Therefore, it would be easier and safer if something else needs to be added or adapted.

Many thanks and regards,
Christian


@ctid2032775

ctid2032775
30 May 2021, 12:34 ( Updated at: 21 Dec 2023, 09:22 )

RE:

amusleh said:

Hi,

Just tested on Spotware account and it worked fine:

RoboForex:

Maybe you haven't installed the Visual C++ 2019 x86 on your system.

Hi,

again thanks for your support - this was also my first guess but it's already installed (as well x64):


@ctid2032775