Tuesday, May 29, 2012

Emergency European measures continue

GREECE OUT 'JUNE 18'...Cameron in contingency talks...Greece Pours Billions Into Biggest Banks...Companies Plan for Unrest...GERMANY: Not willing 'to pour money into a bottomless pit'... Spain's Debt Costs Near Danger Level...Dollar Rises...



EURUSD breaks key 1.25 level, bounces back above

http://www.smh.com.au/business/markets/euro-hit-by-spain-woes-facebook-drops-20120530-1zhvo.html The euro neared a two-year low on Tuesday as investors fretted about Spain's troubled banking system.
Already down sharply by midday, the euro fell further below $US1.25 after Egan-Jones Ratings cut Spain's credit score for the third time in less than a month, saying the need to support Spanish banks was putting new strains on public finances.


Read more: http://www.smh.com.au/business/markets/euro-hit-by-spain-woes-facebook-drops-20120530-1zhvo.html#ixzz1wIHeMiEP


Monday, May 28, 2012

Market prepares for Greek exit of Euro


http://www.bbc.co.uk/news/business-18233033 The premium for Spain's 10-year bond over its German equivalent rose to 5.05 percentage points, the highest since the euro was formed..

The slow and silent run on banks in Italy and Spain - and Greece, of course - is a reality, according to bankers and regulators, although not yet a lethal one...   http://www.bbc.co.uk/news/business-18234057


...In plain terms, by mid-June, Greece could very well be controlled by an anti-austerity, anti-bailout party that wants to completely do away with the second Greek bailout (which means a potential disorderly default).

This actually is the best possible outcome for Greece as the alternative is outright anarchy...   http://www.marketoracle.co.uk/Article34874.html 

http://www.bbc.co.uk/news/business-18074674 What could happen if Greece leaves the Euro?

http://www.economonitor.com/nouriel/2012/05/17/greece-must-exit/ The Greek euro tragedy is reaching its final act: it is clear that either this year or next, Greece is highly likely to default on its debt and exit the eurozone.


Postponing the exit after the June election with a new government committed to a variant of the same failed policies (recessionary austerity and structural reforms) will not restore growth and competitiveness. Greece is stuck in a vicious cycle of insolvency, lost competitiveness, external deficits, and ever-deepening depression. The only way to stop it is to begin an orderly default and exit, coordinated and financed by the European Central Bank, the European Union, and the International Monetary Fund (the “Troika”), that minimizes collateral damage to Greece and the rest of the eurozone.

Thursday, May 24, 2012

Europe imploding


Here are the major developments we’ve seen so far:


Deputy Prime Minister Nick Clegg says a Greek exit from the euro would have a "very unpredictable knock on effect" on the global economy.


ROME/HELSINKI, May 24 (Reuters) - At least half of euro zone governments as well as banks and large companies are making contingency plans in case Greece decides to leave the single currency area, even though the preferred option is still for Athens to keep the euro.
Italy's Deputy Economy Minister Vittorio Grilli said his country was ready for such a possibility, if Greek voters on June 17 give power to parties that reject reforms agreed with the EU and IMF in exchange for emergency loans.



Tuesday, May 22, 2012

Forex Expert Advisors

There are lots of ideas meant to help traders make money, but it is easy to see why expert advisor systems stand out among them as being so appealing for so many traders. Although this type of technology was first implemented in the futures market, the currency exchange market quickly saw the advantages to these programs and eagerly stepped up in implementing them. Their growing popularity on the forex market shows how useful the systems can be for traders who use them.

Depending on the system's available features and level of technological support for the software, expert advisor systems will support at least most of the indicators commonly used on the currency market: types of averages (exponential moving average, weighted moving average, simple moving average, triangular, variable and time series moving average), Wilder's average true range, standard deviation, mass index, trailing stops, vertical horizontal filter, fixed stops and limits, and many more. They can perform trading operations in real time. In other words, it only takes seconds, so the trader doesn't have to wait for the trade to go through. It also allows for greater diversification of trading and being capable of analyzing data over very short periods of time. That creates more investment opportunities and the potential for profit both in local markets and internationally. Expert advisor programs allow short term data analysis, which was not possible until the automated systems were produced and gives the trader an edge in that he can now easily predict market trends within a short period of time and react accordingly.

