Forex: USD/CHF extends slide to fresh lows

FXstreet.com (Córdoba) – The Swiss Franc continues its rally against the Dollar. The USD/CHF fell further below 0.8900 and reached a new all time low at 0.8878. The pair remains trading near session low, holding a bearish bias. Greenback is headed toward the tenth daily decline out of the last 12 trading days.

The recovery of the Dollar earlier found resistance at 0.8930 and the pair resumed its downtrend as the Swissy strengthened across the board.

To the downside, support levels could be located at 0.8860 and below at 0.8820 while to the upside, probable resistance levels lie at 0.8890 and above at 0.8930 and 0.8965.
Read more »

Wall Street jumps on optimism, Dollar slump continues

FXstreet.com (Córdoba) – Stocks rose sharply in Wall Street with the Dow Jones ending at the highest level since June 2008. Gold reached fresh record highs above $1,500 an ounce as the Dollar posted losses across the board.

The DOW rose 1.52% on Wednesday and has risen more than 300 point in three days. Earnings reports and better-than-expected housing data triggered optimism in Wall Street.

In the currency market, the Aussie and the Swiss Franc were among the best performers. The Yen trimmed losses on American hours but finished mostly lower in the market.

The EUR/USD reached fresh 15-month highs at 1.4545, pulled back afterwards to 1.4485 but managed to rise back above 1.4500. Cable remained steady on American hours consolidating around 1.6400, barely below April highs.

The USD/CHF extended its decline to fresh record lows at 0.8870/80 and remains under pressure. Greenback is also trading at record lows against the Aussie.
Read more »

US yields continue to grind lower

By: Jamie Coleman

Hopes for robust US growth have been dialed back further in the wake of the US trade data which has pressured US yields lower. The buck, which suffers from many woes, seems to latch on to the latest one to float across the screens, and yields are today's problem du jour for USD bears to hang their hats on... 10s are down 10 bp in yield with 5 over 12 bp lower.
Read more »

Forex Trading Weekly Forecast - 02.28.2011

Forex_Trading_Weekly_Forecast_02.28.2011_body_TOF02252011table.png, Forex Trading Weekly Forecast - 02.28.2011

DailyFX provides forex news on the economic reports and political events that influence the currency market.

Read more »

Forex - Survey: Sales of Distressed Homes increased in January

Forex - How Does an Oil Crisis Impact the U.S. Dollar?
By: Kathy Lien on February 22 11 10:01 EST

Oil prices are on the rise and everyone is talking about the possibility of $100 oil. Right now, the rise in oil is accompanied by a rise in the U.S. dollar but will this relationship last? Taking a look back at the two prominent oil shocks of the past four decades (1973 and 1979) and others beyond that, we see that the dollar eventually weakens.

1973 Oil Crisis: Initially Dollar Bullish, Eventually Dollar Bearish

In 1973, oil prices jumped 134% when the members of the OAPEC, which is OPEC plus Egypt and Syria, announced that they were no longer shipping oil to nations that supported Israel in its conflict with Syria and Egypt. This effectively shut down exports to the US, Western Europe and Japan. As a result, prices rose significantly to account for the sharp reduction in supply. At the same time, Saudi Arabia, Iran, Iraq, Abu Dhabi, Kuwait, and Qatar unilaterally raised prices by 17 percent and announced production cuts after negotiations with major oil companies.

In response to this oil shock, the trade weighted US dollar index* as measured against the major currencies first strengthened alongside oil and then sold off immediately. At that time, the Federal Reserve was combating inflationary pressures by raising interest rates. The jump in crude exacerbated the need for further rate hikes, forcing the central bank to bring the Fed Funds target rate from 7.5 percent in May 1973 to a high of 13 percent by the summer of 1974. The focus on inflation was initially dollar bullish but once the rate hikes started to have a serious impact on US growth, the trend turned dollar bearish. Between the third quarter of 1973 and the first quarter of 1975, GDP growth contracted five out of the seven quarters and in response to the deterioration in growth, the US dollar erased all of its gains.

1973oil

1979 Oil Crisis: Initially Dollar Bullish, Eventually Dollar Bearish

The US’ second oil crisis in 1979 was triggered by the Iranian revolution and exacerbated by a gasoline shortage. OPEC raised prices by 14.5 percent on April 1st and the US Department of Energy announced phased oil price decontrols which involved the gradual increased of old oil price ceilings. Shortly thereafter, OEC raised prices a second time by 15 percent, the US halted imports from Iran, while Kuwait, Iran and Libya cut production. Saudi Arabia also eventually raised their market crude prices to $24 per barrel and because of all of these factors, crude oil prices increased 118 percent between January 1979 and December 1979.

