MNB 10.4 Streamlined by Snailbeard

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

Re: MNB 10.4 Streamlined by Snailbeard

Post by snailbeard »

And on the more useful TF of H1 - the difference is less pronounced (except that I am repeating the top line as D1 instead of W1)

This gives a less lagging (compared to H1 MA(960) ) indication of a change of trend (at least in the pip range that we are interested in).
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

Re: MNB 10.4 Streamlined by Snailbeard

Post by snailbeard »

One of the criticisms of back-testing is the risk of curve-fitting and cherry picking:
So my thoughts are lets pick two periods one ideal and one difficult.

In the first case we should get fantastic results and few losers.
And the second we would expect more losers and few winners.
For this test I have set a hard stoploss of 300 pips because I saw some pull backs of over 200 pips, of course if we did this with normal lot sizes on multiple currencies we could lose our shirt. However, what I am looking for is plenty of trades with great results because this has to make up for all those losses in the bad periods.
NB-CherryPick-11Jan13-10Mar13.png
As expected the results are good but perhaps disappointing since we have a number of trades which hardly made any profit. I suspect this is due to micro-mangement of the trades. Perhaps this is the wrong approach to limiting losses.


In the second run I pick a period which is incompatible with NB trend detection logic, however, interestingly straight forward to trade by other methods:
NB-GU-Sept-Oct2012-big-losses.png
So what can we take away from these results?
It seems better to put more effort into the trend detection logic so that we stop lagging behind the real trend. Neither do we want huge stoplosses and draw down in a multi pair trader.
So I think it is worth looking deeper into the MTF MA logic. Interestingly, my first attempt at a single pair EA was fundametally based on the consistent divergence of Multiples MAs after convergence, so in some respects I am just rediscovering something that was useful and the reason I moved on was the same issue of coping with the changes in the market.
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

Re: MNB 10.4 Streamlined by Snailbeard

Post by snailbeard »

Anti-NanningBob

When the market is ranging about the H4-240 MA the autotrader fails to notice and continues to apply the NB strategy which results in a sequence of losses.

If we had a simple rule set for quantifying this we could reverse the rules and apply an anti-NB10 strategy which would give profits instead of losses.

Note: even the MTFx4 MA is too lagging on D1 to help, although there are clues on H4 and H1 - I'll might come back to that later.

Meanwhile, lets say we find a reliable way to identify rangng...
(simple definition 1: the price swings above and below MA-H4-240 and MA-D1-12)
definition of swing: recent low, previous recent high
and in the context of NB10 - a week-by-week strategy:
points of interest:
now: means current week - are we above or below the MAs?
last week: were we on the opposite side of the MAs?
and last+1 week: were we on the same side of the MAs?

Also I have added labels where we get profitable anti-NB entries
Logic:
Place a instant order
Sell above MAs and RSI goes down
OR Buy when below MA and RSI goes up
We might also dispence with RSI and instead use the crossing of pivots.
The stoploss would be the previous pivot + delta
The optimistic target would be the same pivot that was reached previously,
however, lock in some profit at each pivot crossing.

Note I have added the zig-zig indicator - although a predictive zig-zag might be more useful than a historical ZZ.

The week-by-week high/low is not sufficient as we can get swings in the same week.
We might define a swing more precisely
a swing must have a minimum range and duration.
This will be dependent on current market conditions and is reflected in the distance between pivots,
but in this case over 100 pips
a minimum swing could be 14 H4 bars - typically occuring over 3 days
and a long swing could be 30 bars.

Imagine for a moment that we have another EA running which prepares a daily trading objective based on recent past over one or two weeks. The purpose of this EA would be to provide guidance for the next day(s) trading:
Is the price in a swing?
Where did the swing start?
How far is left to go? ( how long were previous swings, which was the highest pivot reached, which was the lowest pivot reached? )
Was the the daily candle just completed a doji?
And did it close just above significant support or just below significant resistance.
Can we predict or detect channel boundaries?

