Is there any way to create candlestick on ODD TimeSpan from tick

ear All KDB+ Gurus,

I have tick Data and I know that  I could convert it to minute bar easily by this way:

“select High:  max Price, Low: min Price, Open: first Price, Close: last Price by  1 xbar Time.minute from Trade where Symbol = `BAC”

And the tickdata looks like this:

Time                Symbol        Price


09:30:01.333       BAC            9.10

Now is my question, is  there any possible to convert the tick data into candlestick on some weird timespan? From example, 5 seconds, 7 seconds or 55 seconds. I know it sounds  weird but  just curious whether here is any advance command or function I  could use?

Thanks in advance.

Best

Wenhao

  

Do you mean this?<o:p></o:p>

select High:  max Price, Low: min Price, Open: first Price, Close: last Price by  5 xbar Time.second from Trade where Symbol = `BAC<o:p></o:p>

<o:p> </o:p>

Von: personal-kdbplus@googlegroups.com [mailto:personal-kdbplus@googlegroups.com] Im Auftrag von she wenhao
Gesendet: Donnerstag, 13. Dezember 2012 17:44
An: personal-kdbplus@googlegroups.com
Betreff: [personal kdb+] Is there any way to create candlestick on ODD TimeSpan from tick data by using xbar function.<o:p></o:p>

<o:p> </o:p>

ear All KDB+ Gurus,<o:p></o:p>

<o:p> </o:p>

I have tick Data and I know that  I could convert it to minute bar easily by this way:<o:p></o:p>

<o:p> </o:p>

“select High:  max Price, Low: min Price, Open: first Price, Close: last Price by  1 xbar Time.minute from Trade where Symbol = `BAC”<o:p></o:p>

<o:p> </o:p>

And the tickdata looks like this:<o:p></o:p>

Time                Symbol        Price<o:p></o:p>

---------------------------------------------------<o:p></o:p>

09:30:01.333       BAC            9.10<o:p></o:p>

…<o:p></o:p>

<o:p> </o:p>

Now is my question, is  there any possible to convert the tick data into candlestick on some weird timespan? From example, 5 seconds, 7 seconds or 55 seconds. I know it sounds  weird but  just curious whether here is any advance command or function I  could use?<o:p></o:p>

<o:p> </o:p>

<o:p> </o:p>

Thanks in advance.<o:p></o:p>

<o:p> </o:p>

Best<o:p></o:p>

<o:p> </o:p>

Wenhao<o:p></o:p>

  <o:p></o:p>


Submitted via Google Groups

Thanks lot  Kuentang,

Yes, it is. I tried some  ODD timespan on this like by 7 xbar Time.second from Trade where Symbol = `BAC and it rocks. Really interesting that I could have some 7 second or 77 second bar, lol

Have a nice day~~~

Wenhao

To: personal-kdbplus@googlegroups.com
X-Mailer: Apple Mail (2.1283)
X-Gm-Message-State: ALoCoQkVtz7m3ruoVs8N7DDArk+jkwIaEL4Cn2kwHsuMfNiSJ92doR0WmsMBQGQ+C9YEIjSBxXiE

If you liked 7 seconds, how about 7.123?:)

