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

Re: [amibroker] Re: Timer



PureBytes Links

Trading Reference Links

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@xxxxxxxxx> 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 --------------------~--> 
Has someone you know been affected by illness or disease?
Network for Good is THE place to support health awareness efforts!
http://us.click.yahoo.com/Rcy2bD/UOnJAA/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/