Bridge Robot

Place your robots here
Post Reply
ianj
Trader
Posts: 81
Joined: Sat Feb 09, 2013 2:07 am

Bridge Robot

Post by ianj »

On this topic i will go into my Bridge Robot

I have both an external GUI and an upcoming algorithmic strategy engine that i use to trade on Empty4 platforms - these allow me to abstract away from Empty4 as a platform and just use it as an execution platform only. It also means, that with the addition of bridges to other platforms i can trade the same strategy or manual trading on LMAX, cTrader, FIX, Empty4 etc

The GUI/strategy engine accesses the platforms over a very simplistic network socket protocol - its subject to change but for this Robot version it will be the same as i use to access Empty4 currently.

Even if you don't have a use for such a bridge there might be some comms/trade techniques used in here that you might find VERY useful - i am having to work them out myself as no-one seems to be able to help me, so it would be a pity to waste that knowledge

This thread really picks up from the Tick Capture indicator:
http://www.stevehopwoodforex.com/phpBB3 ... 454#p74454

which deals with network connections to the outside world and subscriptions/handling feeds for multiple pairs (spotware don't seem to acknowledge this is possible)

This Robot extends that idea to allow a remote client to create/manage positions - to use cAlgo as an execution engine

I have not started it yet but code will be forthcoming - i will post it on this message when its ready - I have all the essential mechanism i need to make it work now

I will not be providing any actual clients - they are part of my own collection - i MIGHT provide a couple of simplistic java test programs - but don't expect much !

Its might also be possible to use the SpotWare Open API at some time in the future, but at the moment that does not do much - certainly not enough to implement a Bridge
CNS VPS - it just works :-)
ianj
Trader
Posts: 81
Joined: Sat Feb 09, 2013 2:07 am

Re: Bridge Robot

Post by ianj »

Just to recap, if you read this:
http://ctdn.com/forum/cbot-support/443?page=1#8

spotware support would suggest that you cannot open positions in symbols other than the symbol of the chart in which the robot runs.

This appears to be incorrect - i have repeated the solution here from the capture indicator thread (this time only - don't worry)

Symbol seems to be both a property AND an interface in using cAlgo.API.Internals;

I implemented the Symbol interface and overrode "Code" to return "GBPUSD" but otherwise used the standard Symbol property attributes on a EURUSD chart

- and voila ! A GBPUSD position !

I need to tidy it up to be more general and look for complications but it seems to work

Code: Select all

            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);


3 positions (EURUSD, GBPUSD, AUDUSD) - one chart/robot (EURUSD) :D
Next - multi pair feed capture ...
CNS VPS - it just works :-)
phil_trade

Re: Bridge Robot

Post by phil_trade »

Hi

I'm also using an API to trade thru Empty4 with a high level language and sql.

It seems you can acces marketdepth ? Hace you try this ?

Cheers

Philippe
ianj
Trader
Posts: 81
Joined: Sat Feb 09, 2013 2:07 am

Re: Bridge Robot

Post by ianj »

phil_trade wrote:Hi

I'm also using an API to trade thru Empty4 with a high level language and sql.

It seems you can acces marketdepth ? Hace you try this ?

Cheers

Philippe
Yeah no problems - i have been streaming level 2 (price levels) across 30+ pairs for a couple of weeks now. There are generally between 6-15 price levels either side of the best bid/offer, depending on the pair - it varies. generally about 0.1-0.2 pips apart - but again it varies

Here is an example from last week some time - as captured in CSV from a separate process (i capture from an indicator, stream over a socket and store in a separate process)

Code: Select all

2013.08.18 21:00:25.433,icmc,GBPUSD,1.56124/50,1.56123/50,1.56115/100,1.56112/100,1.56101/100,1.56096/100,1.56091/300,1.56086/200,1.56078/500,1.56072/500,1.56067/500,1.56042/500,1.55885/1300,;1.56300/50,1.56301/25,1.56309/25,1.56312/100,1.56320/100,1.56328/200,1.56331/200,1.56336/200,1.56343/300,1.56348/300,1.56349/200,1.56354/300,1.56379/1000,1.56541/1290,
2013.08.18 21:00:26.998,icmc,EURUSD,1.33316/50,1.33315/50,1.33311/100,1.33307/100,1.33306/700,1.33305/500,1.33304/1000,1.33294/500,1.33162/2800,;1.33388/50,1.33389/50,1.33393/100,1.33397/100,1.33398/200,1.33407/1000,1.33408/1000,1.33418/500,1.33444/2800,
They are price levels - not individual orders - with price and size available at that level

I currently run 1 indicator per chart/pair but experiments this morning have suggested i can subscribe to multiple pair feeds in a single indicator/robot
CNS VPS - it just works :-)
talkyPip
Posts: 4
Joined: Tue Mar 04, 2014 11:25 am

Bridge Robot

Post by talkyPip »

can you share sample code for your bridge to use calgo as the engine and send orders to other terminal?
ianj
Trader
Posts: 81
Joined: Sat Feb 09, 2013 2:07 am

Bridge Robot

Post by ianj »

talkyPip » Tue Mar 04, 2014 12:30 pm wrote:can you share sample code for your bridge to use calgo as the engine and send orders to other terminal?
I don't mind in principle but a few points come to mins:

1. I have not progressed this project any - i have been busy on other things
2. I DO intend to progress it - probably some time soon
3. The API and facilities have DEFINITELY CHANGED - some of the features i understood were not possible but i had managed are now formally possible within the API - this is good as they will likely work reliably and consistently

I need to revisit the API in the coming weeks - if i get something working i am happy to publish at least part of it. I will not, however be publishing any form of general Empty4/Spotware bridge - any system i build will go through an intermediate layer which i will not be able to publish in full

Register for updates to the thread and i'll try to post when i manage some progress

BTW I recently added Bully Pepperstone to my live capture - the L2 looks different to the IC Markets - but they are broadly compatible - it depends on what the L2 is used for i guess. Its pretty expensive to capture 30+ pairs at 500MB per instance - at least over a VPS
CNS VPS - it just works :-)
Mocean
Posts: 9
Joined: Sat Jun 22, 2013 1:14 am
Location: Bondi - Australia

Bridge Robot

Post by Mocean »

Hi Ian,

looks interesting.

I've been exploring PT3 and looking for a dev to create an LMAX API Bridge Socket - are you interested in some paid work?

PT3 might also interest you, it has a lot of functionality you'd find useful.

We are working on a volume algo, would be good to chat sometime and swap ideas and collaborate.

Skype me if you want to chat some more?
Colemination
Dare to fail....live to succeed
Post Reply

Return to “Robots”