One of the greatest benefits of these systems is that they increase daily trades to a large degree. This is the logical result of transaction execution times dropping from seconds to a few fractions of a second. More trades to go through per trader in a twenty-four hour period. Correspondingly, the number of traders is going up all the time, which further allows the market to expand even more and move even more quickly.

Forex expert advisors instantly execute every transaction, twenty-four hours a day, seven days a week, where a human trader would have to sleep or spend time with his family instead of checking the market. The programs adhere to the usual trading rules and follow the same indicators as manual traders. They offer access to a number of different functions, including money management, automatic trailing stops, discretionary market orders and limit and/or stop orders, and provide various indicators for technical analysis to give the human trader the chance to study current trends and then develop strategies based on those trends for future trading.

Technology is constantly changing and improving. As more and more investors learn how to take advantage of its benefits, expert advisors will continue to help the market develop, making it even easier for people to profit from foreign currency trading.

Friday, May 11, 2012

Banks prepare for the return of the drachma


Drachma coins are on display in this picture illustration taken in Athens November 11, 2011. Greece's prime minister designate will name a new crisis cabinet on Friday to roll out painful austerity measures and calm the political turmoil that has threatened to bankrupt Athens and force it out of the euro zone. REUTERS/Yiorgos Karahalis (GREECE - Tags: BUSINESS)

(Reuters) - Banks are quietly readying themselves to start trading a new Greek currency. Some banks never erased the drachma from their systems afterGreece adopted the euro more than a decade ago and would be ready at the flick of a switch if its debt problems forced it to bring back national banknotes and coins.

http://www.reuters.com/article/2012/05/11/us-banks-drachma-idUSBRE84A0DC20120511

BBC: How does Greece leave the Euro? http://www.bbc.co.uk/news/business-15575751

http://en.wikipedia.org/wiki/Greek_drachma


“Drachma Clauses”: Planning for Greece’s Exit from the Eurozone



http://www.zerohedge.com/contributed/2012-16-21/%E2%80%9Cdrachma-clauses%E2%80%9D-planning-greece%E2%80%99s-exit-eurozone

Monday, April 30, 2012

MQL Data Types

MQL4 supports seven data types within the program. Each type is associated with different trading tasks that programmers need to perform. The goal of this article is to provide a brief reference for when to use each data type.

The double data type is probably the most common type found in MQL programs. This is because it is the type responsible for calculating floating point numbers. Say for example, that an expert advisor needs to determine when to adjust a trailing stop. The expert advisor looks at the current price and subtracts it from the current stop loss to maintain the appropriate distance (1.3230-1.3209=0.0021). The distance requires a decimal point. When the expert advisor saves the distance to memory, it needs to save the information after the decimal point. That forces the programmer to choose a variable of type double.

Integers, or int, is the simpler version of double. Double values require a decimal place to hold the number's value accurately. An integer, or whole number, does not have a decimal place. Integers are appropriately used when the MQL programmer knows for a certain fact that the number will never contain a decimal. An example would be if you wanted to implement a max trades feature. If the number of open trades in the account exceeds a certain number, then prevent trades. We know in advance that there is no such thing at 4.76 trades being open. There can only be 4 trades open or 5 trades open. This clearly indicates the need to use an integer.

Datetime values are just what they sound like. They represent both the date and time. More specifically, a datetime variable represents the number of seconds that have elapsed since January 1, 1970. This is where it gets a little tricky. The number of seconds that have elapsed is actually an integer. Datetimes store integer values but then associate them with a date and time.

A value of 0 would indicate that the time is 00:00 on January 1, 1970. A value of 60 stands for one minute later at 00:01 1/1/1970, and so on. One benefit of knowing that the datetime type stores information as integers is that you can easily determine the amount of time that happens between an event. If the event starts at 15:35 and ends at 18:12, you can simply subtract 18:12 - 15:35 and wind up with the number of seconds between those values. That information can then be used to determine the number minutes/hours/days between the two events.

