Market color

Market Depth

Moving from small time retail forex accounts to a serious account size comes with some bumps in the road. Most traders see the prices of forex pairs on the screen and assume that they can buy and sell unlimited quantities at any time. Although the forex market is the largest market of any in the world, making it the most liquid, there is still a limited size to what you can trade at any moment.

Reading Forex Market Depth

NinjaTrader and MB Trading both make market depth information available in their trading screens. It shows where all of the nearby liquidity lies. Say, for example, that you wanted to place a big order for EUR/USD. You can see in the screenshot from MB Trading’s platform that the liquidity gets bigger as you get further from the price. They call these “Level 2″ quotes, which is jargon taken from equities traders.

Market depth of EUR/USD

MB Trading's Navigator shows the market depth of the EUR/USD. Light colors show the best prices, darker prices indicate distance from the best price.

I took this screenshot in the late afternoon when liquidity is at its worst. The best bid shows a depth of 200, which is measured in mini lots of 10,000. You could sell up to 2 million EUR/USD and get filled at that price. Notice, however, that most of the liquidity is further away. 3 million sits at the next best price and another 3 million even further from that. The net available liquidity is 8 million on the short side and 6 million on the long side for a total of 14 million.

The FX Pro screen in NinjaTrader makes it even clearer. I took this screenshot several minutes later, which is why liquidity numbers are different. One thing I really like about this screen is that NinjaTrader converts the liquidity depth into more tangible numbers. The formatting makes more sense to me. Plus, it’s much easier to keep track of the varying spread.

FX Pro screen in NinjaTrader

The FX Pro screen in NinjaTrader

What you learned in economics doesn’t apply to trading. Dealing in bulk actually leads to worse pricing instead of improved pricing. The reason is that forex instruments are so standardized that there’s effectively never a lack of customers. It’s really an issue of getting how much much you want at a certain speed.

Only a fool would hit the market with 20M EURUSD instantaneously unless you’re desperate to exit a position. If you push a market order judging solely from the quote on the screen, you may get 2-8 million filled at the displayed price. But, the rest of the order will get filled at progressively worse prices. The traders making a market want their pound of flesh for letting someone into the market so quickly.

Traders cannot see the liquidity depth of most brokers because they elect not to show it. Their platforms encourage the buy this, buy that psychology. The more information that they broadcast, the more bandwidth that’s required, which means that better servers are required.

The EURUSD is the most liquid forex pair in the world. This varies largely by broker, but at any given time you should be able to trade 20-30 million EUR/USD. That doesn’t mean that you’ll get filled at the price on the screen. What that means is that that is the sum quantity available at any given moment.

Some brokers hide their quantity. It’s not like the stock market where if there are 15,000 shares of Microsoft ready to trade at any given moment, you can see 100% of the liquidity available. In forex, as an OTC market, the broker may wish to restrict the viewable book for a few reasons.

If you offer markets from say 5 banks, it’s very rare for the broker to feed the best competitive price and to let the banks fight it out? Why? Because the broker also needs the banks to stick around when nobody wants to trade.

It’s an informal agreement that if I’m retail broker A and UBS is my main liquidity feed, I go out of my way to give UBS the good flow. My customers expect to trade during NFP and other volatile markets (although they really shouldn’t!). If the brokerage simply lets the banks fight it out, then the banks have every reason to let the brokerage rot on the vine when their customers want to trade but it’s bad for the banks. The banks certainly don’t want to take positions in volatile markets. Their only incentive for doing so is if the “good flow” that the forex broker sends during normal markets incentivizes them to accept the risk of losing more than they care to during NFP.

News traders are the most likely to try trading during a thin market. They are also the most likely to complain about not being able to trade. These are the arguments to which I’m least sympathetic. If you’re trading the news, you are overwhelmingly likely to have less than one year of trading experience. The decision has nothing to do with researching systems or evaluating whether or not it’s a good idea. It has everything to do with gambling.

