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

[GT] Re: BuySellArrows.pm Trigger Prices



Chia-liang Kao wrote:
Hi Robert,

Thanks for looking!

2009/11/13 Robert A. Schmied <ras
AT
acm.org>:

Actually, I forgot i did some refactoring on an unfinished branch...
see the topic/graphics-improvements branch on my github repo, in
particular the commit:


http://github.com/clkao/finance-geniustrader/commit/2aab2187c5a8f1468478d92411b0b928093fa603

Instead of using the bar high/low directly from prices, it makes the
buysellarrow object taking datasource for high/low (which actually
means sell/buy arrow positioning) for rendering the arrows.

Cheers,
CLK


CLK and jon

i evaluated the referenced changes clk made to BuySellArrows, but found the
changes to the api made it unusable with respect to the original version. in
addition i also dislike slipping in yet another otherwise unannounced perl
prerequisite (is it even necessary? meaning is there a way we could avoid
requiring these versions of min and max?). never the less i've been
intending to
query clk to better explain how to use it and request that it be given a
different name.


First of all, I should have pointed at the branch and diff that is
ported  to CPAN branch:
http://gist.github.com/233510

(you can also fork from:
http://github.com/clkao/finance-geniustrader/tree/CPAN/topic/graphics-improvements)

so right, it was work in progress and it didn't work well yet.  It
might be better to simply converge the two modules and factor out the
same code (having the old prices_ds usage passed for a function taking
high_ds, low_ds).  I think my original intention was for this
graphics::object module to fallback to the old behaviour if only
prices_ds is given.  It depends on how we drive from graphics.pl... In
any case I'd like to see the two modes sharing code base.

i'm in favor of that but until it works like BuySellArrows.pm does now
it should not be named BuySellArrows.pm. i'd suggest the development
proceed under a new name and once it is working either it can be renamed
or simply replace the current BuySellArrows.pm.


And also List::Util has been in perl core since 5.7.3, so it's not
quite an external dependency.

yea! this is the worst kind. things that get slipped into perl along
the way. this sort of non-dependency dependency isn't typically mentioned
in the install instructions (after all it's a perl internal), and unless
something (the apps?) say it must be perl 5.7.3 things don't work so good.
i'd like to keep gt working on perl as old as ... well lets just say v5.6.2.


within this thread jon provided the name so with the hacks i've made since
and
just now are included in the newly christened graphic object
BuySellPricesArrows.
i've left the keys used to control the colors unchanged, but don't object if
they are altered to be specifically for BuySellPricesArrows.

if someone can finish it (e.g update pod, correct usage examples, and
provide
changes needed to drive it via graphic.pl and or backtest.pl) it could be
another
useful graphic object ...


aloha

ras





followup to jon edwards posting:
Thank you guys !!

ras,

I don't mind changing graphics.pl, backtest.pl (I've not cracked that
yet), POD, examples, etc. if I can figure out what to change.

Currently graphic.pl doesn't like the new BuySellPricesArrows.pm Can't call method "get" on an undefined value at
/usr/lib/perl5/vendor_perl/GT/Graphics/Object/BuySellPricesArrows.pm
line 149.

that's exactly the same place where i ran out of energy.


Line 149 my ($low, $high) = map { $self->{$_}->get($i) } qw(low_ds
high_ds);

I assume it's because graphics.pl needs the additional parms for the
init but this is where I'm getting confused with this code. (and I
thought I knew perl more then I appear to). Would the high, low, min
max come from the $ds_s object created in graphics.pl ? Assuming so
is there something I can read to understand these data structures so
I know how to make references to data elements ?

without a better understanding of what the arguments are supposed to be
i cannot be of much help.

clk can you offer any specifics?

aloha

ras



Thank you, Jon