Algorithmic and Mechanical Forex Strategies | OneStepRemoved

  • Articles
  • Sophisticated Web Sites
  • Automated Trading
  • Testimonials
  • Contact

Don’t start with a forex robot

July 30, 2013 by Edward Lomax 2 Comments

I am a profitable trader and I trade real money. The long journey to become a successful trader ended with me achieving my goals. As I understand it, the goal of becoming a profitable trader is one that many people have, but few people achieve.

I moved to Chile with my wife to help with her father who suffered from various strokes. Besides getting used to living in a foreign country, I had to figure out a way to make money. Long story short, I wrote and sold fitness books on the Internet. Eventually, I became interested in other online money making opportunities, which led me to trading Forex. (Since I had to deal with currency exchange in my real life every day calculating what things cost, I often wonder what took me so long to get into Foreign Exchange).

My first experience with Forex trading was with Forex trading robots. I, like many others, fell for the dream of trading on autopilot without having to learn anything. After all, this is what most of the Forex robots promise to deliver and it sounds perfect.

Forex Trading Robots Are NOT A Good Starting Point

Getting a Forex robot pre-programmed with a proven trading strategy sounds like the perfect place to start your trading journey. Using a commercial trading robot should allow you to skip the lengthy learning curve and jump straight to profits. Buy a profitable robot, put it on your account, become an instant Forex trading success and start buying all the expensive cars and houses you’ve always wanted.

I, like many others, fell for the dream of trading on autopilot without having to learn anything

Well, if it was that easy, where are all the Forex trading success stories? Yes, we hear the success story of the person SELLING the robot on the sales page. But where are all the rich, happy people as a result of buying the trading robot?

I think a lot of people fail to make money using a Forex trading robot because they lack the knowledge and experience necessary to evaluate the robot properly. Starting your trading journey with pre-programmed expert advisors is not the way to go. You first need to understand what trading is all about, how hard it is and what to expect in terms of monthly gains and long term rewards.

Forex Robots And The Fall Of Communism

I studied and received my degree in philosophy. There was something about communism that always stood out for me. Communism was a philosophy that doomed Russia to failure from Russia still had a Feudalistic social system, and therefore did not know of the evils of capitalism. Since communism was supposed to evolve out of capitalism and correct the injustices, Russia really wasn’t the right place to put communism into practice. Eventually, it failed.

So, what does this have to do with using Forex robots?

If you don’t already know about trading manually, it is hard to evaluate or appreciate trading on autopilot. Many times the unrealistic expectations of the robot users is the real problem, and not the robot itself. Dreams of instant wealth conflict with the reality of trading, and when those dreams are not met, the robot is abandoned without being given a fair chance.

In short, it is hard to evolve into a successful Forex robot user unless you have previous trading knowledge and experience. When you know how hard it is to have consistent and profitable trading results, you’ll appreciate a robot that puts profits in your account. When you appreciate the robot, you’ll be more likely to use it for the time necessary to reach your long term trading goals.

Building Your Own Forex Robot Should Be The Conclusion Of Your Journey

From my own experience, I can say that using a Forex robot should be at the END of your trading journey. Only after you’ve learned what type of trader you are and what system you want to trade should you consider automating your trading. Only then will you appreciate the trading results you get on autopilot.

So, I think many people are approaching Forex trading from the wrong direction. They are looking for a shortcut to skip the time and effort it takes to learn how to trade. They think they can just get the robot from someone else, and they will be instantly profitable.

But, even if the robot is profitable over time, most people won’t trade it long enough to see the profits they desire. Since they don’t know how hard it is to trade, they are always going to expect more. They want to see profits every day and don’t want to have to deal with losses. Well, that is just not what trading is all about.

The truth is, automated trading is not necessarily better than manual trading. Yes, it might help fit trading into your lifestyle and keep you from missing trading opportunities, but it does not replace a solid trading system, professional money management and patience. Therefore, I find it better to try to evolve into automated trading by first focusing on determining what type of trader you are (scalper, intraday trader, swing trader, end of day trader, etc.), and finding the right trading strategy for your personality.

Luckily, I did not give up after my first experiences with commercial Forex robots. I became a student of trading and stuck with it until I found something that worked for me. In this series I want to go over my experiences with scalping, intraday trading, swing trading and end of day trading. In the end, I want to share with you a trading plan I use to measure my progress on my way to achieve my long term goals.

If you’ve had negative experiences with commercial Forex trading robots that potentially derailed your trading success, please leave a comment below.

Filed Under: How does the forex market work?, Trading strategy ideas Tagged With: expert advisor, forex robot

Deciding Trading Strategy Time Frame

May 7, 2013 by Edward Lomax 1 Comment

Over the next few weeks I’ll be going over 6 characteristics important when building a trading strategy. A lot of people want to create a trading strategy, or have a trading strategy automated by building an expert advisor. It is important your strategy, whether to be traded manually or automated, takes into account these characteristics if you want the strategy to be built on a strong foundation.

What Time Frame Is Best To Trade?

You’ve probably struggled with this question before. Figuring out what time frame to trade is the first thing you need to do. In a way, the way you answer the question defines both your trading strategy and you as a trader.

  • If you trade the lower time frames like the M1, M5 or M15, your strategy might be considered a scalping strategy and you are a scalper.
  • If you trade the M30 or H1 time frames, your strategy might be considered an intraday strategy and you a day trader.
  • If you trade the H4 or D1 time frames, your strategy might be considered swing trading and you are a swing trader.
  • And if you trade on the W1 or MN, your strategy might be considered investor style and you are a position trader.

I would like to tell you there is one BEST time frame to trade from, but that is just not the case. The time frame you decide to trade from is a personal decision and depends on your trading style and personality. You are going to have to make the decision for yourself.

  • If I told you trade off the Daily time frame and you want to be an active trader getting into and out of the market all the time… this is not going to be a good fit.
  • If I told you to trade the 5 minute charts and you want to get in and hold positions… you are going to get very frustrated.

Just keep in mind, there is a right time frame for both your strategy and you as a trader. Aligning your trading strategy to your trading personality is essential for long term success. (And yes, that is also true if automating your trading by building an expert advisor).

