Topics
Replies
Spotware
29 Nov 2013, 11:17
The Stop() method will be triggered before the callback is. Therefore, the robot will stop before the callback is triggered.
When using asynchronous methods, the callback is used to control execution when the result is received from the server.
In asynchronous operation, when a request is send to the server, the program continues to execute the next statements, without waiting for the response from the server. The statements that follow the trade operation request cannot assume anything about the result of those requests.
You also need to change the type of the callback in your method to Action<TradeResult>
protected override void OnStart() { OpenBuyLimitAsync("EURUSD", 10000, Symbol.Ask - 20 * Symbol.PipSize, "test1", null, null, null, "test", SendSMS); OpenBuyLimitAsync("EURUSD", 10000, Symbol.Ask - 20 * Symbol.PipSize, "test1", null, null, null, "test", PrintMsg); // Stop(); } public void OpenBuyLimitAsync(string argSymbol, int argVolume, double argTargetPrice, string argLabel, double? argStoplossInPips, double? argTakeprofitInPips, DateTime? argExpiration, string argComment, Action<TradeResult> argCallback) { Symbol XXXYYY = MarketData.GetSymbol(argSymbol); PlaceLimitOrderAsync(TradeType.Buy, XXXYYY, argVolume, argTargetPrice, argLabel, argStoplossInPips, argTakeprofitInPips, argExpiration, argComment, argCallback); }
@Spotware
Spotware
27 Nov 2013, 17:55
We are currently working on improving memory consumption in both cTrader and cAlgo.
Please note that the minimum requirement to run cAlgo is 512MB but for high-frequency robots or executing a large number of robots simultaneously, it is recommended to have at least 1GB RAM.
@Spotware
Spotware
27 Nov 2013, 17:00
RE:
Hyperloop said:
The code works as needed. But I am trying to make a multi-timeframe version of this but the results greatly differ from the original. The code for the multi-timeframe version is below:
The result on the chart will be different if a different Timeframe is used. The code looks fine.
@Spotware
Spotware
27 Nov 2013, 16:41
We will investigate the issue but in order to do so, we need a video capture or a screen capture of this happening. Please send it to engage@spotware.com.
@Spotware
Spotware
25 Nov 2013, 16:13
RE:
Mocean said:
Does cTrader use "Last looks" function like MT4?
In cTrader every order sent to the LP can either be filled by the bank fully / partially or rejected. Those are entirely banks' decisions - cTrader or the broker do not interfere at all.
As far as we know in the "other outdated rudimentary unfair platform" that you mentioned above it is all entirely up to the broker what to fill, at what rate, etc. That platform is so disconnected from the rest of the market that conversations about last look functionality in it are simply irrelevant. Bridge providers are trying hard to mitigate the incompatible differences with limited success, but (1) the broker will always be able to interfere with quotes in any way, (2) the broker will always be able to back-change any trades or anything else and (3) in most cases the broker only needs the feed to stream prices, again making the talk of last look in the "other rudimentary platform" rather irrelevant.
There is no point talking about last look in the "other platform" mentioned by you considering they provide the option to inject prices. So, brokers can throw in a quote that they like at any time. You can imagine what the implications of that are.
Meaning doe the LP's have the option of a delay in execution where they can pull their offer and reject the order?
We are not aware of any "delay in execution" on the LP side in the context of last looks. It is simply a matter of the bank having the option to reject a trade that came from a taker - no delays are necessary for that. Nothing wrong with banks having the option to reject orders - this is a common market practice. The rest of the order can go to the next bank, depending on the order type, and often at the same price.
Bear in mind that the debate about whether last look is good or bad for the liquidity taker like yourself is leaning towards it being bad. This is mainly for two major reasons:
- those banks that do provide liquidity will stream the worst prices they can for obvious reasons, resulting in even worse spreads
- fewer banks are willing to provide liquidity with no option to reject an order (this is fair in our opinion because they take the ultimate risk), which results in a much worse spread in the aggregated feed for you
The general consensus is that no-last-look-execution is only needed when the taker does not care about execution price as much as he does about a guaranteed fill. Which is a rare use-case.
BTW We use the term "other platform" because the maker of the "other platform" complains wherever they can the moment we make an attempt to tell the truth about them. E.g. as we do in this video http://www.youtube.com/watch?v=9-_HweZUGS4
@Spotware
Spotware
29 Nov 2013, 11:31
RE:
Hyperloop said:
Thank you for your kind words. Yes, there are plans for additional events such as you have described.
@Spotware