Retail traders are the most likely to trade during volatile events, not just news but really any type of momentum. Almost everyone follows a breakout or momentum strategy. It has everything to do with what traders perceive as the most likely outcome. When the market explodes in one direction, it takes nerves of steel to stand in front of the freight train. Therefore, it’s probably a good idea because it’s counter-intuitive.

Trends happen so slowly that they don’t excite the gambling buzz that most retail forex traders are after. My friend Afshin in Dublin fell victim to this last week. He saw the EUR/USD rising day after day after day. He felt like it was simply overdue for a correction. The urge to participate, rather than coming from a desire for a quick hit, instead came from a desire to be right before there was any clear indication of the opportunity to be right. The point is that what feels natural to do is often precisely the wrong thing to do. It feels natural to every other trader, too.

Market Depth and Direction

One research project that I’d eventually love to do is to study how market depth on any given side of a market affects direction. Some traders run simple liquidity businesses where they receive trading rebates in exchange for accepting the risk of holding a position over the short run. These entities are less likely to concern themselves with picking the direction of the market.

Trading desks that make markets, however, often want the flow so that they can establish a position and earn the spread while doing so. These entities are picking direction – and they are backed by very intelligent math geeks with PhDs and a lot of time on their hands. If those desks make a visibly deep market and it’s sufficiently one sided, then it’s probably safe to assume that they expect to the market to move in the opposite direction.

When you’re buying a forex pair, the bank is selling it to you. So if everyone stacks the liquidity so that you can buy but the liquidity is thin on the short side, it should be telling you that the smart money wants to go short right now.

Ten heresies of finance

I set a reading list for new programming hires before they ever interact with customers. OneStepRemoved’s newest programmer, Jon Rackley, comes with an outstanding background in programming, but almost no market knowledge. Jon is under my wing for the next few months. My goal is to fully indoctrinate him on my market views.

One of the most useful, high level overview of trading dynamics is Benoit Mandelbrot’s The (Mis)behavior of Markets. My philosophy is that before you attack a problem, you first need to understand the problem. Building trading robots is the problem that our customers face every day. One reason that many would-be automated traders fail is that they understand very little about how markets function. They try to solve a problem that they don’t understand very well.

Mandelbot’s “10 heresies of finance” sums up my view of markets quite well. I made Jon read the book as part of his job training because has no trading experience. If you’re relatively new to markets or think it’s time to step back and re-evaluate your approach, then I highly recommend this book.

The 10 heresies of finance

  1. Markets are turbulent.
  2. Markets are far more risky than the standard theories imagine. Mandelbrot does do a very good job throughout his book explaining how unpredictable and complex market behavior really is.
  3. Market timing matters greatly. Big gains and losses concentrate into small packages of time. He calls this trading time.
  4. Prices often leap, not glide. That adds to the risk.
  5. Time is flexible. Some times of day are more important than others
  6. Markets in all places and ages work alike. Human behavior never changes, even if the mood does
  7. Markets are inherently uncertain. Bubbles are inevitable. We will always be greedy
  8. Markets are deceptive.
  9. Forecasting prices may be perilous, but you can estimate the odds of future volatility
  10. In financial markets, the idea of “value” has limited value.

Jon found Mandelbrot’s comparison between wind turbulence and market dynamics the most compelling part of his argument. It’s conceptually difficult to accept the idea of human behavior acting like the wind. The math of the two behaviors is identical, which is somewhat difficult to accept emotionally. What I like about the argument is that it makes for a beautiful metaphor.

When a storm comes up, it’s noteworthy. The average wind speed picks up. People notice that part. What everyone really notices and gossips about are the wind gusts. Staring out the window and watching the family oak tree bend a quarter way to the ground makes an impression.

Wind gusts are essentially market volatility. Events like a collapse of the euro or a surprise NFP number are the violent gusts of wind that make the jaws of traders everywhere drop to the ground. One gust begets another gust, packing themselves densely in time. Mandelbrot would reference the
increase in gusts as trading time speeding up.