Select a strategy time frame

Choosing the right time frame to trade is critical for running a live strategy

Time Frame Concerns For Expert Advisor Builders

Since people here are primarily interested in creating an automated trading robot, I want to discuss time frame choice in light of automated trading.

Smaller Time Frames: One of the main reasons someone wants to create an automated trading EA to trade the smaller time frames is because they don’t have time to trade. They have a trading system they want to use, but have a hard time trading it live in the markets. Creating an expert advisor is a solution to this problem.

Another reason people want to trade the lower time frames is because they think they are more profitable. Lower time frames present more trading opportunities and require smaller stop losses. Therefore, the thought is you can trade more often with a higher lot size and make more profits.

Concerns About Lower Time Frame Trading: The truth is, the lower time frames are not as reliable as the higher time frames. While there are more trade setups which allow you to get into the market more often, those setups have a lower probability of success.

Yes, using tighter stops gives you the opportunity for higher profits. But this can turn on you quickly if you your win rate is lower or if you don’t have a good risk to reward to begin with. What starts out as the desire for higher profits can quickly turn into higher drawdown.

Don’t make the mistake of thinking an automated system trades BETTER than a real trader. Automating your trading can keep the trading strickly by the rules and keep you from missing trading opportunities… but the challenges of trading on the lower time frames still exist. And even though you automate the trading, this style of trading needs to fit your trading personality.

Higher Time Frames: Higher time frames have less trading opportunities, but higher probability of success. There is just less market noise on the higher time frames. Random movements in price do not effect your trades as much as they would on the lower time frames.

One of the best traits a trader can have is patience. Training yourself to be a patient trader and using the higher time frames can pay off big over the long run. Many traders on the lower time frames burn themselves out because of the stress of being in the market all the time. Frankly, you can’t make any money at all trading if you burn yourself out and quit trading.

Concerns About Higher Time Frame Trading: I think people are not accustomed to thinking of automated trading on the higher time frames because of commercial robot makers. They want to show exciting results over a short period of time, and higher time frame trading does not provide for this. Therefore, they concentrate on lower time frames, scalping strategies and explosive profits in the short run.

The short term focus created an environment where people think automated trading is only for lower time frames. This is definitely not the case. Higher time frame strategies can also be automated. But again, you are only going to stick with higher time frame trading if it matches your personality.

So, if you want to build your own strategy, or automate a strategy, you first need to figure out what type of trader you are. I know, I know, you want to make as much money as possible as fast as possible. But that view will not sustain you over the long run. The most important thing you can do is match your trading strategy to your personality and work from there.

Read the next article in the series of the Top 6 Charachteristics of a Winning Trading Strategy: How to pick the direction of a trend

Filed Under: Trading strategy ideas Tagged With: expert advisor, time frame

Using Expert Advisors for a Discretionary Trade

April 26, 2013 by Edward Lomax Leave a Comment

Over the past couple of weeks, I’ve been going over how manual and discretionary traders can use expert advisors as tools to make their trading easier, faster, more accurate and potentially more profitable.

I want traders to understand that expert advisors (or robots, or EA’s), are not just for automated trading using someone else’s trading strategy (or one you have programmed yourselves). You can also use EA’s before placing the trade, to place the trade and after the trade is placed.

Why Place Trades Using An Expert Advisor?

I use Metatrader4, so I want to go over a little trading scenario that used to happen to me all the time. I tend to be a level headed person before the trade and look for the best setups. Stress only kicks in once the live trade enters the market.

You see, in my opinion, placing a discretionary trade in Metatrader4 is uncomfortable. It is clunky. And for me, it is too easy to make a mistake. The truth is, I’m not very good at numbers and dealing with numbers makes me nervous. (I know, kind of weird coming from a Forex trader, right?)

Here is what I mean…

A discretionary trade might use support and resistance

The EURUSD price of 1.3085 doesn’t stick out to Edward.

Some people are very comfortable talking about the market in numbers. They say things like, “When the EURUSD reaches the 1.3085 level, I’m looking to sell”. And in their minds they can visualize this level. I have trouble with this and need to see the level on the charts… like drawing a horizontal line at that level, for example. I cannot be the only one with a brain that works like this.

When I have to place a trade, say a pending order, in Metatrader4… having to deal with numbers makes me nervous.

  • I need to figure out the number to place the pending order.
  • I need to figure out the number to place my stop loss. This means adding or subtracting, and knowing how to do this on different currency pairs.
  • I need to figure out the number to place my take profit. Again, more adding and subtracting.
  • I need to figure out the lot size based on my money management strategy.
  • I need to figure out the risk to reward ratio to see if I want to take the trade or let it pass.

Like I said before, this might not be a problem for some of you. But for me, all this calculating and plugging into MT4 is very stressful… and compounded by the fact I’m trying to get into the market while it moves. There is just too much room for error and I end up having to re-check my calculations and inputs over and over again.

I fixed this problem by using an expert advisor that helps me place trades in MT4. I can program certain parameters, place trades by moving lines on the chart (very visual), and automate things like calculating the proper lot size to use. (As a matter for fact, there is an advanced money management formula hard coded). Basically, when I want to get into the markets, all I do is use the expert advisor to set up the trade visually and hit a button.

Reasons Why I Use An Expert Advisor To Place a Discretionary Trade

There are two main reasons I place my manual trades using an expert advisor…

Less Stressful: As I stated above, dealing with all those numbers and inputting them into Metatrader4 drives me crazy. When all I want to do is get into the markets as fast as possible, I’m stressing about numbers, math and putting the numbers in properly.

More Accurate: Automating the process with an EA has the added benefit of being more accurate. I’m less likely to make a mistake in my calculations or entry of the numbers into MT4. I can accept losing trades… but not when they happen because I made a stupid mistake placing the trade.

In short, manual trading is hard enough… so any time you can reduce stress and eliminate errors, you should take it.

Why You Should Build Your Own EA To Place Trades