The price action of the US dollar during that time was very similar to the price action of the greenback in 1973; it first rallied and then sold off. At that time, the Federal Reserve was also hiking interest rates to combat inflationary pressures and the oil price spike exacerbated their degree of rate hikes. Between January 1979 and December 1979, rates where taken from 10 percent to 14 percent and by March of 1980, the Fed Funds rate hit a high of 20 percent. Quarterly GDP growth dropped 7.8 percent in the second quarter of 1980, triggering the dollar’s demise.

1979oil

1990 Oil Price Spike: Persistent Dollar Weakness

Between June and October of 1990, oil prices also jumped 113 percent as a result of the first Gulf War. Interestingly enough, the US dollar behaved very differently for two reasons. The first was the short-lived nature of the oil spike; prices started falling 6 months after the initial rise and the second was the Fed’s monetary policy cycle. Unlike the oil crisis of 1973 or 1979, the Federal Reserve started cutting interest rates before the spike and continued to reduce rates throughout 1990 and into 1991 and the dollar was already in a downtrend due to the loosening of monetary policy. The weakness continued as growth slowed with GDP remaining stagnant in third quarter of 1990, and then falling 3 and 2 percent respectively over the next two quarters.

Although the U.S. dollar is rising right now, the abundance of spare capacity and the muted level of inflation means that the Federal Reserve is not pressured by the increase in oil prices. The market basically doesn’t believe that the Fed will start raising interest rates – and they have good reason to feel this way because based upon the last 3 oil shocks, the recovery could suffer from higher commodity prices. Back in the 1990s, the Fed took a break from cutting rates like they are expected to do in June, but they quickly resurrected their rate cuts as the economy slowed. Of course, interest rates were much higher then than they are now, but if growth does not pick up, the Fed may be forced to prolong its asset purchase program.
Read more »

Bookmark and Share Forex - Survey: Sales of Distressed Homes increased in January

Forex - Survey: Sales of Distressed Homes increased in January
By: Calculated Risk on February 22 11 8:22 EST
From Campbell/Inside Mortgage Finance HousingPulse: HousingPulse Distressed Property Index Hits 49.6% in January

Perhaps the biggest news in the January data was a sharp rise in the HousingPulse Distressed Property Index or DPI, a key indicator of the health of the housing market. The DPI, or share of total transactions involving distressed properties, climbed from 47.2% in December to 49.6% in January. The increase was a continuation of a trend as the DPI registered just 44.5% back in November.
...
Already, in the key state of California, distressed property transactions account for 66% of the market. In Florida, distressed property transactions account for 63% of the market. And in the combined area of Arizona and Nevada, distressed property transactions are a stunning 72% of home sales.
...
The increase in distressed properties, combined with a reduction in first-time homebuyers, is causing downward pricing pressure to build in the market, especially for the categories of damaged REO and move-in ready REO.

This fits with other recent reports suggesting the percent of distressed sales was very high in January. The Case-Shiller house price data, to be released this morning, will be for last year (October, November and December) - and this survey suggests the repeat transaction house price indexes will show further weakness in 2011.
Read more »

Forex - Misc: Shiller says house prices could fall 15% to 25%, Solid Manufacturing Survey, Libya Updates

Forex - Misc: Shiller says house prices could fall 15% to 25%, Solid Manufacturing Survey, Libya Updates
By: Calculated Risk on February 22 11 1:45 EST
House prices:
• From David Streitfeld at the NY Times: Home Prices Slid in December in Most U.S. Cities, Index Shows

Mr. Shiller, noting the unrest in the Middle East, a large backlog of foreclosed houses, the uncertain future of the mortgage holding companies Fannie Mae and Freddie Mac, and proposals to reduce the mortgage tax deduction, saw “a substantial risk” of declines of “15 percent, 20 percent, 25 percent.”

• Real House Prices fall to 2000 Levels, Update on NAR Overstating Sales
• Case-Shiller: National Home Prices Are Close to the 2009Q1 Trough

Other U.S. economic news:
• From the Richmond Fed: Manufacturing Activity Advanced at a Healthy Pace in February

