It is currently Wed Sep 08, 2010 4:55 pm




Post new topic Reply to topic  [ 22 posts ]  Go to page Previous  1, 2
Create Automated Trading System 
Author Message
Site Admin

Joined: Wed Sep 17, 2008 12:18 am
Posts: 407
Post Re: Create Automated Trading System
Hi, sorry I missed the part regarding separate application.

OK, so if you have your own separate application you can go 2 ways.
1. Do some form of remoting/communication to have the OFxP and your application working together, similar to what bolo suggests. This will require more work and is possible (there are a few ways to do it).

2. Have you application logic running inside the OFxP.
There are a bunch of classes that do the trading, and PlatformManagedExpert does "wrap" them, to allow for a more simplified creation of expert.

What I guess you need to know is that each expert is run inside an "ExpertHost" that servers as its "SessionManager". So the expert can query its SessionManager to get all the possible SessionInfo's and create Expert Sessions with them. Now the process of creating sessions with the Session Manager is as follows:

[see IExpertSessionManager]
- Get DataSources
>> ArbiterClientId[] DataSources { get; }

for the selected Data Source get running Sessions:
>> SessionInfo[] GetSourceSessions({pass here the Id the of the source})

- Get Execution Sources
>> ArbiterClientId[] ExecutionSources { get; }

for the selected Execution Source get running Sessions:
>> SessionInfo[] GetSourceSessions({pass here the Id of the source})

When you have selected the proper Data Source and Execution Source you need, and the SessionInfo that they share (must both support the same Session), create an expert session:

>> ExpertSession CreateRemoteExecutionSession(ArbiterClientId dataProviderSourceId, ArbiterClientId? orderExecutionerSourceId, SessionInfo sessionInfo);

Once you have created the Session, you can access it also from here:
>> ReadOnlyCollection<ExpertSession> Sessions { get; }

Now your ExpertSession contains Data Provider and Order Execution Provider. Use the first to obtain the data (there is events inside for ticks etc), use the second to Execute Orders.

An expert may have many ExpertSessions and thus operate on multiple trading couples, brokers, etc. at the same time.
---

It is not mandatory to do this process, of creating expert session, by expert code, since there is UI that can allow to do all this by hand. This UI is used inside the ManualTradeExpertControl UI component, and applies the "CreateExpertSessionForm". So if you want to manually create a session for your expert, just create this form like this is done in the ManualTradeExpertControl class. It will take care of creating a session for you, and then your expert can directly use the created session.

Also I will not lay one more line of code before I put a wiki page on how all this is done and why, so that I do not need to describe it all again... :D


Tue Feb 10, 2009 7:04 pm
Profile
Member

Joined: Sat Nov 29, 2008 11:47 pm
Posts: 68
Post Re: Create Automated Trading System
Hi Deyan,

I was also talking about your second way : I mean that the proxy expert reference the other platform assemblies and initialize the necessary components of this platform on OnStart method. When OnQuoteUpdate gets called expert proxy forward new quote to foreign platform, receives orders, and execute new orders on the executioner.

I think that this could be more or less work depending on the other platform arquitecture, regarding OFxP everything should be very straight forward.


Tue Feb 10, 2009 8:23 pm
Profile
New member

Joined: Thu Feb 05, 2009 6:17 pm
Posts: 6
Post Re: Create Automated Trading System
Thanks everyone, I'll try to get it working and will let everyone know what I've done when I'm finished.


Wed Feb 11, 2009 2:33 pm
Profile
Site Admin

Joined: Wed Sep 17, 2008 12:18 am
Posts: 407
Post Re: Create Automated Trading System
I have posted an article on the wiki regarding Experts

http://www.openforexplatform.com/wiki/i ... le=Experts

It contains a class diagram at the bottom. Any comments on how it can improved are welcome.


Wed Feb 11, 2009 5:30 pm
Profile
Site Admin

Joined: Wed Sep 17, 2008 12:18 am
Posts: 407
Post Re: Create Automated Trading System
New related wiki article

http://www.openforexplatform.com/wiki/i ... lex_Expert


Thu Feb 12, 2009 11:03 am
Profile
New member

Joined: Mon Oct 19, 2009 6:36 pm
Posts: 1
Post Re: Create Automated Trading System
Hi,

Sorry for asking a probably very basic question.

Is it possible to create an Expert such that it takes price quote from only ONE source but execute orders to multiple brokers?

I understand your massive workload in creating this amazing product, but I'd greatly appreciate seeing a more comprehensive documentation/wiki soon :)


Mon Oct 19, 2009 6:44 pm
Profile
Site Admin

Joined: Wed Sep 17, 2008 12:18 am
Posts: 407
Post Re: Create Automated Trading System
Hi,

better documentation coming as soon as we are done with designing the final version of the trading API. It turns out to be quite a challenge to do one, that works over all possible trading interfaces, but shall get there.

Regarding your question - all combinations are possible, yes - experts have the power to consume data from a single source and trade on many others. The only problem you will face is finding your way trough the knowledge on how to implement the strategy (you will need to read some source code)... but as I already mentioned we are working on it :) In the mean time feel free to ask your questions here, help is available.


Mon Oct 19, 2009 6:54 pm
Profile
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 22 posts ]  Go to page Previous  1, 2


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © phpBB Group.
Designed by Vjacheslav Trushkin for Free Forums/DivisionCore.