Traderji.com - Discussion forum for Stocks Commodities & Forex

Experiments in Technical Analysis

Discuss Experiments in Technical Analysis at the Technical Analysis within the Traderji.com - Discussion forum for Stocks Commodities & Forex; Originally Posted by asnavale Hi Karthik, You are right. The Histogram method has inherent problem ...


Go Back   Traderji.com - Discussion forum for Stocks Commodities & Forex > METHODS & STRATEGIES > Technical Analysis

Notices

Technical Analysis Discussion of all the principles involved in technical analysis.


Advertise Here

Reply
 
Thread Tools
Sponsored Links
  #731  
Old 5th February 2007, 11:16 PM
Moderator
 
Join Date: Jul 2005
Location: kuwait
Posts: 1,456
Blog Entries: 5
Thanks: 45
Thanked 549 Times in 102 Posts
karthikmarar is a name known to allkarthikmarar is a name known to allkarthikmarar is a name known to allkarthikmarar is a name known to allkarthikmarar is a name known to allkarthikmarar is a name known to all
Reputation: 629
Default Re: Experiments in Technical Analysis - Trading the MACD

Quote:
Originally Posted by asnavale View Post
Hi Karthik,

You are right. The Histogram method has inherent problem of whipsaws. I have already used the Hi-Lo threshold and MA threshold to reduce them. I have described the two options in an earlier post in this thread. You might have gone through that. I was expecting some comments from you on this. Although there was reduction in whipsaws the two alternatives had some other problems in specific cases as I have pointed out in that post. The MA threshold still gives a few more whipsaws compared to Hi-Lo threshold.

I am working on another alternative. It appears to give better performance than all the earlier variants. I will post it in a day or two. Your comments and guidance will be very useful for refining the system.

Regards

-Anant
Dear Ananth

Sorry, I did not give any comments as I had not really done a thorough check on your new modifications. Whatever I did showed clearly that these were still prone to too many whipsaws.

I was also experimenting with a dead band and all buy and sell signals will be active only beyond these bands. But these bands have to variable and one needs to adjust them based on the historical value of that particular stock. My work is incomplete as I am finding very little time nowadays. And that is one of the reasons for the MACD posts getting delayed. Do post your new idea and will surely check out and comment.

Warm regards

Karthik
Reply With Quote
Sponsored Links
  #732  
Old 6th February 2007, 09:57 AM
Member
 
Join Date: Nov 2006
Posts: 32
Thanks: 0
Thanked 0 Times in 0 Posts
uma_k is on a distinguished road
Reputation: 19
Default Re: Experiments in Technical Analysis - Trading the MACD

Hi Anant,

I have one request. In your modification to MABIUTS-HB system using Hi-Lo and MA thresholds you have given AFLs for each of them. Can you combine both and make a single AFL with provision for selecting either MA or HI-LO threshold? This will help in running a single AFL instead of two and visualising the differences better.

Regards

*** Uma ***
Reply With Quote
  #733  
Old 6th February 2007, 08:37 PM
Member
 
Join Date: Dec 2005
Location: Hyderabad
Posts: 326
Thanks: 0
Thanked 1 Time in 1 Post
asnavale is on a distinguished road
Reputation: 30
Default Re: Experiments in Technical Analysis - Trading the MACD

Quote:
Originally Posted by uma_k View Post
Hi Anant,

No new post from you for long time. Are you working on any new twist to Experiments in Technical Analysis.

Regards

*** Uma ***
Hello Uma,

I am Working ... Working ... Working ... Working ... Working ...

When I get something worth posting I will surely do. Thanks for your interest.

Regards

-Anant
Reply With Quote
  #734  
Old 6th February 2007, 10:02 PM
Member
 
Join Date: Nov 2006
Posts: 1,496
Thanks: 55
Thanked 69 Times in 38 Posts
kkseal will become famous soon enoughkkseal will become famous soon enough
Reputation: 133
Default Re: Experiments in Technical Analysis

Hi Anant,