select High: max Price, Low: min Price, Open: first Price, Close: last =
Price by 7123 xbar Time from Trade where Symbol = `BAC

2012.12.13. d=E1tummal, 18:27 id=F5pontban she wenhao =EDrta:

> Thanks lot Kuentang,
>
> Yes, it is. I tried some ODD timespan on this like by 7 xbar =
Time.second from Trade where Symbol = BAC and it rocks. Really = interesting that I could have some 7 second or 77 second bar, lol \> \> Have a nice day~~~ \> \> Wenhao \> \> On Thursday, December 13, 2012 12:23:35 PM UTC-5, kuentang wrote: \> Do you mean this? \> \> select High: max Price, Low: min Price, Open: first Price, Close: = last Price by 5 xbar Time.second from Trade where Symbol = BAC
>
>
> Von: personal...@googlegroups.com =
[mailto:personal...@googlegroups.com] Im Auftrag von she wenhao
> Gesendet: Donnerstag, 13. Dezember 2012 17:44
> An: personal...@googlegroups.com
> Betreff: [personal kdb+] Is there any way to create candlestick on ODD =
TimeSpan from tick data by using xbar function.
>
>
> ear All KDB+ Gurus,
>
>
> I have tick Data and I know that I could convert it to minute bar =
easily by this way:
>
>
> “select High: max Price, Low: min Price, Open: first Price, Close: =
last Price by 1 xbar Time.minute from Trade where Symbol = `BAC”
>
>
> And the tickdata looks like this:
>
> Time Symbol Price
>
> ---------------------------------------------------
>
> 09:30:01.333 BAC 9.10
>
> …
>
>
> Now is my question, is there any possible to convert the tick data =
into candlestick on some weird timespan? =46rom example, 5 seconds, 7 =
seconds or 55 seconds. I know it sounds weird but just curious whether =
here is any advance command or function I could use?
>
>
>
> Thanks in advance.
>
>
> Best
>
>
> Wenhao
>
>
> –
> You received this message because you are subscribed to the Google =
Groups “Kdb+ Personal Developers” group.
> To view this discussion on the web visit =
https://groups.google.com/d/msg/personal-kdbplus/-/r9nhd2cWOQcJ.
> To post to this group, send email to personal...@googlegroups.com.
> To unsubscribe from this group, send email to =
personal-kdbpl...@googlegroups.com.
> For more options, visit this group at =
http://groups.google.com/group/personal-kdbplus?hl=en.
>
>
> –
> You received this message because you are subscribed to the Google =
Groups “Kdb+ Personal Developers” group.
> To view this discussion on the web visit =
https://groups.google.com/d/msg/personal-kdbplus/-/3UOlB17SVTIJ.
> To post to this group, send email to =
personal-kdbplus@googlegroups.com.
> To unsubscribe from this group, send email to =
personal-kdbplus+unsubscribe@googlegroups.com.
> For more options, visit this group at =
http://groups.google.com/group/personal-kdbplus?hl=en.

bin is useful if you want to aggregate over a non uniform gridr:s#09:30:01.333 09:31:02.332 09:35:00.0 10:40:00.0select max[price],min[price]by Symbol,Time:r@r bin Time from tradeOn Dec 14, 3:10?am, Boh?k Andr?s <and...> wrote:&gt; If you liked 7 seconds, how about 7.123?:)&gt;&gt; select High: ?max Price, Low: min Price, Open: first Price, Close: last Price by 7123 xbar Time from Trade where Symbol = BAC>> 2012.12.13. d?tummal, 18:27 id?pontban she wenhao ?rta:>>>> > Thanks lot ?Kuentang,>> > Yes, it is. I tried some ?ODD timespan on this like by 7 xbar Time.second from Trade where Symbol = BAC and it rocks. Really interesting that I could have some 7 second or 77 second bar, lol&gt;&gt; &gt; Have a nice day~~~&gt;&gt; &gt; Wenhao&gt;&gt; &gt; On Thursday, December 13, 2012 12:23:35 PM UTC-5, kuentang wrote:&gt; &gt; Do you mean this?&gt;&gt; &gt; select High: ?max Price, Low: min Price, Open: first Price, Close: last Price by ?5 xbar Time.second from Trade where Symbol = BAC>> > Von: personal...@googlegroups.com [mailto:personal...@googlegroups.com] Im Auftrag von she wenhao> > Gesendet: Donnerstag, 13. Dezember 2012 17:44> > An: personal...@googlegroups.com> > Betreff: [personal kdb+] Is there any way to create candlestick on ODD TimeSpan from tick data by using xbar function.>> > ear All KDB+ Gurus,>> > I have tick Data and I know that ?I could convert it to minute bar easily by this way:>> > “select High: ?max Price, Low: min Price, Open: first Price, Close: last Price by ?1 xbar Time.minute from Trade where Symbol = `BAC”>> > And the tickdata looks like this:>> > Time ? ? ? ? ? ? ? ?Symbol ? ? ? ?Price>> > --------------------------------------------------->> > 09:30:01.333 ? ? ? BAC ? ? ? ? ? ?9.10>> > …>> > Now is my question, is ?there any possible to convert the tick data into candlestick on some weird timespan? From example, 5 seconds, 7 seconds or 55 seconds. I know it sounds ?weird but ?just curious whether here is any advance command or function I ?could use?>> > Thanks in advance.>> > Best>> > Wenhao>> > –> >

Submitted via Google Groups</and…>