My afl collection

Status
Not open for further replies.

shivangi77

Well-Known Member
Predictive RSI (Using Neural Network)







The following formula was create using the new version of the WiseTrader Toolbox which can compile trained neural networks to AFL.

Yellow RSI This is the 14 day neural network powered predictive RSI. It is both smooth and has slightly less lag.

Blue Standard 14 day RSI included with Amibroker.

Red Smoothed 14 day RSI. Smoothing has added some lag.


 

shivangi77

Well-Known Member
Volume Spike Exploration


The formula is an exploration for finding volume spikes:

A volume spike is defined to be when volume exceeds a StdDev above its moving average
Looking back, the code filters for a volume spike an exact # of bars ago
Looking forward, the code filters for the first volume spike that takes place after the current bar.


 

shivangi77

Well-Known Member
Random Walk Index


The random walk index (RWI) indicator attempts to determine if a stocks price movement is random or the result of a statistically significant trend. The random walk index attempts to determine when the market is in a strong uptrend or downtrend. It does this by measuring price ranges over the past N bars and how it differs from what would be expected by a random walk, which is going up or down randomly.





 

shivangi77

Well-Known Member
Elliott Wave Calculator
(Excel based)

The calculator will help to broadly classify various waves associated with the Elliott Wave principle as per the Fibonacci ratios
Some of the commonly accepted ratios and rules have been taken into account while making the calculator.

Following assumptions related to price aspect are made while making the calculator.
1) You need to first establish Wave 1, based on that rest of the waves have been calculated .Once Wave 1 is identified, insert the values in grey cells under FROM and TO Cells
2) Wave 2 is 0.618 times Wave 1
3) Wave 3 is 1.618 times Wave 1
4) Wave 4 is 0.382 times Wave 3
5) Wave 5 is equal to Wave 1
6) Wave A is 0.382 times Wave 5
7) Wave B is 0.618 times Wave A
8) Wave C is equal to Wave A

Following assumptions related to time aspect are made while making the calculator.
1) Once Wave 1 is identified calculate the number of price bars between the start and end of the wave. Insert this in calculator (grey cell under the column Time Bars)
2) Wave 2 is 0.618 times Wave 1
3) Wave 3 is equal to the sum of time between Wave 1 and Wave 2
4) Wave 4 is 1.382 times Wave 2
5) Wave 5 is 1.382 times Wave 4
6) ABC waves is half in length to 12345 waves
7) Wave A and Wave C are of same time duration.
8) Wave B is 0.618 times Wave A

The above points are commonly accepted ratios in Elliott wave principle and thus are not absolute values
I feel if Elliott Wave price projection is used with oscillator divergence and trend channels, it can give quite reliable price projections. With the help of the calculator we can quickly form an opinion about the current trend in any time frame from 1 min to 1 month or more, in any stock or index


DOWNLOAD

 

shivangi77

Well-Known Member
Stock screener based on RSI


Comparative Relative Strength study compares two stocks to show how the stocks are performing relative to each other. Comparative Relative Strength Study should not be confused with the Relative Strength Index of J. Welles Wilder Jr. It is one of the most simplest and powerful way to analyse the stock markets.

I have created a simple Excel file where I have taken four different “base dates” and compared it with current market price of stocks. Just for ease of calculation, I have taken previous 3, 6, 9, 12 month’s prices as “base date”, to see the rate of change (momentum) during these timeframes. Therefore we can easily compare stocks across the market, to find an outperforming or underperforming stock.




How to update the data?
You need to follow the steps given under to update the data, to reach the desired results.

1) Update the data in "Grey cells" only, which you will find in all the sheets except the first sheet “Screener”

2) Download the end of day (EOD) data from National Stock Exchange site, for this sheet I have downloaded 3, 6, 9, 12 month’s data. Alternatively one can choose specific day’s data as base date for example a significant high (05-11-2010) or an important low (26-08-2011). It’s up to you to select different time frames. The minimum timeframe to compare, that I have used is 3 month’s data, some people use 1 week and 1 month’s data as well to gauge short term performance.

3) Copy the data in the same sequence as I have done in different worksheets i.e. “Latest” “3 month” “6 month” “9 month” “12 month”. In case you choose different data set, keep the latest data first and oldest in the last sheet otherwise “Gain %” in first worksheet will be calculated erroneously.

