Topics
Reverse Position

completed Closed cTrader Automate

Suggestions
13 Nov 2014, 08:53
 18
 1418
 1
Modify volume of a position

completed Closed cTrader Automate

Suggestions
28 Sep 2014, 13:15
 163
 1986
 6
28 Aug 2014, 00:33
 3017
 1
27 Aug 2014, 17:14
 49
 1911
 3
Replies

AlexanderRC
23 Sep 2014, 13:20

RE: RE: RE:

Spotware said:

  • Ability to specify which parameters are ignored if some other parameter is set to a specific value to exclude runs with logically identical parameter

You can check parameters in OnStart method and stop cBot if needed. 

That will require the cBot to store already tried logical combinations in some "external" store and abandon the run if the new set of parameters matches the one already computed.

Another approach would be to use combined values on a larger scale for the current genetic algorithm to work more efficiently. Consider the following example. There are 3 parameters, A, B and C. A can have values of 0 and 1. If A is 0, B parameter is used. If A parameter is set to 1, C parameter is used. B can have values between 0 and 120, C between 0 and 100. Instead, I can use combined parameter D which would have values from -121 to 100. -121 to -1 values of parameter D would be mapped to values 0 to 120 of parameter B and values of 0 to 100 of parameter D to values 0 to 100 of parameter C.

But both approaches would require deliberate changes to cBots.

For now I will stick to my own library.


@AlexanderRC

AlexanderRC
22 Sep 2014, 22:58

RE:

sargedessy said:

Guys, I managed to get cTrader install in wineskin, but it crashes each time I try to launch it.

I do not see any .Net assemblies in the modules list except ctrader.exe. I assume that crash occurs very early in initialization state and is related to .Net under Wine in Mac OS X. I would try to get some simple WPF program to run first. Something like NoteScraps. If it crashes in the same way, then compatibility with cTrader.exe is not cTrader specific. However, I did not try to run NotScraps under WINE myself, it is just a suggestion.


@AlexanderRC

AlexanderRC
22 Sep 2014, 14:15

RE:

Here are some points which are not covered for me in the current iteration of the optimizer.

  1. Ability to specify which parameters are ignored if some other parameter is set to a specific value to exclude runs with logically identical parameters.
  2. Specify some internal parameters of genetic algorithm such as size of initial population, whether crossover and/or mutations are used. Criteria for convergence to optimum fitness value, etc.
  3. Ability to specify some bias towards mutations/crossings in some parameters against the others. For example, it may be wise to try more values for fixed take profit parameter than for the parameter specifying the number of periods in the moving average indicator.
  4. Equity and balance drawdowns in absolute values and all sorts of derived metrics based on those. For example, I do not optimize entry volume as it is chosen after optimization to keep the expected drawdown at a certain value and that calculation depends on the initial balance and optimized drawdown in absolute currency value.
  5. Ability to specify swaps (including copying current values from the server).
  6. Ability to spread the work across remote agents running on separate computers (with uploading bar/tick data to the agent and some external data like times when the news were released).

@AlexanderRC

AlexanderRC
19 Sep 2014, 11:07

RE: RE: RE:

Very encouraging screenshot. Any predictions when optimizer will be released?


@AlexanderRC

AlexanderRC
03 Sep 2014, 16:05 ( Updated at: 21 Dec 2023, 09:20 )

RE: RE:

rkokerti said:

rkokerti said:

What is the expected release date? Because very cumbersome to use the software now.

I have a question in this connection. Why Spotware working properly while FxPro not? Same version number, same setup, but working differently. Can not be that, the problem is at on the broker side?

Check digital signature on cTrader.exe/cAlgo.exe and look for its date. The version may be the same but the actual builds may be different. To find the actual .exe you are executing, use the Image Path Name in Windows Task Manager or Open File Location context menu command for the process.


@AlexanderRC

AlexanderRC
03 Sep 2014, 01:41

RE:

Spotware said:

In Minute bars data mode we generate 4 ticks (open, high, low, close) for every m1 bar.

Do these 4 ticks happen in the order listed?

