Topics
Replies
PanagiotisCharalampous
02 Jan 2019, 11:50
Hi khemrathy,
Thanks for posting in our forum. See below an example on how to achieve this.
using System; using System.Linq; using cAlgo.API; using cAlgo.API.Indicators; using cAlgo.API.Internals; using cAlgo.Indicators; namespace cAlgo.Robots { [Robot(TimeZone = TimeZones.UTC, AccessRights = AccessRights.None)] public class MarketAnalysis : Robot { protected override void OnStart() { Positions.Closed += Positions_Closed; } private void Positions_Closed(PositionClosedEventArgs obj) { if (obj.Reason == PositionCloseReason.StopLoss) PlaceLimitOrder(obj.Position.TradeType, Symbol, obj.Position.VolumeInUnits, obj.Position.EntryPrice); } } }
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
02 Jan 2019, 11:35
Hi enam3074,
Thank you for posting in our forum. We do not have an ETA for this feature but the development team is currently working on it. It should be included in one of the releases planned for 2019.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
02 Jan 2019, 11:23
Hi to both,
Currently there is no option to predownload all backtesting data at once. As soon as the backtesting data is downloaded, it is kept until a reason to redownload occurs e.g. software update that affects the way the data is read. Therefore if you have downloaded your data once, you will rarely need to redownload it.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
02 Jan 2019, 11:17
Hi oliveira.phc,
I tried this today but could not reproduce any delay. It could be related to your network connection since the data need to be downloaded.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
02 Jan 2019, 11:05
Hi eliezer_barros,
Which broker's cTrader do you use?
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
28 Dec 2018, 13:10
Hi lec0456,
This is the rule we are using. We agreggate the data at 17:00 EST.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
28 Dec 2018, 12:55
Hi lec0456,
If you want to have a fixed time for day change throughout the year, the use EasternStandardTime. The change of the day takes place at 17:00 EST.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
28 Dec 2018, 12:24
Hi oliveira.phc,
Can you share the cBot code so that we can check?
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
28 Dec 2018, 11:17
Hi lec0456,
A day changes at 22:00 UTC +0.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
28 Dec 2018, 09:56
Hi,
You can try something like the below
foreach (var position in Positions) { if ((Server.Time - position.EntryTime).Days > 90) position.Close(); }
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
28 Dec 2018, 09:28
Hi ywsing,
Thanks for posting in our forum. Did you check cTrader UI to see if the subcribed symbols still receive spots?
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
27 Dec 2018, 09:54
Hi Vitali,
What do you want to do? It is not clear to me.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
27 Dec 2018, 09:51
Hi Milan,
Thank you for posting in our forum. There is no such option in cTrader Copy since it uses an equity to equity model. The volume that will be copied is based on the equity to equity ratio according to the amount allocated to the strategy.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
27 Dec 2018, 09:47
Hi eliezer_barros,
Thanks for posting in our forum. I would suggest to create a new thread as this is a new subject. If it is something small then maybe I could help you. If it is a big task then I would advise you to contact a Consultant to assist you with this.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
21 Dec 2018, 15:51
Hi oliveira.phc,
ErrorCode is of type Enum, therefore a value type, so it has ? to indicate that it is nullable. Position and PendingOrder are reference types therefore can be null by default. So no ? is needed. This is a C# feature, not a cTrader Automate API one. You can read more about types here.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
21 Dec 2018, 15:24
Hi oliveira.phc,
I am not sure what are you referring too. Position and PendingOrder are reference types thus by default nullable. Actually Nullable types in C# are used to extend value types, not reference types.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
20 Dec 2018, 14:08
Hi procumulative@gmail.com,
Please send me an email at community@spotware.com to arrange the TeamViewer session. There is no plan for MIT orders for now but we can consider this given there is demand from the community.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
20 Dec 2018, 09:53
Hi eirik_1993,
There is no such feature out of the box at the moment but I guess it would not be hard to be coded into a cBot.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
20 Dec 2018, 09:44
Hi Ben,
Yes it will be accurate, you can verify it with the following experiment
using System; using System.Linq; using cAlgo.API; using cAlgo.API.Indicators; using cAlgo.API.Internals; using cAlgo.Indicators; namespace cAlgo.Robots { [Robot(TimeZone = TimeZones.UTC, AccessRights = AccessRights.None)] public class NewcBot : Robot { [Parameter(DefaultValue = 0.0)] public double Parameter { get; set; } protected override void OnStart() { Timer.Start(new TimeSpan(10000)); Timer.TimerTick += OnTimerTimerTick; } void OnTimerTimerTick() { Print(Server.Time.Hour + ":" + Server.Time.Minute + ":" + Server.Time.Second + ":" + Server.Time.Millisecond); } protected override void OnTick() { } protected override void OnStop() { // Put your deinitialization logic here } } }
Regarding the timestamp, check here how you can get the timestamp in C#.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
02 Jan 2019, 11:54
Hi Ton,
We do not have an estimation for this yet. I will inform you as soon as we have one.
Best Regards,
Panagiotis
@PanagiotisCharalampous