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

Worse alternative to TradeStation 2000i!



PureBytes Links

Trading Reference Links


-----Message d'origine-----
De : Jonas Vikström <jonas@xxxxxxxxxx>
À : omega-list@xxxxxxxxxx <omega-list@xxxxxxxxxx>
Date : mercredi 28 avril 1999 13:32
Objet : RE: Best alternative to TradeStation 2000i?


>Every skilled programmer knows there is a trade off between ease of coding
>and power. I guess that EL and ESPL are aimed at different users.
>


Yes, I see...different users.

Your rsquared formula (below) makes use of :
RegSlope = LinearRegSlope(Price, Len);
and
RegValue = LinearRegValue(Price, Len, 0);

that have a lot of things in common.
Means that you calculate twice the same length code for nothing ( edit the
above functions if you do not believe me).
A clever implementation example is given in TS2000i:
You may replace close by anything you want ( add a numeric series input in
this case).

I assume that we are speaking of the same stat ( coefficient of
determination, also known as rsquared, an useful as trend quality
measurement).
I have no time to verify that codes match ( your is different wit the use of
average instead of raw prices, but the remark remains valid  concerning the
simplification that you should write before giving us lessons on smart
coding and smart programming languages).


{*******************************************************************
Description : This Function returns coeffR
Provided By : Omega Research, Inc. (c) Copyright 1999
********************************************************************}

Inputs: Length(Numeric);
Variables: R(0), X(0), Y(0), UpEQ(0), LowEQ1(0), LowEQ2(0), LowEQT(0);

X = CurrentBar;
Y = Close;

UpEQ = Summation(X * Y, Length) - Length * Average(X, Length) * Average(Y,
Length);
LowEQ1 = Summation(Square(X), Length) - Length * Square(Average(X, Length));
LowEQ2 = Summation(Square(Y), Length) - Length * Square(Average(Y, Length));

If LowEQ1 * LowEQ2 > 0 Then
 LowEQT = SquareRoot(LowEQ1 * LowEQ2);

If LowEQT <> 0  Then Begin
 R = UpEQ / LowEQT;
 If R <= 1 AND R >= -1 Then
  coeffR = R;
End;


{*******************************************************************
Description : This Function returns Square of the Pearson r value
Provided By : Omega Research, Inc. (c) Copyright 1999
********************************************************************}

Inputs: Length(Numeric);

RSquared = Square(coeffR(Length));


Rgds,
-Pierre Orphelin
Représentant exclusif de Omega Research en France.
web: http://www.sirtrade.com



-----Message d'origine-----
De : Jonas Vikström <jonas@xxxxxxxxxx>
À : Jimmy56@xxxxxxx <Jimmy56@xxxxxxx>; omega-list@xxxxxxxxxx
<omega-list@xxxxxxxxxx>
Date : mercredi 28 avril 1999 12:07
Objet : RE: R Squared Code


>I use the formula below
>
>Regards
>Jonas Vikstrom
>
>------------------------------------------------------------
>Function name: rmR2
>Inputs: Price(NumericSeries), Len(NumericSimple), Smth(NumericSimple);
>Vars: Ctr(0), RegSlope(0), RegValue(0), Avg(0), RegRes(0), YRes(0), r2(0);
>
>RegRes = 0;
>YRes = 0;
>Ctr = 0;
>
>Avg = Average(Price, Len);
>RegSlope = LinearRegSlope(Price, Len);  <======== lot of things in common
here

>RegValue = LinearRegValue(Price, Len, 0); <======== lot of things in common
here
>
>for Ctr = 0 to Len - 1 begin
> RegRes = RegRes + Square((RegValue - (Ctr * RegSlope)) - Avg);
> YRes = YRes + Square(Price[Ctr] - Avg);
>end;
>
>if YRes <> 0 then
> r2 = RegRes / YRes
>else
> r2 = 0;
>
>rmR2 = Average(r2, Smth);
>
>