Education

Trade Exit Quality

Test your EA’s Trade Exit

A little over 100 years ago, in 1903, the Wright Brothers achieved their monumental goal of flight at Kitty Hawk, North Carolina.

Most people don’t know that there were quite a few other people trying to build an airplane at the same time. One was Alexander Graham Bell; another was the President of the Smithsonian Institution.

All of these men were much better funded than a certain little-known pair of bicycle shop mechanics from Ohio with a wind tunnel in their garage.

But there’s a key difference that led to the Wright Brothers’ success.

The other guys focused on making a more powerful engine.

Orville and Wilbur Wright focused on the plane.

plane

Specifically, the Wright Brothers built their airplane as a glider without an engine – then mounted the engine later, almost as an afterthought.

They flew it in the breeze first, then added power later. That was the key to their success. They discovered that when you’re building an airplane, the wings are more important than the engine.

What does this have to do with Forex Trading?

When you build and test an Expert Advisor you need to focus on the part that’s really important.  The part that’s responsible for the bottom line.

Most traders spend their time and energy searching for the perfect trade entry.

But the fact is, the entry does very little for most trades.  Gets it started in the right direction, but that’s about it.

It’s the trade exit that makes the money.  Or loses money. Both of these goals are equally important:

(1)  Squeeze every bit of profit from your winning trade like wringing water from a washcloth.

(2)  Drop a losing trade faster than you can say “margin call” and stop the bleeding right away.

In the 3 Metrics PDF I describe a simple method I use to test the quality of my exits.

For each winning trade I make a note of when the trade was closed.  Then I look to the left and the right on the chart and find what the optimal exit time would have been.

I study the price action or indicators values around the optimal time and see if I could improve my exit strategy.

You can use the “exit test” the same way the Wright Brothers used the wind tunnel in their bicycle shop. To perfect the airplane before going out to “the big time.”

NOTE:  Right now I test my exits manually, but there has been talk on our forum about adding a method to test the quality of an exit inside of an EA.  If there is enough demand for this I’ll add this feature to a later release of VTS. That’s the way we roll.

What’s the difference between an Expert Advisor and an MQL Script?

Expert Advisor vs. MQL Script

What’s the difference between an Expert Advisor and a Script?  I get this question a lot.

Both are written in MQL, so they both have access to the library of MQL functions for opening and closing trades, finding indicator values and even sending emails.

One difference is that Scripts are located in their own folder underneath the “experts” folder on your computer.

Also, Scripts appear under their own menu in the MetaTrader platform.

But, the biggest difference is that a Script executes just once, while an Expert Advisor executes each time a new price value is received.

Yeah, I know that last part is a mouthful:  “executes each time a new price value is received”.

This is how it works:  Your Expert Advisor, physically located on your computer, waits for new price data to be sent from the broker’s server.

metatrader-tick

When new price data is received, your Expert Advisor executes.  If there isn’t any new price data, your EA does not execute.

You might have noticed that when the market is slow your EA does not run.  This behavior is correct!

EA’s are designed to execute their logic based on changes in price.  (Remember, a change in price will usually lead to a change in an indicator value.) If there is no change in price, there is no reason for the EA to execute.

But there’s a subtle by-product of this behavior that you should be aware of.

If your EA contains logic that is solely based on time, it may not execute exactly the way you planned.

Suppose your EA is designed to open a trade at 8:00, but the market is slow and there is no price movement at that time.  Well, it ain’t gonna happen.  Not at 8:00.

Because your EA will not even execute if there is not a change in price.

But, if your EA is written correctly,  it will execute on the next price change after 8:00.

Honestly, this is usually not a big deal.  That trade scheduled for 8:00 will normally be opened within a few seconds of 8:00.

Still, it’s good to be aware of these nuances. You should understand the behavior of your EA under any market condition.

If you’re interested in more of this kind of information, I’ve put together a free email course that spoon-feeds MQL .

You can sign up here:

http://www.iexpertadvisor.com/free-metatrader4-mql-course.html