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

RE: [amibroker] Re: Display Current Time on Chart



PureBytes Links

Trading Reference Links

This code and the a previous message code which displayed the current time
in the title (with a Refresh going on) is very interesting.  Thanks for
sharing.

I have (am testing) the intraday qpFeed, and I notice two things with this
and the other code.

First, after synching my computer clock to the navy standard (or some such),
the current time is approximately 2 minutes ahead of what the time of the
last bar is.  The last bar might show an 11:14 time stamp, but the current
time is listed at 11:16.  So, is there a two minute delay in the feed I am
receiving??

Second, the new bar will appear approximately 11 seconds after the change in
the current minute (ignoring the 2 minute offset I just described).  Again,
I wonder if this is a delay in the feed.

Can someone comment on any observations you have made regarding the time of
the last bar vs the computer clock time, and what, if any, delay exists when
the counter in the code below) shows the bar is complete vs when a new bar
really appears.

Thanks,
Ken



-----Original Message-----
From: amibroker@xxxxxxxxxxxxxxx [mailto:amibroker@xxxxxxxxxxxxxxx] On Behalf
Of ricko8294_98
Sent: Friday, November 28, 2008 9:47 AM
To: amibroker@xxxxxxxxxxxxxxx
Subject: [amibroker] Re: Display Current Time on Chart

Will this help?  I copied this from another post some time in the past.
Don't remember the author of it

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;
}

Then, to add to the title bar add this line

Title = Title + "\n\\c07 Time left in the bar " + WriteVal (SecsToGo/60
,2.2);




--- In amibroker@xxxxxxxxxxxxxxx, "Pete" <dryheat3@xxx> wrote:
>
> Thanks for the tip. I checked the UKB and didn't find anything that 
> does exactly what I'm looking for. What I would like is to see the 
> current system time expressed in hh:mm:ss and I would like the
display
> to be active, meaning as seconds tick away the display would show
each
> second passing along. The purpose would be for intraday use so I can 
> see as a bar is about to be completed and moved to the next bar.
> Thanks.
> 
>   Pete  :-)
>



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

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

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

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

For other support material please check also:
http://www.amibroker.com/support.html

*********************************
Yahoo! Groups Links




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

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

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

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

For other support material please check also:
http://www.amibroker.com/support.html

*********************************
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/