Pages

Tuesday, February 21, 2012

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.

Search This Blog

Subscribe to this blog via email

Liquidity Forex System

Disclaimer and Risk Disclosure

SPECIFIC FOREX RISK DISCLOSURE STATEMENT: BEFORE PROCEEDING, YOU MUST READ AND ACKNOWLEDGE THE FOLLOWING DISCLOSURE

The risk of loss in trading foreign exchange markets (FOREX), also known as cash foreign currencies, the inter-bank market or the FOREX markets, can be substantial. You should therefore carefully consider whether such trading is suitable for you given your financial condition. Elite E Services does not control, and cannot endorse or vouch for the accuracy or completeness of any information or advice you may have received or may receive in the future from any other person not employed by Elite E Services regarding foreign currency trading or any managed account information. The factual information contained herein has been obtained from sources believed to be reliable but is NOT necessarily all-inclusive and is NOT guaranteed to be 100% accurate. The content herein is provided on a best efforts basis and is believed to be up-to-date and accurate; however, there are no explicit or implicit warranties of accuracy or timeliness made by Elite E Services or affiliates. FOREX trading involves substantial risk and is not for all investors. Investments or trading in the FOREX markets can be highly speculative and should only be done with risk capital which you can afford to lose and that, if lost, would not change or adversely affect your lifestyle. The high degree of leverage that is often possible in foreign exchange trading can work for you as well as against you. The use of leverage can lead to large losses as well as gains. Managed foreign exchange accounts can be subject to substantial charges for management and profit incentive Elite E Services, and in some cases introducing brokers’ commissions or mark-ups that are above and beyond the ordinary spread generally provided on a clearing firm’s trade execution platform. It may be necessary for those accounts that are subject to these charges to make substantial trading profits to avoid depletion or exhaustion of their assets. Performance results may vary due to account size, starting or closing date, the number of positions and/or markets traded and/or other factors.

This brief statement cannot disclose all of the risks and other significant aspects of the foreign exchange markets. Therefore, you should carefully review the disclosures contained in this document to determine whether such trading is appropriate for you in light of you particular financial condition. There are also risks associated with utilizing an internet-based deal execution system software application, and computerized trading and money management tools including, but not limited to, the failure of the hardware and software.

PAST PERFORMANCE DOES NOT NECESSARILY GUARANTEE FUTURE RESULTS, nor does it guarantee freedom from losses. The information contained herein should not be construed as an offer to buy or sell commodities, futures, securities, or any type of investment. Elite E Services highly recommends that before making a decision, the reader collects several opinions related to the decision and verify facts from several independent sources.

ADDITIONAL WEB DISCLAIMER: ALTHOUGH IT IS POSSIBLE TO PROFIT BY TRADING FOREIGN EXCHANGE, IT IS ALSO POSSIBLE TO LOSE 100% OF YOUR DEPOSIT. THERE IS A HIGHER PROBABILITY OF LOSING VS. WINNING GIVEN ENOUGH TIME. FOREIGN EXCHANGE TRADING IS EXTREMELY RISKY AND IS ONLY FOR THE SOPHISTOCATED INVESTOR WITH AN ABOVE AVERAGE UNDERSTANDING OF CURRENCY MARKETS. RISK CAPITAL SHOULD BE USED WHEN TRADING FX SYSTEMS, DEFINED AS CAPITAL THAT ONE CAN AFFORD TO LOSE 100%. ANY INVESTOR MUST CONSIDER THE RISKS OF FOREX TRADING AND DETERMINE IF IT IS APPROPRIATE FOR HIM or HER.

THIS WEBSITE IS NOT A SOLICITATION TO INVEST IN FOREIGN EXCHANGE SYSTEMS, THIS WEBSITE DOES NOT RECOMMEND ANY PARTICULAR INVESTMENT.