stevehopwoodforex.com
https://www.stevehopwoodforex.com/phpBB3/
Print view

Daily Fibonacci Signals
https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?t=4100
Page 16 of 21
Author:  snailbeard [ Wed Apr 19, 2017 6:20 am ]
Post subject:  Ghost in the machine

Following on from the previous posts, and further analysis of short range trades, I found that the same problem exists with these short range trades as the grid trading method, which is the double price swings which trigger trades in both directions. However, the patterns that trigger the trade set-ups are not the real set-up. The ghost in the machine finds a different set-up later in the day.

Looking at the failing set-up first for XAUUSD, this M15 chart shows the premature breakouts with stop-losses which are too close for the set-up:
xauusd-m15-SRT-double-losses-manual-win-29Mar16.png
So the first breakout at A reverses quickly all the way to B, hits a stop-loss, triggers the buy trade then goes back far enough to hit B's stop-loss. During trending periods the stop-losses are sufficient to allow A or B to be successful, but during ranging periods the stops are too close and this can result in a string of losses. However, there are multiple patterns in the chart and in ranging periods we need to avoid the dumb break out method and be more subtle. The only chance of making more profits than losses is
a) work within the trade-able range
b) ensure that stop distances are close enough to the entry to make a viable profit ratio

In this chart the orange 200xM15 MA also tells about an important support and resistance level. It is also almost horizontal which means price has been bouncing around this level for sometime, which is just other words for saying price has been ranging, but in addition, it now seems retrospectively stupid to trade from a price where we know price is swinging up and down. The thinking machine suggests trading up from just above support or down from just below resistance.

So can we tell the difference?
What are the clues?
Perhaps we need to cross reference with Captain Jack's naked trading posts?

So if price is ranging, it might stop ranging if the market decides to stop buying or selling at a particular level.
Does OBV give a clue the direction of the breakout before it happens?
Author:  snailbeard [ Wed Apr 19, 2017 8:54 am ]
Post subject:  Pre-Breakout-Alerts

Following on from the SRT - Short-Range-Trades, I have been looking for additional patterns to trade ranging periods that have some good set-ups.

I have added some code to find a number of small bars at a line of support or resistance. This the market being indecisive about price direction and often precedes a breakout. We often see several false breakouts before the real move starts.

This does not by itself get us any further to the final direction of the main move, but we can also look at other patterns such as the direction of OBV and price relative to yesterday, and price relative to nearby support and resistance levels.

First, lets have a look at this extract from the log file for one day with lots of alerts:
xauusd-m15-PreBreakout-Buy-Alert-8Jan2016.png
So these alerts could be useful for manual trading or as a step before more analysis, and we always have to solve the question of stop-range to target range. My EAs have typically tried to achieve a factor of 2, which works quite well for trending days, but not well for ranging days. So this is all about a better profit factor and expectation of a higher proportion of losses.

Can we get factors of 5 to 1 or 10 to 1?

Lets take a look at the corresponding chart for the above breakouts:
xauusd-m15-preBreakout-alerts-8Jan2016.png
The day starts at A, and the previous day finished up (rising MAs), so our first thought is that we might get an early morning pull back and at B, we see that price has pulled back to the 100 MA and we are wondering if it will pull back more or pause and go higher. In a strongly trending buy market it would safer to expect another rise later in the day.

However, at C we start to get a sequence pre-breakout-down alerts and it turns out that this was a good guess based on hints from OBV. However, it is not of much use unless we have a good SL to TP ratio.

I added the red Fibonacci lines to help find potential support and resistance levels. The D1 chart would show you that daily momentum has stalled and D1 bars are ranging, so we can expect prices to swing down as well as up. There is a Fibonacci line at 1104.19 and we see that from C onwards our breakout does not require a deeper stop-loss. Next we need a take profit price: the first Fibonacci line below is too close and the next one is at E, we can also look at the estimated daily range to see if there a chance of longer move.

Now the wrong action is to wait for a breakout bar, and a better tactic is to enter from our stop-loss :?
So that bit about entering from the stop-loss doesn't make sense (unless we hit it) and decide to go again.
However, what we would like to do is be as close to our stop-loss before we enter which gives a better ratio to our take profit.

I cannot tell from this M15 chart how to do that, although if I was watching M1 as well, perhaps the M15 doji bar just before a downward breakout bar at D and M1 might suggest a turning point.

So we have a number of options:

a) wait for price to hit our virtual stop-loss and reverse
b) continue to use the breakout bar
c) enter at the pre-breakout stage

So (c) is an alternative to entering from the virtual stop-loss, we are closer to the stop-loss than we would be if we wait for the breakout bar, which are often not the real breakouts anyway.

I am usually looking for about 4 to 5 times the average spread and lets say we jump in from C with 4 x spread
giving us a stop just above the Fibonacci level (120 points) and our first target is 665 points away, so that is a factor of 5, but we also check the expected daily range for ranging days:

The previous days range was about 1580 points and so far the current day has used up about 970 points of that, so actually 665 is at the limit, if we are feeling cautious we might decide to go and look for something better...
However, we can see from E and H that the price did swing down more than expected.
Later in the day price penetrated both the M15 MA(100) and our stop-loss zone.

Two other curious pre-breakout-alerts occur, one at F just after take profit, but in fact our price has already run,
although something interesting happens at G with an unexpected rapid dip.

Again at J we get the pre-breakout-down alert, but in fact it happens just above our take-profit price. The tops and tails of the bars are rising and so is the 200 MA, so we know that we have already completed the days main move. There is a trade-able range if we are happy to enter based other criteria.

And where might we find some indication of where the day intends to finish?

How about this chart, which shows December 2015 prior to the current period and the same patterns, but on a longer time scale:
XAUUSD-D1-multi-day-breakout-from-December2015.png
So we have a strong line of support emphasized by the wedge and then the blue Fibonacci lines relating December's support and the previous days bar to the current day.
Note the relationship between current day, the previous day and the yellow falling 100 day moving average.

It is all there, but it is easier to point it out after events have happened.
Author:  snailbeard [ Mon Apr 24, 2017 11:46 am ]
Post subject:  Pre-Breakout-Alerts

There are days when these alerts are
a) too copious
b) over ambitious

I have been looking at periods which are already difficult to trade due to ranging. A non-moving day can produce more alerts since the whole day is a pre-breakout day. Then there is the issue of falling daily range and our estimates of daily range will be lagging the actual days range, although we might be able to pick this up from falling ATR or MACD from D1.

However, lets start with the M15 view of what appears to be an ideal set-up:
xauusd-m15-SRT-alerts-6Apr2016.png
Lets say we are watching this chart from 05:30 server time and we start getting alerts from A onwards until C then after that we have the real break out.

The first challenge is to wait for the false breakouts to pass, and B is the one which might trigger a close stop-loss. An ideal manual entry occurs just after the M15 doji where heavy selling brought the price back into the pre-breakout channel. We also have a few more bars in which to enter a sell with a close proximity stop loss, before the main move of the day gains momentum.

However, if you look at the bottom of the chart there is a note indicating that the suggested target price is beyond the days actual range, which means we haven't taken into account that the the daily price is strongly ranging!

The following chart includes MACD, MACD is too lagging for timing trades but it is a good way to qualify the market phase at a glance;
xauusd-MACD-shows-ranging-D1-Feb-to-Apr2016.png
The first part of February was strongly trending, March was mostly ranging and April is ranging with a slight upward bias. The current day of interest is D and it is inside a wedge. The red SMA(60) forms part of an area of support along with the lower green trend line.

My EA needs to relate past MACD to present values so that it can adjust the target price estimates.
The current version produces the following alerts:
xauusd-M15-PreBkOutSellAlerts-shrinking-range-6Apr16.png
So the P/L of 10:1 is highly unlikely during ranging except on those better than average days, whereas the 5:1 is more likely to succeed.

