Closed GoogleCodeExporter closed 9 years ago
Original comment by daniel.k...@gmail.com
on 28 Aug 2010 at 6:22
After market simulation is finished, html report is generated. It contains one
time line graph for each analysed market. Time line graph may contain up to 100
time series (limited due to performance reasons). Which time series are
displayed depends on trader implementation, that can use API to add data to a
graph. For instance the trader below is adding best toBack/toLay prices to a
graph:
def execute(ctx: ITraderContext) = {
for(runner <- ctx.runners) {
val bestPrices = ctx.getBestPrices(runner.runnerId)
ctx.addChartData("toBack",bestPrices._1)
ctx.addChartData("toLay",bestPrices._2)
}
}
The time stamp for chart data is the same as time stamp of historical market
state that the trader implementation is executed for. For example, if trader is
analysing market data for one minute with a collection interval 1 sec, then the
graph for the trader above will contain 60 samples for both toBack/toLay series.
There is no limitation on what kind of data can be added to a chart. For
instance the example below will add a constance line to a chart:
tx.addChartData("fixedLine",50)
Original comment by daniel.k...@gmail.com
on 28 Aug 2010 at 6:46
Original comment by daniel.k...@gmail.com
on 28 Aug 2010 at 6:57
TODO:
- Create empty html report and save it to current directory - 1
- Add one empty time line graph for each analysed market to html report - 3
- Add addChartData(label:String,value:Double) to Trader context - 1
- Update time line graph with chart data - 3
Original comment by daniel.k...@gmail.com
on 28 Aug 2010 at 7:01
Original comment by daniel.k...@gmail.com
on 4 Sep 2010 at 8:07
Original issue reported on code.google.com by
daniel.k...@gmail.com
on 28 Aug 2010 at 6:22