Zigzag Bollinger Band

Post Reply
User avatar
snailbeard
Trader
Posts: 615
Joined: Mon Dec 24, 2012 10:54 am
Location: Just above water somewhere between Oxford & Cambridge

looney tune

Post by snailbeard »

SB has been getting a good kicking from usdcad. The daily view makes it quite clear that the market is undecided. It looks like the Doji filter is turned off when it should be on. The D1 view shows price dithering in various channels.

In the past I have found that the Fibonacci tool only works looking backwards, because we often don't know which S/R lines are the relevent ones for the tool. However, they can help identify the zigzag pivots in a way which is more appropriate to the time scale of interest.

I have found that if I apply two Fibonacci views for the previous candle from a higher time frame, one based on the open & close and one on the high and low we get two sets of S/R lines which can be more indicative than the daily pivots.

More experienced traders than me will talk about the importance of the 3 part wave, and this stands out quite clearly in the attached chart. The thick white lines identify strong levels by mid January. This significant price movement could be considered the first wave. In which case we might expect two more waves of decreasing strength and according to the Fibonacci sequence we have a good idea about future support and resistance levels. If one has in enough macro economic knowledge one can simply buy and hold until price approaches the third wave ceiling. Most of us smaller traders don't have this knowledge or confidence and perhaps we don't want to ride out a significant down swing.

In the past I have talked about the daily trading plan but I have not been able to abstract it into something useful for SB, but in a proper programming language like C# with generic containers & iterators & matching, it might be possible to manage SR levels from several time frames. The one simple rule I can see from this chart is the pull back from the third wave into a consolidation zone should result in inhibiting the normal entry method.

I have already implemented a triangle filter so I'm not sure why that isn't doing the job either...
perhaps it is not on this time scale(???add to todo list)

The chart also shows a premature buy entry.
Support at 50% has not been breached so far, there is tentative support at 61.8.
If 61.8 to 50 was the third wave of a pull back then have we completed the pullback?
I leave that question to be answered by someone with a deeper understanding...
You do not have the required permissions to view the files attached to this post.
Last edited by snailbeard on Sat Feb 08, 2014 1:54 pm, edited 1 time in total.
User avatar
snailbeard
Trader
Posts: 615
Joined: Mon Dec 24, 2012 10:54 am
Location: Just above water somewhere between Oxford & Cambridge

one flew over the cuckoo's nest

Post by snailbeard »

While I was busy trying to fix a leak in a bathroom the above question was answered by the market itself.

I wasn't watching at the time so I don't know if the currency meter went hot before or after the breach of support. Who gave the signal to run: the candle or the indicator? This currency meter has lulled me into bad trades in the past so I don't give it much credence anymore, but the colours look good.

That was a good 90 pip move if you were ready for it and not still going the wrong way.
Also the news filter could have been used to protect SB from this kind of news driven event.
You do not have the required permissions to view the files attached to this post.
Last edited by snailbeard on Sat Feb 08, 2014 1:55 pm, edited 1 time in total.
User avatar
snailbeard
Trader
Posts: 615
Joined: Mon Dec 24, 2012 10:54 am
Location: Just above water somewhere between Oxford & Cambridge

News events

Post by snailbeard »

And finally we see how news events play out on the M1 chart.
Interestingly there is a falling channel just before the big push. I don't know if this is typical or whether it occurs in the opposite direction to the main push as well, otherwise it would be too easy to spot these premove channels and make a killing.
You do not have the required permissions to view the files attached to this post.
User avatar
snailbeard
Trader
Posts: 615
Joined: Mon Dec 24, 2012 10:54 am
Location: Just above water somewhere between Oxford & Cambridge

Should we sell?

Post by snailbeard »

SB calculates on several timeframes but M15 is the common denominator for higher time frames.

We define a series of lower highs and lower lows as suggesting a downward entry. The argument can be put for any timeframe, but generally one view is not enough.

In the first chart we see a downward channel and perhaps a chance to grab a few pips, perhaps the start of a big move:
You do not have the required permissions to view the files attached to this post.
User avatar
snailbeard
Trader
Posts: 615
Joined: Mon Dec 24, 2012 10:54 am
Location: Just above water somewhere between Oxford & Cambridge

