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

Re: [amibroker] Time in String Format



PureBytes Links

Trading Reference Links

OK, I guess my problem is that there are no arrays of strings in AB, so in 
Explorer it would always use last bar of selected range?

Graham, I think he is trying to report the times of past bars - when buys 
occurred...

If so, a couple of other ideas might be:

1. Use Osaka Plugin - it handles tables of strings.
2. Just use Timenum() w/o formatting.
3. Use hour() / minute() / second() in adjacent columns.

Steve

----- Original Message ----- 
From: "Graham" <kavemanperth@xxxxxxxxx>
To: <amibroker@xxxxxxxxxxxxxxx>
Sent: Wednesday, December 14, 2005 10:49 PM
Subject: Re: [amibroker] Time in String Format


> Look back on some of the replies, you will fnd your answers
> Instead of timenum use Now(4) and this will give you the actual
> computer time, not the bar time
>
> --
> Cheers
> Graham
> AB-Write >< Professional AFL Writing Service
> Yes, I write AFL code to your requirements
> http://e-wire.net.au/~eb_kavan/ab_write.htm
> On 12/15/05, Tony Lei <yiupang91@xxxxxxxxx> wrote:
>> Thanks Steve,
>>
>> But that still didn't work. I keep getting 4:00 and 3:59
>>
>>
>> Tony
>>
>>
>> On 12/14/05, Steve Dugas <sjdugas@xxxxxxxxxxx> wrote:
>> >
>> > OK, how about this one?  Sorry, I can't test it...
>> >
>> > Steve
>> >
>> > Time = Timenum();
>> >
>> > Time = IIf( Time >= 130000, Time - 120000, Time );
>> > TimeStr = NumToStr( Time, 6.0, False );
>> > HourStr = StrLeft( TimeStr, 2 );
>> > MinStr = StrMid( TimeStr, 2, 2 );
>> > SecStr = StrRight( TimeStr, 2 );
>> >
>> > FormattedTimeStr = HourStr + ":" + MinStr + ":" + SecStr;
>> > AddTextColumn( FormattedTimeStr, "Time" );
>> >
>> >
>> > ----- Original Message -----
>> > From: Tony Lei
>> > To: amibroker@xxxxxxxxxxxxxxx
>> >
>> > Sent: Wednesday, December 14, 2005 9:26 PM
>> > Subject: Re: [amibroker] Time in String Format
>> >
>> > Hi Steve,
>> >
>> > Very close but they don't match the time from each signal.  I keep 
>> > getting 4:00 which is the current time after market close.
>> >
>> > thanks
>> >
>> > tony
>> >
>> >
>> > On 12/14/05, Steve Dugas <sjdugas@xxxxxxxxxxx> wrote:
>> > >
>> > >
>> > > Hi - You can try this, I don't have an intraday DB to test it...
>> > >
>> > > HourNum = Hour();
>> > > HourNum = IIf( HourNum > 12, HourNum - 12, HourNum );
>> > > HourStr = NumToStr( HourNum, 1.0 );
>> > > MinStr = NumToStr( Minute(), 1.0 );
>> > > SecStr = NumToStr( Second(), 1.0 );;
>> > > TimeStr = HourStr + ":" + MinStr + ":" + SecStr;
>> > > AddTextColumn( TimeStr, "Time" );
>> > >
>> > > Steve
>> > >
>> > > ----- Original Message -----
>> > > From: Tony Lei
>> > > To: amibroker@xxxxxxxxxxxxxxx
>> > >
>> > > Sent: Wednesday, December 14, 2005 4:55 PM
>> > > Subject: Re: [amibroker] Time in String Format
>> > >
>> > > Tomasz,
>> > >
>> > > I have it set to TimeNum but I can't seem to be able to get it into 
>> > > the following format:
>> > >
>> > > HH:MM (12 HR)
>> > >
>> > > thanks
>> > >
>> > > tony
>> > >
>> > >
>> > > On 12/14/05, Tony Lei <yiupang91@xxxxxxxxx> wrote:
>> > > > Tomasz,
>> > > >
>> > > > The reason why i just want to use TimeNum is because I want the 
>> > > > Time in HH:MM:SS to show up without the Date.  Is there another way 
>> > > > to do it?
>> > > >
>> > > > thanks
>> > > >
>> > > > tony
>> > > >
>> > > >
>> > > >
>> > > > On 12/14/05, Tomasz Janeczko < amibroker@xxxxxx > wrote:
>> > > > >
>> > > > > Hello,
>> > > > >
>> > > > > It makes no sense to add date/time column to exploration as it is 
>> > > > > ALREADY PRESENT.
>> > > > >
>> > > > > Anyway, instead of wrestling, why not use addcolumn directly with 
>> > > > > formatDateTime ???
>> > > > >
>> > > > > AddColumn( DateTime(), "Time", formatDateTime )
>> > > > >
>> > > > >
>> > > > > If you need time alone, just:
>> > > > > AddColumn( TimeNum(), "Time", 6.0 );
>> > > > >
>> > > > >
>> > > > > Please ALWAYS CHECK function reference:
>> > > > > http://www.amibroker.com/f?addcolumn
>> > > > >
>> > > > > Best regards,
>> > > > > Tomasz Janeczko
>> > > > > amibroker.com
>> > > > >
>> > > > > ----- Original Message -----
>> > > > > From: Tony Lei
>> > > > > To: amibroker@xxxxxxxxxxxxxxx
>> > > > >
>> > > > > Sent: Wednesday, December 14, 2005 3:25 PM
>> > > > > Subject: Re: [amibroker] Time in String Format
>> > > > >
>> > > > > Sorry this is what i want to do:
>> > > > >
>> > > > > Buy = TimeNum() >= MarketOpen AND VolumeCheck AND Cross ( MLR3, 
>> > > > > MA3 ) ;
>> > > > >
>> > > > > filter = buy
>> > > > >
>> > > > > AddColumn ( TimeNumStr(), "TIME", 1 );
>> > > > >
>> > > > > thanks
>> > > > >
>> > > > > tony
>> > > > >
>> > > > >
>> > > > > On 12/14/05, Tony Lei <yiupang91@xxxxxxxxx > wrote:
>> > > > > > Hi,
>> > > > > >
>> > > > > > How would I include this in my buy and sell conditions?
>> > > > > >
>> > > > > > Let's say I use the following:
>> > > > > >
>> > > > > >
>> > > > > > function TimeNumStr()
>> > > > > > {
>> > > > > >   return StrFormat("%02g:%02g:%02g", Hour(), Minute(), 
>> > > > > > Second() );
>> > > > > > }
>> > > > > > Buy = TimeNum() >= MarketOpen AND VolumeCheck AND Cross ( MLR3, 
>> > > > > > MA3 ) ;
>> > > > > >
>> > > > > > Do I just replace Timenum() for TimeNumStr()?
>> > > > > >
>> > > > > > thanks
>> > > > > >
>> > > > > > tony
>> > > > > >
>> > > > > >
>> > > > > > On 12/14/05, cstrader < cstrader232@xxxxxxxxxxxx> wrote:
>> > > > > >
>> > > > > > >
>> > > > > > > Excellent!
>> > > > > > >
>> > > > > > > ----- Original Message -----
>> > > > > > > From: Tomasz Janeczko
>> > > > > > > To: amibroker@xxxxxxxxxxxxxxx
>> > > > > > >
>> > > > > > > Sent: Wednesday, December 14, 2005 4:47 AM
>> > > > > > > Subject: Re: [amibroker] Time in String Format
>> > > > > > >
>> > > > > > >
>> > > > > > > Hello,
>> > > > > > >
>> > > > > > > function TimeNumStr()
>> > > > > > > {
>> > > > > > >   return StrFormat("%02g:%02g:%02g", Hour(), Minute(), 
>> > > > > > > Second() );
>> > > > > > > }
>> > > > > > >
>> > > > > > > (note that this returns single "currently selected" time)
>> > > > > > >
>> > > > > > > Best regards,
>> > > > > > > Tomasz Janeczko
>> > > > > > > amibroker.com
>> > > > > > >
>> > > > > > > ----- Original Message -----
>> > > > > > > From: cstrader
>> > > > > > > To: amibroker@xxxxxxxxxxxxxxx
>> > > > > > > Sent: Wednesday, December 14, 2005 2:07 AM
>> > > > > > > Subject: [amibroker] Time in String Format
>> > > > > > >
>> > > > > > >
>> > > > > > > Is there a way to turn timenum() into a string.  e.g 
>> > > > > > > 09:30:00?
>> > > > > > >
>> > > > > > > Thanks
>> > > > > > >
>> > > > > > > ----- Original Message -----
>> > > > > > > From: Dave MacKay
>> > > > > > > To: amibroker@xxxxxxxxxxxxxxx
>> > > > > > > Sent: Tuesday, December 13, 2005 1:39 PM
>> > > > > > > Subject: Re: [amibroker] Re: EOD of day Futures quote source
>> > > > > > >
>> > > > > > >
>> > > > > > > On this page. it mentions Chicago sun times as a source for 
>> > > > > > > Datasharks downloader........
>> > > > > > >
>> > > > > > > Perhaps this could be a source for us also
>> > > > > > >
>> > > > > > > http://www.datasharks.biz/
>> > > > > > >
>> > > > > > > Ed Hoopes <reefbreak_sd@xxxxxxxxx> wrote:
>> > > > > > > I have an account at InteractiveBrokers.com , they have some 
>> > > > > > > futures
>> > > > > > > contracts that are real time and free.  It works as well as 
>> > > > > > > my
>> > > > > > > previous subscription service eSignal.
>> > > > > > >
>> > > > > > > Ed Hoopes
>> > > > > > >
>> > > > > > >
>> > > > > > >
>> > > > > > > --- In amibroker@xxxxxxxxxxxxxxx, "axle_d" <axle_d@xxxx> 
>> > > > > > > wrote:
>> > > > > > > >
>> > > > > > > > Does anyone know of an EOD or delayed free futures download 
>> > > > > > > > that I can
>> > > > > > > > use with AB.  Brite Futures appears not to be working any 
>> > > > > > > > longer,
>> > > > > > > > Lycos/Quote.com seems to time out constantly.
>> > > > > > > >
>> > > > > > > > Any suggestions greatly appreciated in adva nce.
>> > > > > > > >
>> > > > > > >
>> > > > > > >
>> > > > > > >
>> > > > > > >
>> > > > > > >
>> > > > > > >
>> > > > > > >
>> > > > > > >
>> > > > > > >
>> > > > > > >
>> > > > > > >
>> > > > > > >
>> > > > > > >
>> > > > > > >
>> > > > > > >
>> > > > > > >
>> > > > > > >
>> > > > > > >
>> > > > > > >
>> > > > > > > Dave MacKay
>> > > > > > >
>> > > > > > > Please note that this group is for discussion between users 
>> > > > > > > only.
>> > > > > > >
>> > > > > > > To get support from AmiBroker please send an e-mail directly 
>> > > > > > > to
>> > > > > > > SUPPORT {at} amibroker.com
>> > > > > > >
>> > > > > > > For other support material please check also:
>> > > > > > > http://www.amibroker.com/support.html
>> > > > > > >
>> > > > > > >
>> > > > > > >
>> > > > > > >
>> > > > > > >
>> > > > > > > ________________________________
> YAHOO! GROUPS LINKS
>> > > > > > >
>> > > > > > >
>> > > > > > >  Visit your group "amibroker" on the web.
>> > > > > > >
>> > > > > > >  To unsubscribe from this group, send an email to:
>> > > > > > >   amibroker-unsubscribe@xxxxxxxxxxxxxxx
>> > > > > > >
>> > > > > > >  Your use of Yahoo! Groups is subject to the Yahoo! Terms of 
>> > > > > > > Service.
>> > > > > > >  To unsubscribe from this group, send an email to:
>> > > > > > >   amibroker-unsubscribe@xxxxxxxxxxxxxxx
>> > > > > > >
>> > > > > > >  Your use of Yahoo! Groups is subject to the Yahoo! Terms of 
>> > > > > > > Service.
>> > > > > > >  Your use of Yahoo! Groups is subject to the Yahoo! Terms of 
>> > > > > > > Service.
>> > > > > > >
>> > > > > > > ________________________________
>
>> > > > > >
>> > > > > >
>> > > > >
>> > > > >
>> > > > >
>> > > > > Please note that this group is for discussion between users only.
>> > > > >
>> > > > > To get support from AmiBroker please send an e-mail directly to
>> > > > > SUPPORT {at} amibroker.com
>> > > > >
>> > > > > For other support material please check also:
>> > > > > http://www.amibroker.com/support.html
>> > > > >
>> > > > >
>> > > > >
>> > > > >
>> > > > >
>> > > > > ________________________________
> YAHOO! GROUPS LINKS
>> > > > >
>> > > > >
>> > > > >  Visit your group "amibroker" on the web.
>> > > > >
>> > > > >  To unsubscribe from this group, send an email to:
>> > > > >   amibroker-unsubscribe@xxxxxxxxxxxxxxx
>> > > > >
>> > > > >  Your use of Yahoo! Groups is subject to the Yahoo! Terms of 
>> > > > > Service.
>> > > > >  To unsubscribe from this group, send an email to:
>> > > > >   amibroker-unsubscribe@xxxxxxxxxxxxxxx
>> > > > >
>> > > > >  Your use of Yahoo! Groups is subject to the Yahoo! Terms of 
>> > > > > Service.
>> > > > >  Your use of Yahoo! Groups is subject to the Yahoo! Terms of 
>> > > > > Service.
>> > > > >
>> > > > > ________________________________
>
>> > > >
>> > > >
>> > >
>> > >
>> > >
>> > > Please note that this group is for discussion between users only.
>> > >
>> > > To get support from AmiBroker please send an e-mail directly to
>> > > SUPPORT {at} amibroker.com
>> > >
>> > > For other support material please check also:
>> > > http://www.amibroker.com/support.html
>> > >
>> > >
>> > >
>> > >
>> > >
>> > > ________________________________
> YAHOO! GROUPS LINKS
>> > >
>> > >
>> > >  Visit your group "amibroker" on the web.
>> > >
>> > >  To unsubscribe from this group, send an email to:
>> > >   amibroker-unsubscribe@xxxxxxxxxxxxxxx
>> > >
>> > >  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
>> > >  To unsubscribe from this group, send an email to:
>> > >   amibroker-unsubscribe@xxxxxxxxxxxxxxx
>> > >
>> > >  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
>> > >  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
>> > >
>> > > ________________________________
>
>> >
>> >
>> >
>> > Please note that this group is for discussion between users only.
>> >
>> > To get support from AmiBroker please send an e-mail directly to
>> > SUPPORT {at} amibroker.com
>> >
>> > For other support material please check also:
>> > http://www.amibroker.com/support.html
>> >
>> >
>> >
>> >
>> >
>> >
>> > SPONSORED LINKS
>> > Investment management software Real estate investment software 
>> > Investment property software
>> > Software support Real estate investment analysis software Investment 
>> > software
>> >
>> > ________________________________
> YAHOO! GROUPS LINKS
>> >
>> >
>> >  Visit your group "amibroker" on the web.
>> >
>> >  To unsubscribe from this group, send an email to:
>> >   amibroker-unsubscribe@xxxxxxxxxxxxxxx
>> >
>> >  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
>> >  To unsubscribe from this group, send an email to:
>> >   amibroker-unsubscribe@xxxxxxxxxxxxxxx
>> >
>> >  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
>> >  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
>> >
>> > ________________________________
>
>>
>>
>>
>> Please note that this group is for discussion between users only.
>>
>> To get support from AmiBroker please send an e-mail directly to
>> SUPPORT {at} amibroker.com
>>
>> For other support material please check also:
>> http://www.amibroker.com/support.html
>>
>>
>>
>>
>>
>>
>> SPONSORED LINKS
>> Investment management software Real estate investment software Investment 
>> property software
>> Software support Real estate investment analysis software Investment 
>> software
>>
>> ________________________________
> YAHOO! GROUPS LINKS
>>
>>
>>  Visit your group "amibroker" on the web.
>>
>>  To unsubscribe from this group, send an email to:
>>  amibroker-unsubscribe@xxxxxxxxxxxxxxx
>>
>>  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
>>  To unsubscribe from this group, send an email to:
>>  amibroker-unsubscribe@xxxxxxxxxxxxxxx
>>
>>  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
>>  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
>>
>> ________________________________
>
>
>
> Please note that this group is for discussion between users only.
>
> To get support from AmiBroker please send an e-mail directly to
> SUPPORT {at} amibroker.com
>
> For other support material please check also:
> http://www.amibroker.com/support.html
>
>
> Yahoo! Groups Links
>
>
>
>
>
>
> 




------------------------ Yahoo! Groups Sponsor --------------------~--> 
Try Online Currency Trading with GFT. Free 50K Demo. Trade 
24 Hours. Commission-Free. 
http://us.click.yahoo.com/RvFikB/9M2KAA/U1CZAA/GHeqlB/TM
--------------------------------------------------------------------~-> 

Please note that this group is for discussion between users only.

To get support from AmiBroker please send an e-mail directly to 
SUPPORT {at} amibroker.com

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/

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