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

Re: Omega Hall of Fame... & EL question



PureBytes Links

Trading Reference Links

Dans un courrier daté du 29/10/98 18:28:10 Heure d6iver Pari10 Madrid,
Canyon678@xxxxxxx a écrit :

> The list is getting back to normal. I second most of the members opinion,  
> MB,  PO, Doug, Bob, Neal , Hans et. al  have contributed a lot without
expecting
>  anything in return. I also witnessed the stormy affair of MB & PO.
>  
Hummm...good memory.

>  I use a spread indicator
>  
>  Input: 
>  price1(c of data1),
>  price2(c of data2),
>  
>  If price2 > 0 then 
>  Value1 = (price1)/ (price2)
>  Else Value1 =Value1[1];
>  ---------------------------------------------------
>  I will like to use 
>  Value1 = (price1)/ (price2)
>  
>  Instead of checking each value of price 2  >  0 , I will only check it when
> I
>  get a error then branch to the above routine.
>  
>  To do this I need to write a error routine i.e 
>  On error Call Test            ' eg. VBasic  statement
>  
>  What is the syntax for a error routine in Easy language.
>  Is it worth it ?   If it will work it will save processing time by half.
>  Thanks
>  Michael 

No need of an error cheking.
This is included in the language, if you use a begin... end  statement

 If price2 > 0 then 
 Value1 = (price1)/ (price2)
 Else Value1 =Value1[1];   <=======Firts, you do not need this. It is implicit
(variables are updated from previous value as default)
 
If price2 <> 0 then negin
 Value1 = (price1)/ (price2);
end;

Does the trick.

If f price2 <> 0 is false, the calculation  after "begin" and before "end" is
not executed and value1 remains with the same (previous) value, that is
equivalent to your error code checking.

Sincerely,

-Pierre Orphelin