Showing posts with label strategies. Show all posts
Showing posts with label strategies. Show all posts

Monday, November 3, 2014

Should You Use The Macd In Your Trading Strategy?




Meet the Macd.


To use this indicator effectively, we will have to understand some of its development and history. Many traders use it as do many larger institutions, it has widespread acceptance around the world. To give a bit of background a quite from Wikipedia: http://en.wikipedia.org/wiki/MACD



MACD, short for moving average convergence/divergence, is a trading indicator used in technical analysis of stock prices, created by Gerald Appel in the late 1970s.[1] It is supposed to reveal changes in the strength, direction, momentum, and duration of a trend in a stock's price.
The MACD indicator (or "oscillator") is a collection of three time series calculated from historical price data, most often the closing price. These three series are: the MACD series proper, the "signal" or "average" series, and the "divergence" series which is the difference between the two. The MACD series is the difference between a "fast" (short period) exponential moving average (EMA), and a "slow" (longer period) EMA of the price series. The average series is an EMA of the MACD series itself.
The MACD indicator thus depends on three time parameters, namely the time constants of the three EMAs. The notation "MACD(a,b,c)" usually denotes the indicator where the MACD series is the difference of EMAs with characteristic times a and b, and the average series is an EMA of the MACD series with characteristic time c. These parameters are usually measured in days. The most commonly used values are 12, 26, and 9 days, that is, MACD(12,26,9). As true with most of the technical indicators, MACD also finds its period settings from the old days when technical analysis used to be mainly based on the daily charts. The reason was the lack of the modern trading platforms which show the changing prices every moment. As the working week used to be 6-days, the period settings of (12, 26, 9) represent 2 weeks, 1 month and one and a half week. [2] Now when the trading weeks have only 5 days, possibilities of changing the period settings cannot be overruled. However, it is always better to stick to the period settings which are used by the majority of traders as the buying and selling decisions based on the standard settings further push the prices in that direction.

And more from www.technitrader.com
MACD is the very popular Moving Average Convergence Divergence indicator. It is a trend-following indicator developed by Gerald Appel in the 70's, during a very different market than we have today. The theory of MACD is that when two moving averages cross, a significant change of trend in the stock's price is more likely to occur. As with all indicators, the moving average crossover is not a "sure thing" and should not be considered an absolute truth as you trade stocks.

Appel attempted to improve on that concept by using 3 Exponential Moving Averages to form 2 indicator lines. What MACD does is it plots the point spread between 2 different Exponential Moving Averages-a slower and a faster one. This is the first line. Then, a second Exponential Moving Average is plotted against the first. This is very similar to Stochastic. It can also be plotted as a histogram or bars, like Volume and Balance of Power are commonly used.

  • Widely used
  • Measures convergence and divergence
  • Shows trending markets and ranging markets
  • Best suited to longer time frames
  • Is adjustable to current conditions
  • Can be found on most trading platforms
  • Is not the most accurate in ranging markets



how to interpret the macd indicator


This is how some people use the Macd to enter and exit their trades.

You can see on the chart some arrows indicating entries and exits. Notice in the section where the price bars are, the arrows lag behind the crosses of the indicator. Often the indicator gives a signal well in advance of the price bars.





There is one serious proviso, because of the length of the smoothing period on the indicator, a sharp adverse move in the price may not be reflected and there could be a loss incurred.

Observing the bars in the histogram will allow the trader to detect changes in momentum and perhaps enter or exit his trade. The gap between the moving average lines will also be a guide to momentum.

  • Used for entries and exits by some traders
  • Illustrates momentum
  • Often indicates changes before moving averages 
  • Crossovers signify changes





how to trade the macd indicator  


First things first.!

The Macd Indicator can be found on most charting platforms if not all. It is a widely used tool and there are several versions. People use their own version as to what reflects their individual needs. For purposes of this discussion we will use the standard settings of 12 26 9.

