[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[amibroker] Re: How to best synchronize Amibroker time with IB Market Data feed time?



PureBytes Links

Trading Reference Links

Thanks guys. I was actually comparing the IB market-data clock (right bottom corner of the TWS application) to the following code:

//~~~~~~~~~~~~~~~~~~SECONDS LEFT IN A BAR~~~~~~~~~~~~~
function secondsLeftOnBar_func()
{
Time = Now( 4 );
Seconds = int( Time % 100 );
Minutes = int( Time / 100 % 100 );
Hours = int( Time / 10000 % 100 );
SecondNum = int( Hours * 60 * 60 + Minutes * 60 + Seconds );
TimeFrame = Interval();
Newperiod = SecondNum % TimeFrame == 0;
SecsLeft = SecondNum - int( SecondNum / TimeFrame ) * TimeFrame;
SecsToGo = TimeFrame - SecsLeft;
return SecsToGo;
} 
WriteVal(secondsLeftOnBar_func(),2.2)   


My "Chart Timing" was showing <100mSec but the difference between the above routind and IB was in the range of 6-7 seconds. 

--- In amibroker@xxxxxxxxxxxxxxx, "ozzyapeman" <zoopfree@xxx> wrote:
>
> I use the same atomic clock utility, set to sync every 10 mins, and I am able to stay in sync with IB to the second. So as Jerry pointed out, it could possibly be your PC.
> 
> Note that if you are simply looking at new bars on your chart, those only start with a new tick - and in some cases the first tick may only come in a few seconds or more after zero, depending on the activity on the particular ticker you are looking at.
> 
> 
> --- In amibroker@xxxxxxxxxxxxxxx, "Jerry Gress" <pleasenospamplease@> wrote:
> >
> > Hello,
> > 
> > Check/replace motherboard/bios battery?
> > 
> > Switch to different clock check server? I use an instate server.
> > 
> > Regards,
> > 
> > Jerry
> > 
> > -----Original Message-----
> > From: amibroker@xxxxxxxxxxxxxxx [mailto:amibroker@xxxxxxxxxxxxxxx] On Behalf
> > Of corvidsystems
> > Sent: Wednesday, July 29, 2009 6:38 AM
> > To: amibroker@xxxxxxxxxxxxxxx
> > Subject: [amibroker] How to best synchronize Amibroker time with IB Market
> > Data feed time?
> > 
> > I synchronize my machine to the atomic clock
> > (http://www.worldtimeserver.com/atomic-clock/), however I'm still seeing 6
> > to 7 second difference on average.
> > 
> > Any best practices suggestions would be welcomed.
> > 
> > 
> > 
> > ------------------------------------
> > 
> > **** IMPORTANT PLEASE READ ****
> > This group is for the discussion between users only.
> > This is *NOT* technical support channel.
> > 
> > TO GET TECHNICAL SUPPORT send an e-mail directly to 
> > SUPPORT {at} amibroker.com
> > 
> > TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
> > http://www.amibroker.com/feedback/
> > (submissions sent via other channels won't be considered)
> > 
> > For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
> > http://www.amibroker.com/devlog/
> > 
> > Yahoo! Groups Links
> >
>




------------------------------------

**** IMPORTANT PLEASE READ ****
This group is for the discussion between users only.
This is *NOT* technical support channel.

TO GET TECHNICAL SUPPORT send an e-mail directly to 
SUPPORT {at} amibroker.com

TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
http://www.amibroker.com/feedback/
(submissions sent via other channels won't be considered)

For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/

Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/amibroker/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/amibroker/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:amibroker-digest@xxxxxxxxxxxxxxx 
    mailto:amibroker-fullfeatured@xxxxxxxxxxxxxxx

<*> To unsubscribe from this group, send an email to:
    amibroker-unsubscribe@xxxxxxxxxxxxxxx

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/