So far I have not mentioned the moving averages - on the chart they are conflicting and criss-crossing and 12MA pair is on the wrong side of the 40MA pair when they both cross into the 'UP' direction.
We can simply forget all this complicated analysis and say these two pairs of MAs should be in the correct alignment otherwise go to sleep.
You do not have the required permissions to view the files attached to this post.
User avatar
rosst
Trader
Posts: 280
Joined: Wed Feb 27, 2013 1:11 pm
Location: Austin, Texas

Re: MNB 10.4 Streamlined by Snailbeard

Post by rosst »

A predictive zig-zag would be great!
User avatar
snailbeard
Trader
Posts: 615
Joined: Mon Dec 24, 2012 10:54 am
Location: Just above water somewhere between Oxford & Cambridge

Re: MNB 10.4 Streamlined by Snailbeard

Post by snailbeard »

The simpler approach to filtering has produced impressive results in the limited back test:

Losses without D1 MA12 & D1 MA40 & Doji filtering:

1 2012.10.01 16:00 buy stop 1 0.19 1.61739 1.60739 1.63283 0.00 10000.00
2 2012.10.02 16:00 buy 1 0.19 1.61739 1.60739 1.63283 0.00 10000.00
3 2012.10.02 19:00 close 1 0.19 1.61395 1.60739 1.63283 -66.69 9933.31
4 2012.10.11 03:00 sell stop 2 0.19 1.59843 1.60843 1.59273 0.00 9933.31
5 2012.10.16 12:00 delete 2 0.19 1.59843 1.60843 1.59273 0.00 9933.31
6 2012.10.18 04:00 buy stop 3 0.19 1.61413 1.60413 1.62158 0.00 9933.31
7 2012.10.18 07:00 buy 3 0.19 1.61413 1.60413 1.62158 0.00 9933.31
8 2012.10.18 16:00 buy stop 4 0.19 1.61811 1.60811 1.62158 0.00 9933.31
9 2012.10.18 19:00 delete 4 0.19 1.61811 1.60811 1.62158 0.00 9933.31
10 2012.10.18 20:00 close 3 0.19 1.60481 1.60413 1.62158 -178.41 9754.90
11 2012.10.23 00:00 sell stop 5 0.19 1.59889 1.60889 1.58675 0.00 9754.90
12 2012.10.23 11:00 sell 5 0.19 1.59889 1.60889 1.58675 0.00 9754.90
13 2012.10.24 16:00 close 5 0.19 1.60142 1.60889 1.58675 -49.84 9705.06
14 2012.10.24 16:00 sell stop 6 0.19 1.59889 1.60889 1.58675 0.00 9705.06
15 2012.10.25 09:00 delete 6 0.19 1.59889 1.60889 1.58675 0.00 9705.06
16 2012.10.26 06:00 buy stop 7 0.19 1.61254 1.60254 1.62433 0.00 9705.06
17 2012.10.26 09:00 buy 7 0.19 1.61254 1.60254 1.62433 0.00 9705.06
18 2012.10.29 16:00 s/l 7 0.19 1.60254 1.60254 1.62433 -191.25 9513.81

Improvements after D1 MA12 & D1 MA40 & Doji filtering:

1 2012.10.24 11:00 sell stop 1 0.16 1.59889 1.61080 1.58675 0.00 10000.00
2 2012.10.25 09:00 delete 1 0.16 1.59889 1.61080 1.58675 0.00 10000.00

Now we need to do some broader testing to see if this removes too many good trades.
User avatar
snailbeard
Trader
Posts: 615
Joined: Mon Dec 24, 2012 10:54 am
Location: Just above water somewhere between Oxford & Cambridge

Re: MNB 10.4 Streamlined by Snailbeard

Post by snailbeard »

Now repeating the tests for the perfect trend with and without MA12/MA40 filtering:

GU : Ideal Sell trend 2013.01.01 - 2013.03.12
=============================================
//NB10 requires BIG stoplosses to allow for BIG retracements
// To fix this we need to catch H1/H4 reversals
extern int iStopLossInPips = 300; // 100; 300;//100;

extern bool useMovingAverage = false;
extern bool bailOnOpposite = false;

// These should be changed for every week!
// but we need to control each pair individually not like this
extern bool UseWMidSR1 = false; //MR1/MS1
extern bool UseWSR1 = false; //R1/S1 default
extern bool UseWMidSR2 = false; //MR2/MS2
extern bool UseWSR2 = true; //R2/S2