Once you’ve been trading for a while and finally define yourself as a trader, your job becomes repetitive. You have a set of rules, and you follow them over and again. The steps you take to place the trade are UNIQUE to you. Therefore, it is a good idea to use a trading tool (in this case an EA to place the trades), that is designed specifically for the way you trade.

Let me give you an example…

I had an EA developed to help me manage the trade after they were placed. (This is something I’m going to talk about in the next post). I gave this Trade Management EA away to other traders. Inevitably, they would get back to me and ask for something to be changed or added.

They wanted the EA to do exactly what they wanted… and what I gave them was not exact enough. Basically, they did not want to change the way they like to trade to fit the tool… then wanted the tool to be changed to fit how they trade. Well, since I am not a programmer, I could not make all the changes these traders needed.

So, I know first hand how important it is to have the tool (the EA you use to place the trade), be EXACTLY built to the needs of the individual trader. I hope this sparks some ideas about how to use EA’s when placing the trade.

On Tuesday, I want to go over my favorite topic concerning manual traders using expert advisors. It has to do with using an EA for trade management after the trade is placed and automating your exit strategy.

Have any ideas for placing discretionary trades with an expert advisor popped into your head? Share your ideas in the comment section below.

Filed Under: MetaTrader Tips Tagged With: discretionary, expert advisor, manual

Custom Indicators and EAs for Manual Trades

April 23, 2013 by Edward Lomax 2 Comments

Recently I’ve been writing about how manual traders can use expert advisors as tools. Since most people believe expert advisors are only used to automate trading and replace the trader, I think some traders are missing a great opportunity to use expert advisors as trading tools to make their trading easier, more accurate, less stressful and potentially more profitable.

If you missed the other posts in the series, you can see them here:

  • 5 Ways Manual Traders Can Use An Expert Advisor
  • Using Expert Advisors For Trading Strategy Creation And Optimization

Using a Custom Indicator or Expert Advisor Before Placing a Manual Trade

If you are a manual trader there are 4 areas using an expert advisor can be used to improve your trading. Let’s take a look at each one.

A manual trader sitting in front of charts

A manual trader parked in front of charts

Identify Trade Setups: A lot of traders use trading systems where a number of indicators must be in agreement to trigger a trade entry. If you have all the indicators on your charts, this can make for a very cluttered trading environment. To clean the charts up, you can create an indicator to alert you when all the trading requirements are met.

For example, instead of having all the indicators on the chart, you can have an arrow indicate when all the trading conditions are met. This can help you identify only the trade opportunities when ALL conditions are favorable for taking a trade. This avoids forcing trades or misreading the indicators because you want to get into the market.

Send Email Alerts: Instead of sitting in front of the charts all the time looking for trade setups, you could have an indicator programmed to send an email alert when the trade setup appears. Manually trading can be very time consuming and exhausting. Email alerts can help greatly by allowing you to step away from the computer screen without missing good trading opportunities.

I’ve personally done this a lot and even bought a Blackberry phone so I would be notified immediately when the email is delivered. I set up a Gmail account that I only use for alerts. The Blackberry is programmed for notifications when an email arrives.

Calculate Lot Size: When a trade opportunity presents itself, you want to get into the market as soon as possible. This is especially important if you are trading from the lower time frames or using a scalping strategy. A few pips difference between when you identify the trade and when you enter the trade could make a lot of difference.

Instead of spending important time figuring out the proper lot size to use, you could have an EA build that figures out the lot size to use for you. If you are using a lot size formula which requires calculating lots based on percentage of account balance and stop loss value, this can be time consuming and best done automatically to avoid mistakes and delays in entering the trade.

Calculating Risk To Reward: I personally only want to take the best trade setups that have a good risk to reward ratio. I’d rather miss a trade by being selective than put my money at risk unnecessarily. EAs and scripts that can calculate the risk to reward ratio on the trade I’m about to take?

These are just some of the ideas of how to use an expert advisor as a manual trader before the trade is placed. You might be able to think of some others. Now let’s take a look at the benefits of using an expert advisor to help you make the best trading decisions.

Benefits Of Using An Expert Advisor Before The Trade

Reduce Time In Front Of Charts: Let’s face it… trading can be time consuming. If you are waiting for the right trading conditions, you could be staring at your charts for a long time. Some days, the trading conditions might never trigger a trade. Using an expert advisor to alert you to trade opportunities allows you to step away from the charts.

Not staring at your charts for long periods of time is important for another reason. The longer you look at your charts, the more likely you are to start seeing trading opportunities. The temptation to get into the market is so great you might start seeing trade setups that are not according to plan. Using an expert advisor to identify and alert you to only the best trade setups ensures you are only taking the best trades.

Sticking To Your Trading Rules: Using an EA can help you identify only the trade setups that meet the rules of your trading system. But they can also help you be more accurate in your trading. For example, you can limit your trading to only the trades with a good risk to reward ratio. Plus you can make your trading more accurate by automating your lot size calculation and avoiding costly mistakes or entering high risk trades on a whim.

Conclusion

Some manual traders do not like expert advisors because they want to make the trading decisions themselves. That is great. But you can use expert advisors to help you make those trading decisions before the trade is placed. I hope this has sparked some ideas you might apply to your manual trading.

On Friday I want to go over how you can use expert advisors when you are placing the trade. Do you have any ideas you’d like to share? Let me know in the comments section below.

Filed Under: Trading strategy ideas Tagged With: custom indicator, discretionary, expert advisor, manual

Selling EAs in the MQL5 Market

April 19, 2013 by Shaun Overton Leave a Comment

MetaQuotes decided to follow the Apple iTunes model for the forex market through its MQL5 market. The company, which is the developer and owner of MetaTrader, has taken the numerous ideas of independent web sites and attempted to put them all under its umbrella.

A lot of traders have been screaming about this, especially in the past few weeks. MT4i is a popular web site that built unauthorized plugins that modified the behavior of MT4. The plugins were wildly popular. Unfortunately, they also violated the software usage agreement that forbids modifying the software.

If you want to work with MetaTrader in a commercial environment, then you are forced to play by the rules that they set. With that in mind, I wanted to write some of the pros and cons of why you might consider using the MQL5 Market.

MQL5 market web site

