Implemented basic charting in my backtester. For now only D1 works, since I haven't yet reintegrated the old tick -> candle convertor I had. My tick storage keeps in each daily tick file header the OHLC bid/ask info for the day, and I use that.
For fun I made an animated gif with UTC daily candles from all the tick providers I have, except TrueFX which has some missing days and screws up the animation:
http://dl.dropbox.com/u/190212/ff/veloce_daily.gif
Even if everything is implemented in IronPython, scrolling the chart is much smoother than other charting packages at the moment. WPF hardware rendering FTW. Of course, this may change when I'll start drawing more stuff, like indicators or chart objects. By moving some stuff to C++/CLI I think it will be possible to draw even continuous data (MT4 line chart, but much more dense) fast enough, without leaving Python.
I'll do a modular backtester design, just like in audio synths or in CEP engines. I'll be able to do stuff like this:
The language to describe such graphs will be represented in YAML, something like this:
This will be extremely easy to implement, unlike a GUI like drag'n'drop approach.
Who would have thought that my days designing audio software will be so useful for trading...
For fun I made an animated gif with UTC daily candles from all the tick providers I have, except TrueFX which has some missing days and screws up the animation:
http://dl.dropbox.com/u/190212/ff/veloce_daily.gif
Even if everything is implemented in IronPython, scrolling the chart is much smoother than other charting packages at the moment. WPF hardware rendering FTW. Of course, this may change when I'll start drawing more stuff, like indicators or chart objects. By moving some stuff to C++/CLI I think it will be possible to draw even continuous data (MT4 line chart, but much more dense) fast enough, without leaving Python.
I'll do a modular backtester design, just like in audio synths or in CEP engines. I'll be able to do stuff like this:
Inserted Code
main_tick -> broker main_tick -> main_candle -> main_candle_filler -> main_market_open_filter -> main_candle_collector main_candle_collector -> trading_system main_candle_collector -> ema_candle_source -> ema -> ema_collector ema_collector -> trading_system main_candle_collector -> main_chart ema_collector -> main_chart
Inserted Code
TickSource: id: main_tick broker: Dukascopy instrument: EUR/USD start: 2009-01-01 end: None CandleBuilder: id: main_candle period: H4 EmptyFiller: id: main_candle_filler MarketOpenFilter: id: main_market_open_filter start_day: Sunday start_time: 22:00:00 end_day: Friday end_time: 20:00:00 Collector: id: main_candle_collector CandleSource: id: ema_candle_source select: low EMA: id: ema period: 34 Collector: id: ema_collector Broker: id: broker slippage: 2 equity: 10000 currency: EUR TradingSystem: id: trading_system active_hours: - london: start_time: 08:00:00 end_time: 16:00:00 - ny_close: start_time: 18:00:00 end_time: 20:00:00 tp: 100 sl: 200 Chart: id: main_chart color_theme: NinjaTrader .....
Who would have thought that my days designing audio software will be so useful for trading...