Should we buy?

Post by snailbeard »

Now moving to an alternative universe on the H1 time frame what do we see?
A series of higher highs.
So why do we get the conflicting messages
and which one is correct?
It appears that both entries are tradable provided that M15 respects H1.
In most of the world both trades could overlap if we can handle it.
Since the H1 pattern is likely to lead to a longer trade we should give it priority.
The H1 pattern also provides a clue to M15 trade that it should be scalping (move quickly to BE, & lock profits.
I would have to redesign SB to get it to be that flexible so the simplest option is to inhibit conflicting entries and give priority to H1.
You do not have the required permissions to view the files attached to this post.
User avatar
snailbeard
Trader
Posts: 615
Joined: Mon Dec 24, 2012 10:54 am
Location: Just above water somewhere between Oxford & Cambridge

And one to rule them all

Post by snailbeard »

So if M15 should respect H1, should H1 respect H4?
And what if H4 is zigzaging down and H1 is zigzagging up?
Just as we used D1 to get an overview of USDCAD earlier the attached view allows us to calculate some potential ranges.
The first observation is that price has swung by 500 pips from a H4 high to a H4 low.
Is this a dominant swing or a pullback?
It so happens that the last H4 swing is a very dominant down swing in a series of lower-lows.
However, on D1 this is a pull back from a series of higher-highs, but it could also be a macro-economic change.
So M15 has a chain of bosses all working a different 'trend'.
So is the trend our friend? Only if it does not visit our stop-loss.
This results in difficult trading conditions for most of us.
So what is a trend? SB thinks a trend is a swing which lasts longer than 30 pips.

Some zigzags from all time frames join up at a common point. I call these super nodes. When the ZigZags of D1,H4 and H1 meet at a common price it creates an anchor or reference price. There is almost always a significant bounce from one of these super-nodes but there can be several candidate nodes before arriving at the main one.

So refering to the chart we have a reference high of a H4 zigzag and super-node low at the bottom. These make good places to use the Fibonacci levels and allow us to plan stop-losses and take profit targets.
Price is moving away from a super-node low after a 500 pip swing.
What is the anticipated length of the reverse swing?
Examine the previous H4 swings, the pullbacks are smaller than the dominant swings.
Several pullbacks have swings of over 200 pips, so this would be the long target.
However, In the market just as in 'Stingray': 'Anything can happen in the next half hour',
so grabbing partial profits and reentering can be less scary than going the wrong way for a long time.

How do we tell the difference between candidate supernodes and final supernodes?
It turns out that this can be defined 6 months earlier provided that our algorithms for identifying true support and resistance levels are correct. I have added Slipshod's indicator to help with this on a D1 chart. SB doesn't currently use this calculation, but this is helping me to workout some future improvements...
You do not have the required permissions to view the files attached to this post.
User avatar
snailbeard
Trader
Posts: 615
Joined: Mon Dec 24, 2012 10:54 am
Location: Just above water somewhere between Oxford & Cambridge

usdcad H1 premature buy signal

Post by snailbeard »

Here is an example of SB making a premature buy trade.
A temporary zigzag low occurs (yellow cross) which later gets changed to the one below the Bollinger band, and price apparently moves up.
On low spread brokers like GlobalPrime it is a valid scalp entry but not good for SB which will hit the stop-loss.
It is quite obvious to us that price is moving sideways inside a triangle and that trading should be inhibited until there is a proper indication of consistent price momentum.
On Monday 6th we see emerging price momentum in an upward direction.
You do not have the required permissions to view the files attached to this post.
User avatar
snailbeard
Trader
Posts: 615
Joined: Mon Dec 24, 2012 10:54 am
Location: Just above water somewhere between Oxford & Cambridge

USDCAD H4 premature buy entry

Post by snailbeard »

Finally we look at the M15 buy entry projected onto two H4 charts, one close-up and the other over two weeks.

On the two week chart take note of the H4 zigzag swings: the price swings provide a channel, which is decreasing in height slightly. If we are confident about the future being pro-USD then any entry system off the bottom channel would suffice, with a stoploss below the channel. If we are more cautious then waitng for the triangle to complete with signs of market consensus provides a safer entry - perhaps.
usdcad-H4-two-week-view-to-8Jan2014.png
In the close-up view it is clearer that SB should take note of the H4 candle patterns.
To use M15 stop distances timing is crucial, premature entries can accumulate.
In the first sequence of candles leading up to the entry: the previous H4 bar closed lower and the one before that was a Doji. After some time an expanding triangle emergies out the contracting triangle. The catepillar has transformed into the butterfly and is just drying its wings before it takes off...
usdcad-H4-premature-buy-entry-3Jan2014.png
You do not have the required permissions to view the files attached to this post.
User avatar
snailbeard
Trader
Posts: 615
Joined: Mon Dec 24, 2012 10:54 am
Location: Just above water somewhere between Oxford & Cambridge

SB internal state

Post by snailbeard »

What is SB's internal state when it sets up the premature buy trade and which filters are on or off?

Firstly, this is how SB views the market:
( it has opened an internal pending buy order - which can still be squashed by entry filters)
The main states that we are interested in here are

a) The triangular contraction:
T~>:(Y) means some contraction
T>:+>> means strong contraction

b) H4 candle bias
3H4 Bias: -1 means a downward bias

The reason the H4 candle bias has not been used as filter must be because it
sometimes kills good trades, although it could be symbol dependent.
I need to explore and find out if this can refined or be part a composite rule.


USDCAD,M1: 2014.01.03 09:02

bVpoHasBeenTriggered
: open #1 buy 0.33 USDCAD at 1.06562 ok
: OrderModifyReliable v4.1:
3M15 Bias: 1 , Priority: i2M15_HLC: +1 i3M15_YCYL: +1 i3M15_HL: +1 ;
3H4 Bias: -1 , Priority:
: arr3D1Direction: 0
D1[Hslp: (PPD:-51),
Lslp: (PPD:77)],
YD1[Hslp: (PPD:12.06),
Lslp: (PPD:-31.60)];
D[Y1D0]: 0, D0[R:35, C:-15] ; ,
T~>:(Y) T>:+>> Y~<:(Y)
M15[G: 8.00,W: 69.5,dL: 11.8,dH: 57.8];
H1 [G: -7.00,W: 94.1,dL: 78.9,dH: 15.2];
H4 [G: 1.00,W:141.7,dL: 58.5,dH: 83.2];
D1 [G: 19.00,W:423.2,dL:338.0,dH: 85.2];
: reportSR(): TF: 15, dAbsGapToSup < dAbsProximity 20.80
: reportSR(): TF: 15, dAbsGapToRes < dAbsProximity 16.60
: reportSR(): TF: 60, dAbsGapToRes < dAbsProximity 23.00
: reportSR(): TF: 240, dAbsGapToRes < dAbsProximity 1.40
User avatar
snailbeard
Trader
Posts: 615
Joined: Mon Dec 24, 2012 10:54 am
Location: Just above water somewhere between Oxford & Cambridge

wonderful features of Metatrader4 not

Post by snailbeard »

While I was using CrappyTester...

I only found this out after some detective work..

Empty4 4 invisibly downloaded an update. I was in the middle of testing, editing compiling.
There was no courteous message that I should update Metatrader4 in the near future.
Suddenly, the USDCAD data I was using for back-testing disappeared,
that was annoying enough by itself.

So I switched to GU, made some changes to the source, retested the script..
no change, same result.
After wasting a lot of time I found the datestamp had changed on some of MTs files
and there was a new folder containing a copy of the experts.

It seems that I was editing and compiling one thing and MetaCrap was running an old build.

This seems a pretty bad way for MetaQuotes to treat their end users.

Yet another reason for us to migrate to ProTrader 3 or JForex, etc.

I might have to install an Intrusion Detection System to prevent this kind of unauthorised hack of my system.
Post Reply

Return to “Automated trading systems”