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

[amibroker] Re: Timer



PureBytes Links

Trading Reference Links


Hi Graham,
   Is there a way of readin the time from database itself? we are
interested in the last printed bar's time. Now we just need to add the
number of seconds elapsed from that time. Once we have this figure, we
can deduct it fro mthe interval time and that would be nice. If its 0
we start again. That way if the symbol is illiquid timer would still
work. As each bar is not printed exactly after the interval on 1
minute chart if stock does not move for more than 2-3 minutes. The bar
will only print ones the stock moves. No trades in the interval means
no bars.

Hence timer needs to be tied to the last printed bar to make any sense
else it would be always out of synch with the chart

Thanks
Choco

.--- In amibroker@xxxxxxxxxxxxxxx, Graham <kavemanperth@xxxx> wrote:
> Been trying to give this some thought today as I guessed you would
> want to use alternate timeframes
> It could be something like this, but you may need to modify for it
to work
> 
> start = 10*3600 + 0*60 + 0 ; //market start time in seconds 10:00:00
> current = hour()*3600 + minute()*60 + second() ); //current time in
seconds
> sofar = current - start; //seconds lapsed today
> last = floor( sofar%interval() )*interval(); //last interval time
> next = ceil(  sofar%interval() )*interval(); //next interval time
> 
> secondstogo = next - current; //seconds
> minutestogo = secondstogo/60; //minutes
> 
> Title = "{{NAME}} - {{INTERVAL}} {{DATE}} - MyChart : {{VALUES}}  - "
> + "time left on bar = " + minutestogo + " minutes";
> 
> The only thing is that I think this would just give you the time from
> the last data entry to the chart.
> I cannot find an equivalent Now(x) for hours, minutes, or seconds that
> would read the time from the computer clock.
> You may be able to do something with datetime(), but I would have to
> give this some testing myself to see if it can be used in any
> calculations
> 
> As said before the above may not work as I have just typed it into the
> email without testing.
> 
> 
> On Wed, 16 Feb 2005 10:41:44 -0000, iascool <sai20_2000@xxxx> wrote:
> > 
> > 
> > I appreciate your quick response Graham and it seems working but not
> > quite sure.
> > How can i make a count down timer for 10 min candles , please comment
> > regards
> > 
> > --- In amibroker@xxxxxxxxxxxxxxx, Graham <kavemanperth@xxxx> wrote:
> > > I checked and it did not really help you much anyway. The xxx was
> > to
> > > just represent what you normally put in the title
> > > Title = "{{NAME}} - {{INTERVAL}} {{DATE}} - MyChart :
> > {{VALUES}}  " +
> > > "time left on bar = " + (Hour()+1-Minute()) + " minutes";
> > >
> > >
> > > On Wed, 16 Feb 2005 06:11:42 -0000, iascool <sai20_2000@xxxx>
> > wrote:
> > > >
> > > >
> > > > Thanks Graham
> > > > But it gives error "Variable 'xxx' used without having been
> > > > initialized" .Please comment
> > > > Regards
> > > > '
> > > > --- In amibroker@xxxxxxxxxxxxxxx, Graham <kavemanperth@xxxx>
> > wrote:
> > > > > you could try this if you have hourly timeframe
> > > > >
> > > > > title = xxx + "time left on bar = " + (Hour()+1-Minute()) + "
> > > > minutes";
> > > > >
> > > > >
> > > > > On Wed, 16 Feb 2005 00:18:03 -0000, iascool <sai20_2000@xxxx>
> > > > wrote:
> > > > > >
> > > > > >
> > > > > > HI
> > > > > > Is there any code available for countdown timer for RT
> > > > candlesticks .
> > > > > > Any help in this regard is apppreciated  , please.
> > > > > >
> > > > > > Regards
> > > > > > iascool
> > > > > >
> > > > > >
> > > > > > Check AmiBroker web page at:
> > > > > > http://www.amibroker.com/
> > > > > >
> > > > > > Check group FAQ at:
> > > > http://groups.yahoo.com/group/amibroker/files/groupfaq.html
> > > > > > Yahoo! Groups Links
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > >
> > > > >
> > > > > --
> > > > > Cheers
> > > > > Graham
> > > > > http://e-wire.net.au/~eb_kavan/
> > > >
> > > >
> > > > Check AmiBroker web page at:
> > > > http://www.amibroker.com/
> > > >
> > > > Check group FAQ at:
> > http://groups.yahoo.com/group/amibroker/files/groupfaq.html
> > > > Yahoo! Groups Links
> > > >
> > > >
> > > >
> > > >
> > > >
> > >
> > >
> > > --
> > > Cheers
> > > Graham
> > > http://e-wire.net.au/~eb_kavan/
> > 
> > 
> > Check AmiBroker web page at:
> > http://www.amibroker.com/
> > 
> > Check group FAQ at:
http://groups.yahoo.com/group/amibroker/files/groupfaq.html
> > Yahoo! Groups Links
> > 
> > 
> > 
> > 
> > 
> 
> 
> -- 
> Cheers
> Graham
> http://e-wire.net.au/~eb_kavan/





------------------------ Yahoo! Groups Sponsor --------------------~--> 
What would our lives be like without music, dance, and theater?
Donate or volunteer in the arts today at Network for Good!
http://us.click.yahoo.com/Tcy2bD/SOnJAA/cosFAA/GHeqlB/TM
--------------------------------------------------------------------~-> 

Check AmiBroker web page at:
http://www.amibroker.com/

Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html 
Yahoo! Groups Links

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

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