A screenshot of the MQL5 market web site.

Advantages to using the MQL5 Market

I read Nassim Taleb’s Antifragile a few weeks ago. A predominant theme that he loves to hit on is finding opportunities that have little downside and infinite payoffs. Selling an expert Advisors very much fits into this category.

The cost to develop one ranges from $360-540 for a normal EA. The payoff for most of my customers is the excitement of finding out the performance of their idea. After spending the development costs, the downside is 100% capped.

The thing I like about MQL5 market is that you can take advantage of a free option: a business in a box. The trader only needs to supply an EA and to trade it. MetaQuotes literally does everything for you. They market products, track the performance, do the customer service, collect the money and write the check. Not bad.

What I also like is that MetaQuotes handles the encryption and licensing of the product. Hundreds of customers casually inquired about the possibility of selling their expert advisor over the past 5 ½ years. Very few of them decide to go forward.

The reason is that it takes tons of times (i.e., it’s expensive) to develop the security protocols and encryption to control access to the file. Integrating with a payment processor like PayPal makes it even more expensive.

Most people ask about selling EAs on a whim. It’s not worth spending several thousand dollars on.

MetaQuotes’ system eliminates the hurdle. Potentially selling your expert advisor is as simple as registering the product on their site and filling out a form.

Are your odds of success very good? No.

But you’ll at least have the opportunity to succeed and don’t have to do anything beyond filling out forms for 5 minutes. The better question is, “why not to do it?”

VAT

EU based traders might seriously consider using MetaQuotes simply because of the absurd VAT rates in most of Europe. MetaQuotes charges a 20% commission for selling trading products.

VAT in most of the EU countries that I know of are already higher than 20%. Starting in 2015, EU businesses will be required to collect and track VAT payments for each country where the end customer resides.

Tracking all of those details is insanely complex and time consuming. It’s cheaper to pay MetaQuotes the 20% commission. Doing so also avoids the hassle of reporting and collecting different VAT across the whole EU.

Cons

The disadvantages only affect people with experience running online businesses. I own a successful online business. The challenge of marketing a product online doesn’t intimidate me the way it does to someone who has never done online marketing.

My sales come from the relationships with people. I build those connections online through the web site and the company Facebook and Twitter accounts. When a customer makes a purchasing decision, it’s because they know and trust me as a person.

I see that relationship as the absolute, most critical element in running any kind of business. So, what happens if I lose control over that relationship and hand it off to MetaQuotes?

The business owner blends in with the crowd. MetaTrader 5 isn’t even that popular, but there are already 250 different expert advisors for sale. There’s slim hope of a product standing out from the crowd if setting up a page on MQL5.com is the only marketing strategy.

Customer Profile

The majority MQL5.com visitors come from countries where Western prices seem exorbitant. Yes, a handful of those visitors can afford the $1,000+ price tag that most good strategies charge. As a percentage, though, it’s tiny.

Alexa, the traffic ranking site, is only good for rough approximations. Click the audience tab and scroll the visitors by country section. Alexa says that the US and Australia only form 10% of the MQL5 site’s total traffic. Not good.

Russia makes up the biggest traffic source with 18% of the traffic. Unless you’re thinking of a Muscovite billionaire oligarch, it’s not a country that you associate with disposable income. Most of the other countries in the list have similar profiles.

Vendors on the site more than likely come from similar countries. I can’t help but think of my friend Ardi, who comes from a city in Indonesia where a couple hundred bucks of month is a good income. He’d be willing to sell a quality expert advisor for $99. That’s a lot of money to him.

There are many Ardis out there for every Aussie or Brit that wants to sell his quality product for 900 quid. The price points look ridiculous when you are 5x more expensive than the average seller.
The 20% commission and loss of control over payments doesn’t seem appealing, either. If the strategy is to put up a page and get sales that you otherwise would not have gotten, then fair play.

Any sane business owner is happy to pay a commission on sales he couldn’t do on his own.
That said, using MQL5 as the exclusive marketing strategy doesn’t seem like a good idea, either. I flipped through a couple of the EAs for sale. Not one page contained a link to a sales page with more information. You can put up your one page description, and then that pretty much has to be enough to get someone to pull the trigger.

Conclusion

One of the guys in my bible study owns an online marketing company. We were chatting about web sites the other day and how important social media is to driving traffic.

He mentioned how so many customers approach him the goal of selling their products online. The first question that he asks a new customer is, “what is your marketing strategy?”

When they usually respond, “Um, I don’t have one,” he likes to joke that it’s a Field of Dreams web site. If you build it, they will come.

Anyone with online marketing experience gets the joke. Nobody shows up at your web site, and they certainly don’t buy products, just because you have a page. It takes time and effort to build a relationship with the customer.

I don’t see that happening on the MQL5 market, either now or in the future. MetaQuotes is a large company, so I’m sure that somebody will buy something. It probably won’t be your product.
I wouldn’t put more time into the site beyond the 5 minutes that it takes to fill out the forms. It is, after all, a free option.

Filed Under: MetaTrader Tips, MQL (for nerds) Tagged With: expert advisor, MetaQuotes, metatrader

Creating A Trending Or Ranging Expert Advisor… Not Both

April 11, 2013 by Edward Lomax 5 Comments

On a previous blog post, Shaun Overton said something that is insightful and simple, but often overlooked by people attempting to program their own trading strategy into a working expert advisor. The concept has been confirmed from years of my own manual trading. And I believe if you are to create a working automated trading strategy… this is the place to start.

This is the portion of the blog post I am referring to:

“Certain rules do work dramatically better during different market conditions. The key is to separate the conditions, then apply the strategy selectively. Most expert advisor designers try to develop a strategy that works all the time.

It doesn’t work that way. When the EA starts to hit a wall on the design, the trader responds with new additions and tweaks to force the performance to improve the general performance.

What I’m working on now is a set of rules to identify various market types. I like to think of it as “don’t compare lawn mowers when it’s raining.” There’s a time and a place for each approach and behavior. The trick isn’t so much the rules, but deciding when to apply them.