The Macd Indicator has a most useful function for the day trader or the longer term trader in that it can be used to identify and confirm the trend. It can also be used to measure the end of a range bound period.

Traders have methods for trading with the trend and also within ranges, the Macd can help to illustrate the current market to help with decision making.

This chart shows how we can determine a trending market or a ranging or non trending market.




To further confirm as to what may be happening regarding trend, we can look at the next higher time frame also.




Of course there are other methods of confirming trends such as moving averages or stochastics, for our purpose at this time we will look only at the utility of the Macd Indicator.



A much Faster entry and exit using the Macd.


How can I use the Macd to my advantage in trading?

Most of the time a trader will be watching for a crossover of the lines to make entries and that has been a successful technique much of the time. By adjusting the lengths of the moving averages a person can make the entries much quicker than the 12 26 9 setup.

By shortening the 26 to a lesser number, the indicator will be come much more reactive to price changes and allow for faster entries and exits.

There is another way of using the indicator besides the crossovers. The histogram provides a signal, often well in advance of the crossover. You will notice that in a rising market the bars get longer and longer as the market advances and then they start to get shorter……. An entry signal. Conversely, as the market falls, the bars get longer and longer until they start getting shorter. A signal!



To use this type of signal we will have to observe the histogram bars as they move away from the zero line, going up or down and then keep an eye on the length of the bar. As soon as the bars begin to level off and get smaller, we have top be prepared for an entry or exit.

Of course this is not a perfect technique, it is a guide only and must be confirmed with price action or perhaps a complimentary indicator such as volume.

Here are a couple videos that are quite informative showing the Macd in action.








This one is a bit older and still has effective methods.






Enjoy your application of the Macd indicator and its uses!

Do you have any suggestions or ideas as to how to use the Macd? I would love to discuss them with you.



Wednesday, August 13, 2014

Is Macd Worthwhile For a Strategy?

Watch how I develop a trading strategy using the Macd.

There are so many ways to use the Macd. I want to develop an automated trading system which will be based on the Macd.

I will set up Forex Strategy Builder Pro to generate a system, using the Macd as the 'seed'. The generator in FSB Pro is free to change many aspects of the Macd as it is creating strategies with other indicators or price conditions.

Here is a look at how I started this:









I am using 60 minute data of EURUSD for this purpose, 35 per cent 'out of sample' as I want to be able to see easily what I can expect from this system in future.

As I have been typing this article the generator has been working, done just over 1,800 iterations which resulted in 51 potential strategies.

Here is what the screen looks like now.




You can see that the generator has pulled in other indicators as it seeks better and better results




I want to have a look at the 'Repository', there may already be a strategy of interest appearing in there.





You can see that none of these look too impressive, no System Quality Number, appearing even thogh an excellent Win/Loss ratio and nice Net Balance in the selection shaded blue.



I will restart the generator and set the System Quality bar to ensure that new entries to the repository have a System Quality Number. Actually I have set minimums for each criteria so that some good ones will be what appears from now on.





I have set the values low so as to allow the repository to gather some results that may not be satisfactory but which may show some promising indicator combinations that can be tested on their own to see what they may produce.



It should be noted that the winner of the 2006 Trading Championship used the Macd to win first place. Indeed, the Macd as a starting point for developing an automated trading strategy may turn out to be a good idea.

By setting some parameters for the Repository collection, I have eliminated many generated results, however, it is time to get quality instead of quantity and I will have to be patient until some good results appear.  In the meantime all results are being stored in the 'Collections' so that I can peruse them when convenient.

I have some results now that I will share with you, they may not be the best in terms of a system to use but they are of interest. We can have a look at these two and I will give you quite a bit of information from the program.





You can see that each of these has a System Quality Number which is what I wanted to be sure to have.. The first result, the one shaded in blue is of very poor quality because there are no trades in the Out Of Sample Area.

The second result has an abundance of trades and while the ratios may not be pretty there are some things to learn from examining this result more closely.

