Topics
Replies
victor.major
30 Jul 2021, 12:24
RE: RE: RE:
Thank you for checking this report. The cBot is closed source so I will submit a bug request with them now.
V.
amusleh said:
victor.major said:
amusleh said:
Hi,
Can you send us the troubleshoot report by adding this forum thread URL to your reference description?
You can explain what actions you did that caused cTrader to become unresponsive?
If possible can you send us the code of cBots you used before cTrader became unresponsive?
Done.
I can cause even the new version 4.1 to become unresponsive when I switch views from Trade to cBot instance view. In v4.0 cTrader would go unresponsive when I try to scroll through the cBot list on the left of the window. It appears that every time cTrader went unresponsive I was trying to interact with its display, clicking, dragging, selecting, etc.
Hi,
Our team checked your troubleshoot report and they found that the issue is your cBots, in order to reproduce the issue we need your cBot code and a video that shows how to reproduce the issue.
@victor.major
victor.major
29 Jul 2021, 13:33
RE:
amusleh said:
Hi,
Can you send us the troubleshoot report by adding this forum thread URL to your reference description?
You can explain what actions you did that caused cTrader to become unresponsive?
If possible can you send us the code of cBots you used before cTrader became unresponsive?
Done.
I can cause even the new version 4.1 to become unresponsive when I switch views from Trade to cBot instance view. In v4.0 cTrader would go unresponsive when I try to scroll through the cBot list on the left of the window. It appears that every time cTrader went unresponsive I was trying to interact with its display, clicking, dragging, selecting, etc.
@victor.major
victor.major
29 Jul 2021, 10:17
RE:
amusleh said:
We will investigate this and let you know the result.
Thank you.
And, sorry I missed one answer: yes I submitted a troubleshooting report from within cTrader.
V.
@victor.major
victor.major
29 Jul 2021, 10:06
( Updated at: 29 Jul 2021, 10:07 )
RE:
amusleh said:
Hi,
Which broker cTrader you are using and which version?
Did you submit the troubleshoot report?
cTrader is not single-threaded, and it uses multiple threads when it needs.
1. IC Markets.
2. Yes.
3. Ok, it seems to hammer just one thread out of 6 or 24 available, so a process of some sort is holding up the rest.
@victor.major
victor.major
29 Jul 2021, 06:03
RE:
I have the same problem. I submitted the issue using the cTrader reporting tool. The only way that I can run cTrader is if I allocate at least 8Gb to the virtual machine and that is fantastically excessive. I used to be able to run it well on a 2Gb VPS.
galafrin said:
It has always been slow and I feel it is not really improving in that matter for instance it takes a few minutes to start my profile sadly because quickly operating is critical. . Perhaps upgrading to .latest version of Dot Net Framework from 7 years old 4.0 will do, thouight.
@victor.major
victor.major
03 May 2021, 12:33
RE:
This looks great! Thank you.
One question, why are we declaring the following as a user variable? Is there any benefit to making the timer not refresh every second for example?
[Parameter("Timer Interval (Seconds)", DefaultValue = 1, MinValue = 1)]
public int TimerIntervalInSeconds { get; set; }
V.
amusleh said:
Hi,
There are several issues with your code, first you should not put any time based logic inside OnBar method, instead you should use the OnTimer method and start timer on an interval that suits your specific needs.
You should not use TimeInUtc, the position EntryTime is set based on your robot time zone attribute, and you should use Server.Time not Server.TimeInUtc, it only works if your robot time zone is UTC.
Here is an example cBot:
using cAlgo.API; using System; namespace cAlgo.Robots { [Robot(TimeZone = TimeZones.UTC, AccessRights = AccessRights.None)] public class ClosePositionOnTime : Robot { [Parameter("Timer Interval (Seconds)", DefaultValue = 1, MinValue = 1)] public int TimerIntervalInSeconds { get; set; } [Parameter("Trade Type", DefaultValue = TradeType.Buy)] public TradeType TradeType { get; set; } [Parameter("Profit", DefaultValue = 100)] public double Profit { get; set; } [Parameter("Close Time (Minutes)", DefaultValue = 60)] public double CloseTimeInMinutes { get; set; } [Parameter("Label", DefaultValue = "My_cBot")] public string Label { get; set; } protected override void OnStart() { Timer.Start(TimerIntervalInSeconds); } protected override void OnTimer() { var currentTime = Server.Time; foreach (var position in Positions) { // Filter positions if (!string.Equals(position.Label, Label, StringComparison.OrdinalIgnoreCase) || !position.SymbolName.Equals(SymbolName, StringComparison.OrdinalIgnoreCase) || position.TradeType != TradeType) { continue; } // Close if position meet the condition if (position.EntryTime.AddMinutes(CloseTimeInMinutes) >= currentTime && position.NetProfit >= Profit) { ClosePosition(position); } } } } }
@victor.major
victor.major
15 Jul 2020, 09:32
RE:
Thank you for this. It works very well and was easy to follow and implement. In fact I did it immediately and it worked, but did not want to create noise by replying :) Then I felt bad for not thinking you, so thank you.
V.
@victor.major
victor.major
09 Jul 2020, 10:07
RE:
Thank you Panagiotis.
Sorry for the clearly basic following question, but I learn by doing...
How do I change
(TimeFrame.Hour).ClosePrices
Into an expression that allows me to declare a user selectable time frame and source from the cBot settings for example these:
[Parameter("Timeframe", Group = "RSI", DefaultValue = "Minute10")]
public TimeFrame RSITimeFrame { get; set; }
[Parameter("Source", Group = "RSI")]
public DataSeries Source { get; set; }
Thanks,
Victor
PanagiotisCharalampous said:
Hi Victor,
Here is an example
var rsi = Indicators.RelativeStrengthIndex(MarketData.GetBars(TimeFrame.Hour).ClosePrices, 14);
Best Regards,
Panagiotis
@victor.major
victor.major
25 May 2020, 16:02
RE:
PanagiotisCharalampous said:
Hi victor.major,
This will be fixed in v3.8. The beta will be released soon. The problem is that when you assign the values to backtesting Close values are set as Source instead of Open. Please try changing the source manually to Open and let me know if this resolves the problem.
Best Regards,
Panagiotis
Ok that is great. I look forward to v3.8. The same problem occurs with tick data and not just with the example cBot, but also with the closed source ones.
V.
@victor.major
victor.major
25 May 2020, 15:23
RE:
PanagiotisCharalampous said:
Hi victor.major,
It is a bug and it will be fixed in an upcoming update.
Best Regards,
Panagiotis
Hi Panagiotis,
when do you anticipate this update to come? I am still unable to obtain sane optimization/backtesting results. The latest optimization attempt gives me a USD 3.5k profit in a given period, while the exactly the same, identical settings (both using tick data) in backtesting results in a USD 5k loss. This is not really useful.
V.
@victor.major
victor.major
01 May 2020, 00:50
RE:
Any updates regarding this?
PanagiotisCharalampous said:
Hi victor.major,
For the Sample Breakout Bot, can you please provide me with the following?
1) Broker
2) Symbol
3) Oprimization Dates.
4) Parameters set that gives different results
Best Regards,
Panagiotis
@victor.major
victor.major
27 Apr 2020, 12:38
RE:
1. IC Markets
2. US2000 (Russel index)
3. 26/03 - 26/04
4. These settings are not good, but illustrate the problem.
[ChartParameters]
Symbol = US2000
Timeframe = m1
[cBotParameters]
Quantity = 1
StopLossInPips = 1990
TakeProfitInPips = 550
Source = Open
BandHeightPips = 305
Deviations = 1.5
Periods = 15
MAType = Simple
ConsolidationPeriods = 1
PanagiotisCharalampous said:
Hi victor.major,
For the Sample Breakout Bot, can you please provide me with the following?
1) Broker
2) Symbol
3) Oprimization Dates.
4) Parameters set that gives different results
Best Regards,
Panagiotis
@victor.major
victor.major
27 Apr 2020, 12:17
RE:
Thank you for replying Panatiotis,
this happens with at least one closed source cBot. Regarding an open source example, the "Sample Breakout cBot" exhibits this behaviour.
Steps to reproduce are as above:
1. Optimise
2. Apply
3. Get a vastly different result compared to the optismisation run whose settings were applied.
V.
PanagiotisCharalampous said:
Hi victor.major,
Can you please provide the complete cBot code and steps to reproduce the issue?
Best Regards,
Panagiotis
@victor.major
victor.major
23 Feb 2020, 07:29
RE:
trander002 said:
we need this
Spotware made a decision to develop cTrader on c#, a proprietary MIcrosoft language and they take extensive use of .net libraries which are again proprietary to the Windows platform. Spotware would need to basically start again to make a cross platform version, which is actually what they should do. The sooner they start the sooner that 10 man years project time will start counting down.
@victor.major
victor.major
23 Feb 2020, 07:23
RE: RE: Saving optimisation results
SwXavi said:
phill.beaney said:
I don't understand why more people aren't requesting this, unless there is a way to save the data from a temp file that everyone except me is ware of.
Any Ideas welcome.
I really like this to be implemented in order to do proper research, currently backtests and optimizations cannot be shared or exported, the only option is to do screenshots, which is awful.
Seconded and thirded +1... I now see that I was not mistaken and that there is in fact no way to export/save/restore optimisation data. I find this so unusual that I am still not convinced that I am not missing something. I am not aware of any other modeling or simulation software that does not save the simulation results, ie. I am not comparing cTrader to MetaTrader. There is a basic expectation that if you spend one day on generating simulation results that you will be able to work with them after the fact, or that they will be saved somewhere in case there is a software problem or a crash - which is what happened to me just then.
@victor.major
victor.major
23 Feb 2020, 07:17
RE:
PanagiotisCharalampous said:
Something I forgot to mention is that you can export the history of backtesting and optimization results, if you right click inside the History tab and select "Export to Excel". I hope this helps!
Has saving optimisation results been addressed? I am using cTrader 3.7. It crashed before I could look at the optimisation results. Upon restart all the results were gone and I do not see any trace of any activity in History or Journal and I see no obvious way to access the optimisation results.
Please let me know that you are in fact saving them to a file somewhere and let me know where that file is.
V.
@victor.major
victor.major
06 Feb 2020, 13:10
( Updated at: 21 Dec 2023, 09:21 )
RE: RE: RE: RE:
The cBot is closed source so I cannot post the code.
Nevertheless the bug has been replicated by the cBot developer and I was informed that the error is with the cTrader. When will you be releasing an update? I am keen to resume my optimisations.
V.
PanagiotisCharalampous said:
victor.major said:
1. Optimization may have indeed finished. The parameters are different across different runs, however I have no way of seeing which parameters are optimal as all the results are zeroed.
2. When I press "play" the optimizer quickly goes through the sequence of run numbers and stops at 574 and shows the screen above.
3. cBot runs well and two optimisations completed successfuly on 3.6
4. I restarted cTrader, once automatically during update, once manually. I also removed the cBot instance and assigned it again. No change.
5. cBot is closed source.
My guess is that this is some kind of cache issue. Can I manually scrub the optimizer cache and start again?
V.
victor.major said:
Hi thank you for the reply.
This is what I see and cannot unsee - there is no way for me to restart or resume the optimization process:
PanagiotisCharalampous said:
Hi Victor,
Can you post some screenshots as well for us to understand the issue?
Best Regards,
Panagiotis
This is probably an issue with the cBot's code. Can you post the source code?
Best Regards,
Panagiotis
@victor.major
victor.major
05 Feb 2020, 14:39
( Updated at: 21 Dec 2023, 09:21 )
RE: RE:
1. Optimization may have indeed finished. The parameters are different across different runs, however I have no way of seeing which parameters are optimal as all the results are zeroed.
2. When I press "play" the optimizer quickly goes through the sequence of run numbers and stops at 574 and shows the screen above.
3. cBot runs well and two optimisations completed successfuly on 3.6
4. I restarted cTrader, once automatically during update, once manually. I also removed the cBot instance and assigned it again. No change.
5. cBot is closed source.
My guess is that this is some kind of cache issue. Can I manually scrub the optimizer cache and start again?
V.
victor.major said:
Hi thank you for the reply.
This is what I see and cannot unsee - there is no way for me to restart or resume the optimization process:
PanagiotisCharalampous said:
Hi Victor,
Can you post some screenshots as well for us to understand the issue?
Best Regards,
Panagiotis
@victor.major
victor.major
14 Oct 2024, 07:21
…never mind, as soon as I posted this message my dev code managed to fetch D1. I do not know what is going on. There was no error, no refusal from the API. It just did not report that it had any new data, and now it reported new data and gave it to me…
@victor.major