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

[GT] Re: Re: Re: Re: Re: Re: Re: Re: Couple of questions



At this point it is still not clear to me whether you need to change anything.

But without you clearer describing what you are trying to do I cannot comment in more detail. Give an example of how your data set looks like, and what you want to graph. Then it is easier to comment.

Let me give you an example. Say you would like to have an additional field in your market called "percentage of shares owned by institutional investors", let's call it INST for short, and you modified your loadtxt function in GT::Prices.pm so that it puts that into another field of the prices array, and you defined a constant $INST to get at that field.

If you wanted to work with this additional data item, you just would write an indicator like I:Prices (or edit I:Prices) to keep on additional series, the $INST field. Then you would get at that via {I:Prices INST}. You could just graph that by graphing that indicator, in an additional zone.

But that may not be at all what you have in mind. But without knowing more about your application one cannot comment further....

Cheers, Th.



Say you have

Sumit Sanghai wrote:
As I had written earlier along with OHLC & volume we have this data about FIIs. (Foreign Institutional Investors).
Now, I went through Text.pm and Prices.pm, and I realized that the best thing to 
(i) read and use this data is to have a Text file where the FII data is the last field (otherwise I will have to change the value of the constants OPEN CLOSE etc).

(ii) But, going through the graphics objects, I realized that they also only display OHLC and volume, so I will have to make changes to them also.
And that's what I wanted to know which all objects would I need to change. Just doing a egrep -r "(\$close|CLOSE|OPEN\$open)" GT resulted in too many files.

Regards,
Sumit.

On Fri, Jan 8, 2010 at 7:41 AM, Thomas Weigert <weigert AT mst.edu> wrote:
Sumit,

first, what do you mean that DB/text contains not only ohlc+volume, but
also some other data? As far as I know, you can only read markets that
have ohlc+volume+date. (Well, you can read anything you want, but the
Prices data structures are set up to hold those things. It is just an
array, so you can actually store whatever you want, but you better know
what you are doing. I have done analysis with reinterpreting the data
and also extended these structures into tables, but I would not
recommend that without you having a very good understanding of GT inside.)

So I assume that your "other market" is like the primary market in
having ohlc+volume.

The GT::Indicators::Prices file I sent out in this thread reads that
other market and converts it to the same time frame as the primary
market. For example, if your primary market is XYZ and your other market
is ABC You can then say
display_indicator.pl I:Prices XYZ CLOSE ABC
and it will actually display the ABC prices, not the XYZ prices as it
would otherwise. Or you can use
{I:Prices CLOSE ABC}
anywhere where you will use prices, and you can use any of the other
LOW, HIGH, VOLUME, etc. also.

There are no other changes required.

But maybe you want to do more than just that, in that case, please
explain some more of your application.

Cheers, Th.

Sumit Sanghai wrote:
> Hello Thomas,
>
> So does your change work for my use-case (as in the DB/text contains
> not only ohlc, volume but also some other data)?
>
> From what I understand till now, I will have to make changes to
> Prices.pm, Indicator/Prices.pm and Text.pm (because the data is in text).
> I am unsure as to where all the changes would be required in Graphic
> objects.
>
>