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

[amibroker] Re: Code Question Involving Arrays



PureBytes Links

Trading Reference Links

Thanks Graham.  I'll give it a try.  I'm not sure that will give me a
result that makes the change in slope relative for looking at
different stocks will it?  I don't quite understand it enough to know.
Maybe it doesn't matter.  

On another note, I'm using tc2005 for data.  do you or anyone else
know how I can add a column to get the sector to print?  AddColumn or
AddTextColumn ........

Thanks Again,

Bret

--- In amibroker@xxxxxxxxxxxxxxx, Graham <kavemanperth@xxxx> wrote:
> Linearray needs set points rather than array values
> try lastvalue or selectedvalue
> 
> Plot ( LineArray ( LastValue(XP0), LastValue(YP0), LastValue(XP1),
> LastValue(YP1) ), "", 4, 1 );
> 
> On 6/7/05, Quad Rate Serial Abby <quad_pumped_abby@xxxx> wrote:
> > I have the following code.  I am trying to normalize the price and
> > plot the line of the slope of the average price over the last 15
days.
> >  This way I can turn it into an explore and use it to see which
stocks
> > are out performing relatively.  I don't really need to plot the
slope
> > and I could take it out, but I would like to know why it doesn't
work,
> > because I suspect it may cause an error in the calculation of the
> > array itself.  If I take out the normalization division there is
no
> > problem.  The error in the "Plot LineArray" is:
> > 
> > Argument #4 has incorrect type (the function expects different
> > argument type here)
> > 
> > The code is:
> > 
> > StartP = 15;
> > EndP = 1;
> > Price_Array = MA (( H + L ) / 2, 1 );
> > LP1 = LastValue ( Cum ( 1 ));
> > XP0 = LP1 - StartP;
> > XP1 = LP1 - EndP;
> > Base_Normalization = Ref ((( H + L ) / 2), -StartP );
> > YP0 = Price_Array [ XP0 ] / Base_Normalization;
> > YP1 = Price_Array [ XP1 ] / Base_Normalization;
> > Plot ( Price_Array, "", 1, 1 );
> > Plot ( LineArray ( XP0, YP0, XP1, YP1 ), "", 4, 1 );
> > 
> > Thanks in advance for anybodys help,
> > 
> > Bret
> > 
> > 
> > 
> > 
> > 
> > Please note that this group is for discussion between users only.
> > 
> > To get support from AmiBroker please send an e-mail directly to
> > SUPPORT {at} amibroker.com
> > 
> > For other support material please check also:
> > http://www.amibroker.com/support.html
> > 
> > 
> > Yahoo! Groups Links
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> 
> 
> -- 
> Cheers
> Graham
> http://e-wire.net.au/~eb_kavan/





------------------------ Yahoo! Groups Sponsor --------------------~--> 
What would our lives be like without music, dance, and theater?
Donate or volunteer in the arts today at Network for Good!
http://us.click.yahoo.com/Tcy2bD/SOnJAA/cosFAA/GHeqlB/TM
--------------------------------------------------------------------~-> 

Please note that this group is for discussion between users only.

To get support from AmiBroker please send an e-mail directly to 
SUPPORT {at} amibroker.com

For other support material please check also:
http://www.amibroker.com/support.html

 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/amibroker/

<*> To unsubscribe from this group, send an email to:
    amibroker-unsubscribe@xxxxxxxxxxxxxxx

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/