=============================================================
extern bool useRSI = true;
extern bool useAO = false;
extern bool useStoch = false;
extern bool useCSS = false;
extern bool useDirectEntry = false;
extern bool useCSSH1CrossDirectEntry = false;
extern bool useCSSH1CrossDirectExit = false;
extern bool usePendingOrders = true;
extern bool useH4BollBoundaryCheck = true;
extern bool useH4BollSlopeCheck = true;
extern bool useH1BollSlopeCheck = true;
extern bool useMoveStopOrders = true;
extern bool useDeleteOrderByH1BollSlope = false;
extern bool AbortDubiousTrades = true;
extern bool useMTF4MAEntryFilter = false; // Use 4 TF MA to filter enteries
extern bool useMTF4MAExit = false; // Use 4 TF MA to kill pending orders and exit open trades
extern bool useD1DojiFilter = true; // Use the daily candle if a doji as a filter
============================================================================

1 2013.01.07 12:00 sell stop 1 0.06 1.60339 1.63339 1.57809 0.00 10000.00
2 2013.01.07 23:00 delete 1 0.06 1.60339 1.63339 1.57809 0.00 10000.00
3 2013.01.08 19:00 sell stop 2 0.06 1.60339 1.63339 1.57809 0.00 10000.00
4 2013.01.09 12:00 sell 2 0.06 1.60339 1.63339 1.57809 0.00 10000.00
5 2013.01.09 12:00 close 2 0.06 1.60288 1.63339 1.57809 2.64 10002.64
6 2013.01.10 14:00 sell stop 3 0.06 1.60339 1.63339 1.57809 0.00 10002.64
7 2013.01.10 18:00 delete 3 0.06 1.60339 1.63339 1.57809 0.00 10002.64
8 2013.01.17 12:00 sell stop 4 0.06 1.60134 1.63134 1.59139 0.00 10002.64
9 2013.01.17 14:00 sell 4 0.06 1.60134 1.63134 1.59139 0.00 10002.64
10 2013.01.18 14:00 t/p 4 0.06 1.59139 1.63134 1.59139 59.14 10061.78
11 2013.01.22 14:00 sell stop 5 0.06 1.58449 1.61449 1.56401 0.00 10061.78
12 2013.01.22 18:00 sell 5 0.06 1.58449 1.61449 1.56401 0.00 10061.78
13 2013.01.29 12:00 sell stop 6 0.06 1.57056 1.60056 1.56542 0.00 10061.78
14 2013.01.30 11:00 sell stop 7 0.06 1.57514 1.60514 1.56542 0.00 10061.78
15 2013.01.30 12:00 close 5 0.06 1.57737 1.61449 1.56401 41.20 10102.98
16 2013.01.31 06:00 sell stop 8 0.06 1.57972 1.60972 1.56542 0.00 10102.98
17 2013.01.31 11:00 sell 8 0.06 1.57972 1.60972 1.56542 0.00 10102.98
18 2013.01.31 11:00 close 8 0.06 1.57940 1.60972 1.56542 1.50 10104.48
19 2013.02.01 16:00 sell 7 0.06 1.57514 1.60514 1.56542 0.00 10104.48
20 2013.02.01 21:00 sell 6 0.06 1.57056 1.60056 1.56542 0.00 10104.48
21 2013.02.05 16:00 t/p 6 0.06 1.56542 1.60056 1.56542 30.14 10134.62
22 2013.02.05 16:00 t/p 7 0.06 1.56542 1.60514 1.56542 57.62 10192.25
23 2013.02.07 11:00 sell stop 9 0.06 1.56836 1.59836 1.55478 0.00 10192.25
24 2013.02.07 15:00 sell 9 0.06 1.56836 1.59836 1.55478 0.00 10192.25
25 2013.02.07 17:00 close 9 0.06 1.57105 1.59836 1.55478 -16.56 10175.69
26 2013.02.07 17:00 sell stop 10 0.06 1.56836 1.59836 1.55478 0.00 10175.69
27 2013.02.08 11:00 sell stop 11 0.06 1.57469 1.60469 1.55478 0.00 10175.69
28 2013.02.08 12:00 sell 11 0.06 1.57469 1.60469 1.55478 0.00 10175.69
29 2013.02.08 12:00 close 11 0.06 1.57462 1.60469 1.55478 0.00 10175.69
30 2013.02.11 12:00 sell 10 0.06 1.56836 1.59836 1.55478 0.00 10175.69
31 2013.02.12 02:00 close 10 0.06 1.56581 1.59836 1.55478 14.74 10190.43
32 2013.02.18 13:00 sell stop 12 0.06 1.54645 1.57645 1.52345 0.00 10190.43
33 2013.02.18 16:00 sell 12 0.06 1.54645 1.57645 1.52345 0.00 10190.43
34 2013.02.20 20:00 t/p 12 0.06 1.52345 1.57645 1.52345 137.30 10327.73
35 2013.02.22 02:00 sell stop 13 0.06 1.52297 1.55297 1.51412 0.00 10327.73
36 2013.02.24 22:00 sell 13 0.06 1.52297 1.55297 1.51412 0.00 10327.73
37 2013.02.24 23:00 t/p 13 0.06 1.51412 1.55297 1.51412 52.68 10380.41
38 2013.02.27 11:00 sell stop 14 0.06 1.50790 1.53790 1.47904 0.00 10380.41
39 2013.03.01 10:00 sell 14 0.06 1.50790 1.53790 1.47904 0.00 10380.41
40 2013.03.05 10:00 close 14 0.06 1.51810 1.53790 1.47904 -61.90 10318.52
41 2013.03.05 10:00 sell stop 15 0.06 1.51222 1.54222 1.48433 0.00 10318.52
42 2013.03.05 16:00 sell 15 0.06 1.51222 1.54222 1.48433 0.00 10318.52
43 2013.03.05 16:00 sell stop 16 0.06 1.50749 1.53749 1.48433 0.00 10318.52
44 2013.03.06 10:00 sell 16 0.06 1.50749 1.53749 1.48433 0.00 10318.52
45 2013.03.07 07:00 close 16 0.06 1.50003 1.53749 1.48433 43.93 10362.44
46 2013.03.07 07:00 close 15 0.06 1.50003 1.54222 1.48433 72.17 10434.61
============================================================================

