🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: alt.comp.lang.borland-delphi
4 messages
4 total messages Started by Christakis John Thu, 06 May 2004 01:56
Stock price data (open, high, low, close)
#2164
Author: Christakis John
Date: Thu, 06 May 2004 01:56
11 lines
1756 bytes
Hiyas,

I have been looking around for any code to handle stock market data
(datetime, open, high, low, close etc) and specifically convert data from
one period to another, that is get 5 groups of 1 minute data and create 1
5-minute element.  Does anyone know of any units/components out there that
can do this alreadt?  I searched Torrys and didn't find anything, are there
other sites like that that are any good?

ta muchly,
cj
Re: Stock price data (open, high, low, close)
#2165
Author: Jeremy Collins
Date: Thu, 06 May 2004 08:15
50 lines
3219 bytes
Christakis John wrote:
> Hiyas,
> 
> I have been looking around for any code to handle stock market data
> (datetime, open, high, low, close etc) and specifically convert data from
> one period to another, that is get 5 groups of 1 minute data and create 1
> 5-minute element.  Does anyone know of any units/components out there that
> can do this alreadt?  I searched Torrys and didn't find anything, are there
> other sites like that that are any good?

Try expanding your search to Google Groups, and include
the VB and C/C++ newsgroups. You won't be the first person
to do this, but it's possible no-one's ever posted anything
about doing it in Delphi. Plenty of people here can help
you convert VB or C code to Delphi.

If that fails, supply a good description & example of the
source data and what you want to do with it. I'm a little
confused about your "datetime" - you hint that the data
represents a period of time (1 min), but for that you
would need two datetime values. Otherwise it seems
straightforward - the "high" for a 5 minute period is the
max high of the 5 1-minute samples, likewise with the "low".
"Open" is the opening value of the first 1-min sample, and
"close" is the closing value of the final 1-min sample.

ISTM the structure would be something like:

type
   TStockMarketSample = record
     StartTime : TDateTime;
     EndTime : TDateTime;
     Open : Currency;
     Close : Currency;
     High : Currency;
     Low : Currency;
   end;

function CompoundSample(Series : array of TStockMarketSample) : 
TStockMarketSample;
begin
   // populate Result with Max, Min, Open, Close etc
end;

Or is this an oversimplification?

-- 
jc

Remove the -not from email
Re: Stock price data (open, high, low, close)
#2166
Author: Peter Fox
Date: Thu, 06 May 2004 08:52
29 lines
2363 bytes
Following on from Christakis John's message. . .

If you're using tick data from the London Stock Exchange be aware that 
you need to be able to deal with cancellations on the next day and that 
some of the data is wrongly classified which can lead to 'blips' 
sometime of staggering proportions.

I can sell you some code to read these files.


>Hiyas,
>
>I have been looking around for any code to handle stock market data
>(datetime, open, high, low, close etc) and specifically convert data from
>one period to another, that is get 5 groups of 1 minute data and create 1
>5-minute element.  Does anyone know of any units/components out there that
>can do this alreadt?  I searched Torrys and didn't find anything, are there
>other sites like that that are any good?
>
>ta muchly,
>cj
>
>

-- 
PETER FOX Not the same since the adhesive company came unstuck
peterfox@eminent.demon.co.uk.not.this.bit.no.html
2 Tees Close, Witham, Essex.
Gravity beer in Essex  <http://www.eminent.demon.co.uk>
Re: Stock price data (open, high, low, close)
#2167
Author: Christakis John
Date: Mon, 10 May 2004 08:28
26 lines
2613 bytes
Hiya,

I really should re-read my own posts :(   The real problem I have is 1
minute data that is missing some minutes (samples/candles/elements call them
what you will).  I call them candles usually as that is how I chart them.

I have approached this from another angle and I think I have it nutted out
now.  I was just hoping that someone else had already done it, but I can't
find anything quickly, so maybe I will post what I finally do.

thanks tho'
cj


> If that fails, supply a good description & example of the
> source data and what you want to do with it. I'm a little
> confused about your "datetime" - you hint that the data
> represents a period of time (1 min), but for that you
> would need two datetime values. Otherwise it seems
> straightforward - the "high" for a 5 minute period is the
> max high of the 5 1-minute samples, likewise with the "low".
> "Open" is the opening value of the first 1-min sample, and
> "close" is the closing value of the final 1-min sample.
>
> jc
>
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads