Showing posts with label CHARTS. Show all posts
Showing posts with label CHARTS. Show all posts

Sunday, 15 January 2012

120115 - Watcher Update


At the risk of having a margin call that will completely ruin my mood, I have decided to post here my latest Watcher version results.

Watcher is my grid trading robot, built on the Metatrader4 platform. For the last 2 weeks, I have been trading it live with results that match the back-testing.

As of Friday afternoon Watcher is up +42%, and I am out of the market totally until Tuesday morning, or possibly NY session on Monday if I get back early enough from my current trip. The reason for taking a break is uncertain market direction from here. Futures open interest shows large speculators very short, the usual signal that precedes a rally. 

On a side note, my DR backup server is having some problems. I am using TeamViewer7 to control it remotely, and have some issues with logging in after reboots. This trip to deepest, darkest Quezon province has provided an excellent opportunity for me to shake this out.

I have been doing a LOT of reading this weekend, and have some great ideas on how to formulate a method for evaluating grid trading systems. This will allow me to perform significantly quicker testing for any new features. I am very keen on spreadsheet modelling, and this method will allow me to evaluate new techniques before coding.

My live experience is matching exactly with the forecast, though I am only shooting for 50% of forecast. Alpha-adding moves have added about 20% to the PL. On friday, when the fall started, I moved from a 20 pip to a 10 pip grid, and doubled my take profit to 20 pips. Then I just watched it fall.When I was down to the final 2 open trades, I switched Watcher off. As the price reached the trough, my last trade closed, and I was out of the market with +42% for the 2 weeks.

Now I am sure there are bruises to come, but manipulating the parameters on this version is way better than last time i tried this, so I will move to automating the main parameters, possibly running them from global variables again, rather than risk going through the EA inputs and screwing it up. Another thing I have done is to have a script to modify all existing TPs, so I can increase them independently of the EA.

I need also to do some tweaking on the prices at which I place pending orders, making them exact multiples of the grid width, and so avoiding the few situations where I end up with a couple of trades a few pips apart, which is inefficient.

Sunday, 1 January 2012

Kaufman Adaptive Moving Average Binary Wave

This new addition to the products line gives fast switching to easily detect trading opportunities. For more details on the algorithm, see Perry Kaufman's Smarter Trading - Improving Performance in Changing markets.

In addition to the binary signal line (solid), the indicator also shows the trend efficiency ratio, a measure of the noisiness of the price series. Close to zero is noisy, close to 1 is trending.


Saturday, 24 December 2011

How to make 100% in 4 weeks whilst risking your house ...

On Friday afternoon Manila time, Watcher reached 100% over its November 21st starting balance. Market has been characterized by unverifiable news (rumour) causing it to briefly kick up, then to settle back down to its support level around 1.30. This is also a major psychological level. From here, there is up and there is the June 2010 level of around 1.20, then quickly down to September 2001 levels of 0.85. Scary! news of good Spanish bond sales bely the fact that Spain cannot repay its debts, there just simply isn't the margin in its budget. An interesting comparison of national debt per capita shows the US in a surprisingly strong position over the majority of European nations.



On another note, HSBC moots AUD falling to 0.93c from its current parity level, so that's another medium to long opportunity to watch out for.

Monday, 19 December 2011

How to make 85% in 3 weeks whilst risking your house ...


EURUSD price action has been very predictable over the last week. I predicted the drop to 1.302 (roughly where it is at time of writing) on the 13th, and can now see the "faux" moves the market makes(paticularly in NY session) again and again.

Trading grid is easy, but it has one big drawback. If the trend goes against you, you will lose your shirt. I have added many features to Watcher to help prevent this, but the major change has been moving from a microtrend logic to trying to follow the "major" trend. Placing pending orders when the price is further from the grid point also helps to avoid them triggering soon after placement.Its that simple.

Over on StockTwits, I also receive some great insight and tips from other traders. Kudos to @JuanLobato for his recognition of the bearish EURUSD M1 triple top. Seems obvious in hindsight, but while others are looking to the esoteric, Juan was the only one to tweet this:


StockTwits is invaluable for determining "why did it do that" as news comes in a very timely fashion


Finally, an extract from the broker report last week. I show this to demonstrate the significant pattern of ratcheting Watcher has made since trading of this version began. Watcher is (at time of writing) at 85.76% profit since 12st November.


Happy holidays to all!

Sunday, 11 December 2011

111211 - Week In Pictures

Watcher, my grid trading program, continues to survive the markets after 3 weeks of trading. The account now stands at $7560 (equity) showing a net profit of 51.2% since Nov 21st. Balance is at $8110, with open PL (usually negative given the nature of the app) at $(550). Free margin is at 1260%, with 150:1 leverage. The EA has complete control, closing all open positions when a certain percentage increase of equity has been achieved. Experience is showing that it is giving away some potential profit, as price continues in a favorable direction, but this is not always guaranteed, since the killer price action for grid trading is a low-volataility move away from the trend which the app is trying to follow.



From the fundamentals side, the short-only strategy for EURUSD has been a bit of a no-brainer. Global bank coordination to increase liquidity has had no effect on the pair, and this weeks meeting of European finance ministers failing to agree on anything that will solve the debt crisis in the short to medium term only serves to increase concerns regarding the future of the EURO.

There was a false breakout of the (slightly bearish) triangle of consolidation on the 9th which set the limits of the European session.

False Breakout

From the technical side, my studies of support and resistance around both price and volume see key turning pivots at the 1.345 and 1.328 point. I found the heat maps I was using last week to be a bit garish for day-to-day viewing, so have removed the colors and just marked the lines of significant change.



In order to monitor the trend, I use daily, weekly and monthly long-range charts:





Sunday, 4 December 2011

111204 - The Week In Pictures

After being up 22% on the week last week with the new version of Watcher, it was only to be expected that this week would be less, possibly even finishing with account equity being lower, as we accumulate more losing positions.
 
On Wednesday central banks coordinated to reduce cost of liquidity swaps by 50 basis points. However, the
Euribor-OIS 3-month spread, the rate at which Euro-zone banks lend unsecured funds to one another, closed at its yearly high. "For context, the last time the Euribor-OIS 3-month spread was this elevated and in an uptrend was in September 2008, right after Lehman Brothers went under".

US Non-farm payroll numbers turned out slightly positive, but the end of the week dollar rally (at expense of the Euro) was probably due to long positions being closed prior to the weekend. Hardly surprising given the 100 pip gap at the week's open (though this was a positive gap). With the Euro debt situation worsening (though see here) it seems like the market doesn't know which way to go.


Watcher closed a significant number of trades both at mid-week and at the close, finishing up an additional 12% (now 34% for the 2 weeks). Drawdown towards the 500% margin level was experienced, but this level was not breached. At one point, only 7 trades were opened, down from the week maximum of 17. Losing positions are less than 10% of equity at the close.

Looking at the heatmap, this is showing a shift in zones to a higher level (1.345 to 1.354) from the previous zone (1.328 to 1.34), with price now resting at the top of the original zone, as per my Wednesday prediction on StockTwits.



The long term view as shown by weekly chart (support lines in Green, Resistance lines in Red) is still negative.

Saturday, 26 November 2011

111126 - The Week in Pictures

The end of the Euro?

Betting down the Euro has been a pretty safe bet this week. On Friday last, I predicted a fall in the EURUSD from 1.34 to 1.32. Looking at the chart, the support/resistance lines are clear, 1.34,1.32 (strangely not a big support at the round number at 1.33),1.29, 1.26 and then straight down to 1.19.

The main issues of when and how to take the trade are moot if one uses a grid trading program. An updated version of Watcher, my MT4 grid-trading app, can be configured to trade uni-directionally, and "ratchet" in profits when net asset value (NAV) exceeds the starting balance by a user-configurable percentage.Switching off long trades, and using a ratchet of +3.5% resulted in a remarkable profit of 22% on the week.

The new Watcher version again uses my proprietary trading libraries, snippets of which I have shared and reused time and time again.

Check out the screen print below for more details:

Thursday, 4 August 2011

Home, home on the Renko ....

EURUSD M1 Chart with Renko Bricks
In the following discussion, some of the points I make refer to the majority of Renko chart implementations made, including my own, using the Metatrader 4 platform. In some other systems, some of the limitations I describe in the caveats section CAN be overcome.

Caveat emptor!

Possibly the best (though in my opinion still not complete) description of Renko bars can be found in a (small) chapter of "Beyond Candlesticks" by Steve Nison. Renko (the name is thought to be from the Japanese word for bricks - Renga) charts show price movement away from a point, the bricks being drawn only when a certain price move has been made, not merely documenting the price change after a fixed time period, as with regular charts.

To avoid confusing myself and the reader, I refer to  the source (regular) chart components as "candles", and the output (Renko) components as "bricks".

Figure 1 below shows a EURUSD M1 chart (top) with the corresponding Renko chart (bottom). Here you can see the clean angular movement of price, which allows for easy identification of the (minor) trend. Also, notice the difference in timescale, the Renko chart having fewer bricks than the source has candles.

EURUSD M1 Source Chart
5 Pip EURUSD Renko Chart
Renko charts are traditionally drawn as follows.

1. Pick a base price (Nison does not say how or give any clue as to which to pick). [see Note 1]

2. If a future close (Nison used daily stock closes) touches or exceeds (base price + boxsize), draw an up brick. If a future close touches or exceeds (base price - boxsize), draw a down brick. In my Renko charts, I use red for down and green for up. Traditionally white and hollow bricks have been used respectively.