extern bool useMTF4MAEntryFilter = true; // Use 4 TF MA to filter enteries

1 2013.01.17 12:00 sell stop 1 0.06 1.60134 1.63134 1.59139 0.00 10000.00
2 2013.01.17 14:00 sell 1 0.06 1.60134 1.63134 1.59139 0.00 10000.00
3 2013.01.18 14:00 t/p 1 0.06 1.59139 1.63134 1.59139 59.14 10059.14
4 2013.01.22 14:00 sell stop 2 0.06 1.58449 1.61449 1.56401 0.00 10059.14
5 2013.01.22 18:00 sell 2 0.06 1.58449 1.61449 1.56401 0.00 10059.14
6 2013.01.29 12:00 sell stop 3 0.06 1.57056 1.60056 1.56542 0.00 10059.14
7 2013.01.30 11:00 sell stop 4 0.06 1.57514 1.60514 1.56542 0.00 10059.14
8 2013.01.30 12:00 close 2 0.06 1.57737 1.61449 1.56401 41.20 10100.34
9 2013.01.31 06:00 sell stop 5 0.06 1.57972 1.60972 1.56542 0.00 10100.34
10 2013.01.31 11:00 sell 5 0.06 1.57972 1.60972 1.56542 0.00 10100.34
11 2013.01.31 11:00 close 5 0.06 1.57940 1.60972 1.56542 1.50 10101.84
12 2013.02.01 16:00 sell 4 0.06 1.57514 1.60514 1.56542 0.00 10101.84
13 2013.02.01 21:00 sell 3 0.06 1.57056 1.60056 1.56542 0.00 10101.84
14 2013.02.05 16:00 t/p 3 0.06 1.56542 1.60056 1.56542 30.14 10131.98
15 2013.02.05 16:00 t/p 4 0.06 1.56542 1.60514 1.56542 57.62 10189.61
16 2013.02.07 11:00 sell stop 6 0.06 1.56836 1.59836 1.55478 0.00 10189.61
17 2013.02.07 15:00 sell 6 0.06 1.56836 1.59836 1.55478 0.00 10189.61
18 2013.02.07 17:00 close 6 0.06 1.57105 1.59836 1.55478 -16.56 10173.05
19 2013.02.07 17:00 sell stop 7 0.06 1.56836 1.59836 1.55478 0.00 10173.05
20 2013.02.08 11:00 sell stop 8 0.06 1.57469 1.60469 1.55478 0.00 10173.05
21 2013.02.08 12:00 sell 8 0.06 1.57469 1.60469 1.55478 0.00 10173.05
22 2013.02.08 12:00 close 8 0.06 1.57462 1.60469 1.55478 0.00 10173.05
23 2013.02.11 12:00 sell 7 0.06 1.56836 1.59836 1.55478 0.00 10173.05
24 2013.02.12 02:00 close 7 0.06 1.56581 1.59836 1.55478 14.74 10187.79
25 2013.02.18 13:00 sell stop 9 0.06 1.54645 1.57645 1.52345 0.00 10187.79
26 2013.02.18 16:00 sell 9 0.06 1.54645 1.57645 1.52345 0.00 10187.79
27 2013.02.20 20:00 t/p 9 0.06 1.52345 1.57645 1.52345 137.30 10325.09
28 2013.02.22 02:00 sell stop 10 0.06 1.52297 1.55297 1.51412 0.00 10325.09
29 2013.02.24 22:00 sell 10 0.06 1.52297 1.55297 1.51412 0.00 10325.09
30 2013.02.24 23:00 t/p 10 0.06 1.51412 1.55297 1.51412 52.68 10377.77
31 2013.02.27 11:00 sell stop 11 0.06 1.50790 1.53790 1.47904 0.00 10377.77
32 2013.03.01 10:00 sell 11 0.06 1.50790 1.53790 1.47904 0.00 10377.77
33 2013.03.05 10:00 close 11 0.06 1.51810 1.53790 1.47904 -61.90 10315.88
34 2013.03.05 10:00 sell stop 12 0.06 1.51222 1.54222 1.48433 0.00 10315.88
35 2013.03.05 16:00 sell 12 0.06 1.51222 1.54222 1.48433 0.00 10315.88
36 2013.03.05 16:00 sell stop 13 0.06 1.50749 1.53749 1.48433 0.00 10315.88
37 2013.03.06 10:00 sell 13 0.06 1.50749 1.53749 1.48433 0.00 10315.88
38 2013.03.07 07:00 close 13 0.06 1.50003 1.53749 1.48433 43.93 10359.80
39 2013.03.07 07:00 close 12 0.06 1.50003 1.54222 1.48433 72.17 10431.97