The color data type, not surprisingly, holds color information such as black, yellow, red and so on. Much like datetime types, color also uses integers to store the information. The difference, though, is that extracting the color information from the integer is not at all obvious. Increasing a color type from 32768 by one will not necessarily make it more or less green. Colors use the integer information to retrieve the red, green and blue components of the color in hexadecimal format. Explaining hexadecimals is well beyond the scope of this article. It's unlikely to come up in your MQL programming. I've been doing this for over five years and only came across one project that required manipulating a color in way more complicated than alternating between two set colors.

A string is anything that resembles a word or sentence. It always uses quotes to contain the information. My favorite use of strings is to gather information to display on the chart or in a log file whenever I need to debug an expert advisor.

Char is the final data type. It's so closely related to a string that I wasn't even aware this type existed until I looked up information for this article. If we study the word "trade", then we will find that it is composed of the five characters t, r, a, d and e.

A final note on data types. There are two ways that types are held in memory. An extern variable is one that shows up in the inputs screen whenever an expert advisor or indicator loads. Static variables are the opposite. They remain within the MQL program and never visible outside of it.

Wednesday, April 25, 2012



Recall that Martingale systems aim to never lose money. Instead of accepting losses and moving on, a Martingale betting strategy doubles the previous bet. Whenever a win finally does happen, all losses up until that point are regained. The trade also gains the same amount of profit that the original trade hoped to capture.

Trading forex with a Martingale money management system will almost inevitably lead to blowing up an account. I've written about this inevitable outcome repeatedly over the past six months. At the risk of beating a dead horse, I figured that visual proof would relieve any lingering hopes once and for all.

The goal of the exercise is to focus on the risk of ruin rather than the profits acquired. As time goes on, the likelihood of ruin goes up with the number of trades placed. A trade is each time a new transaction enters. It does not matter whether or not the last trade was a winner or a loser.

Fifty trades on most Martingale systems corresponds to anything from several days to several weeks. The level of aggression used in the trade level (i.e., the pip distance used to open a new trade) is what most strongly affects the amount of time required to reach fifty trades.

Placing 50 trades shows what most traders know. The returns look fairly nice at that point. A return of 20% on the account shows a 40% probability of occurring. The risk of wiping out the account looks meek at 8.5%.

Increasing the number of trades to 200, which corresponds to several weeks or months, the odds of outright failure skyrocket to 35%. The lucky traders that have not yet blown up show returns ranging from 20% all the way to 300%. The total risk is more apparent, although many traders fall victim to the lure of quick, large returns. If it all looks too easy at this point in time, that's because it is.

Going out to 1,000 trades, which I roughly ballpark as the amount of trades an average expert advisor might complete in 9 months to a year, is where the inevitable result is obvious. The odds of reaching a zero balance reach 95%. A tiny handful of traders are floating huge returns. As the number of trades increases from 1,000 to 2,000 to 10,000, the tiny fraction of accounts left eventually dwindles down to zero.

The test assumes that the trader uses fixed fractional money management set at 1% of the account value. Recall from earlier experiments that a 1% risk value will almost never ruin an account after 200 trades. The percent accuracy for the trades remains at 50%, which is perfectly random. The random number file has been upgraded to include 10 million random numbers instead of the previous half a million.

Monday, April 23, 2012

Fiber projects compete for transatlantic speed

A few weeks ago I wrote about Project Express, a new fiber-optic cable being built across the Atlantic that will give a select number of high-frequency traders a tiny speed advantage in trading times between New York and London. Currently, data take 64 milliseconds (give or take a few fractions of an eye blink) to travel round-trip between New York and London along a cable built in 1998 called the AC-1.


http://www.businessweek.com/articles/2012-04-23/high-speed-trading-my-laser-is-faster-than-your-laser

http://www.businessweek.com/articles/2012-03-29/trading-at-the-speed-of-light


