(long message)Request advie on an app I'm doing

B

Benjamin

Hello,
I need some advice on a financial application I'm doing. First, I suppose
I should give a little background so you know where I'm coming from. For
5 years I earned my living doing COBOL programming with some occasional
VB and web programming with ASP. Prior to that I went to a technical
college where I took a couple of courses in c, c++ and pascal. Although
now about all I can do is the basic "hello world" type applications in
them, also I never really grasped oop. Which is one of the reasons I want
to learn python, as it seems to be the easiest language to learn oop
with. For the last 2 years, I've been earning my living trading, at first
stocks and futures, now it's mainly all forex (foreign exchange), thus
the need for this app.

Anyway the app. I'm doing is a forex charting, backtesting and
eventually/hopefully be able to autotrade (it'd also be nice to implement
a neural network), also I figure that this will be good way to learn
other programming languages as eventually I plan to rewrite this in c,
c++ and Java (and possibly assembler, just cause I like to torture myself
;) ). Basically it's something along the lines of Wealth lab:
http://www.wealth-lab.com/ or Tradestation: http://www.tradestation.com/
but one that will run on linux as well as windows (actually it'll be a
combination of several trading programs, basically all the features I
like with none of the ones that annoy me).

Heres the application implementation proces:
Phase I - design and implement a MySQL database
Phase II - import/export a flatfile into the database
Phase III - add networking to retrieve historical data via dukascopy
Phase IV - add realtime networking to retrieve real-time data via
dukascopy
Phase V - design and implement gui (minus the charting)
Phase V1 - add charting
Phase VII - add indicators
Phase VIII - add scripting capability
Phase IX - add backtesting
Phase X - add paper-trading
Phase XI - add auto-paper-trading
Phase XII - add program, database, and internet connection redundancy
Phase XIII - add data-feed redundancy with E-signal and oanda
Phase XIV - implement real auto-trading with oanda and gain
Phase XV - add Futures, stocks and options (nice but optional)
Phase XVI - add Futures, stocks and options auto-trading with IB and
Mytrack (nice but optional
Phase XVII - implement Neural Network (nice but somewhat optional)

When I was designing this I thought that the scripting capability would
actually be the toughest thing but since I learned about eval() and exec
() that should be fairly trivial (this was actually a very pleasant
surprise with python for me). Now the most difficult parts as I see it is
going to be the gui (particularly the charting), the redundancy, and the
neural network (this will be the toughest but put off till last because
without the rest in place there's really just no point in having it,
which is also why it's somewhat optional).

Phases 1 and 2 are done phase 3 will be done today and phase 4 will be
done this weekend. Which brings me to my questions. First I need to know
which gui toolkit, I should use. The requirements are basically stability
on both linux and windows, and it needs to have some type of canvas or
picturebox control (or widget is what I think the term is in python), so
I can draw the graphs. Also it needs to have a splitter, and toolbar
widget. From what I've seen it look like the major gui toolkits are:
tkinter (of course), wxpython, pyqt (actually I have doubts about this as
I just don't like the license), pygtk, pyfltk, fxpy, and pyopengl. What I
need to know is whether you think one of the above is suitable for my
app., given the requirements, how stable it is, how easy it is to
implement, whether docs are available (ie. tutorials and preferably a
book or two), and how easy it is to learn (although this is the least of
my concerns), also I need to know if you think speed will be a concern as
I plan to be able to graph at least 10000 timeframes of data with
probably 6 - 10 indicators so figure it will need to draw something like
100,000 - 200,000 points/lines/ boxes etc for every 10,000 periods.

I'd also like to know if there's any suitable financial chart widget out
there that does candlestick, ohlc, point and figure, and 3-line break
charts, etc., I've looked but the only one I've come across is Chart
Director: http://www.advsofteng.com/product.html and I find it to be
unsuitable, actually what I really need something like the StockChart X
activex control: http://www.modulusfe.com/stockchartx/

Finally, and this is just planning for the later stage, I'm wondering if
anyone has any ideas on how I can implement the program redundancy. Right
now I'm thinking of having the program run on about 6 or 7 computers with
with every two hooked up to a different internet connection, ie the main
group would be connected to a t-1 line, the next group connected to a
cable line, the next connected to dsl, next connected to a isdn line and
then finally one connected to a regular modem. The thing with this is
that, I don't see any problem with having them talk to each other or
perhaps set up a table in the database with two fields:
CurrentTradingComp and LastTime, and then just have the current program
update that table every 10 seconds, and then have every program check the
table every 30 secs or so and if the first goes down then have the second
take over, then the third etc. That's not a problem, what I'm wondering
is whether or not (and if so how) python can dial the modem on the final
computer, or even if it's a good idea to even have the programs wait till
the one connected to the modem becomes the main computer, (I'll have to
think about that) anyway's I'm rambling but if anyone has any comments or
suggestions, on this I'd love to hear them.

Sorry for the long message, but I figured it would be better to give all
of the information you might need rather than leave some vital piece out.

Thanks,
Ben
ps - if you want to email me then just take out the numbers in my return
address

x-- 100 Proof News - http://www.100ProofNews.com
x-- 3,500+ Binary NewsGroups, and over 90,000 other groups
x-- Access to over 800 Gigs/Day - $8.95/Month
x-- UNLIMITED DOWNLOAD
 
S

Steve Lamb

Which brings me to my questions. First I need to know which gui
toolkit, I should use. The requirements are basically stability on
both linux and windows, and it needs to have some type of canvas or
picturebox control (or widget is what I think the term is in python),
so I can draw the graphs. Also it needs to have a splitter, and
toolbar widget. From what I've seen it look like the major gui
toolkits are: tkinter (of course), wxpython, pyqt (actually I have
doubts about this as I just don't like the license), pygtk, pyfltk,
fxpy, and pyopengl.

Take a look at wxPython. It is a wrapper around wxWindows which an
excellent cross platform (Windows/*Nix) set of Libs. It uses GTK on
Linux and Windows native on the Windows side. Also there is an
excellent RAD tool for wxPython, Boa-Constructor. The author took his
inspiration from Delphi and applied it to wxPython. Very easy to use,
very fast designing of GUI elements.
 
C

Chris Liechti

Take a look at wxPython. It is a wrapper around wxWindows which an
excellent cross platform (Windows/*Nix) set of Libs. It uses GTK on
Linux and Windows native on the Windows side. Also there is an
excellent RAD tool for wxPython, Boa-Constructor. The author took his
inspiration from Delphi and applied it to wxPython. Very easy to use,
very fast designing of GUI elements.

yes, boa is nice. but i like to use SciTe as editor for all kinds of source
files (instead of an IDE) and i prefer wxGlade as GUI editor. wxGlade does
not support binding events, like boa, but it's a great and fast way to
design a GUI with sizers (you can even update the source file later, it
keeps you code and updates the gui part)

chris
 
J

John J. Lee

[...]
When I was designing this I thought that the scripting capability would
actually be the toughest thing but since I learned about eval() and exec
() that should be fairly trivial (this was actually a very pleasant
surprise with python for me). Now the most difficult parts as I see it is
[...]

Why do you think you need eval or exec? If it's all in Python ('pure
Python'), a 'script' is just a Python program that imports stuff from
your libraries and does whatever is required.

If it's not all in Python, it's usually easiest to wrap the non-Python
bits for Python access so you can just import them too (with eg. SWIG,
Pyrex or Boost.Python), and write scripts exactly as if everything
were pure Python (or, in the case of Java, just use Jython).

Another way, attractive if you want to write scripts in multiple
languages (not just Python), is to use a component framework like
CORBA or XPCOM (or UNO, or KParts, or Bonobo, or MS COM...sigh).


John
 
S

Steve Lamb

yes, boa is nice. but i like to use SciTe as editor for all kinds of source
files (instead of an IDE) and i prefer wxGlade as GUI editor. wxGlade does
not support binding events, like boa, but it's a great and fast way to
design a GUI with sizers (you can even update the source file later, it
keeps you code and updates the gui part)

Boa does this. Well, mostly. You cannot touch pregenerated areas
with code it doesn't know about. As time goes by it knows about more
and more code. It will warn you if you're editing a portion of code
that contains pieces it doesn't know about. Boa also does sizers.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top