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

Re: [EquisMetaStock Group] Remembering Values - Price Ratio



PureBytes Links

Trading Reference Links

Hi Roy

Sorry about the name change.  The hot chillie is still burning!!

Thanks for your reply.... most helpful.

The "P" value I was referring to was the Data Array Identifier 
representing the plot that the custom indicator is dropped on, as 
described in the manual under Price Array Identifiers.

Anyway, came up with the following solution which incorporates your 
suggestion and which appears to be identical to the "MS Relative 
Strength Comparative".

{Price Comparison}
(((ValueWhen(1,Cum(IsDefined(P/C))=1,P)  /
   ValueWhen(1,Cum(IsDefined(P/C))=1,C)) * 
   (C/P)) -1);

Good excercise for the ol' brain.

Thanks
Hollywood

--- In equismetastock@xxxxxxxxxxxxxxx, "Roy Larsen" <rlarsen@xxxx> 
wrote:
> Hollywood
> 
> I don't quite understand what you're trying to do here :(
> 
> If you want access to the first price in a chart then there are a 
couple of
> ways to do that without needing a latch. Here's one off the top of 
my head.
> 
> Valuewhen(1,Cum(1)=1,C);
> 
> To get a price from the same date from two issues without having to 
truncate
> your data you could try this.
> 
> Date:=Year()=2002 and DayofMonth()=2 and Month()=1;
> Valuewhen(1,Date,C);
> 
> or this to eliminate N/A periods that might be a problem.
> 
> Date:=Year()=2002 and DayofMonth()=2 and Month()=1;
> LastValue(Valuewhen(1,Date,C));
> 
> > but don't seem to be able to lock-in the P value.
> 
> I'm not sure what you mean by "P value". Can you elaborate?
> 
> Roy  (alias "Ron"??)
> 
> > I am trying to write a formula for Price Ratio and need to be 
able to
> > execute the following:
> >
> > MS V8
> >
> > The ((First_Value_Of_Security1 / First_Value_Of_Security2) *
> > (Daily_Value_Of_Security2 / Daily_Value_Of_Security1)) - 1
> >
> > I have studied Ron's "Using Latches" (tks Ron), but don't seem to 
be
> > able to lock-in the P value. It always returns ZERO whilst the 
Cost
> > seems to be Ok!
> >
> > {Price Comparison}
> > N:=Fml("Signal Set");
> > X:=Fml("Signal Reset");
> > I:=Cum(N+X>-1)=1;
> > {Next 2 lines for debugging only}
> > {
> > ValueWhen(1,I,C);
> > ValueWhen(1,I,P);
> > }
> > (((ValueWhen(1,I,P) / ValueWhen(1,I,C)) * (C/P)) -1);
> >
> > Having changed the start dates of both securities to match, the 
above
> > seems to be working ok!, however, any advise would be great!
> >
> > To be foolproof, I would probably need to know that both initial
> > values are not ZERO or at least the same date as not all 
securities
> > have exactly the same amount of data and that the ending dates 
match.
> >
> > Any assistance would be greatly appreciated.
> >
> > Thanks
> > Hollywood
> >
> >
> > To unsubscribe from this group, send an email to:
> > equismetastock-unsubscribe@xxxxxxxxxxxxxxx
> >
> >
> >
> > Your use of Yahoo! Groups is subject to 
http://docs.yahoo.com/info/terms/
> >
> >
> >
> >


To unsubscribe from this group, send an email to:
equismetastock-unsubscribe@xxxxxxxxxxxxxxx

 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/