Tuesday, July 28, 2009

A fine Technician and R Squared

In comments, Anupam Mazumdar asks about the R-Squared indicator "how we can do it(i mean formula or set up) ourselves using excel or some prog language like c++ or java"

Tushar Chande has written two books on technical analysis and trading. His first book, "The New Technical Trader" is pathbreaking in many ways because it discusses new ideas. In this book he discusses the R-Squared indicator to identify trendiness in the market.
The calculation of RSquared is easy:
RSquared = Square(coeffR(Length));
The function coeffR is calculated as below (in Easylanguage, used in Tradestation):
{*******************************************************************Description : This Function returns coeffRProvided 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;

I do not use the raw R-Sq values. I smooth them with a short moving average, say 3.

And what about the markets?
The choppy conditons seem likely to continue as the markets go through August when there is no event to influence prices. (At least, no visible event!).
But, some stocks are likely to continue moving up, or even gain momentum. Trading strategy may focus on individual stocks rather than the Nifty.

4 comments:

SANDEEPARORA said...

SIR IF POSSIBLE THEN THROW SOME LIGHT ON MECHANICAL TRADING SYSTEMS.LIKE OF EVOLUTION,SUCCES RATE , BACKTESTING. IS DAY VINAK A MECHANICAL INTRACAY DAY TRADING PLATEFORM.

Anupam said...

Hi Mr Sukhani,

Many thanks for your discussion on R-squared. I'll try to crack it.If any question arises, I would ask for your kind clarification.
One question, for intraday trading for nifty what are your favourite parameters for slow stoch and RSI that can help smoothening of noises. if possible pls let me know.

regards
Anupam Majumdar

saket said...

hello sir
i have a query on how to trade in stocks making new highs,how can we work on targets for these stocks,what can be the stops,what can be the strategies on such stocks? thank you

microashish said...

hi sir

i what know abt gann-square of nine how it works is it feasible in indian market

How do i know about it