If you enjoy these types of ideas, you might find our free resetting moving average indicator useful. It builds on Mandelbrot’s fractal approach to markets, negating the idea of a true average. The resetting moving average tries to act as a minimum reference point by changing its period in step with market volatility.

Martingale Lessons

In the spring of 2011, there was no denying it.  I adopted a decidely jaded view of the stock market and had grown to despise an industry full of self proclaimed oracles.  Most of these people in my view were a bunch of textbook salesmen and women selling various dreams of financial security and fame.

Through sheer stubborness I remained invested and recovered from the down years of 2008 and 2009. However, single digit gains were taxing my patience. I was miles from my longterm goals. There was no doubt I would be working well into my 60s and if I suffered any type of dementia, it was not hard to imagine myself greeting people at Walmart.  When I stumbled upon Forex, you could say I was open to a change.

The Allure of the Martingale

Through my work as an expert advisor programmer, I became involved in coding all manner of peoples trading strategies into small trading robots called expert advisors or custom indicators.  I am still surprised by all the permutations of indicators, chart patterns, money management mechanisms, etc, that trader are dreaming up out there.

I would code them all up according to their specifications, slap them in a backtester to put them through their paces, fix any problems. Rinse and repeat until all was working to everyone’s satisfaction.  Many if not most were flawed for one reason or another, some would work exceptionally well in one type of market but perform poorly in others.

Some were tied to faulty indicators that would change their earlier output signals. Some were based on what I viewed as various arcane chart patterns which seemed one step removed (no pun intended) from witchcraft. Others were complex to the point where they would rarely trade and when they did would do so at the most inopportune time.

After perhaps a year of this, I received a Martingale strategy to code for an overseas customer.  After coding and running his EA in the strategy tester, I remember becoming very excited with how well it was performing on every time period and data set in all markets.  I spent more time testing this EA that day than most, even though I was not finding any problems with the coding.  After seeing so many crash and burn that week, I enjoyed watching it do its thing.

To be sure, it was not the first Martingale I had seen and I had always discounted that ilk as being to closely tied to Vegas and gambling. But, like the ones I had seen before, it was doing a bangup job of piling up cash during my test runs.  I guess after seeing the nth Martingale doing that I could no longer ignore this method of trading.

That afternoon and for many days following, whenever my thoughts would wander ideas would pop into my head as to what sort of Martingale I would program in MetaTrader for myself.  It was truly something of an epiphany. Up to that point my whole view of forex was that of a high stakes market best left to big banks, institutional investors, and governments.  I had never thought of running one of these programs on my own money.

Like most Martingales, mine would double its lot size with every loss.  I suppose what was different about my Martingale from many but certainly not all others, is that mine would reverse the direction of its trades.  This would solve trending markets, the achilles heal of single-direction-trade martingales.  It would also use a Take Profit and Stop Loss that would be somewhat sensitive and self-adjusting to Average True Range. This was my answer to excessive volatility.  Finally, I put in logic to have hidden take profits and stops.  This would satisfy my probably unwarranted suspicion of brokers.

I’m not going to get too detailed on leverage, margin requirements and such.  With a Martingale, you need to consider how many levels you’re going to let it go before it gives up or resets its lot size.  And don’t kid yourself; it will go deep more often then you would think.  You need to make sure you have enough money in a Martingale trading account to support your biggest possible trade.

Happy Days and Riding the Martingale bull

I went through the trouble of setting up a forex account and started trading.  The first month felt underwhelming.  I recall the EA only did a little better than breakeven but my enthusiasm was still intact.  The fact that I did not lose any money comforted me, making it feel safe to press on.

I continued tweaking the EA and adjusting how I would use it.  By the end of the 2nd month, mostly through trial an error I found the EA worked best on the EURUSD and the 15 min period. That’s when the results started to give me that euphoria that I had so badly wanted.  By the end of the fourth month, morale was sky high.