Just adding to my last post.

I use a shorter-term MA crossover filter in my own humble system. Works better than without one but i can tell you it's not perfect.

Regards,
Kalyan.
Reply With Quote
  #735  
Old 6th February 2007, 10:11 PM
Member
 
Join Date: Dec 2005
Location: Hyderabad
Posts: 326
Thanks: 0
Thanked 1 Time in 1 Post
asnavale is on a distinguished road
Reputation: 30
Default Re: Experiments in Technical Analysis

Hi Kalyan,

I have already used this filter in the threshold based strategy. I have introduced 9-day MA for BUY and 3-day MA for SELL. Works well but not completely satisfactory. Similarly, in another option I have used last 9-day's highest Close as threshold for BUY and last 3-day's Lowest Close for SELL. This almost is same as the MA-based system. But has its own drawbacks. So, trying to find out some other alternative to filter whipsaws as much as possible.

Thanks for your interest and suggestions. Keep it up so that you may give me some idea to try out.

Regards

-Anant
Reply With Quote
  #736  
Old 6th February 2007, 10:47 PM
Member
 
Join Date: Dec 2005
Location: Hyderabad
Posts: 326
Thanks: 0
Thanked 1 Time in 1 Post
asnavale is on a distinguished road
Reputation: 30
Default Re: Experiments in Technical Analysis - Trading the MACD

Quote:
Originally Posted by uma_k View Post
Hi Anant,

I have one request. In your modification to MABIUTS-HB system using Hi-Lo and MA thresholds you have given AFLs for each of them. Can you combine both and make a single AFL with provision for selecting either MA or HI-LO threshold? This will help in running a single AFL instead of two and visualising the differences better.

Regards

*** Uma ***
Hello Uma,

Here is the AmiBroker AFL code you wanted. You can select the MA-threshold or Hi-Lo threshold in Parameters Window whien you right-Click in the chart.

Code:
("MABIUTS-HB : Threshold Based");
 p1  = Param("EMA Period", 15, 1, 200, 1);
 p2  = Param("Smoothening Period", 15, 1, 200, 1);
 p3  = Param("Bollinger Period", 5, 3, 25, 1);
 p4  = Param("Bollinger Band Width", 1, 0.5, 3, 0.1);
 p5  = Param("Period for Buy", 9, 3, 50, 1);
 p6  = Param("Period for Sell", 3, 3, 50, 1);
 p7  = Paramtoggle("Threshold Based On", "MA | Hi-Lo", 1);

  X  = EMA(C, p1);
  Y  = EMA(X, p2);
  D  = X - Y;
BBB  = BBandBot(D, p3, p4);
BBT  = BBandTop(D, p3, p4);

 Buy  = Cross(D, BBT) AND (C >= MA(C, p5));
 Sell = Cross(BBB, D) AND (C <= MA(C, p6));

If (p7)
          {  Buy  = Cross(D, BBT) AND (C >= HHV(C, p5));
             Sell = Cross(BBB, D) AND (C <= LLV(C, p6));
          }

Buy  = ExRem(Buy, Sell);
Sell = ExRem(Sell, Buy);

shape = Buy * shapeUpArrow + Sell * shapeDownArrow;
PlotShapes(shape, IIf(Buy, colorBrightGreen, colorRed), 0, IIf(Buy, L, H));
The same code is attached herewith as a text file. You can download the file, change the extension to .AFL and directly use in AmiBroker charts.

Regards

-Anant
Attached Files
File Type: txt MABIUTSHB-Threshold.txt (918 Bytes, 53 views)
Reply With Quote
  #737  
Old 8th February 2007, 09:55 AM
Member
 
Join Date: Nov 2006
Posts: 32
Thanks: 0
Thanked 0 Times in 0 Posts
uma_k is on a distinguished road
Reputation: 19
Default Re: Experiments in Technical Analysis

Hi Anant,

Thank you for uploading the AFL.

CONGRATULATIONS
FOR ACHIEVING 200+ POSTS


