Yes, that's correct. Some of the indicators in JBT are exponential moving averages, so there is a configurable waiting period in JBT (set to 1 hour) to allow all indicators to settle before onBookSnapshot() is called for the first time.
On Tue, Jul 17, 2012 at 11:06 PM, Ali <[email protected]> wrote: > One more question. I noticed that onBookSnapshot() is not > called immediately upon the launching of a strategy. I found the following > reference in an earlier post: > > "The strategy must run an hour before onBookSnapshot() is called for the > first time." ... "That is correct. The intent of this is to allow the > indicators (such as EMA and SMA based indicators) to settle in. This is a > feature, not a problem." > > Is this still the case? > > Thank you in advance. > > > On Sunday, July 15, 2012 9:22:36 PM UTC-7, Ali wrote: >> >> Greetings, >> Is there an onMarketChange() method (in Strategy) in JBookTrader similar >> to the one in JSystemTrader? I am trying to use the the price of the last >> market trade to calculate the profit/loss for my current position in real >> time. >> >> Is onBookSnapshot() the equivalent in JBT? With something like: >> price = marketbook.getSnapshot().**getPrice(); >> >> Thanks. >> >> >> -- > You received this message because you are subscribed to the Google Groups > "JBookTrader" group. > To view this discussion on the web visit > https://groups.google.com/d/msg/jbooktrader/-/DRLCfHVJUcAJ. > > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/jbooktrader?hl=en. > -- You received this message because you are subscribed to the Google Groups "JBookTrader" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/jbooktrader?hl=en.
