Replies

kaxalope
13 Nov 2024, 07:27

RE: RE: RE: RE: RE: RE: RE: Proposal: Improved Project Structure for cBots Development in cTrader

PanagiotisCharalampous said: 

serge.owonaokoa said: 

PanagiotisCharalampous said: 

serge.owonaokoa said: 

PanagiotisCharalampous said: 

kaxalope said: 

PanagiotisCharalampous said: 

Hi there,

Why don't you use an external IDE like Visual Studio instead? I don't think the team will invest time in reinventing the wheel.

Best regards,

Panagiotis

I do it, and although it improves things like IntelliSense, the management of duplicated code between bots doesn't get better since each bot is a solution, as I mentioned in the previous post. If there were a way to make each bot a project instead of a solution, then the development experience could be greatly improved. And if there is a way, I'm not aware of it.

No it is not possible, however you can reference shared projects across many solutions, if this is what you are looking for.

Best regards,

Hi  PanagiotisCharalampous,

I'm trying to create a shared Library to use across my indicators and cBots, I can't stand replicating or copying code.

I decide to follow you recommendation of using a Shared Project. I have a couple questions:

1- Do you recommend having a single Git Repo for all Indicators and cBots, I mean creating the repo under <USER_HOME>\Documents\cAlgo\Sources or Should I setup 1 project per indicator?

2-If 3 indicator are all using the same shared Project, Do I need to create that sharedProject with the Solution of 1 Indicator or cBot and reuse in others?

I noticed that if the SharedProject isn't located within a specific location the AlgoHost.exe proecess crashes with error of not having access to the SharedProject folder. Which folder under under <USER_HOME>\Documents\cAlgo\Sources the SharedProject must be to prevent this?

 

Thanks.

Would be great i you could provide a sample of 2 indcators and 2 cBots using a shared project.

 

Hi there,

Unfortunately there is no correct answer to your questions as it all depends on your own requirements.

Best regards,

Panagiotis

Thank you for your very diplomatic reply, that doesn't really take us anywhere.

I think it's really deciving to point your users nowhere rather than helping with real problems.

If what cTrader recommend is to write duplicate code, then please be clear on that.

If you recommend shared project then please be clear and give a simple example of :

Indicator A, Indicator B, sharedProject C and robot D all using logic in SharedProject C.

If that's not possible then please say so.

I really don't see what our own requirements could make a difference in this very specific question.

 

 

Hi there,

It's not a diplomatic answer, it's just beyond the scope of my work. My role here is to explain how cTrader works, answer questions specific to cTrader and liaise for the resolution of problems. Giving trading advises, answering general software development questions and teaching people to code is above my role. Therefore I rarely engage in such discussions. The question on how to organize your projects is not a cTrader specific one but a general software development question. A cBot/Indicator/Plugin is just a .Net project so whatever applies to other .Net projects, applies here as well. Each developer organizes his projects as he sees fit. 

What you describe should be possible, unfortunately I do not have time to prepare an example for you. If you thing there is a specific cTrader problem, let us know how to reproduce it and we will have a look at this.

Best regards,

Panagiotis

No, a cTrader bot/plugin/indicator is not a project but a solution. This is the reason for the topic.


@kaxalope

kaxalope
23 Aug 2024, 07:01 ( Updated at: 23 Aug 2024, 13:17 )

RE: Proposal: Improved Project Structure for cBots Development in cTrader

PanagiotisCharalampous said: 

Hi there,

Why don't you use an external IDE like Visual Studio instead? I don't think the team will invest time in reinventing the wheel.

Best regards,

Panagiotis

I do it, and although it improves things like IntelliSense, the management of duplicated code between bots doesn't get better since each bot is a solution, as I mentioned in the previous post. If there were a way to make each bot a project instead of a solution, then the development experience could be greatly improved. And if there is a way, I'm not aware of it.


@kaxalope