==========================================================================
Bars in test 2180
Ticks modelled 3353
Modelling quality n/a
Mismatched charts errors 0
Initial deposit 10000.00
Total net profit 431.97
Gross profit 510.43
Gross loss -78.46
Profit factor 6.51
Expected payoff 33.23
Absolute drawdown 0.00
Maximal drawdown 117.77 (1.13%)
Relative drawdown 1.13% (117.77)
Total trades 13
Short positions (won %) 13 (84.62%)
Long positions (won %) 0 (0.00%)
Profit trades (% of total) 11 (84.62%)
Loss trades (% of total) 2 (15.38%)
Largest
profit trade 137.30
loss trade -61.90
Average
profit trade 46.40
loss trade -39.23
Maximum
consecutive wins (profit in money) 5 (189.61)
consecutive losses (loss in money) 1 (-61.90)
Maximal
consecutive profit (count of wins) 204.73 (4)
consecutive loss (count of losses) -61.90 (1)
Average
consecutive wins 4
consecutive losses 1
User avatar
snailbeard
Trader
Posts: 615
Joined: Mon Dec 24, 2012 10:54 am
Location: Just above water somewhere between Oxford & Cambridge

Re: MNB 10.4 Streamlined by Snailbeard

Post by snailbeard »

This is great news that we haven't sabotaged the winning trades,
but I am still concerned about a number of losses despite a large stoploss and a perfect trend.
User avatar
snailbeard
Trader
Posts: 615
Joined: Mon Dec 24, 2012 10:54 am
Location: Just above water somewhere between Oxford & Cambridge