So depending on how well we can anticipate and wait for the false breakouts to pass determines whether we go for a larger stop-loss and lower P/L ratio or wait for a better entry and try for a higher P/L ratio.
Author:  snailbeard [ Tue Apr 25, 2017 5:24 am ]
Post subject:  Ranging days

Following on from the previous post: The EA now uses the ranging flags to reduce the estimated remaining range of the day:
xauusd-PBA-ranging-reduced-TP-6Apr2016.png
With reference to the previous chart: these new TP values are more likely to result in a successful outcome.
Author:  snailbeard [ Wed Apr 26, 2017 3:40 pm ]
Post subject:  Daily Fibonacci Signals

After more analysis of ranging days in 2016, I have added a variety of cross checks to hopefully improve the quality of the alerts (and reduce the quantity as there are far too many).

This time lets look at a different day:
The EA spots interesting patterns as filtered from the log file:
xauusd-CSV-PreBreakOutAlerts-for1Apr16-run26Apr17.png
The shades are there to highlight clusters of alerts.
The first alert at 04:15 is the only BUY alert and note that the qualifier 'M=0' means low confidence in the alert.
After this we get a steady stream of alerts until the early afternoon.

What should one do with these alerts?

In the first instance, alerts can start occurring while most people are still sleeping, so lets say you start looking at charts from 9am, the first alert you will be aware of occurs at 09:15: if there have been no false breakouts then it is best to use a wider stop-loss or wait and see. Alternatively, one could enter multiple trades with varying lot sizes.

The following M15 chart shows how the series of PreBreakout Alerts are clustered with several chances to enter trades:
xauusd-M15-chart-PreBreakOutAlerts-01Apr2016-run26Apr17.png
From this we can see that by 11am we have had the false breakouts and chances of getting away with a close proximity stop-loss improve. There is a cracking entry at G where M15 Sma(100) acts as an upper boundary to price just before the market movers open the flood gates.

The entry has a P/L of over 10 and the target is modest compared to the days full range.
Author:  snailbeard [ Thu Apr 27, 2017 5:54 am ]
Post subject:  Post Wedge Alerts

Further analysis of M15 bars can sometimes locate the boundaries of an evolving wedge pattern. When the wedge is sufficiently narrow there is a better chance of price moving without whiplash hitting a close proximity stop loss. This could be less true for traders running inside a brokers platform that manipulates the spread and the price as they can always push prices into any nearby stop losses. We should be careful about revealing our real stop levels to the broker or the market.

The following extract from the log file shows the alerts for 22 April 2016 before I added the extra wedge pattern detection code:
xauusd-CSV-Alerts-without-wedge-complete-22Apr2016.png
So from 07:00 we get alerts and the qualifier 'M=1b' doesn't change, but after introducing the extra pattern matching we see an improved confidence level in the next extract:
XAUUSD-CSV-PBkO-Alert-with-WedgeComplete-Qualifier-for22Apr2016.png
So now we see the qualifier 'M-2b' which in this case means a better chance of using a close proximity stop loss without being stopped out.

The following M15 chart shows how the day and the wedge evolves:
XAUUSD-M15-shows-wedge-complete-1145-22April2016.png
Here A, B, C and D indicate failed breakouts that also define a wedge pattern and at E we see that 11:45 was an interesting time to enter a trade, but it wasn't the only good time to enter as can be seen better on the following chart:
XAUUSD-M15-post-wedge-complete-entries-22April2016.png
In this close up we can see that many bears are using the moving averages as resistance and bulls are using the lower trend line as support, but they are looking tired and its time to put on the kevlar and step into the fray. We have already anticipated that the bears are looking stronger today and signals at F,G and H are also very good entry points.
Author:  snailbeard [ Fri Apr 28, 2017 5:50 am ]
Post subject:  April Pip showers

Just to recap, in an earlier post there is a daily chart of XAUUSD from February to April inclusive. That chart shows that April is strongly ranging in a way that causes our trend trading, grid trading and earlier versions of short range trading to accumulate losses.

