tradingrobotdsl: Domain specific language for automated trading (robot)
Copyright (C) 2007 by Timur Adigamov (timur at adigamov dot com)
http://www.tradeindexfuture.com

== DESCRIPTION:

Domain specific language library for programming trading robots.
Quotes get from opentick server (through opentick-ruby module)
Order place to Trader Workstation socket API (through ib-ruby module)

This is an alpha test quality release. I specifically DO NOT recommend
that it be used for live trading under any circumstances. It has not
been tested. I am releasing it in the hopes that the many eyes of the
community will help with enhancing it, so that we all will have a
robust and reliable library to use.

== FEATURES/PROBLEMS:

* get quotes from opentick servers
* simple average indicator realized :)
* order placement (buy/sell) doesn't work

== SYNOPSIS:

robot do
login 'test_opentick', '123123'
history :duration => 300, :from => Time.now-10*24*3600, :to => Time.now
query MSFT do
if (avg MSFT, 9)/(avg MSFT, 25) - 1 > 0.5
puts "buy MSFT"
end
if (avg MSFT, 9)/(avg MSFT, 25) - 1 < - 0.5
puts "sell MSFT"
end
end # query
end # robot

== REQUIREMENTS:

* ib-ruby
* opentick-ruby

== INSTALL:

* sudo gem install ib-ruby
* sudo gem install opentick-ruby
* sudo gem install tradingrobotdsl

== LICENSE:

This library is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
published by the Free Software Foundation; either version 2.1 of the
License, or (at your option) any later version.

This library is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301 USA


== Use At Your Own Risk

As the license indicates, this code is provided AS IS, WITH NO
WARRANTY WHATSOEVER, not even an implied warranty of merchantability
or fitness for a particular purpose.

*ANY USE YOU MAKE OF THIS CODE IS ENTIRELY AT YOUR OWN RISK.*

This code may contain any number of errors or bugs, both known and
unknown. Use of this code may result in monetary loss due to known or
unknown bugs and errors. In no event shall the author be liable or
responsible for any loss whatsoever, direct or indirect, that may
occur as a result of your use of this code.