I’m not going to give actual numbers since I used to always suspect other type articles of fish tails when they did that, but it was enough to make me a changed person.  If you can recall the nursery rhyme “Sing a Song of Sixpence”.  The line “The King was in his counting house, Counting out his money” pretty much sums it up.  That was me.  It almost felt illegal and I actually hid the results from others fearing that I would jinx everything if I mentioned it. I would often pick up a calculator or paper and pencil calculate out what the sum might be after 5 10 20 years at the current rate of returns.

When a Martingale goes bad

I’m not a market statistician or financial wizard of any sort, so I can’t give a very elegant explanation of what happened. I do know that the financial problems in Europe during the fall of 2011 provided an extremely volatile and choppy market that did not agree with my reversing Martingale EA. It resulted in some whiplash-packed trading weeks and numerous reality checks.

All my gains for the year and then some were wiped out during a few weeks.  The deceptive thing about a Martingale is that 99.9% of time it will look good and make money. When you test it, it is likely you won’t catch it at its worst.  It feeds a sense of denial.  In this case results were good for several months before it lost money.

Once it starts losing, the trades become big very quickly. If you happen to be asleep when this happens, you’re in for a big surprise as you rub the sleep from your eyes and peer at your monitor in the morning.  I know some of you are thinking, “well,  duh”, and to be honest, knowledge of this possibility was always in the back of my head. I thought since the Martingale was a reversing one and would adjust to volatility I was at least somewhat immune to this. I suppose it could have been much worse with a more conventional Martingale.

Another thing to watch out for is meddling.  When things started going bad I slipped into the bad habit of supervising the EA.  I would stop trades just before they were about to recover and the net result was usually to make things worse.

Summary

Since that time, I have scaled back use of the Martingale.  In some type markets I won’t even run it.  I also added a non trading window feature to it.  Specifically I can set it up to shut itself down at specific times of the day.  Now when I go to bed, if there are multiple big financial news reports scheduled for the morning, I set the EA to go inactive before and for sometime after this time to let the associated volatility work itself out.

I sleep better when I know it won’t be running at night.  It’s no longer producing killer returns for me as the volatility will usually make you money, but I don’t have to worry so much about the times when it will create losses, either.  There’s a price to pay for peace of mind. If that means trading less often, I’m all in favor.

Expert advisor versus manual trading

A client from Malaysia emailed yesterday asking about the merits of trading with EAs. He went through the usual motions of buying “quite a number of EAs [that] promised to make millions and ended up crashing or losing my live accounts.” He is not the first, nor will be the last to experience the roller coaster.

He watched a number of videos on YouTube that emphasize the importance of discretionary trading over automated forex robots. They claim, correctly, that a human being understands subtleties that computer programs miss. They then stretch the argument even further and say that EA trading is a fallacy. Given his bad luck, he wondered to what extent that I agree with the argument.

The wrong people are involved in selling EAs (usually)

The argument oversimplifies a difficult concept. Many of you know that I’m a self-confessed math geek. I like numbers. They are logical and they do not vary. What appeals so strongly to me about trading is that you can take a complex process and mold it into a set of logical rules to follow. It’s a wonderfully challenging problem. You’ll never crack it entirely, but I know from experience that you can develop something that works.

My gripe with most commercial EAs is that the people selling them are not traders. They are internet marketers that stumbled into a highly profitable niche industry. They tick the right boxes for their audience.

Most US forex traders are white men between the ages of 40-65 with an unusually high tendency to earn six figure incomes. The marketing gang knows that themes of financial security and the idea of an job that’s not miserable sells well. They focus more on getting that message across than developing a decent product.

EAs are only as good as their designers. OneStepRemoved has designed 1,000+ EAs. I’ve never seen anyone accidentally create a profitable strategy. The ones that do turn out well almost always have years or even decades of trading experience. The rules that they propose usually include subtle distinctions that differentiate between various market conditions and types of volatility.

