Throttle down backtest in order to display the execution bar by bar
Author: JDardon
Creation Date: 3/28/2012 12:15 PM
profile picture

JDardon

#1
Hi Everyone.

I couldn't seem to find any previous topic regarding this question:
Is it possible to throttle down a back test execution of a strategy? By this I mean instead of having a strategy execute in memory and only displaying the chart after completing execution (and the position sizing phase); I would like to introduce some kind of a sleep(500 ms) statement somewhere in the trading loop so that the backtest execution could be throttled down and displayed on a bar by bar basis mostly for demo (a la live style).

This would also require some kind of command to be introduced in the trading loop as well to force the redisplay of the chart I suppose.

Thanks for any pointers.

profile picture

Eugene

#2
Hi Jorge,

You can throttle a backtest Strategy execution by inserting a Sleep, but only if you want to slow it down. ;) That will not affect chart update in any way, as it happens only after the Strategy has finished executing.

An addon like streaming data provider could do that but I haven't finished the Market Replay project due to an unexpected problem. It's still deferred. Here's the topic that you probably couldn't find:

Bar injection addin (Market replay)
This website uses cookies to improve your experience. We'll assume you're ok with that, but you can opt-out if you wish (Read more).