I will open this result as a strategy and prepare for further examination.

First we will see which indicators make up the system.



.And then we have some statistics and an equity chart.




And then a breakdown between Long and Short trades that we can examine carefully



You can see that the software has generated a system that takes $100 to some great sum, close to $30,000, however, this may be unsatisfactory based on the poor ratios.

Here is an overview of that trading strategy which is quickly prepared by the software.

Strategy Overview

Strategy name: New Strategy
Forex Strategy Builder Professional RC 1
Date: 13/08/2014 6:53:37 PM

Table of Contents


Description

None.

Logic

Opening (Entry Signal)

Open a new long position at Lower Band of Bollinger Bands* (Smoothed, Typical, 4, 4.77) when the following logic condition is satisfied:
  • MACD* (Simple, Close, Exponential, 47, 18, 20); MACD line falls.
Open a new short position at Upper Band of Bollinger Bands* (Smoothed, Typical, 4, 4.77) when the following logic condition is satisfied:
  • MACD* (Simple, Close, Exponential, 47, 18, 20); MACD line rises.

Closing (Exit Signal)

Close an existing long position at the end of the week.
Close an existing short position at the end of the week.

Handling of Additional Entry Signals**

Entry signal in the direction of the present position:
  • No averaging is allowed. Cancel any additional orders which are in the same direction.
Entry signal in the opposite direction:
  • No modification of the present position is allowed. Cancel any additional orders which are in the opposite direction.

Trading Size

Trade percent of your account.
  • Opening of a new position - 8% of the account equity.

Protection

The strategy does not provide a permanent loss limitation.
The strategy does not use a Take Profit.
--------------
* Use the indicator value from the previous bar for all asterisk-marked indicators!
** The averaging rules apply to the entry signals only. Exit signals close a position. They cannot open, add or reduce one.

Strategy Properties

Handling of Additional Entry Signals

Next same direction signal behavior - Does nothing
Next opposite direction signal behavior - Does nothing

Trading Size

Trade percent of your account. The percentage values show the part of the account equity used to cover the required margin.
Maximum number of open lots- 5
Number of entry lots for a new position- 8% of the account equity

Protection

Stop Loss- None
Take Profit- None
Break Even- None

Indicator Slots

The slots show the logic for the long positions only. Forex Strategy Builder automatically computes the proper logic for the short positions.
Strategy Properties
Same direction signalNothing
Opposite direction signalNothing
Stop LossNone
Take ProfitNone
Break EvenNone
Bollinger Bands
Enter long at Lower Band
Smoothing methodSmoothed
Base priceTypical
MA period4
Multiplier4.77
Use previous bar valueYes
Signal shift0
Indicator symbolDefault
Indicator periodDefault
MACD
MACD line falls
Smoothing methodSimple
Base priceClose
Signal line methodExponential
Slow MA period47
Fast MA period18
Signal line period20
Use previous bar valueYes
Logical groupA
Signal shift0
Signal repeat0
Indicator symbolDefault
Indicator periodDefault
Week Closing
Exit the market at the end of the week
Base priceClose

Statistic Information

Input ParametersAccount Statistics
Profile nameDefault profileAcceptance criteriaFulfilled
Data source nameFSB Demo dataNet balance28674.80 USD
Strategy nameNew StrategyIntrabar scanningAccomplished
ChartEURUSD H1Ambiguous bars0
Data bars30000Profit per day16.33 USD
Time of updating2014-08-13 17:00Max consecutive loses4
Time of beginning2009-10-26 08:00System quality number2.10
Spread3.00 pointsSharpe ratio0.21
Swap long2.00 pointsAverage HPR3.35 %
Swap short-2.00 pointsProfit factor1.42
Commission0.00 pointsTested bars29932
Slippage0.00 pointsMinimum balance79.35 USD
Interpolation methodPessimisticMaximum balance33754.80 USD
Initial Account100 USDMax balance drawdown6645.00 USD
Leverage500Max equity drawdown7390.00 USD
Account exchange rateNot usedMax equity drawdown76.61 %
Auto scanSwitched onAverage profit1352.60 USD
Trade until Margin CallSwitched offAverage loss-1273.57 USD
Executed orders501
Winning trades143
Losing trades107
Win/loss ratio0.57
Time in position91 %

