Topics
16 Nov 2023, 07:42
 1111
 1
15 Nov 2023, 10:36
 1989
 16
Replies

Spotware
10 Nov 2014, 09:38

Is there a way to add a timer that is only called on after login/relogin to server?

No, there is no such way.

are there other collections that may have a delay as well?

Positions and History collections do not have this issue.

Does OnStart() get called after login/relogin to server?

No, OnStart is called only once on cBot start.

So something like this would solve the problem?

if (Positions.Count(position => position.Label == RobotID) == 2 && PendingOrders.Count(position => position.Label == RobotID) == 0)
            {

//put a timer in here

                if (PendingOrders.Count(position => position.Label == RobotID) == 0)
                       {

Unfortunately no. Positions and PendingOrders collections are updated independently. As a workaround you can place a pending order far away from spot prices. Then if PendingOrders.Count > 0 that will mean that PendingOrders collection is in valid state and you can check it for your other orders.


@Spotware

Spotware
10 Nov 2014, 09:28

Unfortunately there is no way to restore the settings. If you have any additional information about cAlgo crash, please send it to troubleshooting@spotware.com.


@Spotware

Spotware
07 Nov 2014, 17:11

PendingOrders collection could be empty during several milliseconds after reconnect. If you use a Timer you can catch this moment. This issue will be resolved with next application update. We apologize for any inconvenience.


@Spotware

Spotware
07 Nov 2014, 14:42

Not sure why your broker has addressed this question to us. Normally this is broker responsibility to answer questions like this, unless broker considers technical issues, in this case broker must contact our support.


@Spotware

Spotware
07 Nov 2014, 14:15

Please contact your broker regarding this issue.


@Spotware

Spotware
07 Nov 2014, 11:44

Hello,

This feature implementation actually depends on the broker's side.

Best Regards


@Spotware

Spotware
07 Nov 2014, 11:06

Hello,

Your orders are not offset. Every order will be transferred for execution in the liquidity provider independently.

The execution prices for market orders, and the slippage you get depend on the liquidity provider.

Best Regards


@Spotware

Spotware
07 Nov 2014, 10:40

Hello,

This issue is currently getting fixed.

Best Regards


@Spotware

Spotware
06 Nov 2014, 17:19 ( Updated at: 21 Dec 2023, 09:20 )

RE:

mijo212 said:

We contacted your broker. They forwarded you to us by mistake. Please contact your broker again. It is responsibility of broker to answer questions like this. 


@Spotware

Spotware
06 Nov 2014, 17:17

RE:

mijo212 said:

ExecuteMarketOrderAsync "Execute a market order in asynchronous execution mode" is not possible because the platform freezes at send of more than 10 positions.

Dear Trader,

We've checked execution of 20 commands in parallel. Unfortunately, we cannot reproduce the problem. If you can provide us more information regarding the issue please send it to troubleshooting@spotware.com


@Spotware

Spotware
06 Nov 2014, 10:04

Fixed. Thank you for your feedback.


@Spotware

Spotware
06 Nov 2014, 09:43

Is there a way that Ctrader could email me a notification whenever it starts up or restarts?

Probably there is no way. If you find a solution please share it with our community.


@Spotware

Spotware
06 Nov 2014, 09:39

Dear Trader,

Brokers cannot manipulate with execution time. cTrader is a proper NDD/STP type of a platform.

Even if you have several milliseconds latency to cServer, the execution time depends on liquidity provider that fills your order. You can control execution price by using Market Range or Limit orders.

Please contact your broker for further information.


@Spotware

Spotware
05 Nov 2014, 17:57 ( Updated at: 21 Dec 2023, 09:20 )

You can configure email alerts by following steps:

  1. Log In to your cTrader ID. If you don't have it you can register it for free by pressing Sign Up.
  2. Click on "Email Notifications" icon
  3. Select desired alerts

In such case you don't need to code anything in your cBot.


@Spotware

Spotware
05 Nov 2014, 14:09

RE:

AlexanderRC said:

Should not OnError() virtual method be marked as [Obsolete]?

OnError is not obsolete, it handles errors from both API approaches.

As it is not possible to deduce which API call caused the error?

No, it is not possible. We plan to add TradeOperation to TradeResult in the future.


@Spotware

Spotware
05 Nov 2014, 11:57

The problem I encountered is that [Robot] attribute is recognized even when it is enclosed in //, /**/ comments

We can recommend you to remove Robot attribute instead of putting it into the comment. We are not going to change this behavior in near future.

You should get an error message "Project "Robot1.csproj" contains more than one algo source file."

We will change this message.

I am trying to create a Multi-cBot backtest solution here by gathering several cBots into one.

cAlgo and cTrader do not support .algo files with several algo types (cBots or Indicators).

Also, symbols defined at the project level seem to be ignored.

You are right, conditional compilation symbols are ignored. We will consider to support conditional compilation in the future.


@Spotware

Spotware
04 Nov 2014, 17:17

Hello,

Unfortunately, at the moment this is not supported.

Keep in mind that you may promote your ideas here:

http://vote.spotware.com/forums/229166-ideas-and-suggestions-for-ctrader-and-calgo

 


@Spotware

Spotware
04 Nov 2014, 10:51

You need to replace long parameter to int parameter.


@Spotware

Spotware
03 Nov 2014, 16:49

We will look into this issue. For now we can recommend you to run one optimization process per one cAlgo instance.


@Spotware

Spotware
03 Nov 2014, 16:28

jobenb,

Please continue to post issue reports and suggestions. We appreciate your help.


@Spotware