In February, the seasonally adjusted composite index of manufacturing activity — our broadest measure of manufacturing — rose seven points to 25 from January's reading of 18. ... The manufacturing employment index added two points to end at 16, and the average workweek measure moved up three points to 20. Moreover, wage growth gained five points to 18. ... District manufacturers reported that raw materials prices increased at an average annual rate of 4.72 percent

All good news except prices.
• From MarketWatch: Consumer confidence jumps in February

The gauge for consumer confidence rose to 70.4 in February from 64.8 in January.

Libya updates:
• From the NY Times: Chaos Grows in Libya as Strife in Tripoli Intensifies

Libya appeared to slip further into chaos on Tuesday, as Col. Muammar el-Qaddafi vowed “to fight to the last drop of blood” and clashes intensified between rebels and his loyalists in the capital, Tripoli. ... Witnesses described the streets of Tripoli as a war zone.
Read more »

Ichimoku Weekly: USDJPY

We’ve finally reached to the place where we need to make some serious decisions as which way to go for this important Pair. Weekly Timeframe does suggest that the Pair has all the reasons to break the Kumo Cloud and start trading in the Bullish zone however the Daily Timeframe (at least for some time) has lost the momentum and has already reached to the Overshoot zone …

Should we have some correction, we have very strong Support zones in the range of 89.50 to 92.00

(Ichimoku)

Read more »

Trading Systems Coding: Conclusion

After going through this step-by-step tutorial, you should have a fully operational and fully automatic trading system.

As you continue working with your system, keep in mind the following:

  • Always backtest until your system performs well with past data, then paper trade to make
  • sure your system performs well with current data. The market has two phases - trending and ranging - a
  • nd very few trading systems handle both perfectly. Be sure to only trade in a market that your system can beat.
  • Make changes one at a time so that you can pinpoint which aspects are improving your returns and which are hurting them.
  • Keep it simple. Extremely complex trading systems are often fitted to work well with past data, but are incapable of adapting to new market conditions.
  • Make sure that you know the strategy behind your trading system. As absurd as it sounds, many people develop their systems until they become so complex that they forget the underlying strategy.
  • Don't over-optimize. Optimizing too much can lead to what is known as curve-fitting, which can reduce your trading system's effectiveness and ability to adapt.
Resources

Here are some trading applications worth checking out:
MetaTrader - http://www.metaquotes.net/
TradeStation - http://www.tradestation.com/
Tradecision - http://www.tradecision.com/
MetaStock - http://www.metastock.com/
AmiBroker - http://www.amibroker.com/
WealthLab - http://www.wealth-lab.com/
Comprehensive List - http://elitetrader.com/so/

Here are some community resources that can assist you:
Moneytec - http://www.moneytec.com/
StrategyBuilderFX - http://www.strategybuilderfx.com/
EliteTrader - http://www.elitetrader.com/
Read more »
Compiling Your Code
The final step in the actual development of your trading system is compilation - that is, converting your code into a file that the trading software can execute, or run, at any given time without re-reading the code.

The way in which code is compiled differs between trading programs. However, the majority of them simply let you click a compile button and do one of two things: either 1) the program will compile the code and create a new file, or 2) the compiler will list the errors that you have made in your code (as we saw in the previous section). Because MetaTrader has a standard setup, we will use its trading application as an example for the purposes of this tutorial.

MetaTrader's "Compile" button can be found on the top tool bar:




Assuming the compilation goes well, you will now have an executable file that your trading program can quickly read and apply to your charts.

Applying the System to Your Charts
Most trading applications will let you easily apply your trading system within the trading application by either letting you drag the file onto the chart, or inserting it via a menu. MetaTrader allows you to drag the executable file from the "Navigator" window onto the chart to which you wish to apply your trading system.

After this, a dialog box comes up with several options:


Figure 2

Common
The first set of options is standard with many trading applications. The first option simply lets you define what types of positions you are willing to take (long, short, or both). The second option lets you enable "alerts", which are pop-up windows that notify you when your criteria for a trade have been met.

Live Trading
There are two ways in which you can apply your trading system:

1. Semi-Automated Systems - Semi-automated systems are those that alert you to new trades that meet your criteria. Although the alerts themselves are automated, the trades are not placed automatically - hence the "semi" prefix. Although this type of system carries significantly less risk, it also requires you to be near a computer at all times. However, recent innovations have helped solve some of these inconveniences by allowing signals to be sent via email, phone (short message service) or other hi-tech media.

