dear friends & fellow members,
as part of the 'System Implementation Exercise', i am posting a brief descriptive of the system MABIUTS - K1 and also attaching the system AFL code that will be used for this testing. also a sample Price & K1 indicator chart. feel free to give your feedback and you too can run this code on your AB data and test for yourself to get the feel of the selections.
MABIUTS K1 basically uses adaptive moving average (AMA) with other improvisations. AMA was originally provided by Kaufman and works on the volatility. when the stock is volatile the the ema calculation periosd is shortened and the AMA follows the price cloosely. but when the stock is less volatile like in sideways movement, the period is lengtened so that AMA moves slowly. AMA thus helps us to indentify the stocks moving sideways.
but here we are going a step further... we are using the ADX or RAVI to further control the AMA. in a sideways market the ADX & RAVI have low values. normally ADX > 20 or RAVI > 4 is considered trending market. for values of ADX < 20 (or RAVI < 4), we will clamp the AMA so that it becomes
almost a straight line. so when the ADX is less than 20 indicating a sideways market we get almost a horizontal line AMA. so if AMA is horizontal, we avoid geting into any trades to avoid whipsaws.
for more detailed explantion on the system, please refer to the post by karthik:
http://www.traderji.com/57647-post176.html
the original AFL provided by karthik and posted in this thread by sanjay was 'changed' by me and attached to this post. the changes will NOT change the basic process of the stock selection. the changes are:
1) a few lines of code added, so that the search will be within about 200 stocks considered by price & volume. also the close, volume in thousands (VK) & the turnover in lakhs are added into the exploration.
2) then to get a full insight into the process of stock selection, some columns are added in the exploration mode. they are like RAVI, ADX, the intermediate variable DIFF, MyConst, NewConst & the ratio of AMA & the EMA of the AMA. also the number of trading days since the 'last' reversal is provided.
3) the AMA & its EMA can be viewed as a chart for ready eye-balling of the trend.
4) some additional information like the changes in volume (VR), MACD (CD), RSI & HL% are added. HL% indicats the position of the last close as a % of the previous highs and the lows.
5) for easy identification of whether the value of any parameter for a stock is of positive (buy) significance or negative (sell) significance, colors are used for the values. in general, GREEN means a positive value, RED means a negative value and BLACK means a transition zone.
6) the BUY / SELL signalled stocks are being added to watchlist no: MyWL, with a default value of 10, set in the first lines of the code. if you already have some other list in this watch list, you may change the default value. otherwise contents of your watchlist no 10 will be deleted.
7) BUY /SELL siganals are shown as B / S in the column 'BS'. Desk Top inventory management
8) the system has a capability to select ADX or RAVI to control the AMA, with ADX as the default. i will be using only the ADX option to report my selected stocks. but when i get more selections than i can buy on that day, i will use the value of RAVI and other parameters( particularly VR) to limit my selection to the numbers permitted by the money management guidelines.
this procedure is presented with annoying detail, so that some more members may find is easy to start selection of stocks on their own and post them too.
i welcome any suggestions to make changes to the code as long as it does NOT affect the stock selection.
for sure, i am a bad selector of stocks and for that reason, i do not want the value of karthik's system to be undervalued !
thanks for your patience in going through this long post.
murthymsr