What happens with limit and stop orders which existed before the bar if the entry price for them happens to be somewhere between high and low?

What happens if the stop and limit orders are placed somewhere between these 4 ticks?


@AlexanderRC

AlexanderRC
30 Aug 2014, 20:17

RE:

adheer said:

Note : The Label.Contains method is used to filter based on "tradeLabel". History.FindAll cannot be used because the Label contains additional data. e.g. "hx:29292:3", "hx:29292:4" etc. 

As a general suggestion, you can also use the comment property of a position to store some data.


@AlexanderRC

AlexanderRC
30 Aug 2014, 18:24

Consider the following code

using System;
using cAlgo.API;
using cAlgo.API.Internals;

namespace cAlgo
{
    [Robot(TimeZone = TimeZones.UTC, AccessRights = AccessRights.None)]
    public class DebugBacktestChart : Robot
    {
        private DateTime startTime;
        private double startAsk;

        protected override void OnStart()
        {
            startTime = Server.Time;
            startAsk = Symbol.Ask;
            Print("Open Ask: {0}", startAsk);
        }

        protected override void OnBar()
        {
            ChartObjects.DrawLine("openBid", startTime, startAsk, Server.Time, startAsk, Colors.Red, 2, LineStyle.Solid);
        }

        protected override void OnStop()
        {
            double endAsk = Symbol.Ask;
            ChartObjects.DrawLine("closeBid", startTime, endAsk, Server.Time, endAsk, Colors.Blue, 2, LineStyle.Solid);
            Print("Close Ask: {0}", endAsk);
        }
    }
}

No lines in back testing results.

Am I doing something wrong or that just not yet implemented? 

Cannot efficiently visually debug complex robots because of that. Either I need to do that when the market is open with a demo account and wait for the needed events to happen or wade through the back test debug output why robot did or did not do something at some point.


@AlexanderRC

AlexanderRC
29 Aug 2014, 15:19

There were a flurry of updates recently. They were with the same version, the only way to distinguish them was to check the timestamp of digital signature on cTrader/cAlgo.exe. Fortunately, one of them seems to have fixed the issue.  Thanks.
 


@AlexanderRC

AlexanderRC
29 Aug 2014, 10:49

This depends on the broker, how many digits a quote has. Our broker has five digits.


@AlexanderRC

AlexanderRC
28 Aug 2014, 20:06

Do you have and example for this?


@AlexanderRC

AlexanderRC
28 Aug 2014, 19:51

This has been implemented


@AlexanderRC

AlexanderRC
28 Aug 2014, 13:05

RE:

modarkat said:

The easiest way to emulate global variables is a Registry:

http://www.codeproject.com/Articles/3389/Read-write-and-delete-from-registry-with-C

It would leave some traces in the registry, but that is not a big for most of us. AppDomain is transient.


@AlexanderRC

AlexanderRC
28 Aug 2014, 05:39

It is likely possible to emulate global variables via a named AppDomain with permissions to access it from any code (both cBots and indicators). I will try to do that later.
 


@AlexanderRC

AlexanderRC
27 Aug 2014, 20:16

RE: RE:

Spotware said:

Spreads are historical. Commissions are fixed and must be specified in backtesting settings.

In real life commissions are not fixed. We in Romanov Capital assign each client (all of his or her accounts) to different groups with different commissions dynamically. It depends on the traded volume for all of the accounts of a client for the last 30 days. Recalculation and group assignment happens every day at a specified time. The more you trade, the less commissions you are charged.

Please vote for Add commissions for Symbol to cAlgo API on vote.spotware.com


@AlexanderRC

AlexanderRC
27 Aug 2014, 17:28

It has already been implemented as Workspaces. You need a logged in cTraderId for that.


@AlexanderRC

AlexanderRC
27 Aug 2014, 17:24 ( Updated at: 27 Aug 2014, 17:25 )

Do you have an example of where it is implemented in other platforms?


@AlexanderRC

AlexanderRC
27 Aug 2014, 17:18

The old behavior should be left as it is now as a default


@AlexanderRC