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

Re: [amibroker] Code Question Involving Arrays



PureBytes Links

Trading Reference Links

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@xxxxxxxxx> 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 --------------------~--> 
Has someone you know been affected by illness or disease?
Network for Good is THE place to support health awareness efforts!
http://us.click.yahoo.com/Rcy2bD/UOnJAA/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/