How to save Optimization results

Created at 26 Nov 2020, 09:11
How’s your experience with the cTrader Platform?
Your feedback is crucial to cTrader's development. Please take a few seconds to share your opinion and help us improve your trading experience. Thanks!
UW

uwescheffold

Joined 22.11.2020

How to save Optimization results
26 Nov 2020, 09:11


Hi did some long running optimisation and got a resultlist with 1050 entrys.

How to save this list for later analysations?

 


@uwescheffold
Replies

PanagiotisCharalampous
26 Nov 2020, 09:52

Hi uwescheffold,

There is no built in feature for this at the moment.

Best Regards,

Panagiotis 

Join us on Telegram


@PanagiotisCharalampous

duketv
01 Dec 2020, 22:02

you can save individual pass parameters in an external file on your computer. Does that help?


@duketv

uwescheffold
02 Dec 2020, 09:55

RE: How to save Optimization results

duketv said:

you can save individual pass parameters in an external file on your computer. Does that help?

No,sorry that does not help. Imagine there are 1050 results, to say save the parameters one after the other is - sadistic!

And what I need to analyse is the result of the optimisation and the parameters. The parameters alone are usless, since you have to run the backtest again to gets reults.

But anyway, I can't understand why it takes so long to inplement such an easy but neccessary function!

An a software developer I know that the solution would take only short time, one hour or so.

All you have to do is:

1.) apply save/load button to the panel.

2.) OnKlick, open File dialog.

3.) If successful save/load the tabledata in a xml, csv  or whatever file. Methods for that are readyto use in C#.

Alll of thois is realy simple and as it is not done for the last 4 jears, I assume that ther are no developers available? 

And consequently, does it make sense to use a system which can't be adapted to actual and future needs?

 

 

.

 

 


@uwescheffold

PanagiotisCharalampous
02 Dec 2020, 10:13

Hi uwescheffold,

What duketv is implying is that you can write this code in your cBot e.g. in OnStop() function. If it is a one hour job as you say, then it should not be so hard.

Best Regards,

Panagiotis 

Join us on Telegram


@PanagiotisCharalampous

uwescheffold
02 Dec 2020, 11:15

RE: How to save Optimization results

PanagiotisCharalampous said:

Hi uwescheffold,

What duketv is implying is that you can write this code in your cBot e.g. in OnStop() function. If it is a one hour job as you say, then it should not be so hard.

Best Regards,

Panagiotis 

Join us on Telegram

Sorry for replaying again. But saving parameters in OnStop means that you have access to the fitness-result-values in OnStop.

But that is not the case - sorry. What is needed is a parameter that contains the optimization result for the current run.

You can see that in the "protected virtual double GetFitness(GetFitnessArgs args)". In other words, OnStop would need access to the GetFittnessArgs-structure.

Would you point out a way to da that?

 

 

  


@uwescheffold

PanagiotisCharalampous
02 Dec 2020, 11:59

Hi uwescheffold,

OnStop()  was just an example. If you need access to GetFitnessArgs then you can do the export inside the GetFitness() method.

Best Regards,

Panagiotis 

Join us on Telegram


@PanagiotisCharalampous

uwescheffold
02 Dec 2020, 13:37

RE: How to save Optimization results

PanagiotisCharalampous said:

Hi uwescheffold,

OnStop()  was just an example. If you need access to GetFitnessArgs then you can do the export inside the GetFitness() method.

Best Regards,

Panagiotis 

Join us on Telegram

Did you know that the call of GetFitness only happens when the "optimisation criteria - custom" radiobtn is checked? But then you have to provide you own optimisation algo also. Do you realy know how your system is working?

 

 

 

 


@uwescheffold

PanagiotisCharalampous
02 Dec 2020, 14:41

Hi uwescheffold,

Yes I know but I do not understand what is the point of your comment. I am explaining to you the possible ways to do what you are looking for.

Best Regards,

Panagiotis 

Join us on Telegram


@PanagiotisCharalampous

cW22Trader
04 Aug 2021, 12:32

Use this every time PositionsOnClosed is called:

private double peak;
private List<double> drawdown = new List<double>();

private double CalcMaxDrawDown()
{
    peak = Math.Max(peak, Account.Balance);

    drawdown.Add((peak - Account.Balance) / peak * 100);
    drawdown.Sort();

    var maxDrawdown = drawdown[drawdown.Count - 1];

    return maxDrawdown;
}

 

 


@cW22Trader

... Deleted by UFO ...