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

[GT] Re: Re: Couple of questions





On Wed, Jan 6, 2010 at 9:08 AM, Robert A. Schmied <ras AT acm.org> wrote:
Sumit Sanghai wrote:
Hello guys,

I am trying out GT, and had a few questions.

i) I am developing a strategy which apart from the standard volume, and
prices requires some other data which I have in my DB.
I want these to be loaded into the Prices object, and then used elsewhere.
Do I need to make modifications just to Prices.pm to
get the data loaded. Or are there other classes which inherently assume that
Prices can only contain open, high etc?


aloha sumit

both GT/Prices.pm and GT/Indicators/Prices.pm will need modification if you want
the gt indicators to be able to access this 'other data' in the prices object.
naturally whatever database interface module you are using may need alteration
or configuration as well.

however none of the apps that utilize GT/Graphics/DataSource methods to create and
render graphic objects will handle this 'other data' unless you also alter them
(the apps) and possibly also implement suitable additional datasource module(s)
to support this 'other data'. GT/Graphics/DataSource/Prices.pm and Volume.pm
might serve as models for any additional module(s) that might be needed.

can we ask the type and the nature of this 'other data'? there may be better
alternatives to loading up the prices object with additional data especially
if this data isn't of a market dynamic sort.

It's related to daily transactions from FIIs.
 





ii) One of the strategies I am testing, requires simultaneous access to
quotes from multiple stocks and indices.
Any clue where all do I have to make the changes to get such a strategy
working.
It seems that most of the objects make the assumption that they are only
dealing with a single stock.
Is there a simple hack which can help me out?


as clk pointed out, GT/Indicators/Prices.pm allows access to the prices object
for an alternate 'code', but the timeframe and time period indices for each such
prices object would have to align. however as joao notes, GT/Indicators/FromTimeFrame
might alleviate these time related alignment requirements some. if by 'indices'
you are referring to the gt time period indices of a prices object you will have
to employ GT/Indicators/Generic/PeriodAgo.pm, on the other hand, if 'indices' means
a stock market index like ^DJA or ^HSI just treat them like another stock symbol.


good luck and keep the list posted on your efforts.

regards

ras



Regards,
Sumit.