The latest changes to the EA assist manual trading in difficult trading conditions by producing alerts about potential breakouts, but in addition I have added an automatic trade feature for a well formed wedge (this code is experimental and is probably allowing some dubious cases as well).

Despite having a significant failure rate, it has managed to do something unusual, not only did it make a profit for April instead of a losses, it also out performs the trend trading methods (at least in this very limited testing period).

It is too early to say whether the autotrading is going to be generally useful but it seems to have potential:
xauusd-PreBkOWdg-profits-for-April2016-run28Apr17.png
It is quite possible that this approach might be curve fitted to a very specific kind of ranging like April 2016, so more work is required to determine it's limitations...
Author:  snailbeard [ Fri Apr 28, 2017 4:27 pm ]
Post subject:  Take a chance on me

If we take a deeper look at the wins and losses from the auto-trader then we would find that alerts come before and after the entry. Entering once and giving up for the day is not how this is meant to be understood. We either need to wait until we are sure that the big price swings are exhausted, use a bigger stop loss or keep taking entries after a failure, although some discretion is required.

The auto trade for 6April 2016 entered at 06:15 was too early and was stopped out. The following chart shows a better set-up occurs later:
xauusd-M15-keep-trying-0745-6Apr2016-.png
We can see that the second alert at 07:45 would be a perfect entry as there are no significant reverses to hit the stop loss.

One approach would be to start with the lowest lot size and add a bit more for each successive alert, which is a form of scaling in.
Author:  snailbeard [ Sun Apr 30, 2017 6:19 am ]
Post subject:  Spin the Euro

What happens when you combine a dysfunctional president and a dysfunctional currency?

A Moneyweek contributor predicted in 2011 that the EURO would collapse in 2013, so was he wrong or just too rational? Is it just a matter of time? Does it matter to us?
And what happens if I run my latest trading method on EURUSD which is bouncing all over the place?

So the antidote to curve fitting is to run the same methods on completely unrelated data and check that the method is not too specific to one pair in a limited time period.

After testing the latest method on EURUSD for April 2017 I am seriously considering running this EA live on ranging pairs with thin spreads. Just to recap, the EA generates a lot of alerts to assist with manual trading and only the alerts which are qualified by a wedge pattern are programmatically traded. This is fairly crude and there are only 5 trades entered for April 2017 out of 193 alerts, but out those: half are discounted because M<1 leaving about 90 alerts, and out of those about half again are within the working day. So we can say that manual trading should offer a lot more opportunities to enter for the experienced trader. So potentially one should be able to do better than the EA as it stands at the moment.

So here are the results for April 2017 (plus one from the end of March):
EURUSD-CSV-PreBkO-M2-trades-big-profits-April2017.png
We can see that there is a failure rate is > 50% in this small test sample, but great profits on successful days. This is in contrast to my trend trading method which tries too hard to filter out poor trading conditions (most pairs and most of the time).

We can see from the following chart that political tensions have affected this pair:
eurusd-D1-chart-3loss-2win-big-profit-April2017.png
This pair is just bouncing up and down and ranging until the next major announcement. This latest method seems to be perfect for chaotic markets.

The obvious question now is what happens if the pair starts trending? Will it fail to find entries? Will it be continuously stopped out?
Author:  snailbeard [ Wed May 03, 2017 7:07 am ]
Post subject:  USDJPY mixed messages

It is always dangerous to be too excited about a particular method because there are bound to be times when it produces odd results. After significant successes with a range of pairs for April 2017, I found that USDJPY has the pattern matching totally confused.

Have a look at the following M15 chart and see if you can figure out what other traders are thinking:
USDJPY-M15-mixed-signals-03April2017.png
At first glance I see price fell now looks like it might start rising again:
a) OBV is generally rising for an extended period
b) ABCD identifies a rising channel

However, at C we have an intersection of a rising 200 SMA and falling 100 SMA, which also acts as resistance.
But which one is the main resistor?
What my EA lacks is the observation of the bars between E and F, which we can see hug the 100 SMA with a downward bias.

