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

[EquisMetaStock Group] Remembering Values - Price Ratio



PureBytes Links

Trading Reference Links

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/