In April, the Canadian research ship Coriolis II will set out from Halifax to survey parts of the continental shelf stretching 1,000 miles off the east coast of Nova Scotia.
The ship has been hired by Hibernia Atlantic, a Summit, New Jersey-based company that operates undersea telecom cables, to map out a new $300 million trans-Atlantic fiber-optic line called Project Express. The cable will stretch 3,000 miles beneath the North Atlantic, connecting financial markets in London and New York at record transmission speeds. A small group of U.S. and European high-speed trading firms will pay steep fees to use the cable.

http://www.bloomberg.com/news/2012-03-29/cable-across-atlantic-aims-to-save-traders-milliseconds.html

Thursday, April 12, 2012

Fixed Fractional Money Management



Trading totally at random with a 50% winning percentage and an R multiple of 1 yields no advantage, as I discussed last week in modeling money management. Remember that an R multiple is the average win to the average loss. Such a system poses neither an advantage or disadvantage. The average outcome should come out extremely close to the starting balance.

Most traders focus on risking a set dollar amount such as $1,000 on a given trade. Fixed fractional money management updates that dollar figure after every single trade. It changes the overall outcome after you add up all the winners and all of the losers. Remember that trading is the net outcome of several hundred trades or even thousands of trades. The power of money management comes into play as the number of trades increases.

Fixed fractional money management stretches some portions of the bell curve and compresses other regions. Before we get into that, it's important to remember what fixed fractional money management means. It stands for the idea of risking a set percentage of the current account equity rather than the starting equity.

Consider an example where the account balance starts at $100,000 risking 1%. Both methods risk the same amount on the first trade, $1,000. The next trade, however, will yield a different risk amount. A win on the previous trade would increase the account equity to $101,000. One percent of a 101 grand is $1,010 of risk on the next trade. A whopping ten dollar change.

That may seem trivial. It is most certainly not over the long run.

Examples

Consider a trader that plays the coin toss game and has a system with the following characteristics:

He starts with a $100, 000 account balance
His R multiple is 1.0
He wins 50% of the time with no trading costs
He risks 1%

The absolute worst outcome of playing the coin toss with a fixed dollar risk of $1,000 is a loss of $46,000. Adding fixed fractional money management during that difficult drawdown improves the drawdown to a less substantial loss of $37,500. The worst drawdown goes from -46% to -37.5%. The method drags the absolute worst case scenario and pulls it closer to the average. When an unlucky, devastating drawdown kicks in, the technique reduces the losses that the trader experiences.

The best case scenario for fixed dollar risk is a $58,000 (58%) return. Adding money management to the system dramatically stretches the best case scenario further to the right. It improves to a $76,000 return (76%). The good times get a lot better without changing anything at all about the trading system. The method stretches positive returns away from the average. The trader walks away with more money in his pocket.

The natural instinct is to conclude that fixed fractional money management is the way to go. I agree. It improves the risk reward profile of a totally random strategy. Adding it to a real trading system should help control parameters that most traders consider critical like drawdowns and maximizing the return.

An important consequence of using fixed fractional money management, however, is that the odds of receiving a below average return increase somewhat. The coin toss game suffered a below average return 47% of the time. Applying fixed fractional money management increased the likelihood of a below average return to 53%. The effect is not all that much. Losing is more likely. But when it happens, the "loss" is so negligible that it can be thought of as breaking even.

Random numbers occasionally follow a seemingly non-random pattern such as loss-win-loss-win. When this occurs, the size of the trade on the losses is bigger than the trade size of the winners. Even if the winning percentage comes out at precisely 50%, those wins get slightly overshadowed by the losers. That micro effect of slightly larger losses than gains shows up as a slightly increased risk of not making as much money as expected.

Graphing all outcomes

Fixed fractional curves

Red areas represent the losing outcomes while green areas represent the winners. Money management is really about maximizing the ratio of green area to red area. Random trades with no expectation of profit yield a bell curve, which appears on the left.

Fixed fractional moves the highest density of returns slightly to the left. Doing so creates the trivial disadvantage of a slightly increased risk of negligible loss. Importantly, the far left side (the worst case loser) gets dragged much closer to the average. The far right side (the best case winner), gets stretched much further from the average. The goal is to make the green area larger than the red area to where we actually expect a profit.