Just use an external IDE for development. You can do this with a click of a button and get all the development functionalities you need. The built in editor is appropriate only for simple projects.
Best regards,
Panagiotis
Even with simple projects, one often needs to copy the error messages. Moreover, the new developers and advanced users who are learning to code are likely doing that in cAlgo and they are those who are most likely to encounter compilation errors they need to copy (to ask other developers about).
They can do that in an IDE. The product team will not divert resources from other important features to build something that already exists and can be used immediately.
Just use an external IDE for development. You can do this with a click of a button and get all the development functionalities you need. The built in editor is appropriate only for simple projects.
The entry price of the position is the average entry price of the deals composing the position. If the position has only one opening deal, then the opening price should not change. If more opening deals are involved e.g. you have increased the size of the position after entering it, the entry price might change as partial volume is closed and deals removed from the position.
this will crash until you replace OnBarClosed with OnBar, which I did to have it work also works with 1hr tf correctly, and it crashes with both fp markets and fusion markets accounts
Thank you. This issue will be fixed in an upcoming update.
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.
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.
I don't see the problem. In .Net, you can reference projects that are parts of solutions in other solutions. This is not a cTrader thing, is a .Net thing. So you can have an indicator as a standalone solution, as well as reference it in other solutions i.e cBots or plugins
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.
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.
so I’m not really fam with coding on this platform and currently the code does plot horizontal lines on the workspace. the ideal output is
-user defines (current) price at which the algo starts plotting horizontal lines
-user defines increment at which each horizontal line is plotted
for example ( Gold 2000, 3, 100)
algo plots a horizontal line each $3
currently my code gives me the prompts for each parameter but does not even plot a single line. ideally the code would plot automatically using a for loop. But worst case scenario I can manually enter the code for each line
Hi there,
Can you explain your issue in more detail? What do you expect your code to do and what does it do instead?
Best regards,
Panagiotis
Hi there,
I tried your indicator and it plots the lines fine.
So I do not see a problem.
Best regards,
Hey there,
Thanks for trying out the code. However the issue is that it's not supposed to just plot one line. It supposed to plot multiple lines as defined by the User. Could you share the code you used to get it to plot a line ? Cause I was not able able able to get my code to plot a single line.
Thank you in advance.
Hi there,
I used the code you shared. If you want to plot several lines, you need to write the relevant code i.e. a for loop where you will plot lines at different increments.
It looks like the dll is missing from your computer. Can you please advise the reference you use for the System.Drawing methods? The methods do not seem to be a part of the standard System.Drawing namespace
Could you pleasesend us some troubleshooting information the next time this happens? Please paste a link to this discussion inside the text box before you submit it.
Best regards,
Panagiotis
Hopefully you received the text as per the above instructions. The happens every time I try to Optimize a trading bot. The first pic is my % of free RAM before Optimization begins and the second pic is after 4 minutes of Optimization.
Thank you. Unfortunately troubleshooting does not provide any useful information. It it possible to run dotMemory and provide us with a memory snapshot?
Can you share your cBot code so that we can reproduce the issue?
Best regards,
Panagiotis
hi @PanagiotisCharalampous .. the new Ctraders versions are extremly slow with optimization .. what used to optimize in 15 mins is now taking 1 hour if not up to 3 hours !!! this is rendering the Ctrader really unusable for lots of algo traders .. what is the plan to enhance optimization performance !
Hi there,
Improvements related to this thread will be released in 5.1.0
Thank you for reporting this issue. Could you pleasesend us some troubleshooting information the next time this happens? Please paste a link to this discussion inside the text box before you submit it.
Best regards,
Panagiotis
Thank you for your response. The video instruction did not show how to access the “troubleshooting” submission box. I finally figured out how to access it. I just submitted the troubleshooting information, including the link to this discussion. How will I hear back about this?
Hi there,
The high memory usage in the browser may be due to a video card issue, which sometimes requires a computer restart to restore performance.
Please restart your Mac and check if your setup meets the minimum system requirements for cTrader. You can review them here: cTrader System Requirements.
If the issue persists, please wait for the next cTrader release, where we are working on fixing any potential issues.
Best regards,
Panagiotis
I forgot to mention in my last reply … I also tried using cTrader platform on Safari and Google Chrome. The problem also happens on both of those browsers, so it is not the browser. It is something in the application of the cTrader Web platform. As I said, I have been using cTrader Web for 2 years with no problems. This issue just began about a month ago.
Hi there,
Any chance you can try another device as well and let us know if the issue persists?
PanagiotisCharalampous
14 Nov 2024, 14:23
RE: RE: The ability To Copy And Paste Build Errors & Results for code debugging. (Mind Numbingly Infuriating)
Enivid said:
They can do that in an IDE. The product team will not divert resources from other important features to build something that already exists and can be used immediately.
@PanagiotisCharalampous