If we cross reference C and F with the corresponding OBV we no longer get a bias towards rising and it could just be one of those mixed up days where nothing concrete happens.

Such days are to be expected, but for USDJPY in April 2017 the EA is wrong every time :oops:

Are there any concrete signals later in the day?
There is on one which jumps out for me in the following chart. Just to recap our aim is to enter at a place where we can have a close proximity stop loss with a higher confidence of not being stopped out:
USDJPY-M15-open-bar-under-falling-SMA100-1700-3Apr2017.png
So now I can see two wedges:
a) the previous rising wedge
b) a falling wedge boarded by two slow SMAs and OBV consistent with falling prices.
The only place where I see a chance of a clean entry doesn't really work on M15 as we need
to first pick up that we are inside an M15 bar that just opened below SMA100 and that we have had heavy selling above the SMA100 and price direction is down and price is now below SMA100, for that we need to be also watching the M1 bars.

So what is the EA actually detecting at 17:00?

Code: Select all

17:00 USDJPY: :  TRACE   3H1 Bias:  -1 , Priority:  H1>>d1: -1  ^|^|^P  V|v|vP  VTopsV: -1  ^Tails^: +1 ^|>V|
17:00 USDJPY: :   3H1BarsLtAtr100: potential for break out
17:00 USDJPY: :   3H1BarPriceStall
17:00 USDJPY: :  TRACE   3M15 Bias:  -1 , Priority:  d1^<<vM15: -1  ^|^|^P  V|v|vP  VTopsV: -1 V|>^|
17:00 USDJPY: :   M15PreBreakoutUp-Alert-3SB
17:00 USDJPY: :   M15PreBreakoutUp-Alert-COAN
17:00 USDJPY: :  Alert M15PreBreakoutParams:  M=1a  ?Buy?  (Ask?Sl?Tp?),111.377,111.294,112.583, P/L=14.47

17:15 USDJPY: :  TRACE   3M15 Bias:  -1 , Priority:  d1^<<vM15: -1  M15>>d1: -1  i3M15_YCYL: -1
17:15 USDJPY: :  16M15_3H1BreakLower
17:15 USDJPY: :   M15PreBreakoutDown-Alert-COBN
17:15 USDJPY: :   M15PostBreakoutDown-Alert
[/size]

So here we can see at that at 17:00 it finds H1 and M15 candles having a downward bias but ignores this and fails to notice that OBV now has a downward bias as well.
We have to wait until 17:15 for it to catch up with reality when it finally works out that price is going down and this is a bit late as the market movers are ahead of us and have taken price quite far already

It would be an improvement if I can eliminate the incorrect interpretation of mixed messages.

Update....
After adding some additional logic the EA can determine that a bar just opened under a falling MA and use it help ignore unwanted alerts:

Code: Select all

15:00 USDJPY: :   M15PreBreakoutUp-Alert-COAN
15:00 USDJPY: :   IGNORE PreBreakoutUp: bM15BarMovingDownAtSR


17:00 USDJPY: :  TRACE   3H1 Bias:  -1 , Priority:  H1>>d1: -1  ^|^|^P  V|v|vP  VTopsV: -1  ^Tails^: +1 ^|>V|
17:00 USDJPY: :  TRACE   3M15 Bias:  -1 , Priority:  d1^<<vM15: -1  ^|^|^P  V|v|vP  VTopsV: -1 V|>^|
17:00 USDJPY: :   M15PreBreakoutUp-Alert-3SB
17:00 USDJPY: :   M15PreBreakoutUp-Alert-COAN
17:00 USDJPY: :   IGNORE PreBreakoutUp: bM15BarMovingDownAtSR
[/size]

So now we can still see the Alerts in the log file, but they don't get converted into trades.
There is the manual trading choice of ignoring the 'ignore' message if desired.

At 17:00 there is no indication that we should switch from buy to sell and that seems to require better analysis of OBV.
All times are UTC Page 16 of 21