3. Once the first brick is drawn, record the high (HI) and low (LO) of that brick.

4. For subsequent candles, draw a new brick when the future close touches or exceeds (HI +boxsize) or (LO - boxsize). [see note 2]

One side effect of this is that when price oscillates within 2 range boundaries, alternate up and down bricks are not drawn. Price "noise" is thus eliminated.

In forex, we have easy access to tick-by-tick data for the latest candle, and so may wish to enhance the traditional Renko bricks by monitoring prices on a tick basis, and optionally (sometimes essentially) adding the highs and lows of the preceding period as per the source chart (See the section on Wicks).

With historic data, we have already lost irretrievable information, (being the tick sequence) and so we may partition our drawing algorithm into 2 distinct parts:

Instructions 2 to 4 above are repeated for all historic candles. Once we have processed all our historic information, we can continue processing realtime data tick by tick. For each new tick, check the Bid price against the previous HI and LO, and draw bricks as before.

There are a few caveats to using Renko:

Quantisation noise

 (Where I indicate "soft" in the next paragraph I am referring to any stop loss or take profit that is managed by the client, rather than the broker's server. My position is that showing the broker your stops in a dealer-desk situation is like showing your hand in a poker game).

Quantisation noise refers to the information lost when data is sampled, and then attributed an arbitrary level (in our case we take a price move and our output can only ever be on a box boundary). This has implications for example when applying a (soft) trailing stop. The price may move against us by a shade less than the boxsize, and we will never know, since a new Renko brick is only drawn when price moves by the boxsize or more. A (soft) take profit which is not set to a boundary point will be triggered at a different price (i.e. the next boundary). A (soft) stop loss which is not set to a boundary point will also be triggered at a different price. If our money management strategy depends on the stop level being accurate, we may be risking a larger percentage of our equity than we had anticipated.


Volume

It is impossible (someone please contact me if I am wrong, I would love to hear from you) to accurately attribute volume to a Renko brick which is sourced from historic data, unless a Renko bar mapped 1:1 to a source bar. Some assumptions need to be made. For this reason, using any kind of volume indicator on a Renko chart may not give the desired results. [see note 3] Live bricks (those drawn after generator has processed all the historic information) are different, and volume can be attributed accurately. In any system where the volume/time relationship is important, beware that this relationship disappears with Renko, since bricks all have potentially different durations.

Timestamp

For historic data, when the price touches or crosses a box boundary the timing of the crossing is unknown. We can only be accurate to within the chart resolution (i.e. Metatrader 4 has minimum resolution of 1 minute). We only have the opening time of the historic bar [see note 4]. Again, Live bricks constructed from tick-by-tick data can be given accurate timestamps, since we know to the tick at which point the touch or cross was made.

Wicks

Wicks are interesting, since they can be displayed on the bricks and indicate (hard) stop triggers. Whilst I prefer "soft" stops, the gaming problem doesn't exist with ECN brokers, does it? Displaying the Renko bars on the main chart (as per the introductory diagram, also provides its challenges, but is invaluable in dtermining what happened in some scenarios.

Engulfing bars

A common "programmer decision" is to firstly look at each historic candle high. If the high has breached a boundary, then one or more up output bricks are drawn, else, if the low has breached a boundary, then one or more down bricks are drawn. Look at your Renko chart. Do you see "impossible bricks"? (The wick of a down brick is more than 2 bricks higher than its open, or the wick of an up brick is more than 2 bricks lower than its open). This is a direct result of the programmer decision made above and can be resolved as follows: If the close of the current bar is less than the open (we would draw a down brick as per the previous algorithm) we first look to see if the source bar had a high that would indicate we need to draw some "up" bricks first, since these must have occurred at some point before the down close. Similarly where the close is greater than the open, we draw any "down" bricks first. Note that we still cannot be certain that this was the case, since we cannot know the time sequence of the highs and lows within a single source candle boundary.

Notes

[1] The choice I made was to pick the oldest candle that contains a "boundary", and use that boundary as the base price. To calculate boundary prices, start from 0 and repeatedly add the boxsize. e.g. High=1.4222, Low=1.4211, box-size=0.0015: We count 0.0000, 0.0015, 0.0030, 0.0045, ..., 1.4205, 1.4220. Base price is now 1.4220 (In practice we use quotient * box-size). Had the first candle contained 2 or more boundaries, I could have immediately started drawing some Renko bars, although I would have to make some assumption as to which boundary occurred first in time, possibly using Open and Close price to disambiguate.

[2] Most existing software uses "exceeds" but not "touches". Drawing new bars when price touches a boundary results in surprisingly more output bars being drawn.

[3] Currently I assign volume of 0 to all my historic Renko bars.

[4] Currently I assign the bar opening time to the first Renko bar generated from the source data, and add 1 second if I need to generate another.

Saturday, 19 February 2011

110219 - The Week in Pictures

In my last post I talked about Harmonic Patterns. Unless you are a geometry enthusiast, or have a very good eye, using pattern recognition software for these empirical signals is essential. If your software can detect the patterns reasonably quickly and communicate those signals to your encompassing system, you are in for some potentially profitable trades.

AUDUSD showing recent Bullish 5-0 pattern
AUDUSD - A Bullish 5-0 pattern was indicated late last Wednesday. The 3day Linear Regression Channel Indicator shows the whole short-term trend so far. I also expanded the chart to show confirmation of the previous Bearish Gartley pattern detected on 19th January.

EURCHF showing Bearish 5-0 Pattern
EURCHF exhibited a Bearish 5-0 early afternoon of 6th January. This was later confirmed by the Smoothed RSI Inverse Fisher Transform Indicator, and made for a potentially very nice trade.
EURGBP continues sideways move
EURGBP was interesting from a gridding point of view this week. Volatility of this pair has decreased since set up, and the Watcher's grid setting is now probably a little too narrow. Whilst there are several good swings in the price, Watcher only managed to capture one of them, price continually bouncing just below one of the grid lines.
USDCAD bouncing of nDay low point
USDCAD again bounced off its nDay low point this week. As for the last 2 times this has happened, waiting until the open of the first bar following breach of the old low point presented the best opportunity.
USDCHF nearing all-time low

USDCHF again approaching its all-time low of 93c. Look for some good opportunities as it gets closer to this level.

Friday, 18 February 2011

110118 - Float like a Butterfly, sting like a.... errr ... Crab? - Harmonic Patterns

Oooh Daddy, look at the beautiful butterflies ....
I have long been interested in harmonic patterns. The basic premise is that there are certain shapes in the price series which empirically suggest what will happen next. Whether or not you give this any credence or not, it is an interesting study, the by-product of which can be much valuable market insight.

Harmonic patterns are based on Fibonacci retracements, i.e determining where a "golden" ratio of peaks vs troughs exist, and buying/selling accordingly. Putting the numbers to one side (we will come to that in a moment), to me it is quite intuitive to say that a price may rise after it has made a significant fall (bullish signal), or fall after it has made a significant rise (bearish signal).
Gartley 222, named after page 222 of Gartley's book!
There are many websites that describe both harmonic patterns and Fibonacci ratios, so I will not repeat that work here. My favorite site is http://www.harmonictrader.com/price_patterns.htm
Whether or not you believe that Fibonacci numbers actually work, there are perhaps so many market participants who do, that it is a self-fulfilling prophecy, and that could be true of any such empirical signal. Imagine 25,000 harmonic pattern traders saying "OMG, there's a bearish bat formation, sell the farm ......".

One of the drawbacks with Harmonic Patterns, for many retail traders, is that to see a significant amount of patterns, you need a lower timeframe. If you study 4 hour charts, classic patterns except for Fibonacci retracements are few and far between, that is why most pattern indicators have a tolerance input, which you can increase to get more patterns. Of course, this potentially invalidates some signals. I think this explains the continuing amount of new patterns being invented, as the majority of retail FX traders don’t make trades based on H4 signals and then keep the trade on for a month. Probably due to boredom. My pattern indicator detects and displays:

AB=CD
Bat
Butterfly
Crab
Fibonacci Retracements
Gartley
5-0

Bearish AB=CD
You will observe many more Fibonacci retracements than full classic patterns. If you recall that ALL classic harmonic patterns have some Fibonacci retracement component, then that’s not surprising. By default, my indicator has Fibonacci retracements turned off. Not that I don’t think they are valid, merely because most people who are interested in the indicator want to see the larger patterns. Of course you can reverse this, and just trade the Fibos alone.

The majority of commercial indicators are repainting, and use a method of determining retracements which means they miss the trade entry by a considerable margin. They do not include easily accessible signal buffers.

You can tell that these indicators have been written by very clever individuals, given the amount of signals and measurements produced. Do users really want to see the results in a zillion different muddy colours, or would they rather understand that the patterns are displayed on a colour cycle that is easy on the eye when the user is staring at the screen for 8 hours? Does the indicator perform well in real-time? Try setting your favourite pattern indicator to have a 10,000 bar history, and attach it to an EA in the strategy tester. In visual mode, move the speed control to the extreme right (fastest). Does it keep up or does it stutter with the load? This is a measure of  “On-Off” ratio and shows how much of your system resources the indicator will use. In the same test, does it give multiple signals at slightly different bars on each bar open? That is the difference between writing code and production engineering.

Bearish 5-0
For most types of trading, stops and profit targets are the key to successful trades. When the indicator gives you a valid bullish signal, you still need to know how big your stop should be and where your profit target is. There is a whole other layer that needs to be put on top of this or any other indicator to achieve that automatically.