2. Automated Systems - Automated systems are those that place trades with your broker automatically - that is, they require no intervention on your part. This type of trading system involves significantly more risk, especially if there are logical errors that you did not catch when testing. Therefore, it is imperative that you either paper trade or semi-automate your trading system to be sure that it performs as expected in a live environment. ( Note that these trading systems will also require you to complete additional paperwork for your broker stating that they can't be held responsible if your trading system generates large losses.

Safety
The two options here (see Figure 2) let you determine whether or not you are willing to let the program call external dynamic link libraries (DLLs). Remember that DLLs are libraries that let you reuse code from other people's trading systems. If your trading system makes use of these external DLLs, then you will need to enable these options. If not, then you are best off leaving these unchecked.




Inputs
Here is where you can define the inputs for the trading system if you did not specify them directly in your code:


Figure 3

Notice that this area enables you to insert custom inputs without modifying the code at all. This is useful if you plan on changing your inputs, but want to use the same basic strategy. Note that if you optimized your variables, this option would not be available.

Conclusion
Now you should be able to compile and apply your trading system! Again, be sure to paper trade - or at least semi-automate - your trading system before allowing the system to place trades automatically. Failure to do this could lead to large losses should there be a logical error in your code.
Read more »

Trading Systems Coding: The Coding Process

By now you should have a design in hand as well as a basic idea of what the code looks like. In this section, we'll take a more in-depth look at how a program is created. After reading this section, you should be able to understand basic program structure and be able to convert your design to code!



An Overview

There are two basic parts to a program:



* Variables - These are items that hold data. This can be data that you collect from the user, or any other data.

* Statements - These form the core of the program. Statements manipulate the data to get results that can be converted to actions.



In addition to these core components, there are also several optional components:



* Functions - These are simply collections of related statements that can be used to perform a specific task. For example, a function telling you when to buy might include a statement to check whether you have enough money, a statement to determine whether it meets your criteria and a statement to place the order. A function combines these, allowing you to simply call on the function instead of rewriting these statements each time you want to buy.

* Arrays - These are simply data structures that hold similar data and enable you to access and manipulate the data more efficiently.



A Look at Variables

Variables are simply objects that you define to hold data. You may recall from the previous section that we used three variables: MATrendPeriod, MaCurrent and MaPrior. MATrendPeriod held a number that defined how many days we would use in our moving average calculation; MaCurrent held a number representing the current moving average; and MaPrior held a number representing the prior moving average.



Creating a Variable

You can use almost any name you want when naming a variable. The only exception is a list of ''restricted words'' that you are not allowed to use because the names are already used by other parts of the program. You can find your trading program's list of restricted words in the program's documentation. In general, names should describe the data being held. For example, notice that we used MaCurrent to define the current moving average.



After you have created a name, you must declare and define the variable. Declaring a variable tells the computer what type of data it is, and tells it to make space for that data. Defining the variable is where actual data is assigned, or added, to the variable. Let's take a look at these processes:



1. Declaring a Variable

In MetaTrader, variables are declared automatically when you assign information to them. In other programs, you may have to declare a variable, which is typically done using the following format:



;



The two types of data are numbers and text, but these are broken down into more groups like integers (whole numbers), double (large numbers), float (decimal numbers), string (text), and others depending on the program you are using. For example, the following code will declare numberOfDays as an integer:



Int numberOfDays;



2. Defining a Variable

After your variable has been declared, the computer has created space for it. Now, all you have to do is add actual data to that space. This can be done in two ways: you can either define a set amount, or you can perform a calculation to obtain a value, which you then assign to the variable.



In MetaTrader, you can add set data using the following format:



Defines: ();



In other programs, set data is often assigned simply using the equals sign:



= ;



If you want to perform a calculation to obtain data to assign to the variable, then you simply assign the variable to the calculation:



= ;



For example, to set a 20-day moving average in MetaTrader, we use the following code:



= iMA(20,MODE_SMA,0);



Note that the iMA(20,MODE_SMA,0) portion of the code is the calculation. The format for this calculation was developed by MetaTrader and will differ if you are using another trading program. To find these calculations, you must consult your trading program's documentation, which usually contains a list of all available calculations.



3. Using Variables

Once declared and defined, variables can be used anywhere else within the program to represent the data they contain. To do this, simple type the name of the variable in place of the data. For example, if MATrendPeriod contains the number of days we want a moving average calculated for, we can use it to replace the 20 in our example above:



= iMA(MATrendPeriod, MODE_SMA, 0);



There are two advantages to using variables as opposed to just the data: (1) you can change the data in one place, and (2) the result of an entire calculation can be contained within one variable.



A Look at Statements

Statements are the core of any program - they contain all of the commands that manipulate data to make decisions. Here we will take a look at several of the most common types of statements and how they can be used.



1. Comments

If you have designed a complex trading system, it may take a lot of code to implement your rules; therefore, it would be prudent to insert comments in your code to help yourself understand it in the future, and to help out anyone with whom you may share your code. Almost all trading applications share a similar method for creating comments:



Single Line Comments:



//



Multi-Line Comments:



/*



*/



2. The 'If' Statement

This is the statement you will use most when coding a trading system. This statement lets you create scenarios as we did in the design portion of this tutorial. You may have also noticed that this was the only statement we used in the example program we created. This type of statement is implemented using the following format:



Standard If/Then:



If Then ;



Standard If/Else:



If Then Else ;



So, for example:



If accountBalance <>



The condition can be:



· Greater Than (>)

· Less Than (<) · Equal To (=). Note that one '=' assigns, two '==' returns either true or false. 3. The While Loop This loop is commonly used to tell the computer to continue doing something while a certain condition is true or false. So, for example, maybe you want to have the trading system keep a position open while your account is above a certain balance, but close it if it ever falls below that balance. These statements are created using the following format: While ;



4. The Exit and/or End Statement

An 'Exit' or 'End' statement is used to indicate to the computer that your program will be ending at that particular point. Typically, this is done using:



Exit;

Or,

End;



These are usually placed in the 'If' statements if that statement is executed so that the computer doesn't continue to look at the rest of the 'If' statements.



Trading System Implementation

Note that different trading applications will differ slightly in how they implement statements. For example, in some trading applications, the 'If' statement is constructed by using:



If (, , );



Meanwhile, other applications may split up this code into two parts:



If () { } else { };



We can see that the same idea is present, but the implementation differs. It is important to consult your trading application's documentation, or application programming interface (API), to determine what differences exist.











Putting It All Together

Now you should have an idea of the different components that can be used when coding your trading system. All that remains to be done is to put everything together. To do this, simply take your design document and determine the following:



* What variables will I have to define?

o Calculations à Moving averages, RSI, MACD, etc.

o Set Amounts à Time periods, deposit amounts, risk percentages, etc.

* What statements will I have to make?

o Convert your rules to the proper statements using the above guides.



Once you know this, all you need to do is piece together all of the parts. The standard structure for a program is:











Conclusion

Now you should have a basic idea of how to put your trading system into code. Be sure to consult your trading application's documentation often, as it may contain pre-built calculations that you can use, code examples and much more that can help you to better understand the specifics. In the next part of this tutorial, we'll take a look at testing your new program both technically (to find errors in the code) and theoretically (to find errors in your logic).

Read more »

Trading Systems Coding: The Coding Stage

Now that we have a design document in hand, we can look at how these rules are put into code that a computer can understand. In this section, we'll break down a section of code and look at it piece by piece. For this example, we will use MetaTrader's programming language MetaQuotes II to build a very simple moving average trading system.

Defines: MATrendPeriod(100);

Var:MaCurrent(0),MaPrior(0);


If Bars < 100 Then Exit;

If FreeMargin < 1000 then Exit;


maCurrent =iMA(MATrendPeriod,MODE_SMA,0);

maPrior =iMA(MATrendPeriod,MODE_SMA,1);


If maCurrent > maPrior then

{SetOrder(OP_BUY,Lots,Ask,3,0,Ask+TakeProfit*Point,RED); Exit;};


If maCurrent < maPrior then

{SetOrder(OP_SELL,Lots,Bid,3,0,Bid-TakeProfit*Point,RED); Exit;};

The If/Then Format
After taking a brief look at this code, you should recognize a few elements that we touched on in the design phase. For example, you should recognize the If/Then format that we used when constructing our design. To get a better understanding of this code, let's break it down and analyze each part:

Defines: MATrendPeriod(100);

Var: MaCurrent(0),MaPrior(0);

Here, we're simply defining the moving average that we are using by saying that we want it to be an average of the last 100 bars. The Defines function here lets us do that for any type of data we want. After that, we simply invent two variables (items which we create to hold data) MaCurrent(0) and MaPrior(0). These two variables will hold the data that we will set in a later step.

If Bars < 100 Then Exit;

If FreeMargin < 1000 then Exit;

Here we see the If/Then format that we used in the design phase put to work. These two statements tell the computer to exit if certain conditions aren't met. Let's translate these two commands into English:

If Bars < 100 Then Exit; à "If there are fewer than 100 bars (data points) on the chart, then exit the program without doing anything.''

If FreeMargin < 1000 then Exit; à "If my account has less than $1,000 in available funds, then exit the program without doing anything.''

You can translate any criteria you want into this format and put it at the beginning of your program in order to adapt to certain situations.

Buy and Sell Signals

maCurrent =iMA(MATrendPeriod,MODE_SMA,0);

maPrior =iMA(MATrendPeriod,MODE_SMA,1);

Now let's make use of the two variables we described above. Let's take these statements apart to see what they are doing:

maCurrent = à Here we are telling the computer to assign the following information to "maCurrent''.

iMA(MATrendPeriod,MODE_SMA,0); à Here we are using a simple statement, which uses the following basic format: Study(TimePeriod,Mode,Start).

Note that you can replace iMA with MACD, RSI or any other studies your trading system may be using. You can also replace the parameters to suit your own system.

If maCurrent > maPrior then

{SetOrder(OP_BUY,Lots,Ask,3,0,Ask+TakeProfit*Point,RED); Exit;};

Now we are getting somewhere! Here is the part of the code that tells the computer when to buy. Notice that we are making use again of the If/Then format that we used in the design document. Let's translate this to English to see what's happening:

If maCurrent > maPrior then { à "If the current Moving Average is greater than the prior Moving Average, then…''

SetOrder( à "Create an order entry to …''

OP_BUY,Lots,Ask,3,0,Ask+TakeProfit*Point,RED à "Buy my defined number of lots at the ask price plus my take profit point, and mark it as a red point on the chart.''

); à "End the order.''

Exit; à "Exit the trading strategy.''

}; à "End the If/Then statement.''




Note that the Take Profit Point is something that is defined by users when they add the trading system to their charts. Also notice that we are buying at the ask price and selling at the bid price - this is a key feature, especially when creating a system for stocks.

If maCurrent < maPrior then

{SetOrder(OP_SELL,Lots,Bid,3,0,Bid-TakeProfit*Point,RED); Exit;};

Finally, we have our code that tells the computer when to take a short position. Note that this statement is almost identical to the "buy'' statement, aside from the OP_SELL instead of OP_BUY as well as the usage of the bid price as opposed to the ask price.

Conclusion
And there you have it - the bare bones of what a trading system code looks like. Please note that the above code is not a complete trading system, as it does not include any commands to close open positions. Such additional aspects can be implemented using a format similar to the code we've shown.

In the next section of this tutorial, we will go into greater depth regarding the specific ways in which your trading system can be converted to code.
Read more »

Trading Systems Coding: System Design

The first step when coding any application is the design phase. Whether coding a software application or a trading system, careful design and planning will help you finish in a shorter amount of time with fewer errors. We will be using a simple three-step process to design our trading system.

Step 1: Create Your Trading System Rules
The first step when designing a trading system is simply coming up with the rules by which your system will operate. There should be four core rules to every trading system:

1. Buy - Identify when you want to buy a position.
2. Sell - Identify when you want to sell a position.
3. Stop - Identify when you want to cut your losses.
4. Target - Identify when you want to book a gain.

So, for example:

1. Buy - When the 30-day moving average (MA) crosses above the 60-day MA
2. Sell - When the 30-day MA crosses below the 60-day MA
3. Stop - Maximum loss of 10 units
4. Target - Target of 10 units

This example system will buy and sell based on the 30- and 60-day moving averages and will automatically book gains after a 10-unit profit or sell at a loss after a 10-unit move in the opposite direction.

Step 2: Identify the Components of Each Rule
Now that we have our rules down, we need to identify the components involved in each rule. Each component should contain two elements:

1. The indicator or study used
2. The settings for the indicator or study

These components should be constructed by typing the shorthand name for the study, followed by the settings in parentheses. These settings in parentheses are referred to as "parameters" of the indicator or study. Occasionally, a study may have multiple parameters, in which case you simply separate them with commas.

Let's take a look at a few examples:

1. MA(25) - 25-day moving average
2. RSI(25) - 25-day relative strength index
3. MACD(Close(0),5,5) - Moving average convergence divergence set based on today's close, with a five-day fast length and a five-day slow length

If you are unsure of how many parameters a certain component requires, you can simply consult your trading program's documentation, which lists these components along with the values that need to be filled in. For example, we can see that Tradecision tells us that we need three parameters with MACD:



So, for the example mentioned in step one, we would use:

1. MA(30) - Meaning 30-day moving average
2. MA(60) - Meaning 60-day moving average

Step 3: Adding Action
Now we will add actions to our rules. Each action adheres to the following basic format:

IF Condition [WHILE Condition] THEN Action




Typically, the condition will consist of the components and parameters you created above, while the action will consist of buy or sell. Conditions may also consist of simple English if no component is present. Note that the "while" component is optional.

Here are a few examples to help illustrate this point:

* IF MA(30) Crosses Above MA(60) THEN Buy
* IF MA(30) Crosses Below MA(60) WHILE Volume(20,000) THEN Sell
* IF EMA(25) Is Greater Than MA(5) THEN Sell
* IF RSI(20) Is Equal To 50 THEN Buy

So, for the example we've been using, we'd simply list:

* IF MA(30) Crosses Above MA(60) THEN Buy
* IF MA(30) Crosses Below MA(60) THEN Sell
* IF our trade has 10 units of profit THEN Sell
* IF our trade has 10 units of loss THEN Sell

What's Next?
Next, we'll take a look at converting these rules into a code that your computer can understand!
Read more »

Trading Systems Coding: Introduction

Trading systems are simply sets of rules that traders use to determine their entries and exits from a position. Developing and using trading systems can help traders attain consistent returns while limiting risk. In an ideal situation, traders should feel like robots, executing trades systematically and without emotion. So, perhaps you've asked yourself: What's to stop a robot from trading my system? The answer: Nothing! This tutorial will introduce you to the tools and techniques that you can use to create your own automated trading system.

How Are Automated Trading Systems Created?
Automated trading systems are created by converting your trading system's rules into code that your computer can understand. Your computer then runs those rules through your trading software, which looks for trades that adhere to your rules. Finally, the trades are automatically placed with your broker.


This tutorial will focus on the second and third parts of this process, where your rules are converted into a code that your trading software can understand and use.

What Trading Software Supports Automated Trading Systems?
There are many trading programs that support automated trading systems. Some will automatically generate and place trades with your broker. Others will automatically find trades that fit your criteria, but require that you place the orders with your broker manually. Moreover, fully automatic trading programs often require that you use specific brokerages that support such features; you may also have to complete an additional authorization form.


Advantages and Disadvantages
Automated trading systems have several benefits, but they also have their downsides. After all, if someone had a trading system that automatically made money all the time, he or she would literally own a money making machine!

Advantages:
  • An automated system takes the emotion and busy-work out of trading, which allows you to focus on improving your strategy and money management rules.
  • Once a profitable system is developed, it requires no work on your part until it breaks, or market conditions demand a change.
Disadvantages:

  • If the system is not properly coded and tested, large losses can occur very quickly.
  • Sometimes it is impossible to put certain rules into code, which makes it difficult to develop an automated trading system.
In this tutorial you will learn how to plan and design an automated trading system, how to translate this design into code that your computer will understand, how to test your plan to ensure optimal performance and, finally, how to put your system to use.
Read more »

US soldiers’ remains repatriated


A ceremony to send back the remains of four US soldiers was held at Hanoi’s Noi Bai Airport on Tuesday, the 112th repatriation of its kind since 1973, according to the US Embassy.

The remains and their relics, which were sent in four coffins, were found during a cooperative search conducted between this October and November and were handed in by local people.

Initial autopsies by the two countries’ experts showed that the remnants might belong to US soldiers who were lost in the Vietnam War.

However, they were sent to Hawaii State for further examination.

Speaking at the handing-over ceremony, the US Government’s representative expressed gratitude and appreciation for Vietnam’s human and goodwill policy as well as its effective cooperation in the search during the past years.

Also on Tuesday a mass grave together with soldiers’ belongings was discovered during excavation work at the construction site of a drainage system in the central province of Quang Ngai.

Nguyen Trong Luyen, head of Quang Ngai Town’s Army Steering Committee, said they are yet to identify the remains as also estimate their number.

But local agencies suspect it was the grave of Vietnamese soldiers who died in an attack on Quang Ngai Prison under the US army’s control in 1968, according to Luyen.

An excavation was planned on Wednesday to carry out further tests.

Reported by Huong Giang – Hien Cu

Read more »

Market Dollar Rates at 0300 GMT - Sept 8

LONDON, Sept 8 (Reuters) - Following are the middle exchange rates for leading currencies against the dollar:

CURRENT HIGH LOW Euro 1.4336 1.4346 1.4329 Japanese Yen 92.79 93.08 92.72 British Pound 1.6342 1.6363 1.6324 Swiss Franc 1.0594 1.0602 1.059 Danish Crown 5.1908 5.1943 5.1885 Norwegian Crown 5.9858 5.9926 5.981 Swedish Crown 7.1199 7.1254 7.1182 Australian Dollar 0.8542 0.856 0.8529 Brazilian Real 1.8415 - - Canadian Dollar 1.0781 1.0796 1.0774 Hong Kong Dollar 7.7501 7.7504 7.7504 Mexican Peso 13.3505 13.3655 13.36 Russian Rouble 31.4835 31.4995 31.45 Singapore Dollar 1.4315 1.4341 1.4312 South African Rand 7.5427 7.595 7.5785

Read more »

EUR/USD - Sept 8

A break above 1.4365 indicates a move to recent swing highs between 1.4380-1.4390 and beyond 1.4400-1.4410. A move beyond is likely to test 1.4440-1.4450. A break of that level, if it can hold signifies a longer term move higher.

Minor support has developed at 1.4320 A drop below is likely in early European (if not it is likely to be a predominantly bullish day) but if sustained indicates the range is likely to continue. Further support is at 1.4290, 1.4280 and 1.4220. Beyond this support is swing lows in the area between 1.4190-1.4170.

Cory Mitchell, CMT
Read more »

USDCHF Forecast

Similar to EURUSD, the USDCHF didn’t make significant movement yesterday with no more than 60 pips movement. I think we are in no trading zone. Price still trapped in range area of 1.0715 – 1.0527 and range trading strategy which is to buy around 1.0527 or to sell around 1.0715 is still the best strategy for now. I prefer a bearish continuation scenario but a valid break below 1.0527 is needed to confirm the bearish scenario. CCI in neutral area both on h4 and daily chart.

Read more »

EURUSD Daily Forecast: September 08

The EURUSD didn’t make significant movement yesterday, with only 60 pips movement. On h4 chart below we can see that the bearish channel has been violated to the upside indicating potential bullish outlook but the lack of trade volume usually leads to false breakout so we have to be very careful here and do not rush jump into the market. The bias remains neutral in nearest term and I still prefer to stand aside for now. I think range trading strategy to buy around 1.4180 or to sell around 1.4405/46 is still the best strategy in this situation. Be patient. CCI in overbought area and about to cross the 100 line down on h4 chart suggesting potential downside pressure testing 1.4275/50 support area. Break below that area should trigger further bearish momentum re-testing 1.4180. Initial resistance is seen at 1.4359 (yesterday’s high). Break above that area should trigger further bullish momentum testing 1.4405/46 key resistance level.

Read more »

Daily Forecast for Crosses: September 08

EURJPY Forecast

The EURJPY attempted to push higher yesterday, topped at 133.86 but bullish momentum was limited as the pair closed lower at 133.37. On h4 chart below we can see that the price touched the upper line of the bearish channel before retreat lower, show us that the bearish channel (red) still hold so far but the bullish channel (blue) also remains valid indicating potential bullish correction scenario remains intact. I think we are in no trading zone now. Immediate resistance is seen at 133.86 (yesterday’s high). A clear break below that area could be considered as bearish channel violation and should trigger further bullish momentum towards 134.50 area. Initial support at 132.80.


GBPJPY Forecast

The GBPJPY failed to continue it’s bullish momentum yesterday. The pair attempted to push higher, topped at 153.23 but further bullish scenario was rejected as the pair closed lower at 151.97. On h4 chart below we can see that the bullish channel (blue) has been violated to the downside indicating bullish scenario failure and the price might move towards the upper line of the bearish channel (red). The bias is bearish in nearest term testing 151.15 and 150.50 area. Immediate resistance at 153.23 (yesterday’s high).

AUDUSD Forecast

The AUDUSD had a moderate bullish momentum yesterday, topped at 0.8575 and closed at 0.8553. On h4 chart below we can see that after breakout from the triangle and hit yesterday’s high, the pair is now seems to consolidating a little bit lower. The bias is neutral in nearest term but I am expecting further bullish momentum and 0.8615 is still a potential bullish target. However CCI about to cross the 100 line down on h4 chart suggesting potential downside rebound testing 0.8470/80 area.

Read more »