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

Re: Creating a surrogate for price?



PureBytes Links

Trading Reference Links

Thank you both!!! I do believe that is what I'm looking for.


--- In amibroker@xxxxxxxxxxxxxxx, "Tomasz Janeczko" <amibroker@xxx> 
wrote:
>
> Hello,
> 
> In addition to that, if you want to accumulate 5 over subsequent 
days (so it adds 5 to every bar after initial one) you can use:
> Surrogate = Close[ 0 ] + Cum( 5 );
> 
> Best regards,
> Tomasz Janeczko
> amibroker.com
>   ----- Original Message ----- 
>   From: Terry 
>   To: amibroker@xxxxxxxxxxxxxxx 
>   Sent: Monday, June 05, 2006 4:40 PM
>   Subject: RE: [amibroker] Creating a surrogate for price?
> 
> 
>   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
> 
> 
> 
> 
> 
> 
> 
> 
> 
>   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
> 
> 
> 
> 
> 
>   SPONSORED LINKS Investment management software  Real estate 
investment software  Investment property software  
>         Software support  Real estate investment analysis 
software  Investment software  
> 
> 
> -------------------------------------------------------------------
-----------
>   YAHOO! GROUPS LINKS 
> 
>     a..  Visit your group "amibroker" on the web.
>       
>     b..  To unsubscribe from this group, send an email to:
>      amibroker-unsubscribe@xxxxxxxxxxxxxxx
>       
>     c..  Your use of Yahoo! Groups is subject to the Yahoo! Terms 
of Service. 
> 
> 
> -------------------------------------------------------------------
-----------
>