No. What would be the applicability of such method if there were one?
Isak
Post subject: Re: How to get data interval of ITesterClient
Post rating: 0
Posted: Tue 19 Mar, 2013, 11:43
User rating: 6
Joined: Thu 19 May, 2011, 11:14 Posts: 235 Location: South Africa,
A strategy wants to know "from" during backtesting in the JF client. Since the call to setDataInterval is made from the client, the strategy cannot have access to "from" except through the API.
The reason why a strategy might want to know "from" is hard to explain briefly, but I will try:
In live mode, the strategy uses an ITesterClient internally to stream to itself a preamble of historical ticks in order for its state machine to reach a steady state quickly.
In backtest mode, the strategy cannot do this because the API does not allow more than one ITesterClient to exist at a time.
Therefore the strategy considers the first section of the backtest stream to be the preamble, and only starts trading after this section.
In order to decide when to switch over from preamble to trading in backtest mode, the strategy therefore needs to know "from"
In the past, I have approximated "from" with the date of the first tick streamed, but weekends introduce some unwanted variation in this approach.
API Support
Post subject: Re: How to get data interval of ITesterClient