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

Re: [amibroker] Static variables



PureBytes Links

Trading Reference Links

Hi Dennis,

Since Foreign(Close) and Close are both arrays, AB will divide the value of
Foreign(Close) on each day by the Close for each day. I am not 100% sure
what you are trying to do, but have you tried LastValue(Close) or
LastValue(Foreign(Close))?

Steve

----- Original Message -----
From: "metzdennis" <Dennis.Metz@xxxx>
To: <amibroker@xxxxxxxxxxxxxxx>
Sent: Sunday, October 20, 2002 5:56 PM
Subject: [amibroker] Static variables


> Hi group
>
> I want to compare the relative strength of a stock with the entire
> market (in my case the S&p 500 or ^gspc).
>
> The formula below plots the S&P and the current stock. Furthermore I
> want to set the current close of the s&p equal to the close of the
> stock. This should be a static number, but instead the "divider" gets
> recalculated every time.
>
> divider=Foreign("^gspc","C")/Close;
> zeitreihe=Foreign("^gspc","C")/divider;
> Plot(zeitreihe, "S&P", 1);
> Plot(Close,"", colorBlack, 64);
>
> All I want is a chart, where the current stock and the modified S&P
> [(last close of S&P)/(last close of stock) * (historic close of s&P)]
> is plotted. But I simply can not get this to work because the divider
> ist recalculated for every date.
>
> Thanks for your help,
> Dennis
>
>
>
> Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx
> (Web page: http://groups.yahoo.com/group/amiquote/messages/)
>
> Check group FAQ at:
http://groups.yahoo.com/group/amibroker/files/groupfaq.html
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>