Friday, June 19, 2015

Finally...... Here is VPA Version 3

Finally, I am ready with the working version of the upgraded VPA, version 3.0. Of course the usual prolonged testing has not been done yet. For the version 1.0 I had my friend CAS who did the through testing before we released for the public. He was the one who introduced me to VSA. It is the right time to acknowledge his contribution to the VPA. Anyways I am releasing the version 3.0 directly now and we can collect all the feedback and make the debugging if any.

Obviously the first question that would arise in everyone’s mind is what is new in version 3.0. Let us look at the various changes as below

Code: The code itself had undergone a big change. Now it is more organized and easily understandable. Also the formula for each condition have been studied and updated.

Background color choice: There is option to select the background color.  There is option to have two different colors for the upper and lower parts of the pane providing a gradient colors.

Trend Analysis: One of the major changes is the way the trend evaluation is done. In the earlier version trend evaluation was done using Linear Regression Slope. In the new version we are using the “Random Walk Index” to evaluate the Trend. This method is much more accurate compared to the earlier one. It uses the Inbuilt RWI functions of the Amibroker. The AFL has some parameter variables and if one is not sure about the Random Walk Index it is better to leave the parameters at default values. The RWI index and trend analysis deserves a separate dedicated post which I will do later.

Bar coloring: Two choices for bar coloring are provided, VSA based and Trend Based. The method is selectable from the parameter window.

Support and Resistance lines:  The support and resistance lines can be plotted on the chart. Maximum of 20 lines can be plotted. One can also adjust the sensitivity for the selecting the support and resistance lines. All the selection can be performed from the parameter window.

 Also commentary is provided about the support and resistance lines. Messages are displayed as the price approaches a support or resistance lines. Also messages are displayed when the price cross a support or resistance line.

 High Volume Lines:  In Volume price analysis high Volume bars deserve a lot of attention. The high volume Bars of the past  also play significant role in current Bar analysis as well. So I have provided the facility to plot the high volume lines just  like the support and resistance lines.  One can plot up to 20 lines. Also one can adjust the volume factor that determines the high volume areas.  All the adjustments and selection are done from the Parameter window.

The Parameter setting window

The AFL can be downloaded from the below link

Volume Price Analysis VPA 3.0

Friday, June 5, 2015

The K-Trend System - I

Before we proceed with further exploration of the K-Trend Indicator let me share with you my Trading system based on the K-Trend Indicator. It was one of my early Indicators developed during my early days of TA journey.
The system is a simple Reversible one. The rules are follows

BUY Setup
When the momentum turns positive from negative, In other words when the K-Trend Indicator is negative and changes from negative to positive.
Buy setup = KT < 0 and KT (today) > KT (Yesterday)
The setup condition remains active for 6 Bars

Enter when the value is above the High of the Buy setup Bar+0.5 times a 5 bar Average True range.
Buy = High(Buy setup bar) + (0.5 x ATR(5) ) .  In fact the value 0.5 is adjustable.

Exit  setup
When the momentum turns negative from Positives, In other words when the K-Trend Indicator is positive and changes from positive to negative.
Exit setup = KT >0 and KT (today)<KT (Yesterday)

Exit when the value is below the Low of the Exit setup Bar-0.5 times a 5 bar the Average True range.
Exit = Low(Exit setup Bar) – (0.5 x ATR(5))

After experimenting I found that many trades were missed because the Ktrend quickly crossed above or below the zero line in less than 6 bars and the value was still less/more than the entry/exit threshold values and the stock went on to make big moves. So I added further conditions to take care of these opportunities as well. The revised Entry and Exit condition are as follows

Buy = High(Buy setup bar) + (0.5 x ATR(5) )  OR  KT cross above +40

Exit = Low(Exit setup Bar) – (0.5 x ATR(5))  OR  KT cross below -40

I found that the system was able to catch the big Trends and losses were quite limited  in the sideways moves. The system was useful for stocks which had the tendency to have some trends and useless for stocks which moved sideways most of the times.

The system has the facility to set the ATR multiplication factor which has a default value of 0.5.  Also one can set the traded quantity so the current Profit/Loss situation  is indicated exactly. 

A quick backtest on the Nifty (The Indian stock Index) is provided below.

The System can be downloaded and tested if one likes from the below link.  Looking forward to feed backs..