You are on page 1of 8

Trendy

Trendy is not an auto-trader. It is a trading aid for trend line traders. Trendy takes trades
based on trend lines that you draw on your chart.

If you think the market is trending up, then you draw rising trend lines. If you think the
market is trending down, then you draw falling trend lines. If you think the market is
ranging, then draw flat trend lines.

I describe how to draw lines that Trendy will respond to further into this document. The first
bit is for the noobs.

For the noobs


This is really basic stuff but it is not often explained clearly; this is my attempt to make
everything clear to those of you new to Forex trading.

A 'market' is the cross pairs that make up our chart symbols. GBPUSD is a 'market', for
example. So is USDJPY, or EURUSD and so on. These 'markets' are also confusingly
described as 'instruments' sometimes. I am a professional pianist, so imagine the
confusion this caused me at the beginning. I shall stick with 'markets'.

Markets are either trending up, or trending down, or ranging – information that is not much
use to you unless you understand the terms:
• An up trend definition: a series of higher highs and higher lows.
• A down trend definition: a series of lower lows and lower highs.
• A range definition: a series of highs that do not travel far from one another, and lows
that do not travel far from one another.

Everybody loves a laugh at my expense, so here goes. I had been losing my trading
capital for about two years before I worked out the meaning of highs and lows – I am a tad
on the slow side. I thought 'high' refers to the high of the preceding candle, and 'low' to the
low of the preceding candle. It took me a while to stop losing money consistently.

So, what are 'highs' and 'lows'? Answers coming up on the next page.
A 'high' is a candle, or group of candles, whose highest price is higher than that of the
candles on either side of them. The yellow arrows point to the highs on this chart:

Notice how the candles rise towards a high, then fall away from it? That is what makes it a
'high'. I missed a few – the one in between the second and third arrows for example.

A 'low' is a candle or group of candles, whose lowest price is lower than the candles on
either side of them. The yellow arrows point to the lows:

Notice how the candles fall towards a low, then rise away from it? That is what makes it a
'low'.
You now know what is meant by the terms 'highs' and 'lows'.

An up trend is a series of higher highs and higher lows. The yellow arrows mark the highs
and lows:

Ok, so I have not spent 35 hours searching for the perfect trend and you could argue with
some of those arrows, but you get the message?

A down trend is a series of lower lows and highs:

That down trend pic is much better than the up trend.


Here is another term you will come across in a variety of guises: 'buy the weakness and
sell the strength'. Another common term for this is 'buy low, sell high'. More explanation of
this in a bit, but you should be starting to get a glimmer of what it means.

First, let us explore the meaning of the common term, 'retrace'. Look at that down trend in
the previous picture. Each of the new lows is followed by a period in which the market
moved in the opposite direction; it 'retraced' upwards. Trend trading is all about taking
advantage of those retracements.

Here is a point that you really, really need to get your heads around: a historical chart
gives 20:20 hindsight. Trading at the time the candles were being formed, we had no idea
what the next tick was going to be, never mind the direction the next few candles were
going to travel.

So, we are looking at our chart wondering when to enter a trade. Let's use 20:20 hindsight
first just to establish the principle of selling strength and buying weakness. Referring again
to that down trend chart above, let's use a trendline to join up points where the arrows
were originally:

You can argue with the points I have used to draw the trend lines. I don't care; the point of
all this is to gain reference points. Imagine that you had sold at every touch or approach of
the upper trend line? Then closed the trade at a touch of the lower trend line? Lots of
green pips and happy smiling faces.

What we have done is obey the principle of: sell the strength and buy the weakness. We
have 'sold high' at the upper trend line, and closed the .bottom.

No, it is not that easy. We would not have been selling early on in the trend – it had not
been established. Look at where we are now. Where is the market going? It has broken
above my upper trend line. Will it continue? Will the trend change to an up trend? Do we
simply adjust the upper line to accommodate that new high, and sell again? I am just
reinforcing the point that looking at charts in the past gives a misleading 20:20 hindsight
vision.
Now for 'buy the weakness and sell the strength'. Here is the up trend from much earlier,
with trend lines replacing the arrows:

Here, we are waiting for the market to approach our lower trend line before buying. We
would be 'buying weakness', waiting for the market to approach the upper line sometime
further on, then closing it.

Let's move on to a ranging market. A range is where the highs and lows lie within a narrow
range, prior to a breakout of the range and either a trend resumption or reversal. The
yellow lines mark off the range high and low of two ranges:

Imagine buying at the bottom and selling at the top. Wow. If only all markets ranged all the
time.
The EA
Trendy is not a 'trading system'. It is for use when you have already decided which
direction to trade and want to enter the market when the price reaches a certain level on a
trend line.

For example, I have a few charts set up with Bob's 240 H4 LWMA. I want to buy when the
market is above the lwma and sell below it. I have drawn my trend lines and know where I
want to enter the markets and know where I want my pending trades to go. I also want to
be able to move them as new candles form and my trade fill prices fall outside of my trend
lines. Thingy is, I have to go out to teach the piano. I have to sleep. I cannot be at the
console all day and night.

Here is where Trendy steps in. He offers three trading facilities: trend, range and channel.

Drawing trend lines the EA can work with


You will need an upper and a lower trend line on your chart, with names that the ea can
recognise. Trendy has two inputs that allows you to specify the line names you will be
using. These are found in the “Trading inputs” section:
• UpperTrendLineName: defaults to “u” for “upper” - best to keep it simple.
• LowerTrendLineName: defaults to “l” for “lower”