Those types of people are not marketers. They spent their career trading. It’s part of the reason that the meagerly stocked talent pool of traders does not get come into contact with the marketing crew. The other problem is that the guys coming up with strategies worth selling have no incentive to do so.

Unless you’re FAP Turbo or MegaDroid, the potential income for most trading robot oriented business is six figures. I’ve worked with several multimillion dollar trading educators. They seem to do better in the long run owing to the relationships that they form with their customers. They are the exception rather than the rule.

Now look at how much a truly profitable trading strategy can make. Millions. No marketers or affiliates required. No web site. Just a computer and a server. There’s no effort required beyond passive monitoring. If you had a trading system that generated blockbuster returns, would you even bother with trying to form it into a business? I wouldn’t.

Traders like this do exist. It’s just that they’re about 0.01% of the trading population. I know this from my brokerage experience because once in a blue moon I fielded their phone calls. They were the perfect clients. They traded all the time, rarely called (only people losing money call their broker) and when they did, it was for some routine matter like withdrawing profits.

The only thing that stood out about them was their account balance. These people are the source of the dream, and they’re what keep the remaining 99.99% of algorithmic trading developers going.

Knowing how sweet the setup is if you have something worth selling, and also knowing that the financials really don’t make sense for selling a blockbuster system, I honestly would not consider purchasing an EA from the internet. I would never yield control over my account to something that behaves in a manner that I don’t understand.

When the drawdown inevitably comes, I would have no way to feel comfortable that the strategy is actually viable in the long haul. I would suspect that the end is nigh and that I better shut down the account before the losses accumulate. How anyone can make an informed financial decision with strictly marketing material is beyond my understanding.

What most expert advisors miss

Trading rules restrict discretionary traders in a way that I find beneficial. It cuts down on their tendency to over-trade, forcing them into situations where patience more often that not wins out.

Todd over at Triple Threat Trading runs a trading education business. He loves to go on and on about how he makes customers quantify their approaches as a set of rules. It’s easy enough to lose money in forex or futures.

The rule based approach minimizes those hazards. Following rules eliminates many of the unknown variables from your performance evaluation. Knowing that you followed the rules and still lost reduces the blow to the ego. It’s easier to say “the rules lost” instead of “I lost.”

The logic naturally flows into the idea of automating the strategy. The chief advantage is that the computer does not fatigue or tire. It follows the rules blindly. So long as a human remotely monitors the execution, the semi-automated approach often works well for established, rule based traders.

Making a trading robot does create new problems like deciding whether to only trade during active sessions or to leave the expert advisor on 24 hours a day. These are usually problems that resolve themselves with a few months of hands on experience.

The main lesson that I learned while running my forex account up this year with a gray box EA is how important it is to stay patient. Most of the systems that I trade personally tend to eat losses way too quickly. I have yet to determine how to quantify patience in trading terms, despite my love for quantifying things.

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.

Euro collapse

I’m writing this over the Atlantic on my way home from Dublin. I’m absolutely convinced that the euro is at the start of its death spiral.

Many of you know that I travel to Ireland about once a month to work with Traders Now and their q algorithm. I love the math, the programming and all the strategizing that goes into developing a fully automated trading system. One of my favorite parts, however, is the Friday night before I leave. Kieran and I play a long game of poker with his buddies.

The first few hands did not treat me kindly. I was busy chewing my sour grapes when Kieran mentioned one tiny, little thing about the euro. The place exploded with rumors and opinions. The poker game stopped entirely for fifteen minutes.

Mind you, this is not a poker table full of financial professionals. It actually seems to be a good cross section of Irish society. We had everyone from a plumber and retired taxi driver to a multimillionaire real estate developer sitting at the table.

The first thing that came up were the rumors of what would happen if the euro did in fact collapse. Two out of the nine players had independently heard rumors of the government printing Irish pounds and stockpiling them. They also mentioned a rumor of plans to completely lock down the country for three days in the event of a collapse. Banks close, businesses close, the airport and ferries close. Life goes into suspended animation.