Thanks

*** Uma ***
Reply With Quote
  #738  
Old 8th February 2007, 07:48 PM
Member
 
Join Date: Dec 2005
Location: Hyderabad
Posts: 326
Thanks: 0
Thanked 1 Time in 1 Post
asnavale is on a distinguished road
Reputation: 30
Default Re: Experiments in Technical Analysis

Thank you Uma

-Anant
Reply With Quote
  #739  
Old 8th February 2007, 08:04 PM
Member
 
Join Date: Dec 2005
Location: Hyderabad
Posts: 326
Thanks: 0
Thanked 1 Time in 1 Post
asnavale is on a distinguished road
Reputation: 30
Default Re: Experiments in Technical Analysis

THE MABIUTS-HB WITH RSI

The Story so far:

The MABIUTS-HB system is based on difference between two Moving Averages. Any Moving Average based system is prone to whipsaws and MABIUTS-HB is no exception. I have tried to reduce the whipsaws in following ways:
  1. By introducing Bollinger Bands of the Histogram and BUY and SELL are based on the cross-over of the Histogram and the Bollinger Bands. This has resulted in some reduction in whipsaws.
  2. I further refined the system by introducing a filter. There are two alternatives for the Filter: one based on short term MA and another based on previous High or Low over a short period. Both of these are almost identical except in few specific cases. Both of these did reduce the whipsaws to a considerable level. But the occurrence of whipsaws is still a problem to be solved.
What is New now:

Karthik has recently suggested some kind of indicator based Filter though he did not specify which. I have tried a few different indicators and found that RSI can be used as a Filter to reduce whipsaws to a much more acceptable level, though not completely eliminating them.

I am describing now the RSI based Filter applied to MABIUTS-HB system.

The basic signal generation is the same as earlier which is based on Histogram crossing over the Bollinger Bands. But the signal is valid only when the RSI is also favourable. With few trials with different values of RSI, I found that BUY condition when RSI is above 50 and SELL condition when RSI goes below 50 are satsfactory.

The commonly used default period of 14 for RSI was found to be inadequate for this MABIUTS-HB system. After testing with different values I have chosen the RSI period of 21 which appears well suited to filter the whipsaws. Therefore, I have taken RSI(21) as the Filter.

The BUY and SELL conditions are therefore generated as follows:

BUY: Histogram crosses and goes above upper Bollinger Band AND RSI(21) is 50 or more.

SELL: Histogram crosses and goes below lower Bollinger Band AND RSI(21) is below 50.

Here the Bollinger Bands are those of the Histogram itself, with a period of 5 and width 1.

The AmiBroker AFL using this method to plot the BUY and SELL arrows on the price chart is given below. I have also attached the AFL file with this post to so that you need not type it. Just download it and directly use by changing the extension from 'txt' to 'AFL'.

Code:
("MABIUTS Histogram With RSI(21) Filter");
p1 = Param("EMA Period", 15, 1, 200, 1, 1);
p2 = Param("Smoothening Period", 15, 1, 200, 1, 1);
p3 = Param("Bollinger Band Period", 5, 3, 50, 1);
p4 = Param("Bollinger Band Width", 1, 1, 3, 1, 1);

 X = EMA(C, p1);
 Y = EMA(X, p2);
 D = X-Y;
 
BBB = BBandBot(D, p3, p4);
BBT = BBandTop(D, p3, p4);

Buy  = Cross(D, BBT) AND (RSI(21) > 49.99);
Sell = Cross(BBB, D) AND (RSI(21) < 50.00);

Buy  = ExRem(Buy, Sell);
Sell = ExRem(Sell, Buy);

Marker = Buy * shapeUpArrow + Sell * shapeDownArrow;
PlotShapes(Marker, IIf(Buy, colorGreen, colorRed), 0, IIf(Buy, L, H));
I have enclosed three figures to show the effect of the Filters. each figure has three charts of the same stock. The bottom chart is without any Filter. The middle chart is with Hi-Lo Filter. The top chart is with RSI filter. In each figure you can see that the lower chart has too many signals. the middle chart has much reduced number of signals. The top chart has very few signals. These charts clearly show the pronounced effect of RSI based filter.

