| stevehopwoodforex.com https://www.stevehopwoodforex.com/phpBB3/ Print view |
|
| Preemptive Zig Zig https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?t=2792 |
Page 2 of 4 |
| Author: | snailbeard [ Mon Sep 30, 2013 2:47 pm ] |
| Post subject: | Using the same rules on M15, H4 and D1 |
The EA produced a useful alert this morning before it hit a bug. It drew my attention to EURJPY, which has been stepping down recently in the M15 chart, whereas, on H4 it looks like a pullback in an upward staircase. Further, to this the D1 chart has several interpretations depending on the zoom setting. On the longest time, it could be said that Euro was gaining fast against the Yen, but more recently, the gain is more modest and the pull backs are deeper. However, since my EA is fairly dumb, it does not yet process the D1 perspective, but if it applied the same rules as it does on M15 it would be currently indicating nothing about D1 since it needs a pull back swing and upward proximity of the mid-Bollinger to produce an alert. Neither does the EA look for channel support lines which I added to the chart, linking the lows of the zig-zag, which might act as a target or a resistance boundary. On the M15 timescale, my EA has calculated the Euro is stepping down, but it is not aware of weekly and daily support in close proximity to the entry trigger at D'. From a manual trading perspective I observe that price movement might be trapped in a channel between H4 & H1 Bollinger bands and the weekly and daily support pivot levels. I would therefore wait for some evidence of a market preference, which would be a confirmed breakout from this channel. With reference to the M15 chart I have labelled the zigzags ABCD and A'B'C'D'. Where D and D' are alerts that price might cross the mid-Bollinger band and that would be the trigger to trade. Points ABC are prerequisites indicating a swing in the main direction followed by a pullback, then C to D is price moving in the direction of the dominant swing, a failure to cross the mid-Bollinger can be a sign that movement can reverse or range for a while. Market movers might push price briefly through this threshold in order to force us in or out of trades. This is one reason why I have written some code to set-up virtual-pending-orders which can wait for the price to stay over the threshold for 0 or more minutes before committing to the trade. This code also checks the spread. The VPO is not considered to be triggered if the spread is over a threshold or the price has not remained over the threshold for at least 'n' minutes. Looking more closely at ABCD, there is a doubt about this trade because the candle body never closes above the mid-Bollinger but the zig-zag does. It also occurs when market manipulation frequently happens (late Friday to early Monday). Many traders avoid trading late Friday to early Monday. There will be many trades like A'B'C'D' with uncertain outcomes. I developed the partial exit code to avoid being trapped in a trade which could be near a reversal level. The idea is to avoid large stop losses and increase lot size and take at least one slice of profit and move the stop-loss to breakeven, just in case the price swings back towards to entry point. |
|
| Author: | snailbeard [ Mon Sep 30, 2013 4:54 pm ] |
| Post subject: | Midnight Cowboy |
Most of us have got better things to do at midnight on Friday than watch what the high speed cowboys are up to, but refering back to the a ABCD trade that crosses the weekend, we can see better on a 1 minute chart how that invisible price jump comes about: we do not get our 'D' point on M15 because the price reaches 'C' and within minutes the price has gapped down. If I am confident about the major swing and minor pullback on M15: To beat the market movers: our rules need to be adaptive so that for a strong swing we know that our threshold is adaptive. Let the MA(15) be used in place of MA(20) for the purposes of points C and D, in a strong swing and we can out fox the fox. To determine the strength of a swing some analysis of ATR values is required, I currently log these once every four hours just for reference: 2013.09.27 12:00 EURJPY,M15: =============================================== 2013.09.27 12:00 EURJPY,M15: EURJPY : Average True Range for various parameters: 2013.09.27 12:00 EURJPY,M15: AVG 01 05 20 -------------------------------------------------------------------------------------------- 2013.09.27 12:00 EURJPY,M15: M15 11 11 10 2013.09.27 12:00 EURJPY,M15: H1 31 20 20 2013.09.27 12:00 EURJPY,M15: H4 33 38 50 2013.09.27 12:00 EURJPY,M15: D1 105 103 116 2013.09.27 12:00 EURJPY,M15: W1 331 294 320 2013.09.27 12:00 EURJPY,M15: MN1 0 0 0 2013.09.27 12:00 EURJPY,M15: =============================================== 2013.09.27 20:00 EURJPY,M15: =============================================== 2013.09.27 20:00 EURJPY,M15: EURJPY : Average True Range for various parameters: 2013.09.27 20:00 EURJPY,M15: AVG 01 05 20 -------------------------------------------------------------------------------------------- 2013.09.27 20:00 EURJPY,M15: M15 11 9 13 2013.09.27 20:00 EURJPY,M15: H1 17 24 22 2013.09.27 20:00 EURJPY,M15: H4 60 42 50 2013.09.27 20:00 EURJPY,M15: D1 105 103 116 2013.09.27 20:00 EURJPY,M15: W1 331 294 320 2013.09.27 20:00 EURJPY,M15: MN1 0 0 0 2013.09.27 20:00 EURJPY,M15: =============================================== 2013.09.30 04:00 EURJPY,M15: =============================================== 2013.09.30 04:00 EURJPY,M15: EURJPY : Average True Range for various parameters: 2013.09.30 04:00 EURJPY,M15: AVG 01 05 20 -------------------------------------------------------------------------------------------- 2013.09.30 04:00 EURJPY,M15: M15 22 13 18 2013.09.30 04:00 EURJPY,M15: H1 28 41 28 2013.09.30 04:00 EURJPY,M15: H4 104 56 49 2013.09.30 04:00 EURJPY,M15: D1 96 110 116 2013.09.30 04:00 EURJPY,M15: W1 180 267 312 2013.09.30 04:00 EURJPY,M15: MN1 0 0 0 2013.09.30 04:00 EURJPY,M15: =============================================== 2013.09.30 08:00 EURJPY,M15: =============================================== 2013.09.30 08:00 EURJPY,M15: EURJPY : Average True Range for various parameters: 2013.09.30 08:00 EURJPY,M15: AVG 01 05 20 -------------------------------------------------------------------------------------------- 2013.09.30 08:00 EURJPY,M15: M15 9 11 12 2013.09.30 08:00 EURJPY,M15: H1 20 25 28 2013.09.30 08:00 EURJPY,M15: H4 58 61 49 2013.09.30 08:00 EURJPY,M15: D1 96 110 116 2013.09.30 08:00 EURJPY,M15: W1 180 267 312 2013.09.30 08:00 EURJPY,M15: MN1 0 0 0 2013.09.30 08:00 EURJPY,M15: =============================================== See the chart below to see how the the basic rules can be adapted according to market conditions: |
|
| Author: | snailbeard [ Mon Sep 30, 2013 6:04 pm ] |
| Post subject: | H4 Zig Zig |
The same basic rules can be applied on higher time frames. In the H4 chart below the trigger event occurs twice. Experienced traders can see how it relates to other strategies which make more use of pivot levels for entries and exits. The trigger event occurs first on Tuesday, then again on Wednesday, with the first stop-loss under C (66 pips), and the second under C', one can one manually trail the trade or follow the method of partial exits after gaining 'x' pips or reaching a weekly (mid)pivot level. The profit to loss ratio is roughly 4:1 in this instance. The main part of the move occurs between Wednesday and Thursday, and by 4pm the market movers have taken their profits and probably left the office with a beaming smile. |
|
| Author: | snailbeard [ Tue Oct 01, 2013 6:12 am ] |
| Post subject: | Reversals |
A flaw in this strategy, like many others, is the difficulty in spotting the difference between a pullback and a reversal, only when pullback swing is longer than the previous swing does dominant direction change. Another weakness is the recalculation of the last zigzag. The following data was extracted from the log file after switching on the trace/dump of zigzags: Note that bars at 2013.09.23 16:00 and 2013.09.24 16:00 were candidate zigzags C and C' on the chart below. ============================================================================================== 2013.09.19 16:00 EURJPY,M15: TF:240: _32 _7680 -1____ 134.94600 0.00000 3.08300 308 8, (128H->32 bars) --- 2013.09.23 16:00 EURJPY,M15: TF:240: _20 _4800 1____ 0.00000 133.08900 0.00000 0 0, (80H->20 bars) 2013.09.24 16:00 EURJPY,M15: TF:240: _14 _3360 1____ 0.00000 132.70100 0.00000 0 0, (56H->14 bars) 2013.09.25 08:00 EURJPY,M15: TF:240: _10 _2400 1____ 0.00000 132.68700 -2.25900 -226 22, (40H-> 10 bars) ============================================================================================== Here candidate zigzags adjust 3 times. If the order is triggered at the first D on crossing the mid Bollinger then we would have a big loser. Can the VPO method described earlier avoid the false trigger? The ABC'D' set up does not get triggered, the final setup ABC''D'' would trigger, but would also reach the first partial exit and therefore be a profitable trade. So setup ABCD illustrates why I don't like simple price cross pending orders. There is a certain robustness to the method provided that there are a minority of false triggers. |
|
| Author: | snailbeard [ Wed Oct 02, 2013 11:57 am ] |
| Post subject: | Reversals |
Reversals (Part 1) There are a number of ways to anticipate reversals, although there are often several pre-reversals or mini-reversals before the actual reversal. This is what confuses most trading strategies and results in losing trades at the end of a swing. Those trying to catch the reversal often get burned as well by jumping in too soon. My EA also generates alerts when daily and weekly pivots occur at or beyond Bollinger Bands. This is independent of the zigzag logic, the data is there but not accessed by the zigzag alert logic. There is also information about the rate of price movement on different time frames: 2013.06.11 08:00 AUDUSD,M15: 2013.06.11 08:00 AUDUSD,M15: Alert: (bPriceCloseToDP || bPriceCloseToWP) && bPriceBelowD1LBoll =============================================== 2013.06.11 08:00 AUDUSD,M15: AUDUSD : Average True Range for various parameters: 2013.06.11 08:00 AUDUSD,M15: AVG 01 05 20 100 2013.06.11 08:00 AUDUSD,M15: M15 14 24 15 12 2013.06.11 08:00 AUDUSD,M15: H1 64 31 27 32 2013.06.11 08:00 AUDUSD,M15: H4 94 62 70 54 2013.06.11 08:00 AUDUSD,M15: D1 82 143 119 81 2013.06.11 08:00 AUDUSD,M15: W1 284 272 183 247 2013.06.11 08:00 AUDUSD,M15: MN1 647 358 478 0 2013.06.11 08:00 AUDUSD,M15: =============================================== 2013.06.11 08:00 AUDUSD,M15: ================================================ First: Alert: (bPriceCloseToDP || bPriceCloseToWP) && bPriceBelowD1LBoll This tells me that the price has gone beyond the daily Bollinger, which can mean either that, it is a very strong swing which will continue or the price movement has gone too far in this direction and is going to reverse, either way, there is likely to be at least a small counter swing. Secondly the ATR table tells a very interesting story as well: Both H1 and H4 have moved a lot more than the long-term average D1 has moved by a typical amount and so has W1. However MN1 has really motored beyond its normal amount, informing us to be cautious about continuing in the current dominant direction. I would like to turn off any downward alerts until there has been a significant counter swing. In the next post I'll walk through a deep analysis of a complex chart and attempt to articulate unambiguous rules for moving along with the swing. |
|
| Author: | snailbeard [ Wed Oct 02, 2013 1:20 pm ] |
| Post subject: | Reversals (Part 2) |
Reversals (Part 2) In the following chart, the letters A to I indicate the likely location of zigzags on lower time frames. The numbers 1 to 7 are meant to relate to an identifiable event such as crossing a threshold, or passing and returning a threshold or touching but not crossing a threshold. Only the event 'crossing a threshold' is unambiguous. The other events need to be better defined. Although the events are highlighted on a H4 chart it is likely that most of the indicated events must be identified on a lower timeframe. So we must say something along the lines: The price reached level L1 but after N1 minutes it had either crossed or not crossed L2. Or we can say a candle on a particular time frame opened and closed on the same side or opposite side of a threshold ( or several bars). Although, the chart appears cluttered, I am only interested to look at specific details. Seeing this chart is like seeing all the words of the whole story on one big page but still we only understand the story by following it in sequence, although we can dip into chapters out of sequence and make some sence of chapters on their own, but sometimes the previous chapters are important. So referring to the forward swing: our main trigger event is the crossing of the mid-Bollinger band. In the counter-swing we need to identify a movement from outside the Bollinger Bands returning inside the Bollinger bands, but more than this we need to see micro-pullbacks towards the outer Bollinger with a mini-swing bigger than the micro-swing, where the mini-swing is towards the mid-Bollinger. Since we don't know how far the swings will travel it is important to take partial profits and move the stop-loss to break even at the first opportunity. To manually trade what is described here you would need to have an M15 chart and possibly M1 chart open as well. We can see that if the price crosses a congruence of a weekly and daily pivot in combination with other criteria then there is likely to be at tradable movement back towards the mid-Bollinger. We cannot use this method in the first major swing when pull-backs are small, we must wait for the main swing to weaken ( when the ratio of forward swings to pullback swings has reduced. |
|
| Author: | snailbeard [ Thu Oct 03, 2013 5:02 pm ] |
| Post subject: | example trade |
Example trade With the help of virtual pending orders and partial exits I was able convert an alert into a trade: From CrappyTesters back testing with AUDUSD M1: 1 2013.06.05 05:36 sell 1 0.40 0.9628 0.0000 0.0000 0.00 10000.00 2 2013.06.05 05:36 modify 1 0.40 0.9628 0.9663 0.9533 0.00 10000.00 3 2013.06.05 06:05 modify 1 0.40 0.9628 0.9628 0.9533 0.00 10000.00 4 2013.06.05 06:05 close 1 0.10 0.9606 0.9628 0.9533 22.00 10022.00 5 2013.06.05 06:05 sell 2 0.30 0.9628 0.9628 0.9533 0.00 10022.00 6 2013.06.05 06:48 close 2 0.10 0.9585 0.9628 0.9533 43.00 10065.00 7 2013.06.05 06:48 sell 3 0.20 0.9628 0.9628 0.9533 0.00 10065.00 8 2013.06.05 07:07 close 3 0.10 0.9563 0.9628 0.9533 65.00 10130.00 9 2013.06.05 07:07 sell 4 0.10 0.9628 0.9628 0.9533 0.00 10130.00 10 2013.06.05 14:17 close 4 0.10 0.9539 0.9628 0.9533 89.00 10219.00 I have labelled the chart where T1 is this trade and T2 and T3 are secondary trades reentering the major swing after pull backs. There were no reversals to hit the stop loss so the trade went to completion gaining 219 pips. |
|
| Author: | snailbeard [ Thu Oct 03, 2013 5:37 pm ] |
| Post subject: | Overlapping trades |
Overlapping trades By rejoining the dominant swing at successive pullbacks one can double or treble the gains: 1 2013.06.05 05:36 sell 1 0.40 0.9628 0.0000 0.0000 0.00 10000.00 2 2013.06.05 05:36 modify 1 0.40 0.9628 0.9663 0.9533 0.00 10000.00 3 2013.06.05 06:05 modify 1 0.40 0.9628 0.9628 0.9533 0.00 10000.00 4 2013.06.05 06:05 close 1 0.10 0.9606 0.9628 0.9533 22.00 10022.00 5 2013.06.05 06:05 sell 2 0.30 0.9628 0.9628 0.9533 0.00 10022.00 6 2013.06.05 06:48 close 2 0.10 0.9585 0.9628 0.9533 43.00 10065.00 7 2013.06.05 06:48 sell 3 0.20 0.9628 0.9628 0.9533 0.00 10065.00 8 2013.06.05 07:07 close 3 0.10 0.9563 0.9628 0.9533 65.00 10130.00 9 2013.06.05 07:07 sell 4 0.10 0.9628 0.9628 0.9533 0.00 10130.00 10 2013.06.05 12:47 sell 5 0.40 0.9565 0.0000 0.0000 0.00 10130.00 11 2013.06.05 12:47 modify 5 0.40 0.9565 0.9599 0.9469 0.00 10130.00 12 2013.06.05 14:17 modify 5 0.40 0.9565 0.9565 0.9469 0.00 10130.00 13 2013.06.05 14:17 close 5 0.10 0.9539 0.9565 0.9469 26.00 10156.00 14 2013.06.05 14:17 sell 6 0.30 0.9565 0.9565 0.9469 0.00 10156.00 15 2013.06.05 14:17 close 4 0.10 0.9539 0.9628 0.9533 89.00 10245.00 16 2013.06.05 14:46 close 6 0.10 0.9520 0.9565 0.9469 45.00 10290.00 17 2013.06.05 14:46 sell 7 0.20 0.9565 0.9565 0.9469 0.00 10290.00 18 2013.06.06 00:06 close 7 0.10 0.9500 0.9565 0.9469 60.62 10350.62 19 2013.06.06 00:06 sell 8 0.10 0.9565 0.9565 0.9469 0.00 10350.62 20 2013.06.06 00:17 close 8 0.10 0.9483 0.9565 0.9469 77.62 10428.24 21 2013.06.12 04:40 sell 9 0.40 0.9439 0.0000 0.0000 0.00 10428.24 22 2013.06.12 04:40 modify 9 0.40 0.9439 0.9473 0.9343 0.00 10428.24 23 2013.06.12 05:33 modify 9 0.40 0.9439 0.9439 0.9343 0.00 10428.24 24 2013.06.12 05:33 close 9 0.10 0.9419 0.9439 0.9343 20.00 10448.24 see the attached chart for a visual representation of the back test data: |
|
| Author: | snailbeard [ Fri Oct 04, 2013 8:03 am ] |
| Post subject: | Missing trades |
With reference to the chart, note that there is a perfectly good set up in the early morning of 11 June 2013. There are many variations of the zigzag formula and also several parameters which can be adjusted. It appears that the M15 zigzag is missing some useful swings. Working backwards 1,2,3 is the zigzag with an oversized swing for this time frame. ABCD is the hyperthetical zigzag which would help identify the entry points T or T'. |
|
| Author: | snailbeard [ Fri Oct 04, 2013 8:12 am ] |
| Post subject: | Better zigzags for M15 |
By experimenting with the zagzag parameters i found that changing Depth from the default of 12 to 9 gives a more appropriate indicator for this method: |
|
| All times are UTC | Page 2 of 4 |
|
Powered by phpBB® Forum Software © phpBB Limited |
|