Categorizing the market helps make the strategy selection process far easier. If the market is highly volatile and ranging, then select a scaling strategy that works well in ranging markets. If the market is trending quietly, then perhaps a basic trend strategy would work perfectly well.”

The full blog post is here: Expert advisor versus manual trader

Can You Create an Expert Advisor For All Market Conditions?

Did you catch the change in approach to developing an automated robot that can increase your possibility of success?

While most expert advisor creators seek to build an automated trading robot that works well all the time… the real opportunity is developing a system to determine what type of market behavior is present, and then applying the correct trading method for the market.

  • If the market is trending, apply a trending strategy.
  • If the market is ranging, apply a ranging strategy.

Simple right? Maybe so simple it is often overlooked. (I’ll go into reasons I think people make these mistakes with expert advisors in future posts).

Let’s take a look at what I am talking about. Here is a snapshot of a trending market:

AUDJPY Trending

The AUDJPY moved in a strong trend this week

The photo shows the AUDJPY pair on the H1 timeframe for the period of April 3rd to April 10th. Clearly, this is a trending market. Let’s say we applied a simple strategy of BUYING the end of day candle close and closing the trade the next day. (This is just an example, so I’m not going into stop loss, take profits or anything else you would need to do with a real strategy. I just want to keep it simple).

This simple strategy would have resulted in 769 positive pips.

OK, let’s look at an example of a ranging market:

Range trade the EURUSD

The EURUSD has been ranging this week

This is a snapshot of the EURUSD pair on the H1 timeframe from March 27th to April 3rd. This time, we are going to SELL at the end of day candle close when price is near the top of the range, and BUY at the end of day candle close when price is near the bottom of the range. (Again, this is very simplistic on purpose and only for sake of example).

The result of this simple strategy would have been 286 positive pips.

So, potentially 1053 pips of profit in less than two weeks of trading, on two currency pairs, taking only one trade a day on each currency pair. Pretty impressive, isn’t it?

Clarification

I’m not suggesting I would be able to correctly identify the beginning and ending of the range or the beginning and ending of the trend. I don’t have a crystal ball.

What I am suggesting is once the type of market is identified, it is very simple to get nice profits from even the simplest of trading strategies.

Focus On The Right Strategy For The Right Market Condition

When people hear words like “automated” or “robot”, they think the possibilities are endless. Visions of extreme profits very quickly immediately flash into their heads. They believe, and are lead to believe by unscrupulous, commercial robots marketers, that an automated trading solution should greatly outperform their manual trading counterparts.

If a good manual trader can get 40% profits a year… a robot should be able to get 4000%.

As a result, they set out to build robots that trade well in every market condition. Plus, the robot should trade multiple times during the day, pulling out more and more profits each time. If that were possible, incredible wealth is just around the corner.

The truth…

Trying to come up with an extremely complicated set of trading rules to profit in every market is a very difficult task to undertake. Usually what happens is the strategy works very well in certain markets… but gives back a lot (or all), of the profits when the markets change. When tweaks are made to keep this from happening, the robot stops being as profitable when market conditions return to favorable.

My advice is to simplify the goals you want to achieve with your automated trading.

  • If you have a good strategy that works well in trending markets… create a robot to trade only in trending markets and work to develop rules to determine trending markets and their direction.
  • If you have a good strategy the works well in ranging markets… create a robot to trade only in ranging markets and work to develop rules to determine the beginning and end of the range.

A automated trading robot does not have to trade all the time to be extremely profitable. It only has to trade well in the market it is created for. When thinking of automated trading, a specialist is much more desirable than a jack-of-all-trades.

I truly believe switching focus from a wonder robot that trades all the time to a specialized robot that trades only under the best conditions is the path to long term success with automated trading. I hope this post has give you some things to think about and has sparked ideas that leads to your future success.

Next Friday I want to talk about Why Forex Robot Creators Don’t Use Sensible Strategies. See you then.

Filed Under: Trading strategy ideas Tagged With: AUDJPY, eurusd, expert advisor, ranging, trending

Build a Trading Robot

April 10, 2013 by Shaun Overton 1 Comment

I talk a lot about the importance of building your trading plan. The same thing applies for building a trading robot or an expert advisor.

Most people approach EA development as digging frantically looking for huge gold nuggets. That approach is a good way to waste a lot of time and money.

Most people dive into the process without considering the details. The purpose of this post is to slow everything down so that you can develop some sort of business plan for your trading.

Steps to building a trading robot

Three long, difficult steps are involved with deploying a trading robot. You first need to obtain data for testing. A good strategy, once discovered, then needs to be programmed to automatically place trades. Finally, you need to select a broker to execute the orders in the live market.

The importance of data

A good number of traders brag about their best trades. One trade gave them a million dollar profit and other such and such.

What newbie system traders don’t realize is the tedious process of how these people reached their status. Knowing whether or not a system has an edge or not entails researching your idea using historical price data. Here are some tips that you can use when looking for data:

• You need to get data, you need to analyze it, and then you need to trade it. It is really simple on the surface, but when you are trying to go about this, every step creates huge obstacles. The easiest work around is to use the trading platforms listed at the bottom of the article.

• If you are looking for free options, you might go look somewhere like Yahoo! Finance where you can get data on lots of stuff that is mostly end of day prices. It’s no good for high frequency. You can get some options data, you can get forex and you can get some indices and some futures data.

• The reason why data quality is important is when we go on to analyze and come up with potential ways that you might want to trade algorithmically, if you have garbage data, you have a garbage analysis. Be very careful about the data that you decide to accept.

Problems gathering data

Now that we learned how important data is, we now discuss the other side of the picture in data gathering which is its disadvantages.

• Unreliable. Sometimes it’s just wrong. Sometimes there are duplicate entries. Sometimes there are gaps in the data that are unexplained. And if you don’t really know what you’re looking for, what kind of problems there might be in the data, you can come up with some weird discoveries.

• Delays. Technology bridges the information gap. But sometimes, due to time differences and the most annoying part when your broker or you are having problems on your internet connection at times, delays are inevitable.