However, be aware that this is not the best solution. In several cases you can still see some whipswas, but less than the other options. On a casual observation I have seen in most cases when RSI oscillates between 45 and 55 the whipsaws are more. But if we use 45 and 55 as filter values the system performs poorly. Therfore, I have retained the RSI(21) Filter value of 50.

There is a need to address this problem. Your critical evaluation, comments and suggestions are needed. Please feel free to post your opinion.

Thanks

-Anant
Attached Images
File Type: png ASAHI.png (17.0 KB, 85 views)
File Type: png LT.png (16.3 KB, 55 views)
File Type: png WIPRO.png (17.7 KB, 82 views)
Attached Files
File Type: txt MABIUTSHB-RSI.txt (625 Bytes, 82 views)
Reply With Quote
  #740  
Old 8th February 2007, 09:05 PM
Member
 
Join Date: Nov 2006
Posts: 1,496
Thanks: 55
Thanked 69 Times in 38 Posts
kkseal will become famous soon enoughkkseal will become famous soon enough
Reputation: 133
Default Re: Experiments in Technical Analysis

Hi Anant,

Excellent charts - brought out the differences clearly. Only in the case of Wipro there was a false sell signal during a consolidation phase.

Simce your system uses a 15d EMA and a smoothened version of it as the trigger line, i am not surprised that the conventional 14d RSI didn't work for you.

This seems better than all the filters that have been tried so far.

Regards,
Kalyan.
Reply With Quote
Sponsored Links

Reply

Bookmarks


Advertise Here


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Similar Threads for: Experiments in Technical Analysis
Thread Thread Starter Forum Replies Last Post
Technical Analysis Course snowy Technical Analysis 28 7th November 2008 07:37 PM
Technical analysis course sh50 Seminars & Tutors 18 10th June 2007 03:46 PM
Hello everybody.Technical Analysis vijay chauhan Introductions 2 30th May 2007 03:09 PM
Technical Analysis crosscurrency Forex 0 30th October 2005 11:00 PM


All times are GMT +5.5. The time now is 05:40 AM.

Indemnity, Disclaimer & Disclosure Notice:
• By visiting Traderji.com you indicate your acceptance of our Forum Rules Disclaimer & Disclosure and indemnify Traderji.com, its associates and related parties of all claims howsoever resulting from the usage of the forum.
Disclaimer: Trading or investing in stocks & commodities is a high risk activity. Any action you choose to take in the markets is totally your own responsibility. Traderji.com will not be liable for any, direct or indirect, consequential or incidental damages or loss arising out of the use of this information.
Disclosure: The information in this forum is neither an offer to sell nor solicitation to buy any of the securities mentioned herein. The writers may or may not be trading in the securities mentioned.
• All names or products mentioned are trademarks or registered trademarks of their respective owners.
General Content Disclaimer Notice:
In light of our policy of encouraging candid, open exchanges of views and the rapid distribution of information originating from many sources, Traderji.com cannot determine the accuracy of information that may be uploaded to the forum. Opinions, advice and all other information expressed by participants in discussions are those of the author. You rely on such information at your own risk. You are urged to seek professional advice for specific, individual situations and not rely solely on advice or opinions given in the discussions. Since Traderji.com is an open and free discussion forum, any comments made by members of this forum in their posts reflect their own views and not of the owner or administrator of Traderji.com. Thus the owner/administrator indemnify themselves of all claims whatsoever and will not be liable or responsible for any members comments/views in this forum Traderji.com. If you find any objectionable or offensive posts made by members of this forum which you would like to bring to our notice for removal then please Contact Us.
 


Copyright © 2001 - 2008, Traderji.com All Rights Reserved.

Recommended Websites - www.TradersEdgeIndia.com - www.TradingPicks.com - www.MasterOfTrading.com