Klaus, looks like it worked. I can see from my recorded data file that
market data stopped at 23:00:00 Berlin time and resumed at 03:48:36
Berlin time on the following day. The only remaining issue is that
when there is no market data, the price gets set to -1, which I will
fix soon in the code and post here.

On Oct 1, 6:22 pm, Eugene Kononov <[email protected]> wrote:
> Today is Friday, and IB data stops until Sunday afternoon, so it's not a
> good day for this test. I'll repeat on Monday.
>
> On Fri, Oct 1, 2010 at 6:16 AM, Klaus <[email protected]> wrote:
> > of course. stupid me, I forgot to reset averageBalance
>
> > On 1 Okt., 02:43, nonlinear5 <[email protected]> wrote:
> > > Klaus,
>
> > > I thought about this, and figured that the code should actually be:
>
> > >         if (Double.isNaN(averageBalance)) {
> > >             averageBalance = 0;
> > >             return null;
> > >         }
>
> > > Otherwise, averageBalance will forever be NaN and so no market data
> > > will be recorded once a new session starts. Please try this, and as I
> > > mentioned, I'd be running the same thing.
>
> > > On Sep 30, 7:05 pm, Klaus <[email protected]> wrote:
>
> > > > Tried the approach with null:
> > > > weird. It does not stop (clock is still counting and so on, but
> > > > the data does not change any more..)
>
> > > > Klaus
>
> > > > On 30 Sep., 21:04, Klaus <[email protected]> wrote:
>
> > > > > I would also expect during these times 0 as a course, but it is -1 ..
>
> > > > > On 29 Sep., 22:23, nonlinear5 <[email protected]> wrote:
>
> > > > > > > Alternatively: can we simply return null?
>
> > > > > > Yes, this should work without modifying any other parts of the
> > code.
> > > > > > It's actually a mystery to me why the averageBalance would ever be
> > > > > > NaN. I'd expect 0 when market data stops. I'll investigate before
> > > > > > making a permanent fix.
>
> > --
> > 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]<jbooktrader%[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.

Reply via email to