Uploaded by 3 Herescu

Trend Trading the Trendy Way

advertisement
Trendy
Introduction
Trendy is an EA that attempts to trade the trend as described in "Trading Day by Day Winning the Zero-Sum Game of Futures" by F H Chick Goslin.
This book is not freely available, so I am not able to post it in an FF thread. I suggest
members acquire a copy, as there is much in the book that is useful.
What I can do is describe how I have been trading Mr Goslin's system manually and how I
have implemented this in Trendy.
There are three elements to this strategy, which is trend trading:
1. A trend line (TL)
2. An Intermediate-Term Momentum line (IL or Intermediate-term Line)
3. A Short-Term Momentum line (SL or Short-term Line).
The trade setup is the trend. The trade trigger then depends on the behaviour of the SL
and IL lines.
Linked to these are Mr Goslin's three 'rules' of trading:
1. The future is unknown:
• This seemingly blindingly obvious statement has implications for using a lot of
the standard Forex indicators. All they do is present information from the past;
using them to predict the future is fruitless. Trendy only uses Moving Averages.
2. Continuity is more likely than change:
• In other words, once a trend is established, it is likely to continue for long
periods of time. A market may have hit an all-time high or low and Rsi may have
been reading overbought/sold for weeks; this does not mean the trend is going
to reverse any time soon. It might, because that is the nature of the market;
more likely is that a retrace will be just that and eventually the trend will resume.
3. Prices fluctuate:
• i.e. 'retrace'. Ok, so a retrace might turn into a trend change, but more likely is
that the trend will subsequently resume.
It is well worthwhile bearing these three rules in mind when trading this system. They can
help you make sense of confusing market movement – the norm when trading Forex.
The Trend Line
The TL is a Moving Average:
• W1 time frame
• Period = 10
• MA method = Simple
• Apply to = Close
Those of you familiar with my recent work will recognise this; it is the "Single moving
average" trend filter that is one of the trend-detection options used by my latest robots.
Using the trend line is easy. The relationship of the market to the MA is irrelevant; what is
important is the direction of the line, so:
1. Line is down: downtrend.
2. Line is up: uptrend.
3. Line is sideways: ranging.
This system only trades a trending market.
Here is a clear EurChf downtrend:
EU ranging, after a previous uptrend:
Mr Goslin suggests some leeway in the 10 week SMA, knocking two weeks off to see
where the SMA was 8 weeks ago. This could provide an early warning of a possible trend
change, so my W1 charts also include an 8 period SMA.
Look at the EC chart including this:
The 8 period SMA is is the dashed turquoise line. No sign of a cross yet, so that sell trade
can remain in place for now.
Now look at the EU chart with the 8 SMA included:
The criss-crossing of the 10 MA by the 8 MA helps confirm the ranging nature of the
market. At some point:
• One of these crosses will become (more) permanent,
• The 8 MA will continue to move in one direction.
• Eventually, the 10MA will follow and a trend is established.
Remember, the 8 SMA is merely me looking for an early warning; it is not part of Mr
Goslin's system and is not implemented in Trendy.
The Short-term Momentum Line (SL)
We determine the overall trend from the W1 charts. We trade off the D1 charts. SL is an
calculated by subtracting approximately a two-week SMA from a half-week SMA. I shall
describe how to use this later.
The Intermediate-term Momentum Line (IL)
IL is approximately a 3 week Moving Average of the SL. I shall describe how to use this
later.
Drawing the SL/IL lines.
Mr Goslin uses proprietary software to draw these lines on his charts; this software is not
available with MT4. As an alternative, I use MACD.
MACD stands for Moving Average Convergence and Divergence. The histograms (bars)
shown by this indi are calculated by subtracting Fast EMA from Slow EMA. The dashed
“Signal” line is an SMA of the histogram values – MACD SMA.
So, although MACD does not draw lines on the chart, we can still use it to emulate Mr
Goslin's software.
I have an MACD the draws the histograms in colour:
The colours mean:
• Bright green (lime?): > 0 and rising
• Dull green: > 0 but falling
• Bright red: < 0 and falling
• Light red (brown?) < 0 but rising.
Different eyes perceive colours differently, so study the picture above and decide for
yourselves which descriptions you want to use for the colours you see.
The indicator is attached to post one in the thread and is called “ML” for 'Momentum
Lines”; download it to your Indicators folder, close down and restart your platform and it will
be available for use from 'Custom Indicators' in your Navigator window.
Setting up your charts for manual trading
Before I describe how to trade, spend a few minutes setting up some charts for manual
observation. Bear in mind also my oft-repeated mantra that you cannot seriously trade an
EA until you have traded the system manually, and try it out manually on demo before
relying on Trendy: There is a zip file containing the templates.
• Each pair you trade will have two charts:
◦ a W1 chart. On this will go your 10 period (and optional confirmatory 8 period)
SMA. There is a template attached to post 1 that will do the job for you – 'Trendy
w1'. Download this to the Templates folder of your platform.
◦ A D1 chart. On this will go ML – the template is 'Trendy d1'.
• Alternatively, use a single chart for each pair and use the 'Trendy both indis'
template, switching between the W1 and D1 tf to view the correct information. Using
the template means that only the 'correct' indis will show up on the chart – the
Moving Averages on the W1 and ML on the D1.
The sharp-witted amongst you will have noticed that it is impossible to completely emulate
the SL on a D1 chart. I have found it easiest to trade this system off the D1 chart and so
have compromised on the half-week setting by using 3 days. This appears to work
remarkably well, but the EA works differently, as I shall explain later.
Trading this system
Here are the requirements that must be satisfied – ignore the bold 'x point ' thingies for
now.
1. Buy trade:
• W1 trend must be up i.e. The yellow 10 period SMA must be clearly rising. 1
point.
• D1 chart and ML indi:
◦ SL (the Macd histograms) only have to be rising – their position re the zero
line is unimportant. The histograms have to bright green or light red 1 point.
◦ The dashed Signal line needs two characteristics:
▪ It must be > 0. 0.5 points
▪ It must be rising. 0.5 points
2. Sell trade:
• W1 trend must be down i.e. The yellow 10 period SMA must be clearly falling. 1
point.
• D1 chart and ML indi:
◦ SL (the Macd histograms) only have to be falling – their position re the zero
line is unimportant. The histograms have to dark red (brown?) or dark green
1 point.
◦ The dashed Signal line needs two characteristics:
▪ It must be < 0.
0.5 points
▪ It must be falling. 0.5 points
The Three Points trade trigger:
Mr Goslin applies a scoring system to each element of the system. Read the requirements
again and look at the points allotted this time:
• Buy points >= 2 triggers a buy trade.
• Sell points >= 2 triggers a sell trade.
Buy points and Sell points are not affected by each other, so Sell points are not subtracted
from Buy points etc.
My understanding is that any combination of points scored will trigger a trade. This means
it is theoretically possible to trigger a trade whilst the TL is neutral or even going in the
wrong direction. This makes no sense to me, so I will only take a buy when the trend is
clearly up and a sell when it is clearly down. I have implemented this into Trendy as well. I
might change my mind with experience – we shall see.
It is not necessary to monitor the charts constantly. Check them every few hours for
opportunities to open/close trades. Trend trading like this is looking at intermediate-term
trades that could last several days or even weeks, so obsessive chart-gawping is not
necessary. Trendy looks for these opportunities at the start of each H4 candle by default.
Trade exit:
Mr Goslin is characteristically vague about this – aren't most people that write trading
books? It does not help that he was successful before access to Forex became so widely
available and traded different markets; some of what he says clearly does not apply to
such a fast-moving marketplace as Forex.
I use:
1. Manual closure.
2. Jumping stops.
3. Point count dropping below 2.
Trendy implements 2 & 3.
Trendy Dashboard
Monitoring all the available pairs takes a while, even if only done every few hours. The
Dashboard is an indicator, and so goes in your Indicator folder. I hacked a lot of the code
from sq's Ibuks Bread'nButter Dashboard – cheers yet again sq – so a lot of the inputs are
familiar to you. It shows the pairs you want to monitor then their
• Trend,
• Buy points count (+ count)
• Sell points count (- count)
• Buy swap (B swap)
• Sell swap (S swap)
• Spread
The dashboard uses the same points calculation algorithm as the EA, so you can see at a
glance which pairs are most promising. Put the indi on a pair you will never trade and
blank out the candles for a clear display. Experiment with the colours, line and column
inputs to make the display most comfortable to your eyes. The Dashboard is attached to
post 1.
The Dashboard will show pairs that it thinks are trending and have a Point count that may
trigger a trade. Once you see this, go to the individual chart and make the trading decision
from there – either to open a new trade or to close down an existing one.
You can tidy up the display:
• Set ShowRangingPairs to false to display only those pairs that are showing a trend.
• Set ShowSpread to false to turn off the spread display and its annoying flicker.
Using Trendy
Trendy is an Expert Advisor and goes in your Experts folder. Close down your platform,
then download Trendy from post 1 and restart your platform to make it available.
Trendy trades as I described my manual trading, plus the usual filters for balance, spread,
margin etc. You need an instance of Trendy on each chart you trade. The chart time frame
is irrelevant as all tf's are controlled by Trendy's inputs. Experiment on demo with changing
tf's whilst Trendy is running to ensure that doing so does not cause difficulties.
Most of the inputs are straightforward. Some that might need explanation are:
• StopTrading, TradeLong and TradeShort: these allow you to control the trading
direction or even stop trading altogether if all you want Trendy to do is manage an
open trade.
• CriminalIsECN: set this to true if your criminal insists on two-stage order-sending.
This is irrelevant if you do not use StopLoss and TakeProfit. Remember that IBFX
are ECN even though they do their best to hide this fact and stop all their 'valued
clients' actually sending any trades.
• Lot size thingies: allows you to set your lot size, or initial lot size if using scaling in.
◦ Lot: go on, take a guess.
◦ Scaling in: 'scaling in' is a method of reducing your initial lot size and so your
early risk. Scaling in automatically disables Trendy's other management
features such as jumping/trailing stops etc, until your whole position is open. You
gradually add to your position as the market moves in your favour. For example,
you want to trade 0.05 lots; instead of sending the whole position in one go, you
send 0.01 lot trades every 50 pips profit, moving the stops at each new level to
protect winners from turning into losers. The inputs are:
▪ UseScaleIn: defaults to 'false' so remember to turn this on if you want this
feature. When 'false', Trendy ignores all other scale-in inputs.
▪ ScaleInAtPipsProfit: the number of pips profit at which to send the next
scale-in trade.
▪ MaxLotsTotal: this is the maximum lots you want open in your position. Your
Lot setting needs to be a divisor of this.
• TradingTimeFrame: Trendy will check for trade opening/closing opportunities at
the start of each candle specified by this input. The default of 240 represents the H4
time-frame. A D1 input would be 1440 as this input is expressed in minutes.
• RisingTrend, FallingTrend and UseTrendDetection: these allow you to specify
the trend manually, or leave it to Trendy to use its trend-detection algorithm.
◦ You should leave all the TL, SL and IL inputs alone unless you know what you
are doing. They are based on the H4 tf to emulate Mr Goslin's strategy as
closely as possible. The exception is TlMinimumAcceptableMove:
▪ This stands for Trend Line Minimum Acceptable Move and insists that the TL
value now is this number of pips higher/lower than it was at the point
TlCompareWithCandles ago, to establish a trend. Remember to set this
input to the same value in the Dashboard if you use them in conjunction. The
default of 100 is a guess. The higher this figure is, the fewer trades will be
triggered but, theoretically, the safer they will be.
◦ Early warning line: this is intended to be a shorter-term trend line that will act
as an early warning of a conter-trend/trend change move. By default, this is
enabled and emulates the 8 period W1 MA I described earlier in this document.
It is fully configurable, so play with it to your hearts content.
•
•
•
•
•
Entry and exit point-count thresholds: these allow you to specify the points count
levels at which Trendy will open and close trades:
◦ EntryThresholdPointsCount: point count for trade entry; defaults to the
minimum stated by Mr Goslin.
◦ ExitThresholdPointsCount: point count for trade exit. This is not a part of Mr
Goslin's strategy and is an attempt to give traders more control over trade
closure parameters.
Margin checks: these help avoid over-trading by limiting the number of trades that
can be opened. Trendy will make the calculations before sending a trade and abort
if there is insufficient margin to allow further trading. There are two to chose from;
the default indicates my preference.
◦ Scoobs check: scooby-doo is a former pro trader with the big banks; we have
benefited hugely from his advice. This filter compares the current account
margin with the free margin divided by 100, and aborts the trade if the margin is
greater than the result of this calculation.
◦ ForexKiwi check.ForexKiwi contributed this filter. It looks at the margin percent
figure and aborts the trade if yours is less than the figure you specify in
FkMinimumMarginPercent.
Trading hours: allow you to specify when Trendy is allowed to trade. These are
best left to trade 24 hours by default, but users can specify trading times if they
wish.
Trade balance and spread filters: these help you to avoid entering trades that
could prove detrimental if the market turns against you for a particular currency, and
to avoid entering trades at news-release times.
◦ MaxSpread: the crims typically widen spreads just before the release of a major
news item – often hugely. If the current spread exceeds your acceptable
maximum, Trendy will not send the trade. You should set an individual
MaxSpread for each pair if Trendy goes live.
◦ UseZeljko: named after Zeljco who corrected the code for this filter and made it
work. This filter ensures 'balanced' trading. The easiest way to describe it is to
use hypothetical trades. Imagine that:
1. Trendy buys GBPUSD.
2. Trendy buys GBPJPY. You are now heavily exposed to GBP.
3. Something unexpected happens (and something unexpected always
happens in Forex) and the pound plummets, dropping like a stone into
the abyss. Both your trades scream into huge drawdown.
4. To avoid this, Trendy will not buy another GBPxxx pair. Imagine
instead that a Sell GBPJPY trade arises, just before the market
plummets. This time, your GU trade is screaming into the abyss, but
your GJ trade is going stratospheric. One trade 'balances' the other in
the event of something dramatic happening.
◦ OnlyTradeCurrencyTwice: works in conjunction with UseZeljko. Again, imagine
the above scenario nos 1 & 4. Now you have a GU Buy and a GJ sell open –
perfectly balanced trades. If you now further trade any pair involving GBP, you
will unbalance your trading again, leaving you exposed to unexpected events.
This filter prevents a third trade being opened involving GBP.
◦ Note: both UseZeljco and OTCT work more deeply than the example I have just
given. For example, now you have a GU buy open, balanced trading does not
allow a further buy xxxUSD trade to open, only a sell xxxUSD – then OTCT
kicks in again...........
Swap filter: some pairs have dreadful swap in one direction. This filter allows you
to avoid trading pairs in the direction that would cost a fortune in swap. How much
relevance this has to a system that could follow a trend for hundreds of pips is open
to debate. Once you have seen one of these adverse-swap pairs hang around
going nowhere for a couple of weeks, you will see why a lot of us want nothing to do
with them.
The remaining inputs are all about individual trade management. Management is a cutdown module from Multi-purpose trade management EA available from
http://www.forexfactory.com/showthread.php?t=89371. The full management EA has a
wide range of extra features. There is a User Guide to describe the inputs, so please
download this to see how Trendy's mptm features work.
Recovery and Hedging
There is no Recovery or Hedging. Coders, the Recovery code is in place and commented
out, so feel free to play with it. I have no intention of implementing it in the future, but left it
in place for the inveterate tinkerers.
Disclaimer and Risk Disclosure:
Trading foreign exchange on margin carries a high level of risk, and may not be suitable
for all investors. The high degree of leverage can work with as well as against you. Before
deciding to invest in foreign exchange you should carefully consider your investment
objectives, level of experience, and risk appetite. The possibility exists that you could
sustain a loss of some or all of your initial investment and therefore you should not invest
money you cannot afford to lose. You should be aware of all the risks associated with
foreign exchange trading, and seek advice from an independent financial advisor should
you have any doubts.
I will put this a tad more bluntly:
Most Forex traders lose all their money.
• Using Trendy in trading Forex does not guarantee success.
• Trading with Trendy could lead to serious financial loss.
• Trading Trendy without understanding its underlying trading strategies guarantees
traders will lose their money.
Good luck. Have fun.
Download