4) That’s all about updating data. Once all the data is copied everything will be updated automatically in the first sheet “Screener”. Now you can apply excel filter by selecting top row. You can check the performance of stocks across different timeframes by using “Sort largest to smallest” feature. On top you will get the outperforming stocks (part of “buy only” watch list) and the bottom of the table will give you the list of underperforming stocks (part of “sell only” watch list). To further arrange the data for your convenience you can uncheck the "#N/A" when you sort the data.


A Few things to take care of:
1) Updating this stock screener is a little tricky, at least for someone who is new to Microsoft Excel. People familiar with Microsoft Excel will find it very easy. It’s just a simple copy paste task in the appropriate sheets.

2) The data that we download from NSE is not reliable at times. Old data is not split adjusted so you will get erroneous result with this screener, especially with the stock that had a split, bonus or rights issue in the past one year. If you can import data from a reliable software or a website, it will work like a charm.

3) Always verify the results of the screener with a chart. That’s what I do to verify the results of any kind of screener.

4) You need to copy the formulas in the “Screener” worksheet if new data is added in second work sheet “Latest”. This can be done easily by selecting the last row in the first worksheet “Screener” and dragging it down.


Screening and trading
This excel file will just help you to find an outperforming or underperforming stock. It tells you, where you should allocate your money. It doesn’t ensures that you will be profitable trading a particular stock. Profitability will depend on your trading system and trading discipline.

This screener essentially helps you in finding a momentum stock. Momentum trading is not easy for everyone. It is based on “buy high, sell higher” (greater fool theory) way of trading in other words breakout trading. One can always wait for some kind of a retracement to enter a momentum trade. But the stock chart will always give an impression that the stock has moved “significantly” from a base. Most of the stocks that you will find using this screener will be “fundamentally over valued”.
Good luck :)
-Author


DOWNLOAD

 
Last edited:
Stock screener based on RSI


Comparative Relative Strength study compares two stocks to show how the stocks are performing relative to each other. Comparative Relative Strength Study should not be confused with the Relative Strength Index of J. Welles Wilder Jr. It is one of the most simplest and powerful way to analyse the stock markets.

I have created a simple Excel file where I have taken four different base dates and compared it with current market price of stocks. Just for ease of calculation, I have taken previous 3, 6, 9, 12 months prices as base date, to see the rate of change (momentum) during these timeframes. Therefore we can easily compare stocks across the market, to find an outperforming or underperforming stock.




How to update the data?
You need to follow the steps given under to update the data, to reach the desired results.

1) Update the data in "Grey cells" only, which you will find in all the sheets except the first sheet Screener

2) Download the end of day (EOD) data from National Stock Exchange site, for this sheet I have downloaded 3, 6, 9, 12 months data. Alternatively one can choose specific days data as base date for example a significant high (05-11-2010) or an important low (26-08-2011). Its up to you to select different time frames. The minimum timeframe to compare, that I have used is 3 months data, some people use 1 week and 1 months data as well to gauge short term performance.

3) Copy the data in the same sequence as I have done in different worksheets i.e. Latest 3 month 6 month 9 month 12 month. In case you choose different data set, keep the latest data first and oldest in the last sheet otherwise Gain % in first worksheet will be calculated erroneously.

4) Thats all about updating data. Once all the data is copied everything will be updated automatically in the first sheet Screener. Now you can apply excel filter by selecting top row. You can check the performance of stocks across different timeframes by using Sort largest to smallest feature. On top you will get the outperforming stocks (part of buy only watch list) and the bottom of the table will give you the list of underperforming stocks (part of sell only watch list). To further arrange the data for your convenience you can uncheck the "#N/A" when you sort the data.


A Few things to take care of:
1) Updating this stock screener is a little tricky, at least for someone who is new to Microsoft Excel. People familiar with Microsoft Excel will find it very easy. Its just a simple copy paste task in the appropriate sheets.

2) The data that we download from NSE is not reliable at times. Old data is not split adjusted so you will get erroneous result with this screener, especially with the stock that had a split, bonus or rights issue in the past one year. If you can import data from a reliable software or a website, it will work like a charm.

3) Always verify the results of the screener with a chart. Thats what I do to verify the results of any kind of screener.

