Experiments in Technical Analysis

karthikmarar

Well-Known Member
Hi casoni

Thanks for those nice words though I don't deserve any credit for your work.
I had done nothing but a few words of encouragement. Please reserve the word "Best " for the more deserving souls in the forum.

I appreciated your keeness to learn and keep it up.

warm regards

Karthik
 
Hello Everybody,
Posting Alf On Behalf Of Mr Karthik.r....which Will Explore \ Scan Database In Few Seconds And Gives Best Buy\sell Security Based On Five Best Indicators,i Am Posting In Behalf Of Karthik.r {sir}, Because He Guided From Very First Step To Build This Explorer,who I Belive Is Best Person In This Forum , Who Talks Less And Gives More ,and [sir]deserves All The Credit....thank You
Oh !!! Gr8 How nice Guru is always GURU.
Jay
 

karthikmarar

Well-Known Member
Dealing with Whipsaws

Hi all

My busy work schedule has been keeping me away from my hobby and passion - Technical Analysis.

Ok.. let us more forward whenever a little time is available.

For most trend followers the most difficult issue is whipsaws. There is always a trade off between early entry and whipsaws. If one wants to avoid whipsaws then one has to be content with delayed entries.

Also there is always a confusion especially with the beginners in TA, is the market trending or ranging. Should I use trend following Indicators or oscillators?
Of course one can definitely find out when the trend proceed to some extend and the entries are delayed.

As practitioners of TA we all try various means and methods to avoid the ugly whipsaws and minimize our losses. Even I have been working on this for long.

I would like to share one such idea with you all. I often thought it would be a good thing if I can see the trendiness of the stock by just looking at the charts and not look through the ADX, DI+, RAVI or some complicated method. I could have an indication on the charts, may be a moving average, which can tell me if the market is moving sideways or is trending. Thus was born my Adaptive Moving average based Trend Check Signal.

This Moving average would follow the close price when the ADX value moving up. But when the ADX is down the moving average is clamped to a fixed level. In other words the moving average remains a straight line when the ADX is down indicating a sideways market. When the ADX is moving up, in other words the stock is trending up or even down the moving average tracks the price. Once this moving average is plotted in the price chart we have easily have an idea whether the market is trending or ranging by looking at this line.

We can even use the RAVI instead of ADX. RAVI reacts fasters than ADX.
I am enclosing a chart to show the Adaptive Moving Average, which I call Trend Check.

More on the mathematics and the codes later :)

regards

Karthik
 
Last edited:

karthikmarar

Well-Known Member
Hi

Let us continue with the logic and codes for the Adaptive Moving Average based Trend Check.

For that we first look at the EMA formula briefly

EMA today = Sc ( C-EMA(-1))+EMA(-1)

Where Sc is the smoothing constant
C is today’s close
EMA(-1) is yesterdays EMA

SC is expressed as 2/(n+1) where n is the time period of the EMA.

In adaptive Moving average the Smoothing constant is changed based on other factors like volatility.


Here what we are trying to do is adjust the moving average based on the ADX or RAVI.

When the ADX/RAVI is above 20% of the recent range (Here last 20 days) the constant becomes equal to 2/(n+1). So the Moving average becomes equal to a EMA.

When the ADX/RAVI is below the 20% then the constant become equal to the ADX range value. Below 20% of the recent range means the ADX/RAVI value is low and the constant tends towards zero and the EMA becomes equal to yesterdays value. This continues as long as the ADX/RAVI remain less than 20%. So the line becomes almost constant when the ADX/RAVI is below 20% of the recent 20 days range.

Hope I have not confused you all.

I am enclosing the afl for the same. The afl has the facility to select the values for ADX/RAVI and also the facility to select ADX or RAVI.

This line can be incorporated in you Trading system also.

Metastock users please wait for the code, I have to reinstall my Metastock..

By the way I should thank Tushar Chande for the inspiration behind this indicator.

Regards

karthik
 
Last edited:

casoni

Well-Known Member
Hi

Let us continue with the logic and codes for the Adaptive Moving Average based Trend Check.

For that we first look at the EMA formula briefly

EMA today = Sc ( C-EMA(-1))+EMA(-1)

Where Sc is the smoothing constant
C is todays close
EMA(-1) is yesterdays EMA

