Topics
Replies
ianj
30 Aug 2013, 14:45
This is rubbish - I just managed to open a EURUSD, GBPUSD, AUDUSD positions from a single Robot on a EURUSD chart
Symbol looks to be both a property and interface (in cAlgo.API.Internals)
I implemented Symbol in my own class (MySymbol) and override Code with GBPUSD & AUDUSD and passed an instance of that into the Trade api
mySymbol.Code = "GBPUSD";
Trade.CreateMarketOrder(TradeType.Buy, mySymbol, Volume);
mySymbol.Code = "EURUSD";
Trade.CreateMarketOrder(TradeType.Buy, mySymbol, Volume);
mySymbol.Code = "AUDUSD";
Trade.CreateMarketOrder(TradeType.Buy, mySymbol, Volume);
and voila ! 3 positions - 3 pairs
@ianj
ianj
04 Jun 2013, 14:52
Errm !
Then how does the Open API work - does it require that you run a local cTrader to perform the communication with the server ? Does the Open API allow a connection to cTrader - then on onto the server.
This question is similar to that for which metaquotes is often criticised and spotware is advertised as a saviour - products can connect to Mt4 server using an embedded EA and bridging commahnds (as you can with a cTrader robot) but most prefer DIRECT CONNECTS which MQ is attempting to eradicate- which, according to you - does not exist for spotware at all
So how/where is it more Open ?
"Spotware Systems, developers of the FX platforms cTrader and cAlgo, have released details about their upcoming open API called Spotware Connect. The project will help third-party application developers easily build their own cTrader systems, and integrate existing FX related products into the cTrader platform."
@ianj
ianj
16 May 2014, 14:51
I added a few C# synchronisation "lock" calls to ensure that the 2 pool spawned threads (one reads the socket for external command, the second scans and reports the status of positions) cannot interfere with each other and/or On* event callbacks and it seems to have stabilised - at least for now. The threads are not locking and the only Symbol not found errors now come from unsupported pairs - as expected.
This would suggest that the Spotware C# API calls are not threadsafe
Please confirm if you think his is likely the case and i will continue to protect from threaded execution explicitly in my Robot
@ianj