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

Static variables



PureBytes Links

Trading Reference Links

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