Additional Statistics

ParameterLong + ShortLongShort
Initial account [USD]100.00100.00100.00
Account balance [USD]28674.8015320.2013454.60
Net profit [USD]28574.8015220.2013354.60
Net profit [%]28574.8015220.2013354.60
Gross profit [USD]96710.6448799.8547910.79
Gross loss [USD]-68135.84-33579.65-34556.19
Profit factor1.421.451.39
Annualized profit [USD]5953.083170.872782.21
Annualized profit [%]5953.083170.872782.21
Minimum account [USD]79.35-1149.80100.00
Minimum account date11/12/200904/06/201026/10/2009
Maximum account33754.8017815.2016944.60
Maximum account date12/07/201325/10/201305/07/2013
Absolute drawdown [USD]20.651249.800.00
Maximum drawdown [USD]6645.003635.005075.00
Maximum drawdown [%]0.0032.3029.95
Maximum drawdown date26/10/200930/12/201102/05/2014
Historical bars300003000030000
Tested bars299322993229932
Bars with trades272331283614397
Bars with trades [%]90.9842.8848.10
Number of trades250117133
Winning trades1436974
Losing trades1074859
Win/loss ratio0.570.590.56
Maximum profit [USD]2920.002455.002920.00
Average profit [USD]676.30707.24647.44
Maximum loss [USD]-2560.00-2560.00-1910.00
Average loss [USD]-636.78-699.58-585.70
Expected payoff [USD]114.30130.09100.41
Average HPR [%]3.35-24.325.09
Geometric HPR [%]2.294.393.75
Sharpe ratio0.21-0.110.27


You can see that there are many measurements recorded for evaluation.

The next step  that I will do is to take this result and place it in the generator to see if there can be an improvement in the ratios. Certainly the 'Week Closing' could be improved upon, I will see what the generator can do with it.

As you can see in this pic, the generator is compiling more strategies although it has not found a solution which will be acceptable so far.






As time passes it will keep generating strategies and as long as I let it run it will find more and more and perhaps will develop something that I can trade with.

In this article I wanted to display how a strategy can be generated by FSB Pro and some of the tools in the software for evaluation. There are several more tools that I did not include in this article.

The reader may want to have a look at other articles in the blog about FSB Pro, there is a lot to the program for strategy generation.








Sunday, August 10, 2014

Top 25 Forex Opinion Leaders



 Necessary for our trading strategies to work is information. Information as to what works and what does not work and also we need to know what may be happening in the market place. Fortunately for us as traders there are people who research and develop great content  and make this available to us on their sites.

Here is a list of great authors created by TradersDNA, these people are influencers in their area of expertise and I wanted to share this great list with you today.





Seeking Alpha: Top 25 Forex Opinion Leaders - Traders DNA ...
http://www.tradersdna.com Tue, 28 May 2013 08:00:34 GMT
Staying informed and making sure that you are as knowledgeable as possible about the markets is one of the cornerstones of any Forex trading strategy. However, with so much information and noise out there, how do you know who you should be listening to? Sometimes, it can pay to tap into the wisdom of crowds, to see what other traders find to be the most useful and profitable sources of information.
In the fast forward and ever changing world of digital and social media all industries are seeing an increase of the importance of personal branding and specially thought leadership. Forex Trading is as well an industry that as it grows needs value creation thought leaders. Influence is the gold of the present times as influencers can change and lead the way companies go and the way the markets go and act. In Forex the right influencers can reach big audiences and advice them in their trading activities and how to use platforms, trading instruments and Forex brokers.
Read more ...