• Clutter. There are a gazillion sources of information on the internet. This equates to a huge amount of data. Different brokers have their own set of websites and blogs which displays various analyses on a single instrument. It will now be a problem on what data will you consider credible and useful in your trade. Sometimes, analysts just anticipate most especially technical analysts posting price forecasts and so on. Those who waits for news like Unemployment rate has their own views on figures that will show up prior and during the announcement which basically creates clutter.

The Trading Platform

When you trade online, a trading platform is like your playing field. It is the software through which you manage your trades when you open, close or set limits or stops. Usually, a trading platform is provided by the broker.

There are platforms, APIs and all sorts of different companies that offer data and trading capabilities all in the same product. The advantage to those types of software is that it makes your life a lot easier because if you go about this on your own it’s a monumental task.

A lot of people that like to play with R, and you can just custom program your own research platform. Matlab and R are the most common tools in this category. The problem is that you have to build the trading components entirely on your own.

Here are some popular platforms MetaTrader, NinjaTrader, ThinkorSwim and Multicharts. All these platforms use their own different language and solve the data problem. They also include the ability to trade automatically. Most of the heavy lifting has already been done.

MetaTrader uses a custom language called MQL4, which is really a C Scripting Language. NinjaTrader uses C# .NET 3.5. Trade Station and Multicharts is a language called EasyLanguage, which for programmers will probably bore you to tears. To understand more about these platforms, you can check different brokers and their offerings.

Trading Platforms and data

We’ve covered the languages, the markets they cover and then, the other problem is really data. These platforms offer very different set-ups and they all handle the data problem differently.

MetaTrader

MetaTrader is kind of like the AK-47 of Trade Platforms. You download it and it doesn’t matter how novice or not good with computers you are. You will have a hard time not figuring out how to work the platform. It is simple, it’s very friendly. It’s also not sophisticated.

If you’re trying to do something sophisticated, that’s probably not the place to be. And for your analysis, you have to be very careful, because when you download MetaTrader, charts just pop up. You think, “Oh this is great, I got my data and everything looks good”, but the problem is that most of the time the data is junk. You can’t actually rely on it and do any serious analysis.

Getting the data and getting it formatted to MetaTrader is the most convoluted, difficult problem that traders face everyday. This is the platform that we deal with and everybody has problems with their backtesting and getting familiar.

This is good enough if you want to trade every couple of minutes and you’re not super execution sensitive and you are just trying to get something out cheaply. If you try every 4 hours and you trade 3 currencies, MetaTrader is fantastic for that.

But if you try to day trade or trade 20 different currencies at the same time, that’s a disaster, because MT4 isn’t multi-threaded. Every time you push an order into the market, MT4 can only handle it one at a time.

If you have 5 orders firing off together, this one has to finish, and you have all the latency in the middle where they connect and then bounce and the trade confirms okay. Now you repeat the process four more times to get all 5 trades filled. If you’re pushing too many orders through, MT4 will choke.

NinjaTrader

You have to find somebody to give you the data. There are some paid options, there are some, there’s one that’s free called Kinetick, and they give you end of day data. Brokerages also provide limited historical data. The quantity varies substantially from broker to broker.

The problem when you’re programming all this stuff and you’re trading in the live market, if you program to a broker specific platform, you probably spend 4 to 6 months developing and testing it and getting it working, and a lot of money and time. If you go to start trading live and you’re not happy with the broker, too bad. You married them.

What NinjaTrader did is, let’s say that there are Brokers A, B and C. NinjaTrader sits on top to bridge everything together.

NinjaTrader is an API shoved on top of multiple broker APIs so that you can write your strategy in NinjaTrader. They’ve done all the integration with every broker partner they have.

It’s a different way to handle the same problem as MetaTrader. MetaTrader just goes to these brokers and say “You should use our platform”. If you developed in MetaTrader, you can go switch on a whim.

If you have NinjaTrader, you can go switch on a whim. The difference is that you don’t just have NinjaTrader. You have to download the broker platform, then you download NinjaTrader. Then, you get everything hooked up and make sure everything plays nicely together.

There’s a steep learning curve with getting this all set-up to the point where you can actually download historical data and start trading with your broker. Once you have the data set-up, though, NinjaTrader is awesome.

TradeStation and Multicharts

TradeStation and Multicharts offer the same quality of analytics as NinjaTrader. They are easier to develop in. Obtaining data quickly makes these platforms easier for testing trading robots.

If you program with TradeStation, you trade with Trade Station. You can’t go trade with anybody else. However, if you’re ever unsatisfied with the broker because they slip you or because they charge bad commissions or whatever goes wrong with your trading, you don’t have any alternative. You’d have to move to MultiCharts or to redevelop the programming completely from scratch in another platform.

A trading robot

The Broker

Remember that your broker is your trading partner. It provides you the platform, data and most importantly the access in the market. Brokers are also service providers, and traders are their customers. It’s common for a customer to encounter some difficulties regarding the provider. There are two common reasons why a customer sometimes feels dissatisfied.

• First, bad service. When you are having difficulties opening your platform to execute a trade, you call on a customer service representative. And just like any other companies, a structured way of handling complaints will be given to you. Sometimes they can’t just give you what you need because they do not want to understand what you need.

• The second reason is bad execution. The broker is the market maker. They set the buying and selling prices at every single second. When you place a trade, they can present prices that are favorable to them. As a trader, when you know that the trend is on your side, sometimes you do not mind trading few pips higher or lower than your order. So you grab the offer. Until you realize that the broker made some hefty spread on your trades. This affects the trader emotionally and emotions should be out of trading. Emotions spoil strategies nut as a human being, it’s natural to feel upset.

Conclusion

Building your own trading robot is not as easy as ABC. It entails allot of effort in research, trying and testing trading signals and detaching every trade from your emotions. All of these steps are built on the foundation of your trading experience.

Remember that building a trading robot is anchored with the basic steps:
• Gathering and identifying the data you will use. Be very keen on what data to retain and what data will go directly to the bin. Not all data fed by your broker, articles written by analysts or data given to you by someone you know are reliable. Make sure to get the right data, analyze the data and trade using the data.