SC is expressed as 2/(n+1) where n is the time period of the EMA.

In adaptive Moving average the Smoothing constant is changed based on other factors like volatility.


Here what we are trying to do is adjust the moving average based on the ADX or RAVI.

When the ADX/RAVI is above 20% of the recent range (Here last 20 days) the constant is becomes equal to 1/(n+1). So the Moving average becomes equal to a EMA.

When the ADX/RAVI is below the 20% then the constant become equal to the ADX range value. Below 20% of the recent range means the ADX/RAVI value is low and the constant tends towards zero and the EMA becomes equal to yesterdays value. This continues as long as the ADX/RAVI remain less than 20%. So the line becomes almost constant when the ADX/RAVI is below 20% of the recent 20 days range.

Hope I have not confused you all.

I am enclosing the afl for the same. The afl has the facility to select the values for ADX/RAVI and also the facility to select ADX or RAVI.

This line can be incorporated in you Trading system also.

Metastock users please wait for the code, I have to reinstall my Metastock..

By the way I should thank Tushar Chande for the inspiration behind this indicator.

Regards

karthik
hello sir, :) ..thank you for the code ...
 

karthikmarar

Well-Known Member
Hi friends

Looking at the stony silence, I presume that this tread is becoming too technical or too complex. Of course some of the topics covered would only interest the hardcore Technical analysis guys and sound like rocket science to the beginner.

I would like your views on this. Should we continue in the same vein or only cover more simplistic topics like commonly used Indicators etc. Please do come forward and express your views.

Mean while I would like to share a point, which I have been noticing during the course of my interaction with many members in the forum and of course this has nothing to do with technical analysis.

It is about losing Focus. What I notice is that many people lose their focus on the actual trading part and divert their attention on various other issues.

Some are so much involved in the data part that they lose the real focus on the trading aspects. Can I have BSE data from 1990? Who is the best data provider etc etc. Hey What about your trading? Oh, that can wait till I get all the data possible!!!

Others are more involved in searching all over the net for articles and e-books. Ask them how many e-books you have collected and how many have you read. I am sure we will have some amusing figures. Hey what about your Trading? Oh, I am looking for that perfect book that will teach me the most profitable trading method !!!

Some are busy looking for different software all the time. Ahhh.. I have metastock, Amibroker and now looking for Adget and may be I will also try out Fibo Trader. Have you tried tradestation ? I want to try that too… It goes on like this… What about your Trading? Oh, I want to get the perfect software before I can concentrate on trading !!!

Some so engrossed in finding the right entry that they ignore the other important aspects of trading.

Even I am not immune to this. Some time I get so much involved in my experimentation that I neglect the trading part. Often I have to pull up myself and get back to the business of making money.

So all I wanted to say was don’t lose focus on your trading. Software, data and books can be bought or borrowed but the trading knowledge cannot be bought or borrowed. This, you have learn it yourself. So learning and actual trading aspects is what one should concentrate.

Oops sorry for the big sermon. And I know this is one free thing nobody wants … :D

Regards

Karthik
 

aad

Active Member
Hi friends

I would like your views on this. Should we continue in the same vein or only cover more simplistic topics like commonly used Indicators etc. Please do come forward and express your views.
Dear Karthik,

Will that help ? I mean, if you know the answer is not there but somewhere else (which probably calls for deeper study), can we concentrate on something just because it is simpler ?

I personally do not think that this thread is becoming too technical or complex. Afterall, how do you expect TECHNICAL Analysis to be ? And I have read many threads which had more complexity (you have not started yet, I believe)...

I sincerely feel that you should continue with this work. I have been a regular reader of this thread, although I have not been able to keep up due to some other committments in recent time. May be the same case with others why they might have not replied to this thread.

I see too many new posts now-a-days, so by the time you come to your favourite ones, you are out of time / energy. This is happening with me recently.

May be you start entertaining BUY/SELL recommendations in this thread.... it will drastically improve the "hit rate" of this thread :D (just kidding... no offence intended).

With regards,

Abhay
 
Hi karthik,

Some member talks about Contra Trend following system. I request you please throw some light on this topic with example.

I want your help to create a metastock code.
Sell condition : When today price cross the 90% of Buy price or the price when Last buy signal generate

