Hacking on OANDA's API


OANDA Hacking

If you're reading this and you're not me, you should probably not use this software. For one thing, I've never written anything in Python before. So there's that. Also, I'm not a very good programmer.


Donchian-style support and resistance system and exponential moving average that behave like the ones in the links, but are not exact implementations. Trading spot prices (like I do) does not have the same logistical requirements as trading proper futures with $1M for a starting balance.

First, you'll need the data set. Put your OANDA access token into a file named access_token.txt and the relevant account number into a file named account.txt. They probably should be in the same file, or use a fancier config or something, but right now, that's how it works.

For a simple trial of a two channel Donchian system on silver, run

python donchian.py

Silver is the default. If you want to run copper,

python donchian.py -i copper

The default instruments are copper, silver, soybeans and sugar for Donchian channels, for reasons you will see if you run other instruments through the backtester. None acheive the same "bliss" as the four selected.

Note that "bliss" is a simple calculation: the overall return divided by the worst percent drawdown in percentage, as per Mr. Seykota's methods.