But as it turns out, some of us reported having various degree of success trading the EA and I have developed a healthy interest on the EA and I will be trying to make it better by fixing and improving it. If nothing else, you will like the fact that it will pick those Nanning 10.2 entries very well.
The original thread is http://www.stevehopwoodforex.com/phpBB3 ... f=44&t=552. You may want to go there if you want to follow the previous talk. It will be closed in due time and futher discussions and development will continue here.
To begin with, I am going to change a few things. The name of the EA will change slightly to Nanningbob 10.2 autotrader. This will help to distinguish it from the previous version since I expect we will have some major changes ahead.
The versioning also changes. There has been some confusion so here we will begin with 'Version 1.0'. This is the last version I posted on the original EA's home.
With that, here is the page one from the original.
SERIOUS WARNING
Most Forex traders lose all their money.
Using the robot posted here in trading Forex does not guarantee success.
Trading this robot could lead to serious financial loss.
Trading this robot without understanding its underlying trading strategies guarantees traders will lose their money.
This is not a set-and-forget ea. There is no such thing and anyone who tells you there is, is either a liar or an idiot. This EA will need manual intervention.
At best, a trading robot is only 90% as good as the manual strategy it trades. At best. At worst, it can be much less effective. If the strategy is rubbish, so is the robot.
To trade this robot, you have to understand:
How to use EA's.
Trend trading and retracement, Range trading and Counter Trend trading. You will get all of this from http://www.forexfactory.com/showthread. ... ost4846473
This EA is an attempt to trade the system Bob describes at http://www.forexfactory.com/showthread. ... ost4846473 You must understand the system to know how the EA will work. If you cannot be bothered to work out the system, then go away now and do not attempt to use the EA. You will kill your account. Quickly.
DO NOT USE THIS EA ON A LIVE ACCOUNT. IT IS EXPERIMENTAL.
To run the EA, you will need the attached 10.2 indi's in your Indicators folder. You do not need them on your chart.
verb's codex
What follows is informed by verb's codes, attached. verb has provided a superb summary of trading requirements. You must not regard this as a rescue from needing to read and understand Bob's trading system. You can use this as a 'check list' before pulling the trigger on a trade.
So, to business
Currently, NB trades:
- D1 chart:
- go long when:
- Slope is >= 0.4
- Woh is green (i.e. > 0)
- there is a cross upwards of either the blue ma line or the monthly pivot
- price is above monthly pivot
- price is above weekly pivot
- go short when:
- D1 Slope is <= -0.4
- D1 Woh is orange (i.e. < 0)
- there is a cross downwards of either the blue ma line or the monthly pivot
- price is below monthly pivot
- price is below weekly pivot
- H4 chart:
- go long when:
- H4 Slope is >= 0.4
- H4 Woh is green (i.e. > 0)
- there is a cross upwards of either the blue ma line or the weekly pivot
- price is above monthly pivot
- price is above weekly pivot
- go short when:
- H4 Slope is <= -0.4
- H4 Woh is orange (i.e. < 0)
- there is a cross downwards of either the blue ma line or the weekly pivot
- price is below monthly pivot
- price is below weekly pivot- for all the above, you can turn the price above/below monthly and weekly pivots filter off by setting EnforcePricePivotIntegrity to 'false'
- Range trading. Turning TradeRange to 'false' disables Range trading. Currently, there are two types of Range trades:
Bollinger Bands triggered trades. UseBollingerBands must be set to true to allow this. NB trades back towards the weekly pivot.
- go long when:
- D1 Slope shows an upward bias i.e. >= 0.4
- H4 Slope is < 0.4
- market is below the weekly pivot by MinimumRangeTakeProfit.
- market has moved back above the lower BB line from below.
- go short when:
- D1 Slope shows an downward bias i.e. <= -0.4
- H4 Slope is > -0.4
- market is above the weekly pivot by MinimumRangeTakeProfit.
- market has moved back below the upper BB line from sabove
- the inputs section allows you to play with the settings. BbTimeFrame is the input that controls the time frame NB consults for range trading, and defaults to the H1 chart.
- range trade the weekly cross. TradeWeeklyPivotCross must be set to true to allow this. I came across this gem from Bob at:
viewtopic.php?p=13188#p13188. "Range trades will be SRFs and crossing main pivot lines as range prices go back and forth. In other words price just keeps ranging between S1/R1 on non volatile pairs and S2/R2 on more volatile pairs. This causes it to cross the pivot line and you get to use tight SL there if you want or try a 2nd level recovery at S/R 1 lines. I got to see these in April while I was testing and the system worked very well. May was great for trending. You will love
the system because it does work both ways. You just haven't been able to see it yet.
The slope stays inside the 8 lines showing that there is only one real trade available so go the other way when price crosses the pivot line. You wont believe how many times it will work. The buy/sell bias of the slope will tell you which way you have a better chance of getting to the next S/R line for your TP. It is a thing of beauty."
- Trading conditions are:
- D1 Slope must have a clear buy or sell bias. H4 must be ranging.
- trades are taken at the cross of WP, in the direction of the D1 Slope.
-- tp and sl are the relevant resistance and support levels i.e. weekly R1/S1 for trading groups 1, 2, 3, and R2/S2 for the rest.
Cross verification
For this, we have Alex (al3xx) to thank. What this does is to avoid situations when you load the EA on the chart and it picks a cross that happened 50 or more pips ago as a valid entry. I don't want this... I want to catch the cross at the moment it happens. So we check the distance between price and the crossed line and if it is more than a set number of pips it is not valid.
Correlation
Thanks to hopfi2k who sent me the following changes. When applying the EA to many (most) available pairs, it often happens that pairs moving into the same direction have open trades (correlation). I added a correlation filter that checks before a new position is opened against all open trades if there already is a high correlation (adjustable, default to 80) and doesn't open that position.
This usually greatly helps to avoid situations where all correlated pairs go south in case a trend changes or news have an major impact.
Adaptive take profit exits
I have started work on these. NB has the breakeven/trailing/jumping/candlestick_trail features adapted from mptm that come will all my bots these days. I have added the part-close feature, so read how to use it in the mptm user guide.
I have coded NB to override any TakeProfit value if the D1 Slope is >= 0.8 or <= -0.8. Instead NB will use the Breakeven and Jumping stop features to manage the trade. You will see on your chart that these are enforced, so make sure their default values are those you want. By default, the bot uses the 25/10 breakeven that is becoming the norm, and a jump of 50 pips. When the trade closes, the settings return to your choice.
Where the D1 Slope is not in the buy/sell-and-hold areas, NB looks for the next full Support or Resistance level (monthly pivot, R1, R2 or R3 for a buy or monthly pivot, S1, S2, S3 for a sell) that is at least MinD1TrendTradeTpPips away from the order open price. If the trade was triggered by the H4 chart, the tp is the next appropriate S/R: weekly R1/S1 for sub group 4 pairss; weekly R2/S2 for group 4 and 5 pairs.
Adaptive stop loss exits
ATR Stop loss calculation. Described in page 25 http://www.stevehopwoodforex.com/phpBB3 ... &start=240
UseATRStopLoss setting enables the feature. The rest of the settings that follow are pretty straight forward and just allow flexibility on ATR calculation.
If StopLoss is zero and UseATRStopLoss is false, NB adopts these strategies for setting a stop loss:
- D1 trend trade:
- buy: MS2 for groups 4 and 5, MS1 for groups 1 - 3.
- sell: MR2 for groups 4 and 5, MR1 for groups 1 - 3.
- D1/H4 trend trade:
- buy: WS2 for groups 4 and 5, WS1 for groups 1 - 3.
- sell: WR2 for groups 4 and 5, WR1 for groups 1 - 3.
- Bollinger Band range trades:
- buy: top BB line.
- sell: bottom BB line.- weekly pivot cross range trades:
- buy: WS2 for groups 4 and 5, WS1 for groups 1 - 3.
- sell: WR2 for groups 4 and 5, WR1 for groups 1 - 3.
Take profit and stop loss line
Where the trade has stops, then NB draws lines that represent the sl/tp +- HiddenPips. If you manually move the lines, NB should adjust the stops to reflect the new line values. Each line consists of a prefix ('Tp' or 'Sl') followed by the trade's ticket number. Hover the mouse over a line to see which trade 'owns' it, if you have multiple trades open on the chart.
Time frames
You have no choice about using D1 for overall direction finding. Trading strictly according to the system, the lower time frame should be the H4, but I have included the LowerTimeFrame input so that inveterate tinkerers can tinker inveterately. This also means that you can switch from one tf to another on your chart without mucking up the bot's calculations.
Magic numbers
These are how NB knows which trade was triggered by which trigger - D1 trend, D1 trend/H4 trigger etc. Hover the mouse over the ticket number of an open trade and you will see the trade's ticket number and magic number displayed.
Thanks to hopfi2k you can now set majic number to zero and it will be generated automajically. The explanation from hopfi2k:
Concerning the problems of rapidly new trades of the same pair that some users report, I think its a problem of the magic numbers. Attaching the robot to multiple pairs without changing all magic number to unique values can led to unexpected results
Balance, margin and swap filters
Read how these work in the attached Shell User Guide. Much that is in the guide is not relevant here, so ignore it. Watch the swap filters especially; I loathe seeing my profits eaten by the criminal negative swap on the Cad, Aud, Nzd pairs, and these are always set to buy only.
Sunday candle
NB will not trade the Sunday candle.
Exceptionally useful summary posts
viewtopic.php?p=14036#p14036
viewtopic.php?p=14042#p14042
In conclusion
There is no way in the world that an EA can come better than within hailing distance of Bob's skill as a trader. What it does do brilliantly is: monitor the markets all day round; remove the human emotion element from trading. Let's see how close we can drag NB to being as good as its system designer.
Matters of general interest
Read this post:
http://www.forexfactory.com/showthread. ... ost4923611 Newbie traders, read this for inspiration and warning. Those of you who have suffered losses, read it for inspiration. There is a thread devoted to Sam's trading method at http://www.forexfactory.com/showthre...25#post5118825
Masterly summary of hedging: http://www.forexfactory.com/showthread. ... ost4977179
EA coding
I receive may requests to code EA's. Traders, if I code your EA for free, then I will share it here. If you want me to code your EA without sharing, then my fee is $100 payable into my paypal account. I explain why at http://www.forexfactory.com/showthread. ... ost4431794, at the bottom of the post.
Useful utilities/EA's/scripts
Matt's chart-population script at viewtopic.php?p=5733#p5733. Use this every time you start a fresh platform.
MaryJane has posted a fabulous utility to allow us to resize EA input windows: http://www.forexfactory.com/showthread.php?t=299017
Multi purpose trade manager: http://www.forexfactory.com/showthread.php?t=89371
Account equity analyser: http://www.forexfactory.com/showthread. ... ost4693716 Also at http://www.forexfactory.com/showthread. ... ost4709098, which includes a template for both USD and the Euro.
Past-trades display indi by squalou; shows a graphical display of the success/failure of trades in your History tab. Breathtaking piece of work. http://www.forexfactory.com/showthread. ... ost3830610
My shell EA – the code I use to produce EA's so quickly. viewtopic.php?f=5&t=15