Regards,

(moneypick)
 
Last edited:
Hi friends

Looking at the stony silence, I presume that this tread is becoming too technical or too complex. Of course some of the topics covered would only interest the hardcore Technical analysis guys and sound like rocket science to the beginner.

I would like your views on this. Should we continue in the same vein or only cover more simplistic topics like commonly used Indicators etc. Please do come forward and express your views.

Mean while I would like to share a point, which I have been noticing during the course of my interaction with many members in the forum and of course this has nothing to do with technical analysis.

It is about losing Focus. What I notice is that many people lose their focus on the actual trading part and divert their attention on various other issues.

Some are so much involved in the data part that they lose the real focus on the trading aspects. Can I have BSE data from 1990? Who is the best data provider etc etc. Hey What about your trading? Oh, that can wait till I get all the data possible!!!

Others are more involved in searching all over the net for articles and e-books. Ask them how many e-books you have collected and how many have you read. I am sure we will have some amusing figures. Hey what about your Trading? Oh, I am looking for that perfect book that will teach me the most profitable trading method !!!

Some are busy looking for different software all the time. Ahhh.. I have metastock, Amibroker and now looking for Adget and may be I will also try out Fibo Trader. Have you tried tradestation ? I want to try that too It goes on like this What about your Trading? Oh, I want to get the perfect software before I can concentrate on trading !!!

Some so engrossed in finding the right entry that they ignore the other important aspects of trading.

Even I am not immune to this. Some time I get so much involved in my experimentation that I neglect the trading part. Often I have to pull up myself and get back to the business of making money.

So all I wanted to say was dont lose focus on your trading. Software, data and books can be bought or borrowed but the trading knowledge cannot be bought or borrowed. This, you have learn it yourself. So learning and actual trading aspects is what one should concentrate.

Oops sorry for the big sermon. And I know this is one free thing nobody wants :D

Regards

Karthik

Karthik, I would like to express my views. I beg your pardon because this is your thread and I am expressing my views without your permission.

To be honest, I am not a regular follower of this thread, because technical indicators are not my cup of tea. Therefore I can not comment on whether this thread is simple or complex.

I liked your outburst and agree with it, which is valid. Loosing focus is the correct term.

About people who are behind collecting data, E-books, trading videos, various technical analysis software, I would say that psychology plays the major part over here.

The most common fact is that people do not love simple things. People get bored with it. They love to make the simple things more complex.

Suppose a person is using a particular tech. analysis software and is quite comfortable with it, then he will get bored of it and will try to find out a new software. He will come across a review of another software describing that Ohhh indicators are drwan as colorful lines, ohhh it supports one more indicator.....and bla bla...if it is a freeware, he will immediately install it and start wasting his precious time.

About reading various books, I feel psychology again plays a role.

Suppose a person reads a book which explains so called holy grail then person tries to trade with that magic formula or trading pattern. By chance he gets success. Then the same way, he initiates second trade, he looses. He starts thinking...ohhh this holy grail did not work, and by that time his eyes get catch of another book. This way he goes on reading and reading and reading.......what happens to his trading? If he still has some money, he will continue to read till he goes bankrupt.

Same happens with newsletter/subscriptions.

To be honest, what I feel is that the authors of book might be earning more money than what they have earned by trading.

I see some nice threads floating out there in this forum. They are very educative. If such threads improve other people/newbies, even by 1% then the purpose of the forum is solved.

But it makes me uncomfortable to see that people still run behind the tips. Tips are also given in this forum. Very few treat the trading as a business. Very few evaluates themself. Very few adapt the trading style as per his/her own personality. And as you said, most of people are loosing focus, loosing business.

HTI.
 
Hi karthik,

Could you please help me filter stocks that have closed above the 23 and 30 day Simple Moving Average. But I do not want stock that are already above it. I want a stock that was below it and today crossed and closed above both the moving averages. I am using MS. I would be grateful.

Also I have posted a query on data feed regarding plotting of charts regarding futures data. Hmm If I am not asking for too much and u understand what i am asking for :) as it was quite difficult for me to explain also what i wanted to ask, I would appreciate u looking into it.

Rgds

Rahul
 

Similar threads