Академический Документы
Профессиональный Документы
Культура Документы
Amibroker AFL Trend Quality Indicator David Sepiashvili presented the Trend
Quality Indicator as an indicator to filter out noise from the trend.
Better way to use this indicator according to me is to get the bias of trend once +2 or
-2 is breached. Once that happens, traders can shift to hourly or 30 minute time
frame and adopt the buy on dip or hit and run strategy to enter and exit quickly with
profit. Since the trader would be entering in the direction of trend, odds of taking big
loss is small.
Amibroker AFL Trend Quality Indicator
PlotGrid( -1 );
PlotGrid( 1 );
PlotGrid( 2 );
PlotGrid( -2 );
PlotGrid( 5 );
PlotGrid( 5);
Amibroker AFL ATR Channel Breakout System
Amibroker AFL ATR Channel Breakout I had explained this system in this post.
Just refer to the post to know what this AFL is all about. Basically this is a system
which takes into account market volatility. The results of this system have also been
posted and you can find them here. All one has to do is load this Amibroker AFL
directly on to the chart. The entire system will be visible. If you want, then go ahead
and add the Buy/Sell commands. In case you do not know how to do that, then let
me know. I will update the AFL then.
5. Once you do the above, you will get a chart which is similar to what I have posted
below.
I will advise you to go through the rules of the system to have a better idea on how to
use it. In highly volatile times, this is a good system which makes you enter small
when volatility is high and enter big when volatility is low.
_SECTION_BEGIN("EMA");
P = ParamField("Price field",-1);
Periods = Param("Periods", 50, 2, 300, 1, 10 );
Plot( EMA( P, Periods ), _DEFAULT_NAME(), ParamColor( "Color", colorCycle ),
ParamStyle("Style")|styleNoTitle );
_SECTION_END();
In this article, I will explain the basics of this Trading strategy. In the next article, I will
test this strategy on Nifty. I will then share the results and analyze it.
Buy Entry is taken on Open next day, if on previous day, price closed above the
Entry threshold. That is, above the top of the channel. For Short selling, rules are
exactly the opposite. Trade is kept open, till the price does not close below the Exit
threshold. Exit threshold is a Stop loss/Profit Trail mechanism.
Since this Trading strategy buys strength and shorts weakness, it is absolutely
necessary that pyramiding techniques be used. Positions must be added on winning
trades and losses must be taken on small positions. As a position sizing technique,
averaging should never be adopted for this Trading strategy.
Testing Parameters
Testing Parameters used in this Trading Strategy will depend on nature of system
designed. I am giving the parameters for a short term ATR Channel Breakout
strategy. Readers can set the parameters according to their trading style.
I am including an image so that Strategy is clear to all. In the next article, I will share
the results for this strategy.
Trading Strategies ATR Channel Breakout Trending Market
In this article, I will explain the basics of this Trading strategy. In the next article, I will
test this strategy on Nifty. I will then share the results and analyze it.
Buy Entry is taken on Open next day, if on previous day, price closed above the
Entry threshold. That is, above the top of the channel. For Short selling, rules are
exactly the opposite. Trade is kept open, till the price does not close below the Exit
threshold. Exit threshold is a Stop loss/Profit Trail mechanism.
Since this Trading strategy buys strength and shorts weakness, it is absolutely
necessary that pyramiding techniques be used. Positions must be added on winning
trades and losses must be taken on small positions. As a position sizing technique,
averaging should never be adopted for this Trading strategy.
Testing Parameters
Testing Parameters used in this Trading Strategy will depend on nature of system
designed. I am giving the parameters for a short term ATR Channel Breakout
strategy. Readers can set the parameters according to their trading style.
I am including an image so that Strategy is clear to all. In the next article, I will share
the results for this strategy.
Another popular way to keep a Stop Loss which takes into account stocks volatility
is with the help of ATR. ATR is the Average True Range of the stock over a period of
days decided by the Trader. The way to set a Stop Loss is to take the ATR(n) value
and multiply it by a factor of 2 or 3. The most popular multiplier is 3 and the most
popular ATR setting is ATR (20). That is, Average True Range over a period of 20
days. ATR is available in most Technical Analysis Softwares and therefore once you
have the value of ATR, you can simply multiply it with the factor of 3 and subtract it
from your entry price (in case of Buy trade). Look at the chart below for better
understanding.
Amibroker AFL Historical Volatility We discussed about how to set Initial Stop Loss
using Historical Volatility yesterday. Attached with this post is the AFL for plotting
Historical Volatility in a chart. The concept of using Historical Volatility in trading was
explained very well by Larry Connors and Linda Bradford Raschke. This AFL has
been programmed according to the calculations explained by them in their book,
Street Smarts. Its better if you read this book as there are many concepts related to
volatility which are worth reading.
The main use of this AFL is to identify historical volatility levels. VIX is only available
since 2008 and ATR based volatility is not entirely accurate in representing the true
picture of volatility. Therefore, by using this AFL, historical volatility levels can be
easily computed and strategies related to volatility and price can be devised and
backtested. One common way to use this indicator is to plot short term Historical
Volatility and long term Historical Volatility together and see if the market is going to
be more volatile or less volatile in the future. Based on the findings, appropriate
strategies can be used. We will cover some of those strategies in our future posts.
Larry Connors and Linda Bradford Raschke recommend setting of 20 and 100 for
short term and long term volatility.
Amibroker AFL Historical Volatility
_N(Title = StrFormat(Name()+ " {{DATE}} - Open %g, Hi %g, Lo %g, Close %g (%.1f%%)
{{VALUES}}", O, H, L, C, SelectedValue( ROC( C, 1 )) ));
Market is changing all the time. Therefore, it is better to have a technique to set stop
loss which takes into account the changing dynamics of the market. When the
market is volatile, stop loss should be wide and when the market is less volatile, stop
loss can be relatively less wide. One problem faced by traders is getting frequently
stopped out of their positions. The main reason for this is that they dont take into
account the market volatility aspect. In order to calculate stop loss based on
volatility, one needs to calculate the Historical Volatility of the stock. The formula for
calculating Historical Volatility is,
For e.g A 50 Day HV with 252 trading days in an year would be calculated like this,
Once you have the Historical Volatility of the stock, you can simply subtract it from
your entry price and you would get your stop loss. In the chart below, we have
selected two stocks of the same price range and yet they have different volatility
parameters. Therefore, stop loss for same price range stock is different. This is the
right way to set stop loss as it takes into account the volatility of the stock.
As improvements over OBV, Volume Flow Indicator has attempted to overcome all
the shortcomings of the OBV. Firstly, VFI uses stocks typical price in its calculations
(High + Low + Close)/3. This represents the true average of trading activity in terms
of price and volume. Secondly, there is a minimum cutoff % change in price after
which the calculation is done. Unlike in OBV, where even a slight change in price in
% terms would lead to distorted calculations. And Finally, VFI nullifies the impact of
extreme volume bars which usually distort any volume indicator if present on the
chart. VFI does this by cutting off any excess volume above a certain limit, which is
expressed as a multiple of the volume moving average.
The Zero Level and direction of VFI If the value of the VFI is above zero, it is
considered bullish and indicates accumulation. If the Value of VFI is below zero, it
indicates distribution. When VFI crosses the zero line, it indicates that the
intermediate balance of power is changing from the bulls to the bears and vice versa.
Direction of VFI is also important. When VFI is rising, price will move higher. When
VFI will fall, price will eventually fall.
Amibroker AFL Finite Volume Element (FVE) Finite Volume Element indicator was
introduced by Markos Katsanos. The Finite Volume Element Indicator is a money
flow indicator but it is different from On Balance Volume (OBV) and Chakins Money
flow (CMF) indicator. The main difference in these indicators is that the OBV and
CMF, add or subtract volume even if stock barely manages to close above or below
previous close. FVE on the other hand, uses a threshold to filter out directional
movement instead of random noise. The threshold used is 0.3% of Close.
Calculating FVE
where:
C= Todays closing price
H= Todays high
L= Todays low
Typical = (H+L+C)/3
Typical-1= Yesterdays typical price.
Broadly there are two ways to FVE. The first is to look at the slope. If the Slope is
heading higher, then this is a sign of accumulation and bulls being in control. On the
other hand, if the slope is down, then this is a sign of distribution with bears being in
control. Another way to use FVE is to see where it is with respect to zero line. A
FVE value higher than zero indicates accumulation; the opposite is true for negative
values. A logical buy signal would be for FVE to diverge from price, make a series
of higher highs and/or higher lows, and then cross (or be about to cross) the zero
line.
Do not forget to experiment on higher time frames for long term trends. This indicator
is very useful in determining long term trends.
Amibroker AFL Finite Volume Element Nifty Daily