| Author |
Message |
|
|
|
My recommendation is to get a QA account at an actual broker.
|
 |
|
|
You can hack around this by adding a ServerStatusListener to the ORS Client inside of StrategyAgent.
Check out Kohera Metc Tools, DelegatorStrategy class to see how this might be done:
http://github.com/jbrukh/metctools
|
 |
|
|
Try going to photon/features/ and playing around with one of the feature.xml files. This is where the photon plugins are specified.
Edit: Also make sure the feed is compiled as an Eclipse plugin.
|
 |
|
|
So, are you saying that you have to actually duplicate the entire StrategyAgent folder? (This would mean having copies of the executables and libraries!)
Is there a way to specify and load an alternate configuration for StrategyAgent without necessarily copying the folder? I would think you could modify the startup script so that it would run the StrategyAgent, but load up a different directory with just the configuration.
Any ideas?
|
 |
|
|
|
http://www.marketcetera.org/confluence/display/MPIO/Support+FAQ#SupportFAQ-Q%3AWheredoIdownloadthelatestrelease%3F
|
 |
|
|
|
Those would be the methods for Ruby strategies.
|
 |
|
|
I believe you'd have to use maven to assemble the StrategyAgent project, then go into strategyagent/target/strategyagent/bin, and there should be the StrategyAgent startup scripts. If you want to debug in Eclipse, then you would have to set up StrategyAgent to start properly there. One way of doing that is to look at the stategyagent.bat (or .sh) script and replicate the java parameters in an Eclipse Debug Configuration.
I realize that this is not very detailed; this is because I have never actually done this. =)
Thanks,
Jake.
|
 |
|
|
Maciej,
Here is my take:
Firstly, you would enter a Photon (or StrategyAgent) session as an "admin"; in this way, you see all the activity on all accounts and are able to receive all execution reports (I think).
In principle, you would then need only to engineer a strategy that is always on and listens to the execution reports and implements your risk management.
In practice, the following issues:
1. There is no easy way of keeping track of P&L unless you keep track of it yourself. Therefore, once the execution report arrives for an interesting trade, you would need to store its execution price, subscribe to the data feed, and calculate the P&L.
2. If your strategy happens to crash or is turned off during trading, your P&L data will be lost; thus, you will need either some sort of persistence scheme, or will have to somehow recover the execution report of interest.
3. I believe you can revoke a user's trading privileges using the orsadmin utility (though I am not aware of an API that does this). However, have a look at org.marketcetera.ors.security.ORSAdminCLI, as this seems to be what the orsadmin utility is running.
4. This would be a good question to ask the developers about: Suppose user1 goes +100 MSFT, and admin closes out -100 MSFT. I am pretty sure that user1 will still see his position as +100, even though the net position is 0. As far as I know, there is no way for admin to send an order *as* some user; this could potentially be important functionality that should be added to the next release.
Thanks,
Jake
|
 |
|
|
I have had a limited amount of success trying to get this to run through Maven. First, I appended a profile "mytest" to pom.xml (similar to "execute") to run the HelloWorld.txt input file; I modified the paths so that that executing "mvn -Pmytest exec:java" works and turns the StrategyAgent on. However, I get the following exception:
27 Sep 2009 13:15:46,800 WARN [org.marketcetera.strategyagent.StrategyAgent.main()] marketcetera.strategy.StrategyModule (StrategyModule.java:1240) - The strategy failed to connect to the client. This strategy will still run, but will not be able to retrieve brokers or positions.
org.marketcetera.client.ClientInitException: Unable to fetch the client instance as it has not been initialized yet or has been closed. Initialize the client first and retry operation.
It seems that StrategyAgent already assumes that ClientManager already has been initialized and doesn't try to initialize it itself. Any ideas?
Thanks,
Jake.
|
 |
|
|
Agreed. Can someone please provide basic instructions on how to invoke a StrategyAgent that has been compiled from code and use it to launch a Java strategy?
The scenario is this:
- I have built ORS successfully and it is running.
- I have a Java strategy MyStrategy.class (or MyStrategy.java) that has external dependencies on some library foo.jar.
- I would like to launch StrategyAgent to run this strategy and view the output in Photon.
Thanks,
Jake.
|
 |
|
|
|
The JRuby environment can load Marketcetera Java classes. How can I make my own custom Java class visible to JRuby?
|
 |
|
|
|
Generating proper Eclipse metadata for compiling Photon is the most finicky part of the setup. Checkout http://metc.jottit.com for detailed Mac OS X installation notes.
|
 |
|
|
|
How do you configure the logging output that is displayed in the Sink and Main Consoles?
|
 |
|
|
Thought I might share some code that I found useful. This enables you to catch broker and server status events.
Thanks,
Jake.
|
 |
|
|
|
Anyone know how to create a custom FIX message in a Ruby strategy in Metc?
|
 |
|
|