Go to any old chart for now and decide whether the market is trending up or down – pick
one that is clearly trending for now – ranging comes later.

Trendy takes the direction you want him to trade from the inclination of the upper trend
line. Let us say for the sake of brevity that you chose an up trend:
• Draw a trend line that takes in all the highs you want to encompass.
◦ Double click the line so that the three white dots appear.
◦ Right click the line and select 'Trendline properties'.
◦ Select the 'common' tab.
◦ Enter “u” (without the quotes) into the Name field.
• Repeat this process by drawing a line that joins up the lows and rename it “l”.

You can call the lines anything you want – you simply need the same ones in the EA name
fields. It does no harm if you muck up this process; Trendy will complain about what it
regards as the missing line(s) and uninstall himself. Unusually for me, he will complain
politely.

Trendy trades long if your upper trend line is rising, or short when it is falling. It trades both
directions if your upper trend line is absolutely flat. The bottom trend lines provide a price
for sell stop and buy limit orders; it is not a part of the trading direction decision.

To create range lines, repeat the above processes and add two additional steps:
• Select the 'Parameters' tab.
• Make sure both the 'Value' fields have equal values. Don't worry that they might
appear to have an impossible number of decimal places; Trendy has 'Normalization'
processes that deal with this.

Draw a couple of trendlines and drag Trendy onto the chart with 'StopTrading' set to 'true'.
Play around with the upper trend lines and the TradeThe..... inputs and see how the chart
display of trend direction, order prices and channel size change (channel and range size
mean the same thing).

Trading style choices


You will see these three descriptive inputs in the 'Trading inputs' section:
• “Trend trading” followed by an input that tells Trendy how to behave:
◦ TradeTheTrend: if 'true':
▪ Buy (up) trend:
• Set a buy limit at the bottom trend line.
• Set a buy stop at x pips above the top trend line to catch the breakout of
the upper trend line.
▪ Sell (down) trend:
• Set a sell limit at the top trend line.
• Set a sell stop at x pips below the bottom trend line to catch the breakout
of the lower trend line
• “Range trading” followed by an input that tells Trendy how to behave:
◦ TradeTheRange: if 'true':
▪ Set a buy limit trade at the bottom of the range. Take profit at the top of the
range. Stop loss at the size of the range below the open price.
▪ Set a sell limit trade at the top of the range. Take profit at the bottom of the
range. Stop loss at the size of the range above the open price.
• “Channel trading” followed by an input that tells Trendy how to behave.
◦ TradeTheChannel: if 'true', trades as does the Range function.

Channel trading
Why the extra choice for the channel? Two non-flat trend lines create a 'channel'. Take this
picture as an example:

I have concluded we are in a down trend but the highs and lows are moving within the
trend lines, so I want to sell at the top of the channel and buy at the bottom.

Yes, you are correct in what you are thinking right at this moment. A 'range' is is also a
channel, yet Trendy will trade them both slightly differently because we might want them
treated differently.

We will want to sell at the top and buy at the bottom of a range. The falling channel I
illustrated here was part of a clear down trend. We might want to sell at the top of the
channel but not buy at the bottom, in case the market crashes through the lower trend line.
All my EA's come with the TradeLong and TradeShort inputs that allow you to specify the
direction an EA is to trade.

The remaining 'Trading inputs' inputs:


• Trend trading:
◦ TrendStopTrades: set buy stop trades at the upper trend line in a rising trend,
and sell stop trades at the lower line in a falling trend.
◦ TrendStopTrades: tells Trendy to set a buy stop at the upper trend line in a rising
trade, and sell stops at the lower trend line in a falling trend.
◦ TrendStopTradeBufferPips: these are added to the price of the upper trend line
for your buy stop in an uptrend, to allow you to trade only the breakout of the
upper trend line. Vice-versa for sell trades.
◦ TrendLimitTrades: this allows you to take advantage of the bounce off the
opposite trend line. In an up trend, Trendy will place a buy stop at or above the
upper trend line, and add a buy limit trade at the bottom trend line.
◦ TrendLimitTradeBufferPips: added to the buy limit price and and subtracted from
the sell limit price so that the market does not have to exactly reach the trend
line to trigger the trade.
◦ TrendTradeComment: this is sent with the trade as an identifying comment. Do
not change this once you have trades in place; various functions in the code use
it for identifying what kind of trade it is.
• Range trading:
◦ You should be able to work out for yourself what the first three inputs are for.
◦ UseRangeForTakeProfit: this tells Trendy to use the height of the range to
calculate the take profit.
◦ RangeTakeProfitBufferPips: this is subtracted from the height of the range to
bring the tp inside the range lines. For example: an input of 10 will bring a buy
trade tp to 10 pips beneath the upper trend line; an input of -10 will bring a buy
trade tp to 10 pips above the upper trend line.
◦ UseRangeForStopLoss and RangeStopLossBufferPips work in the same way as
the TakeProfit inputs in the last bullet point, but for the stop loss.
• Channel trading
◦ Remember this is for buying at the bottom and selling at the top in an up trend
where you think the market will rise but within the confines of the channel you
have drawn with your trend lines – vice versa in a down trend.
◦ I am not going to describe the inputs. They are the same as the range inputs
apart from starting with 'Channel'. I have only separated them to give users
maximum flexibility in your choices of input values.

All the other inputs in Trendy are the usual stuff included in all my EA's, so read the Shell
User Guide for details of their use.

Included in post 1 of the thread are three set files labelled 'Trend', 'Range' and 'Channel' to
help you ensure that Trendy has the basics in place to behave as you wish him to do.

Have fun

You might also like