4) You need to copy the formulas in the Screener worksheet if new data is added in second work sheet Latest. This can be done easily by selecting the last row in the first worksheet Screener and dragging it down.


Screening and trading
This excel file will just help you to find an outperforming or underperforming stock. It tells you, where you should allocate your money. It doesnt ensures that you will be profitable trading a particular stock. Profitability will depend on your trading system and trading discipline.

This screener essentially helps you in finding a momentum stock. Momentum trading is not easy for everyone. It is based on buy high, sell higher (greater fool theory) way of trading in other words breakout trading. One can always wait for some kind of a retracement to enter a momentum trade. But the stock chart will always give an impression that the stock has moved significantly from a base. Most of the stocks that you will find using this screener will be fundamentally over valued.
Good luck :)
-Author


DOWNLOAD



Awesome!!!
 

shivangi77

Well-Known Member
Average True Range (ATR) in Excel


The concept of Average True Range was developed by J. Welles Wilder Jr and introduced in his book, New Concepts in Technical Trading Systems (1978), the Average True Range (ATR) indicator measures the volatility of a stock or index.

It's fairly simple to use, all you need to do is update the data in "Grey Cells" Just be careful when you copy the high, low,close data for the day,quite often due to "freak quotes" you get incorrect opening values (happens mostly with illiquid stocks).So I would say ignore a few initial ticks, if that is cumbersome ignore the first minute data.

True Range is defined as the greatest of the following:
1)Today's High less Today's Low (D1)
2)Today's High less Yesterday's Close (D2)
3)Yesterday's Close less Today's Low (D3)

The calculator will be of help if you have a trading system based on a range.Using Average True Range (ATR) indicator or True Range instead of just high and low for the day gives a better feel of the markets.This is specially useful to calculate volatility in a stock or a commodity making limit moves



DOWNLOAD


 

shivangi77

Well-Known Member
Position Sizing Calculator




One of the mistakes people commit in trading is to completely disregard the amount of risk to trading account. This is especially the case with fixed lot size in futures and options or otherwise when they take fixed number of shares per trade i.e 100, 200 shares.
Lets take an example, if we buy 100 units of 5$ stock our total value of trade will be 100*5 = 500$. If we buy 100 units of 500$ stock our total value of trade will be 100*500 = 50000$. Profits and losses arising with fixed lots (100 units, in this example) will result in huge swings in the trading account.

Risk Management
Trading is all about preserving capital first and then capital appreciation. Risk management is key to survival in stock trading. One of the golden rules of trading is "cut your losses short but let your profits run". When we say "cut your losses short", it means that we should always be aware of the maximum amount of dollar value that we are willing to risk. This can be for example 1% of total trading capital.

Trading Plan
Coming to the second part. When we take the trades based on technical analysis, we plan them based on support and resistance that we observer on the charts. Basic rule of trading is that we should have an entry, exit and stop-loss (trading plan) before we execute our trade. The difference between our entry and stop is not fixed, it changes with every trade depending on the chart structure.

Position Size
Therefore, we don't have any control over the above two parameters. Both are to some degree "fixed", based on certain rules, to keep overall losses in check. The only thing that is variable is position size. Depending on our entry and stop this will and should change with each trade. With every trade we will have a different number of shares to buy or sell so that our maximum risk per trade remains constant unlike the case with fixed lots.





How to use the calculator?
As always, you can modify the "grey cells" rest will get calculated by the excel file. You need to input, your trading account size (will change with every trade), percentage of risk you want to take per trade (will remain fixed depending on your risk profile) and your trade plan (entry, stop-loss and exit level).
You will get the number of shares that you should ideally trade along with reward to risk ratio (how many times the reward is compared to risk) and other details of the trade.

What you should do is experiment with different entries and exits to see how your trade size changes. Tighter stops will allow you to trade more shares hence your "total trade value" will increase. Increasing the risk percentage from default 1% to 2% will also increase the total trade value.

I hope you will find the position sizing calculator useful in your trading, trade and money management.
Good luck with your trading :)


DOWNLOAD


 

sanjn84

Active Member
hi shivangi can u plz upload some afl's for swing trading i mean some screeners for same for slecting stocks for a pullback in a uptrend.
 
Status
Not open for further replies.

Similar threads