PureBytes Links
Trading Reference Links
|
Not sure what you are really after.
What you did was create a reference to YESTERDAY's close. It will change
every day as you discovered. If you just want the first close of the
data to remain constant, try this:
InitalSurrogateClose = C[0] + 5;
Gets and stores the very first piece of data into a NUMERIC variable.
This is essentially now a CONSTANT you can use in further calcs.
--
Terry
-----Original Message-----
From: amibroker@xxxxxxxxxxxxxxx [mailto:amibroker@xxxxxxxxxxxxxxx] On
Behalf Of orionsturtle
Sent: Monday, June 05, 2006 08:28
To: amibroker@xxxxxxxxxxxxxxx
Subject: [amibroker] Creating a surrogate for price?
Question: How do I reference the first close in a data set, perform a
calculation on it and that becomes the new surrogate close going
forward?
ie. Dow close 5 yrs ago = 9500
surrogate dow close = 9500+5
If I use:
InitalSurrogateClose = ref(c,-1)+ 5 ;
SurrogateClose = InitalSurrogateClose + 5;
it works for the first bar in the data set but then continues to
reference the real close. I need to Isolate this first surrogate close
and I an just not seeing it. Please help if you understand what I'm
after.
Thank you!
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
|