![]() |
|
| 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 ... |
|
|||||||
| Notices |
| Technical Analysis Discussion of all the principles involved in technical analysis. |
![]() |
|
|
Thread Tools |
| Sponsored Links |
|
#731
|
|||
|
|||
|
Quote:
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 |
| Sponsored Links |
|
#732
|
|||
|
|||
|
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 *** |
|
#733
|
|||
|
|||
|
Quote:
I am Working ... Working ... Working ... Working ... Working ... When I get something worth posting I will surely do. Thanks for your interest. Regards -Anant |
|
#734
|
|||
|
|||
|
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. |
|
#735
|
|||
|
|||
|
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 |
|
#736
|
|||
|
|||
|
Quote:
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));
Regards -Anant |
|
#737
|
|||
|
|||
|
Hi Anant,
Thank you for uploading the AFL. CONGRATULATIONS FOR ACHIEVING 200+ POSTS Thanks *** Uma *** |
|
#738
|
|||
|
|||
|
Thank you Uma
-Anant |
|
#739
|
|||
|
|||
|
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:
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));
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 |
|
#740
|
|||
|
|||
|
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. |
| Sponsored Links |
|
|
![]() |
| Bookmarks |
| Thread Tools | |
|
|
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 |
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.