Topics
30 Mar 2024, 20:21
 6
 159
 0
18 Oct 2023, 12:10
 234
 1
27 Feb 2021, 03:58
 1145
 4
08 Jan 2021, 15:55
 887
 1
08 Jan 2021, 11:09
 1281
 4
16 Dec 2020, 19:38
 2
 1123
 2
16 Dec 2020, 19:33
 4
 811
 1
11 Dec 2020, 18:15
 1261
 3
Replies

JeanPaul
03 Mar 2021, 13:26

RE:

PanagiotisCharalampous said:

Hi JeanPaul,

Yes this should work.

Best Regards,

Panagiotis 

Join us on Telegram

Thank you.


@JeanPaul

JeanPaul
03 Mar 2021, 13:25 ( Updated at: 21 Dec 2023, 09:22 )

RE:

PanagiotisCharalampous said:

Hi JeanPaul,

It seems that you are comparing historical times with the current time. Server.Time always displays the current time so it should be aligned with the last bar only. See below

Best Regards,

Panagiotis 

Join us on Telegram

Thank you for the detailed reply.


@JeanPaul

JeanPaul
22 Feb 2021, 22:52

RE:

PanagiotisCharalampous said:

Hi JeanPaul,

I am not sure what do you mean. Can you not save the parameters in the GetFitness() method?

Best Regards,

Panagiotis 

Join us on Telegram

Yes, I agree with you, But I don't know what are the dynamic ones. Not all parameters are set to change within an optimisation, only a subset of them. Let's say we have 10 parameters, only 3 are optimised. Can I get which ones are they from the OnFitness?


@JeanPaul

JeanPaul
17 Dec 2020, 13:51

RE:

PanagiotisCharalampous said:

Hi JeanPaul,

This does not sound like a cTrader issue but a VS issue. I did not experience this issue before, I can step into methods without a problem. If you want to send me your project to have a look, feel free to do so.

Best Regards,

Panagiotis 

Join us on Telegram

Thank you for the response. I solved the problem, I will leave the solution here for future reference.

Although, I was sure I was able to debug through and I did not change any option in Visual Studio 2019, however, this turned out to solve the problem:

From Visual Studio, go to Debug > Options then select "Suppress JIT optimization on module load (Managed only)" 


@JeanPaul

JeanPaul
17 Dec 2020, 13:44

RE:

PanagiotisCharalampous said:

Hi JeanPaul,

We had a look at this and it is an issue of backtesting. It seems to be using the current prices to calculate the margin instead of the historical ones. We will fix this in a future update.

Best Regards,

Panagiotis 

Join us on Telegram

Thank you for getting back to me, I am glad I have highlighted this.

So, while you are fixing this, is this equation right?

double estimatedRequiredMargin = (volume/Account.PreciseLeverage) * (Symbol.Bid);

And should I be using the Symbol.Bid for buying estimates and the Symbol.Ask for selling estimates?


@JeanPaul

JeanPaul
16 Dec 2020, 19:25

RE:

tasr1r1 said:

we develop many bots in trial over the years and some will be selected as favorite for long term forward testing or running real account

is there any way to sort the bot lineup based on our preference?

 

also, its time to update the mobile app to filter trade history like how metatrader did it. loading all the history in the app just not make sense as automated  trader want to check profit of the day, certain period or monthly and provided summarized total.

To workaround this problem, I close cTrader, Move all algo files and start dropping them one by one in order in the directory, in the required order. But obviously, supporting this via a UI is much better.


@JeanPaul

JeanPaul
14 Dec 2020, 16:44

RE:

afhacker said:

There is no "cAlgo.API.Bot" class, you should inherit from "cAlgo.API.Robot" class, it works fine for me both for cBots and indicators.

The only problem is with "Parameter" attribute, if you define your parameters on base class for inherited classes the parameters will not show up on cTrader because they have set the "Parameter" attribute "Inherited" property to "False", not sure why they did that, I hope they fix this issue so we will be able to have our common parameters on single base class, for now the only solution is to make the parameter properties abstract so the child classes must override those parameter properties.

Thank you, I meant cAlgo.API.Robot. But I have my base class in a different project ".cproj", do you is this the same for you?


@JeanPaul

JeanPaul
26 Oct 2020, 15:23

RE:

PanagiotisCharalampous said:

Hi JeanPaul,

Do I need to do this function to get the masterIndex as well as the slaveIndex?

You need to do this for every TimeSeries coming from a different timeframe

 What is the difference between GetIndexByTime and GetIndexByExactTime, what should I use if I rely on 0 UTC on everything?

GetIndexByExactTime will return -1 if there is no exact time match. GetIndexByTime will return the closest index.

Best Regards,

Panagiotis 

Join us on Telegram

Thank you for the prompt response.


@JeanPaul

JeanPaul
22 Oct 2020, 16:26

RE:

PanagiotisCharalampous said:

Hi JeanPaul,

cTrader offers you the option to backtest a cBot that places trades on multiple instruments. If you need different parameters per instrument, you need to program this yourself. The overall results will be for all the instruments you have placed trades for. If you want to backtest multiple instances at the same time, then this is not possible neither we have plans for such a feature.

Best Regards,

Panagiotis 

Join us on Telegram

It is not different parameters per instrument, I used the wrong term, I meant different parameters per instance (an instance can be the same instrument with a different time frame or another instrument).

The benefits of running them together and not individually is that all of them will be affecting the account simultaneously because that will show down the aggregate drawdown per period for the whole.

Thank you for the prompt reply.


@JeanPaul

JeanPaul
20 Oct 2020, 15:21

RE:

PanagiotisCharalampous said:

Hi JeanPaul,

  1. You can get the current bar in OnBar using Bars.Last(0)
  2. You use a TextBlock or DrawText to display your text
  3. You can use Chart.MouseDown to listen to mouse clicks on the chart.

Best Regards,

Panagiotis 

Join us on Telegram

Thank you, but I really meant the Visual Candle and not the actual bar. As I am assuming with the Visual Candle you have have access to features such as colour, so you can maybe append an onClick.

2 - I know this one, but can I attach this to the candle rather than the whole chart?

3 - Same as 2.

 


@JeanPaul