• A trading platform you are comfortable with. Before you start making your own trading robot, feel free to try different trading platforms. It’s like trying on some new pair of shoes before buying them. Do not go for something very complicated and you cannot even decode some basic functions. Remember that your platform is your playing field. It is more fun to trade through a platform you know how to operate than to get the most technical one and read through the help section while some other traders are gaining fast from a current trend.

• A reliable broker that will assist you on your trades. Your broker is your partner. It gives you data, platform and sometimes analysis in real time. Make sure to choose the broker that can give you what you demand and what you need.

If you will follow some of the above tips, you are on the right track on making your own trading robot.

Filed Under: Trading strategy ideas Tagged With: business plan, expert advisor, metatrader, MultiCharts, ninjatrader, TradeStation, trading robot

Position Sizing for the Scalper EA

April 2, 2013 by Shaun Overton 10 Comments

Andrew posted a great comment on the Scalper EA noting how he increased profits dramatically with position sizing. You can think of the expert advisor as the orange and the potential profit as the juice. We want to squeeze out every last drop.

Orange juice squeeze

Squeeze more profit out of your expert advisor with position sizing rules

I always talk about winning percentage and the R multiple together. It doesn’t matter that if win 99% or 15% of the time. It matters how much you win compared to how much you lose. Winning frequently does not correspond to profitable trading.

Only when you know the percent accuracy and R multiple can you determine expectancy: do I expect to make a profit or not following this expert advisor?

The explanation reveals two assumptions:

  1. I know the real accuracy of the system
  2. I know the real R multiple
Accuracy and R Multiple

NinjaTrader backtest reports show the percent accuracy and the R Multiple (ratio of avg win to avg loss)

I don’t know either for a certain fact. The real accuracy and real R multiple may be above or below the numbers seen in backtesting.

It’s important that we consider how we developed these numbers. I found them after analyzing an entire year’s worth of chart data. There’s a real risk that they overestimate future performance.

The forward test for 2012 discounted that notion – the R multiple and percent accuracy numbers actually improved on the blind data. But, as most of you know, I’m extraordinarily risk averse.

I assume the worst case scenario in nearly everything that I do. If the worst case isn’t so bad and the average case is fantastic, that’s the only threshold that pushes me past my risk inhibition. It has to be a really amazing opportunity for me to pull the trigger.

A pessimist’s view on position sizing

The goal is not to maximize profits. It’s more complex than that. The real goal is to maximize profits with a view to how many losses you can stomach.

That number is pretty low for me. Use bigger numbers if you can tolerate more pain.

I operate with the same attitude when selecting my position sizing strategy. It’s important to make reasonable, yet pessimistic, assumptions when selecting your money management approach.

Step 1: Decrease the strategy’s accuracy by 5%

Strategies vary in their accuracy with the chart and instrument where it operates. I have not done an analysis, but my rule of thumb is that accuracy fluctuates ±5%. The worst percent accuracy seen is usually within 5% of the best percent accuracy seen.

The rule generally holds across multiple instruments and time frames. Once you get a feel for the accuracy, you take the observed accuracy and subtract 5%.

The scalping strategy profited 75.93% of the time after including trading costs. Removing 5% off of that number leaves a reasonable worst case assumption of 70.93% accuracy.

Step 2: Decrease the R multiple by 20%

The method used here depends on the expert advisor’s trading style. Range trading expert advisors usually come out with an R multiple (average win/average loss) within a consistently narrow band. Trending EAs exhibit wild fluctuations in the R multiple.

This should make sense to readers with several years of trading experience. Range trades earn profits on the majority of trades. No individual trade contributes dramatically to the final outcome.

Trend trades do exactly the opposite. A small handful of trades contribute enormously to the overall result. The traders faces the risk of overemphasizing how well volatility played to his in advantage in the past. If trends of similar magnitude fail to materialize, the trader’s estimate for the R multiple will be wildly off the mark.

Rules of thumb for adjusting R multiple assumptions:

  1. Cut the observed R multiple for a ranging strategy by 20%
  2. Cut the observed R multiple for a trending strategy by 33-50%

The scalper EA trades ranges and showed an R multiple of 0.53. Cutting that number by 20% reduces it to 0.424.

Apply pessimistic assumptions to model money management

The adjusted numbers for the scalping strategy are 70.93% accuracy and an R multiple of 0.424. I can now take these numbers and start playing with the money management software.

The first thing that I did was to reduce the number of trades in the test to 100. That equates to roughly 1 year of trading, which is a meaningful period of time for this expert advisor.

Fixed fractional money management using 1% risk and the pessimistic assumptions puts the trader slightly ahead of breakeven after trading costs (a 1% profit). The worst case scenario shows an annual loss of 25%. Nobody wants a loss like that. But, it’s something that I can handle as a plausible worst case.

Final numbers

Pessimistic position sizing assumptions

The pessimistic money management assumptions still show an average profit.

Increasing the percent number to 2% doubles the minimum and maximum outcomes. Tripling it to 3% triples the worst and best outcomes. You should select a number whose worst outcome strikes you as something personally acceptable to you.

I selected 1%. The worst case scenario is something that I can handle. The next step is to split the difference between the observed numbers and the pessimistic number for the percent accuracy and R multiple.

The numbers are 73.43% accuracy and 0.477 for the accuracy and R multiple. When I plug the numbers into the software, it spits out an average return of 8.9% with a maximum upside of 40.9% after 100 trades.

Moderate position sizing assumptions

Moderate assumptions for position sizing show an average return of 8.9%.

Using fixed fractional money management squeezed more juice out of the orange. We brought the worst case scenario up to -25% and the best case scenario on moderate assumptions to over +40%. More importantly, the average return increases without affecting the best and worst cases.

What position sizing ideas do you have? Leave your thoughts in the comments section below.

Filed Under: Stop losing money Tagged With: backtesting, EA, expert advisor, money management, position sizing, R multiple, scalping

Scalper EA Other Pairs

March 26, 2013 by Shaun Overton Leave a Comment

A number of readers are using the scalper EA in live accounts. The number one issue that many of them cited is that my research focused solely on the EURUSD. Does it work on other forex pairs?