Re: MNB 10.4 Streamlined by Snailbeard

Post by snailbeard »

When trading manually it is useful to have an Alert about trend reversals on the main time frames.
These alerts are fall out from the MTF MA trend detection.
It would be useful to set up my mobile to pick these up so that I can spend less time at a desk

So the H1 might be scalp trades,

if H1 is followed by H4 then could be much longer
A) With main trend: 300 plus pips
B) pull-back: 100+ pips

example:

2013.01.14 09:00 GBPUSD.G,H1: Alert: Trend has reversed: Timeframe: H1
2013.01.14 16:00 GBPUSD.G,H1: Alert: Trend has reversed: Timeframe: -H4-H4-
2013.01.15 00:00 GBPUSD.G,H1: Alert: Trend has reversed: Timeframe: Daily
2013.01.15 02:00 GBPUSD.G,H1: Alert: Trend has reversed: Timeframe: H1
2013.01.15 05:00 GBPUSD.G,H1: Alert: Trend has reversed: Timeframe: H1
2013.01.15 10:00 GBPUSD.G,H1: Alert: Trend has reversed: Timeframe: H1
2013.01.15 11:00 GBPUSD.G,H1: Alert: Trend has reversed: Timeframe: H1
2013.01.15 17:00 GBPUSD.G,H1: Alert: Trend has reversed: Timeframe: H1
2013.01.16 01:00 GBPUSD.G,H1: Alert: Trend has reversed: Timeframe: H1
2013.01.17 03:00 GBPUSD.G,H1: Alert: Trend has reversed: Timeframe: H1
2013.01.17 09:00 GBPUSD.G,H1: Alert: Trend has reversed: Timeframe: H1
2013.01.17 15:00 GBPUSD.G,H1: Alert: Trend has reversed: Timeframe: H1
2013.01.17 23:00 GBPUSD.G,H1: Alert: Trend has reversed: Timeframe: H1
2013.01.21 14:00 GBPUSD.G,H1: Alert: Trend has reversed: Timeframe: H1
2013.01.22 05:00 GBPUSD.G,H1: Alert: Trend has reversed: Timeframe: H1
2013.01.22 10:00 GBPUSD.G,H1: Alert: Trend has reversed: Timeframe: H1
2013.01.23 10:00 GBPUSD.G,H1: Alert: Trend has reversed: Timeframe: H1
2013.01.23 18:00 GBPUSD.G,H1: Alert: Trend has reversed: Timeframe: H1
2013.01.24 09:00 GBPUSD.G,H1: Alert: Trend has reversed: Timeframe: H1
2013.01.24 10:00 GBPUSD.G,H1: Alert: Trend has reversed: Timeframe: H1
2013.01.24 11:00 GBPUSD.G,H1: Alert: Trend has reversed: Timeframe: H1
2013.01.25 09:00 GBPUSD.G,H1: Alert: Trend has reversed: Timeframe: H1
2013.01.25 13:00 GBPUSD.G,H1: Alert: Trend has reversed: Timeframe: H1
2013.01.29 05:00 GBPUSD.G,H1: Alert: Trend has reversed: Timeframe: H1
2013.01.29 16:00 GBPUSD.G,H1: Alert: Trend has reversed: Timeframe: -H4-H4-
You do not have the required permissions to view the files attached to this post.
User avatar
rosst
Trader
Posts: 280
Joined: Wed Feb 27, 2013 1:11 pm
Location: Austin, Texas

Re: MNB 10.4 Streamlined by Snailbeard

Post by rosst »

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

Re: MNB 10.4 Streamlined by Snailbeard

Post by snailbeard »

rosst wrote:WOW! Good work!
Thanks for the encouragement! All this heavy analysis is giving me a headache!

In particular how to catch on to the end of a trend before the end of a trend?

The signs are there but a retracement and the end of a trend look very similar unless you pull in some more information...
Post Reply

Return to “Nanningbob 10.x”