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

R: CoefficientR



PureBytes Links

Trading Reference Links

Below is the EL code for the CoeffR Function that I have:
=================================
Inputs:Len(NumericSimple);
Var:X(0),UpEq(0),LowEq1(0),LowEq2(0),LowEQT(0),Div(0);

X=BarNumber;
UpEq=Summation(X*Close,Len)-(Len*Average(X,Len)*Average(Close,Len));
LowEq1=Summation(Square(X),Len)-(Len*Square(Average(X,Len)));
LowEq2=Summation(Square(Close),Len)-(Len*Square(Average(Close,Len)));
Div=LowEq1*LowEq2;
If Div>0 then
LowEQT=SquareRoot(Div)
else
LowEQT=0;
If LowEQT<>0 then
CoefR=UpEq/LowEQT;
==================================

Hope this could help.
Max Scorpio
(Italy)


-----Messaggio originale-----
Da: _Craig [mailto:craigbud@xxxxxxxxxxx]
Inviato: domenica 26 maggio 2002 18.14
A: omega-list@xxxxxxxxxx
Cc: ianwaugh@xxxxxxxxxxxxxxxxxxx
Oggetto: Re: CoefficientR


You will have to create arrays for your dependant and independent 
variables, which is the close of data4 and close of data3, 
respectively.  Load the arrays, and then plug them into the following 
TS2000i function:

CoeffR_a(IndArray, DepArray, Array_Size)

I think that the single precision limitation effects this function so I 
never bothered with it.  They may even have the math wrong in the 
function.  Like all TS calculated statistical functions, you should always 
test sample data in Excel to make sure these functions work properly.


At 10:35 AM 5/26/2002 +0100, Ian Waugh wrote:
>In-Reply-To: <memo.693970@xxxxxxxxxxxxxxxxxxx>
>If this is a function within TS6 as I suspect, could some kind TS6 owner
>please post or email a copy, please?
>
>Many thanks.
>
>Cheers,
>Ian
>
> > In May's TASC there's an item on daytrading stock pairs. The code
> > includes the function CoefficientR:
> >
> > R=CoefficientR(Close, data3, Close Data4, length)
> >
> > Presumably this is from TS^ because TS 200i doesn't recognise the
> > function. The only this it has is CoeffR which doesn't seem to be
> > quite the same thing - at least it only takes one parameter.
> >
> > Can one of you clever programming types give me a function I can use
> > in 2000, please?
> >
> > Many thanks.
> >
> > Cheers,
> > Ian
> >


"Nota di riservatezza: Il presente messaggio, corredato dei relativi
allegati contiene informazioni da considerarsi strettamente riservate, ed è
destinato esclusivamente al destinatario sopra indicato, il quale è l'unico
autorizzato ad usarlo, copiarlo e, sotto la propria responsabilità,
diffonderlo. Chiunque ricevesse questo messaggio per errore o comunque lo
leggesse senza esserne legittimato è avvertito che trattenerlo, copiarlo,
divulgarlo, distribuirlo a persone diverse dal destinatario è severamente
proibito, ed è pregato di rinviarlo immediatamente al mittente distruggendo
l'originale"

"Confidentiality Notice: This message, together with its annexes, contains
information to be deemed strictly confidential and is destined only to the
addressee (s) identified above who only may use, copy and, under his/their
responsibility , further disseminate it. If anyone received this message by
mistake or reads it without entitlement is forewarned that keeping, copying,
disseminating or distributing this message to persons other than the
addressee (s) is strictly forbidden and is asked to transmit it immediately
to the sender and to erase the original message received."