Absolutely. However, it doesn’t work on all of them. It’s important to follow the same logical process that explained why the expert advisor works so well on the EURUSD.

Analyze the scalper EA in Excel charts

We must dive back into Excel to evaluate the original hypothesis. My expectation was that the strategy should work on charts where the distance of the price from the 200 SMA forms a nice inflection midway through the curve.

GPBUSD price & SMA 200 distance frequency for the scalper EA

The frequency of various distances of the price from the 200 SMA on GBPUSD.

The area right around the 0.5% marks the inflection point. As a reminder, you can think of the curve as being composed of two parts. There’s the steep part, which is where the price is highly likely move. Then there is the flat part. That means the price drifts instead of moves.

Think of slope as rate of change. A steep slope means a fast rate of change. The price is likely to be anywhere but here on the next bar.

Flat slopes make for slow rates of change. The price is in fact very likely to remain a similar distance from the SMA in future bars.

Slope of frequency of price and SMA 200 distances.

The graph contains 2 slopes. A steep slope and a flat slope. Both are marked in red.

The strategy only works when price is likely to stay in the same spot. We are, after all, scalping. The opportunity only exists when the expert advisor can trade in the chop. The chop only exists when the slope of the frequency line is flat.

I used my experience on the EURUSD to infer that 0.75% would make for a natural starting point to evaluate for the moving average envelope. It’s far away enough from the inflection point to overcome spread costs, but close enough to yield a solid number of trading opportunities.

The initial results came out even better than the EURUSD. These results do not include slippage, commissions or spread costs.

GBPUSD Results

Results for 2011 for the scalper EA on GBPUSD

Results for 2011 for the scalper EA on GBPUSD

The results are very much in line with the original idea. Percent accuracy stayed in the same ballpark, coming out to 81%. The profit factor jumped very nicely to 2.99, which is substantially better than the EURUSD performance of 2.16. The sample size consists of 113 trades, which is enough to infer a reasonable expectation of performance.

Equity curve of the scalper EA on GBPUSD for 2011.

Equity curve of the scalper EA on GBPUSD for 2011.

The final test is “does it make money when including trading costs?” The answer is yes. On a 2.5 pip spread, the total trading costs of standard lots on 113 trades is $25/lot * 113 lots (trades) = $2,825. That number is substantially less than the raw profit of $5,360. It makes sense to trade this strategy.

The final step of walking forward unfortunately doesn’t offer enough data points to draw a conclusion. It only placed 13 trades for the entire year. It broke even.

USDCAD scalping stats

EA scalper, USDCAD, 0.9% banwidth

Performance for USDCAD 2011 with a band of 0.9%.

Equity curve of USDCAD for 2011, EA Scalper

Equity curve of USDCAD for 2011

USDJPY is a bad idea

The frequency graph for the USDJPY looks much, much different than the other currencies. Instead of being steep and mostly flat, it’s more like free falling and perfectly flat. The massive size of the tail and the severe contrast between the steep and flat portions led me to believe, correctly, that trading USDJPY would not be a good idea.

The frequency of various distances of the price from the 200 SMA on USDJPY.

The frequency of various distances of the price from the 200 SMA on USDJPY.

Although the areas near the inflection point are indeed the most profitable, the profit factor for USDJPY plummets to slightly above 1.0. When trading costs are factored in, it doesn’t make sense to trade.

Scalper EA USDJPY 2011

Trade performance for the scalper EA for USDJPY in 2011

Related

Have you read the article explaining how and why the scalper EA works?

If you have any suggestions on how to make the rules apply to more currency pairs or instruments, then please share in the comments section below.

Filed Under: Trading strategy ideas Tagged With: eurusd, expert advisor, GBPUSD, scalper, scalping, USDCAD, USDJPY

EA Problem Checklist

January 3, 2013 by Shaun Overton Leave a Comment

It drives me crazy when I call tech support and the customer service person asks, “Is your computer plugged in?” When I step back and think about it, however, they ask dumb questions for a reason. Some people really do forget to check the obvious things.

If you’re stuck trying to load a MetaTrader expert advisor and you cannot get it to trade, this checklist will help you resolve the most obvious problems.

You should see the name of your expert advisor and a smiley face in the top right corner of your open chart. The image below contains a blue line. Everything is correctly displaying above that blue line.

MT4 EA

Expert Advisor Problem Checklist

Do you see the name of your expert advisor on the chart? If yes:

  • If an X appears, then click the big EA button at the center top of the screen. It should appear pressed down
  • If an upside down smile (a frown appears), then right click on the chart. Choose Properties. Click the Common tab. Select “Allow live trading” and “Allow DLL Imports”. Remove the check next to “Confirm DLL Function calls”
  • Click the Inputs tab. Change the inputs to whatever values you desire. Push OK.
  • If a smiley face appears, you’re all done.

Do you see the name of your expert advisor on the chart? If not:
Drag and drop the EA onto the chart.

  1. Click the Common tab. Select “Allow live trading” and “Allow DLL Imports”. Remove the check next to “Confirm DLL Function calls”
  2. Click the Inputs tab. Change the inputs to whatever values you desire. Push OK.

 

MT4 EA Button unpressed

The X appears on the chart because the Expert Advisors button is not pushed down

EA frown

The frown on the chart indicates that “Allow Live Trading” is not enabled.

The EA button correctly pressed

The smiley face appears on the chart after the Expert Advisors button is pushed down.

Filed Under: MetaTrader Tips Tagged With: EA, expert advisor, metatrader, mt4

  • « Previous Page
  • 1
  • 2
  • 3
  • 4
  • 5
  • Next Page »
FREE trading strategies by email

Trending

Sorry. No data so far.

Archives

  • Dominari
  • How does the forex market work?
  • Indicators
  • MetaTrader Tips
  • MQL (for nerds)
  • NinjaTrader Tips
  • Pilum
  • QB Pro
  • Stop losing money
  • Test your concepts historically
  • Trading strategy ideas
  • Uncategorized
  • What's happening in the current markets?

Translation


Free Trading Strategies

Privacy PolicyRisk Disclosure

Copyright © 2022 OneStepRemoved.com, Inc. All Rights Reserved.