Your Idea ...
Your Expert Advisor ...
Your Way
By David M. Williams
CEO iExpertAdvisor, LLC
RE: Curve-Fitting, Survivorship Bias, Accelerated Failure and Custom Indicators
Or maybe you'd just like to build a few simple Expert
Advisors - tinker with them to help uncover that clever idea that's just
outside your reach.
Let's face
it, we both know that finding a good trading strategy takes time, patience and sometimes a little
luck.
But turning your strategy into an Expert Advisor should take none of these.
Well,
maybe a little time. But there
shouldn't be any luck involved - and it shouldn’t test your patience.
Used to be,
you needed the skills of an experienced computer programmer to build an Expert
Advisor.
Not anymore.
For the first time, non-programmers are no longer blocked from turning
their strategies into Expert Advisors!
And not just simple EA's - limited to simple buy or sell logic.
I'm talking about full blown, feature-rich EA's with Custom Indicators, Alerts,
Time-based trading rules - the works. This is a real breakthrough.
Listen,
less than 5 years ago, the only traders running automatic
trading systems were hedge fund managers and private traders that could afford
expensive platforms like TradeStation or the Interactive Brokers
API.
An Expert
Advisor - also called an EA - is a hands free, automatic trading system.
An EA
executes your trading rules with deadly accuracy.
24 hours a day, 7 days a week.
WHAT IS MQL?
MQL – Meta Query Language –
is the computer language used to write Expert Advisors. The syntax
and rules of the language are similar to the C programming language.
The first release of MQL was 3.0. The 3.0 language was more of a
scripting language. It was not easy to create structured
programs with 3.0.
Next 4.0 was released. This is currently the most popular version.
It is very powerful and easily allows functions to be created and
fully supports structured programming.
The latest release is 5.0. This release introduced the
concepts of object-oriented programming to MQL, as well as
backend upgrades to make it easier for brokers to support
MetaTrader.
You are probably not familiar with these terms, like scripting
language, structured programs and object-oriented programs.
And that’s OK!
These are terms for computer geeks
(like me). You don’t need to know these terms to build profitable
Expert Advisors. That’s what the Visual Traders Studio is all about.
WHAT IS METATRADER? MetaTrader is a Forex and Futures platform created by the MetaQuotes Company. The MetaTrader platform is supported by hundreds of brokers and is the fastest growing Forex platform with thousands of new traders joining each day. MetaTrader is free. When I first started using MT, some brokers added an extra 1-2 pips to the spread. Fortunately, the fierce competition in the Forex market forced almost all brokers to remove the extra charge. What makes MetaTrader unique is the support of Expert Advisors. All MetaTrader platforms, regardless of the broker, support Expert Advisors. |
And by the way, companies like TradeStation charge big bucks for their platform, and then they charge you for their data feed and then they charge you commission on every transaction! MetaTrader is free. So you can see that MetaTrader (MT) really is a game-changing opportunity. The platform is free, the data feed is always free and you can get a demo account from your choice of hundreds of brokers. What's funny about this, is that the MQL language which drives MetaTrader Expert Advisors is actually more powerful than the languages offered in those expensive, pay-as-you-go platforms. MetaTrader's Expert Advisors give you a great opportunity. And now it's easy for you to take advantage of this - just like the thousands of Forex traders that already have. Imagine the satisfaction of
watching the Expert Advisor you built consistently close
trade after profitable
trade. |
So What’s Behind A Consistent, Profitable Expert Advisor Anyway?
(Hint, It's
Not In Your DNA
WHAT IS AN EXPERT ADVISOR? An Expert Advisor is a computer program written in the MQL programming language. After an Expert Advisor has been correctly written and compiled, it is attached to a price chart on a MetaTrader account. The Expert Advisors resides on and runs on your local computer. An Expert Advisor’s logic is run each time new price data is sent from your broker’s server to your computer. The Expert Advisor recalculates indicators and executes its logic using the new price data. The EA is capable of doing anything programmatically that can be done manually, such as opening new positions and closing or partially closing positions. |
I speak with a lot of traders.
I know within minutes if they are doomed to
fail.
If you can't describe - in detail - how you
will open, close and manage your trading positions, then I know you're not
gonna make it. Sooner or later, you'll do something - something unplanned - that will wipe your account clean. To zero. Or at least trigger a margin call from your friendly broker.
It's sad, because it doesn't have to be
this way.
You may have heard the saying "Plan your
trade, trade your plan".
Traders that succeed plan all aspects of
their trade. Following your plan is a good start. Not following your plan will - beyond a shadow of a doubt - eventually lead to disaster.
And of course,
not even
having a plan makes failure
quick and certain. Seriously - you might as well
throw your money out the window. |
On the flip side, simply having a trading plan is more valuable than having any specific trading skill!
I know - this may sound hard to believe, but it’s been proven true.
This “Secret” was
Proven Almost 30 Years Ago
In 1983, the famous commodities trader Richard Dennis had an ongoing dispute with his good friend Bill Eckhardt about whether great traders were born or made.
Dennis believed he could teach ordinary people
to become great traders. Eckhardt
thought genetics were the determining factor.
They conducted the now-famous experiment called the "Trading Turtles". They gave very simple - yet precise rules - to a group of inexperienced traders.
The results were overwhelming. The traders
that consistently followed the simple rules had outstanding success.
The magic was in the
system - not in
the trader.
Well, your trading system gives you a better chance. Your trading system is your edge. Richard Dennis proved it - and traders (just like you) have been proving it to themselves for years. All professional traders follow a complete trading system - consistently. They don't just buy the EURUSD because they have a hunch. They buy or sell a currency when the market meets the exact conditions specified by the rules of their trading system.
|
CONSIDER THESE COMMENTS BY RICHARD
DENNIS ABOUT THE TRADING TURTLES “Most successful traders use a mechanical trading system. This is no coincidence. A good mechanical trading system automates the entire process of trading. The system provides answers for each of the decisions a trader must make while trading. The system makes it easier for a trader to trade consistently because there are a set of rules which specifically define what should be done. The mechanics of trading is not left up to the judgment of the trader. If you know that your system makes money over the long run it is easier to take the signals and trade according to the system during periods of losses. If you are relying on your own judgment during trading you may find that you are fearful just when you should be bold and courageous when you should be cautious. If you have a mechanical trading system that works, and you follow it rigorously your trading will be consistent despite the inner emotional struggles that might come from a long series of losses, or a large profit. The confidence, consistency, and discipline that a thoroughly tested mechanical system affords are the key to many of the most profitable traders’ success.” - Richard Dennis |
OTHERS HAVE REACHED THE SAME CONCLUSION Jack Schwager, while researching for his Market Wizard books, found that the most important characteristic of all the top traders and investors he interviewed was that they had adopted a trading system to fit them. Dr. Van Tharp, a leading authority on trading education, looks at a trading system as a business plan: "Ask the big hedge fund managers and professional traders to name their edges. At the top of their list, one edge will stand out: a meaningful business plan. These top traders see a business plan as a roadmap to their trading success." |
|
Love at First Sight – Really, I Mean it!
I've developed hundreds of MetaTrader Expert Advisors for myself and other successful traders for over 5 years now. After building so many Expert Advisors, I began to see a pattern. Over 95% of the EAs that I developed followed the same work flow.
So I began to
build tools to make the work easier. (After all, I am a programmer - so this came
easily.)
The result of
all this work is the Visual Traders Studio© for MetaTrader (VTS
for short).
VTS is a windows-based application that allows you to build Expert Advisors by dragging and dropping - without the need to know the MQL language. |
WHO
IS DAVID WILLIAMS? David Willliams is a Forex trader, an author, a trading system developer and the CEO of iExpertAdvisor, LLC. David has written two books on Forex: Automatic Alpha and MQL for Traders. Automatic Alpha has been selling on Amazon.com for over 3 years. David’s company, iExpertAdvisor, is a regular contributor to FxStreet.com, one of the Forex industries leading educational portals. iExpertAdvisor is a trusted online brand committed to providing best-in-class tools and education to Forex traders since 2004. |
To help these traders - and you - with your first Expert Advisor, I wrote a short white paper explaining what you need to look for in your first Expert Advisor. This paper is called The 3 Metrics to Watch When You Build Your First Expert Advisor.
The 3 Numbers You've Gotta Watch When You Build Your Expert Advisor I feel its imperative that you have this information. Sign up here and I'll email you a short PDF document that could end up saving you hours of work (and a lot of money!). |
Sounds Good Dave, But What's Wrong With Just
Buying An EA?
Listen, I'm not a pessimistic person - I
really believe that most people are good by nature.
But, boy, when it comes to MetaTrader Expert
Advisors, you gotta do your homework.
If you've been involved in Forex for a while,
you have probably come across hyped-up trading systems. Systems that claim to make you rich by about this time tomorrow.
Maybe you've even bought a few - there is no
shame in that. (I’ll explain the exact reason why later).
But let me tell you the ugly truth about some
of these Expert Advisors.
Sadly, it's very easy to manipulate
the results of an Expert Advisor - and make it look like a great market
performer.
First off: You cannot trust MetaTrader historical results.
HOW DO YOU CURVE-FIT AN EXPERT
ADVISOR? View a price chart for the time period that you are interested in – for example, the last 6 months. Start adding indicators to the chart. You’ll eventually notice some kind of pattern with some of the indicators. Perhaps each time two moving averages cross each other, the price spikes. But only when the sampling periods of the moving averages are exactly 5 and 11, and one must be an exponential moving average and the other is a weighted moving average. Also you noticed there were only 3 trades opened on Tuesdays and they were all losers, so you add a rule that prohibits trades on Tuesday. When you run a back-test using the moving average crossover and the Tuesday no-trade rule, the results are great. Now run the test over and over to optimize the stoploss and takeprofit. Give the Expert Advisor a fancy name and you are ready to go. Sound familiar? You may be thinking, maybe this is a good system? I can tell you from experience that it most likely is not. But, there is a sure-fire test that can be run to find out if an EA is curve-fit. It’s called the Robust Test. A description of the Robust Test is shown below. |
The MetaTrader back test
- which uses historical price data - is not very accurate. Even on
clean data. And most
vendors do not use clean data.
Also, it's easy to "curve-fit" an Expert
Advisor.
Curve-fitting means the Expert Advisor has
been built to work for specific historical data.
Rules are applied that work on that,
and only that, exact time period.
These rules are always too specific.
Statistically, they have a near-zero chance of working in the future! And Second: You can't trust go-forward
results either. Not even recommendations from satisfied users.
Most Expert Advisors can be configured by the user.
Hell, some even have the ability to reverse the trade: meaning what's
normally a buy signal becomes a sell signal and vice-versa.
If the same EA is run under 100 different
configurations, there is a pretty good chance that
one of the configurations will show a profit.
Does this mean it is a good EA?
(What do you think the chances are it will be
the configuration you choose? Please.)
By the way, this concept is called "survivorship bias".
Kind of implies that if 100 rats are flushed down a sewer, 1 or 2
will come out alive.
Doesn't have much to do with the particular rat - it just happens
sometimes. |
So even if you read recommendations - from actual
happy customers - they may just be one of the few lucky rats!
By the way, "survivorship bias" is not
limited to Expert Advisors. It affects any trading system (manual or automatic)
and even trade signal services. If You Get This, You’ll Win
Again, I’m not this pessimistic.
I think most vendors are honest and are trying to provide a valuable
service. But when it really comes down to it, you can only trust yourself.
Your edge is your system. Period. Only a tiny fraction of people can get their minds around this powerful truth. It's a switch in perspective that can change the way you trade the markets forever. Your Expert Advisor, built around your ideas, executed the way you see fit. |
THE
ROBUST TEST Curve fitting can be hard to detect. Generally speaking, when technical indicators are used - especially when many indicators are used - there is a possibility that the rules of the system have been “curved” to fit the price data. This can be done on purpose – but also, it can be done accidently. So I use a test first introduced by Chuck LeBeau in his book Computer Analysis of the Futures Market to test for robustness. Simply vary the inputs used to configure the indicators and record the change in performance. For example, if an EA using a 12-period moving average shows great results, but changing the moving average from a 12 period to an 18 period radically changes the performance, the EA is not robust. I speak more about the Robust Test in my book Automatic Alpha: How to Build a Winning Forex Trading System. |
What Are Your Choices?
Once you realize that your key to success in
the Forex market is your system -
your Expert Advisor, you need to set
about building your EA.
You can hire a programmer. This is a good option, but
it can be expensive. And it is a bit of a hassle.
The only way the programmer can create your EA is for you to tell him
precisely how your system works.
This can be difficult with nuances of your system.
If you throw in a cultural and language barrier it gets a lot harder.
Like they say, managing programmers is like herding cats!
You can learn MQL. If you have a background in
computer programming, the MQL language should not be too difficult to pick up.
If don't have any experience in programming, then you need to learn basic
programming and MQL.
This can be a steep learning curve.
Definitely worth learning, but expect it to take a while before you are
proficient.
You can use the Visual Traders Studio©. VTS allows you to turn a
trading idea into an Expert Advisor in minutes - without the need to know MQL.
Of course, if you like, you can learn MQL as you use VTS to build your
Expert Advisors.
Look, it’s all about speed.
One of the more fascinating secrets about developing an Expert Advisor is
that failure is good. Ok, not always
- but if your system is going to fail, better it fails
sooner rather than
later. This concept is called
"accelerated failure".
Why is
"accelerated failure" important to you? Because as soon as your Expert Advisor
fails you make changes - or abandon the strategy altogether - and you move on - quickly.
You don't pin your hopes to an unproven idea.
Most traders get stuck automating their Expert Advisor. Their EA could be the Holy Grail or it could be an absolute disaster, but they don't know yet.
They don't know because they've spent 6
months working on an Expert Advisor that should have been done in 6 days.
The power of
"accelerated failure" is fully embraced among serious trading system
developers. It separates the
professionals from the amateurs, the Do-ers from the Wanna-Bes.
Listen, when you leave your ego at the door, force your ideas to either show
promise or be discarded – then, at that point you are building and running Expert
Advisors just like one of those ultra secretive, deep-pocketed hedge funds!
What’s the Recipe For Developing an
Expert Advisor?
I call my recipe for developing Expert Advisors the Expert Advisor Development Cycle. It's simple - it's just the 6 steps you must complete to qualify your Expert Advisor for live market action.
When the performance on your demo
account is acceptable – and your EA has run through various market types
(trending, range-bound, volatile, etc), then your EA can be started on your
Forex micro or mini account and finally your standard account.
(Note - and this is an important point - the
behavior of the EA may be different on your micro, mini and standard account.
All three should be evaluated individually.)
Sadly, most traders get stuck inside the cycle
forever.
Why?
Because the nature of developing a trading system is iterative.
After an idea
has been implemented, its behavior almost always inspires more ideas - some
similar to the original idea - some completely new.
This is just the way the creative process works.
At this point, where your ideas begin to breed new and more creative
ideas – well, this is where the real magic happens.
And this is why your speed is important:
The faster you complete the cycle, the faster you perfect your trading
systems, the faster you are running profitable Expert Advisors.
When you can drop a bad idea like a bad habit,
develop new strategies based on your ideas that show promise, all at lightning
speed - then you are operating at the black belt level.
You've taken your edge - building
your Expert Advisor, your way -
and turned into a dominating - almost unfair - advantage.
With the Visual Traders Studio © you'll cruise through the development cycle and quickly
turn your ideas into Expert Advisors.
Using VTS:
ü
You do not
need programming skills ü You decrease your development time - from hours or days to minutes
ü You
easily reuse code by dragging and dropping
ü You share
ideas and strategies as visual diagrams |
I had an idea for an Expert Advisor using a custom indicator
I found on the internet. I was able to use the indicator in my EA
without writing any code. VTS really helped me out. -Nic P. |
OK, So Exactly, and I Mean Exactly,
What is the
Visual Traders Studio for
MetaTrader?
·
Note
·
Variable
·
Function
·
Logic
·
End
Correct MetaTrader 4 MQL code every time!
This is a screenshot of the VTS main workspace.
This is what the Elements look like when they are dragged onto the drawing pad.
Each Element provides 3 buttons along the bottom to provide help, information and the ability to configure the Element.
The Elements are connected using a links.
All Elements but the Logic Element have a simple In and Out connection point.
The Logic Element provides 2 Out connection points - a True and False. The system will follow the True link if the Logic's condition is true, otherwise it will follow the False path.
To create an new Expert Advisor, you click the New button and the New System window is displayed. You simply choose the type of system you would like to create and select OK.
You can use a Custom System to create your free-form Expert Advisor. The
QuickStart Systems create an Expert Advisor that uses rules to open and close
both Buy and Sell trades.
And then there are the Strategy Templates. These systems are ready to go
with the push of a button.
IndicatorSystem
ReversalSystem
TimeEntrySystem
PriceEntrySystem
BreakOutSystem
CrossOverSystem
Select one of these Strategy Templates and a complete system is drawn on the VTS
drawing pad.
* Any element of the system can be configured by clicking and selecting.
* Items can be added and removed by dragging and dropping.
* Push the Build button and the Expert Advisor is automatically built.
* The Expert Advisor is ready to be added to a chart on your MetaTrader
platform.
Strategy Templates are working Expert Advisors. They can be used "as-is" out of
the box, or they can be changed to meet your specific needs.
The QuickStart Systems and the Strategy Templates allow you to create powerful EA's using the System Managers.
The System Managers provide a whole load of powerful new functionality. Most of these features were requested by our current users.
The traders using VTS asked for this functionality, so I worked it into the next major release.
The Open Trade Manager is to define the values used when opening new trades.
The Trade Set Manager is used to define what Currencies your Expert Advisor manages.
The Trade Signal Manager is used to tell your Expert Advisor how to behave on subsequent Trade Signals.
The Trade Time Manager is used to precisely define the behavior of your Expert Advisor for up to 4 specific times period for each trading day.
The VTS application even allows you to launch your MetaTrader platform within the VTS workspace. This allows you to easily and quickly build your EA's and then attach them to your MetaTrader price charts.
To see the latest help files for VTS, click here.
The Visual Trader Studio for MetaTrader combines everything you need to seamlessly design, build and test your MetaTrader Expert Advisors in your way.
How Much For All of This?
VTS comes with 6 ready to go Expert Advisors (Strategy Templates) and allows you to personally create hundreds, even thousands, of custom Expert Advisors without the need to become an MQL expert. |
I was able to build 6
Expert Advisors within the first hour of using VTS – and I don’t
know any MQL! These were all EAs using my ideas, not some off the
shelf EA. –Edward G. |
Remember, with VTS:
ü
You do not
need programming skills
ü You
decrease
your development time - from hours or days to minutes
ü You
easily reuse code by dragging and dropping
ü You share
ideas and strategies as visual diagrams
Time-Limited "New Release" Special Offer
Automatic Alpha is an 80+ page eBook that fully describes the process of developing a winning trading system. Building a winning trading system can be an illusive task. Fact: Most traders will never develop a winning trading system without using the techniques described in Automatic Alpha. Click here to see the full product info.
Automatic Alpha Value: +$99
Total Bonus Value (yours at no cost): $257
I personally guarantee that
In other words VTS is a living product.
Best
The first release of VTS (version 1) was sold for over 2 years at the price of $247.
This latest version, Visual Traders Studio ©
for MetaTrader, includes a
complete upgrade of the user interface as well as loads of new features -
features requested by the traders that use VTS every day.
I've actually lowered the price.
The price of Visual Traders Studio © for MetaTrader is normally $299.
This special offer price, including all 3 bonuses, is only $187.
You save $122! Plus, you get $257 of bonuses for free!
30 Day Money Back Guarantee
If you don’t agree that the Visual Trader Studio,
along with the rest of these bonus products, are worth many times the $187 you paid
… if you can’t see how it will add a mountain of money to your bottom line …
just return it anytime in the next 30 days and I’ll promptly refund your money,
no questions asked.
Fair Enough?
Yours for Bigger Winners, More Often,
Dave Williams
David M. Williams
CEO iExpertAdvisor, LLC
Yes, I want the Visual Traders Studio © for MetaTrader, along with all 3 bonus products: Automatic Alpha, MQL for Traders and TrendLineAlert - ALL for the low price of $187 I understand that I’ve got a full 30 days to thumb through and start using the Visual Traders Studio. And if I’m not absolutely convinced that these tools can fatten my trading account – I can return it for a full refund, no questions asked. The Visual Traders Studio ©and all 3 bonus products are delivered electronically. They are available for immediate download. You can start running the Visual Traders Studio© minutes from now! |
Yes, I want the Visual Traders Studio© for MetaTrader at the low price of $147 I understand this offer does not include any of the 3 bonus products, but it does include the Life Time warranty. Also, I understand that I’ve got a full 30 days to thumb through and start using the Visual Traders Studio. And if I’m not absolutely convinced that this tool can fatten my trading account – I can return it for a full refund, no questions asked. The Visual Traders Studio© is delivered electronically. It is available for immediate download. You can start running the Visual Traders Studio© minutes from now! |
www.iExpertAdvisor.com