Referencing a Source /Algo code in my cBot

Created at 23 Mar 2018, 18:04
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!
FMogyi's avatar

FMogyi

Joined 13.10.2015

Referencing a Source /Algo code in my cBot
23 Mar 2018, 18:04


Hi,

Is it possible to include cAlgo source code file (.cs) or compiled code (.algo) to my cBot source? I mean I have a lot of useful functions in my source library - myfunctions. If I start a new cBot/project I need to insert  the source of mylibrary into the new cBot code body, but it is very complicated and dangeorus if  I had  to make some modifications in my source library.  Impossible to handle and keep all of my cBots up-to-date.

I see the Reference Manager option/Add Reference command in the Editor  but I don't know how to use it properly.

How can I write the cAlgo source which contains my funtions - to a library what I can use in my cBots as reference?

Thanks,

Norbert


@FMogyi
Replies

DonaldD
25 Mar 2018, 11:41 ( Updated at: 21 Dec 2023, 09:20 )

Hi FMogyi,

You can maintain your library as a separate C# project and reference it through the Libraries section in the Reference Manager. I paste a screenshot below


@DonaldD

FMogyi
26 Mar 2018, 15:52

RE:

I know this function, but how can I make cAlgo library?


@FMogyi

PanagiotisCharalampous
26 Mar 2018, 16:03

Hi FMogyi,

You don't need any special cAlgo libraries. cAlgo can reference any .Net library since it is a .Net application. Here you can find how to create a .Net library.

Best Regards,

Panagiotis


@PanagiotisCharalampous