These are wild rumors, mind you. I’d argue that it’s really not important whether they’re hard facts or bold faced lies. Perception is reality. It’s becoming obvious to me that the foundations of the fiat euro are growing shaky.

Modern currencies depend entirely on faith in the government in order to continue. They are, after all, simply scraps of paper and electronic entries in a bank’s database. The value of the paper itself is negligible. When ordinary Joes are beginning to question the status quo and whether or not the system is viable, the jig is up (Irish pun intended).

As more people question the system, a small percentage of them begin to take real action. The guys at the poker table seemed to like the idea of Swiss francs in spite of the Swiss National Bank’s peg to the euro. They also mentioned the US dollar as a second best option. I don’t necessarily agree with that in the long run, although I’m sure that will be the short term affect.

The small increase in euro selling begets more people worrying about their savings and assets. They see the price moving adversely, which spurns them into taking action, too. The effect is that the rumors and fear cascade into an avalanche of collapse. It takes on exponential growth as anyone with anything of worth tries to offload it in an attempt to protect themselves financially. Actually, it looks just like the bank runs that Latvia recently experienced.

PS: I lost badly at the poker game. 25 hands that never came out on top, combined with players who will never be bet out of the game makes for a bad night. I walked away with EUR 50 loss. Too bad that’s still worth $65.

ECN MT4 Forex brokers are few and far between

ECN originally stood for an electronic communication network, a description that falls well short of describing its purpose. ECNs developed around the beginning of the internet to allow stock traders to freely trade with one another and bypass the exchanges. The system added a dramatic increase in pricing and transparency. That’s why the investment banks bought them all out; they don’t want the small fish thinking that they deserve actual price discovery and low costs.

Fast forward twenty years and everyone bounces the word back and forth like it applies to the retail forex market. Well, it doesn’t, but I know that I’m going to lose this battle. The real structure of an ECN offers all participants the ability to act as price takers or market makers. With the exception of MB Trading, every single MT4 broker today only offers half of what an ECN offers. Traders either accept the prices appearing on the screen or they do not. The brokers don’t offer any alternatives. The word ECN in popular parlance has been debased to mean a brokerage that is passing liquidity from one side to another.

This structure, in my opinion, is one of the largest ills of the retail forex market. Everything about the system encourages traders to act as captive sheep. They can only accept the prices that the broker deigns to offer.

Although the stock market is also corrupt, at least setting a limit order actually shows through on the ticker. Most forex traders, amazingly, are not aware that this is how most markets work.

Consider a currency that trades at a bid-ask spread of 145-147 with a typical forex broker. If I want to buy at 146 limit, I must wait for the ask to drop to 146 before my order will fill.

The same order traded in the equities or futures markets would behave completely differently. The spread changes the exact moment that I post my 146 buy limit. The spread now appears as 146-147.

I do the market a favor by posting my order out there. The spread decreases, reducing the spread cost for the next person to sell a position. Additionally, that trader got to sell a whole point higher at 146 instead of 145. It works to everyone’s benefit.

Go back to the definition of a limit order. It means an order to buy at a price better than the prevailing market. That action requires a seller. Otherwise, no trade would occur. The broker or exchange posts that buy order for whichever seller wants to come along and take me up on the trade.

You can think of it just like eBay. My limit buy order is like the auction advertisement. eBay is like the broker. The person going short acts like the person buying used stuff off of the internet. Both parties walk away happy with the trade. The purchaser trades cash for goods. The person listing the auction trades goods for cash. eBay gladly stands in the middle and takes a small commission for the service. That is genuine price discovery.

For all the silly rules that the NFA creates, the one that they ought to focus on is this complete lack of price discovery. Any brokerage promoting themselves as an ECN ought to actually offer the services of a real ECN.

Sign up for EA Package


* = required field

powered by MailChimp!