Sunday, April 15, 2007

Friday, September 15, 2006

A long process

When I started this project, only was available. After the names were dropped, now forexlab and 4xlab in the .com .net and .org gTLD all point to the website in their www and non-www versions thanks to a 301 redirect.

Try it (listed in reverse order of registration): bookmarks
More bookmarks
Code project articles in

Monday, September 11, 2006

Updates and Additions

I created the Articles forum to collect posts to other sites. This section is now populated with the series about creating a mechanical trading system posted to the code project.

Posted about automatically clasifying japanese candlesticks.

Updated the page.

Posted the third part of the creating a mechanical trading system article series to the
Creating a Mechanical Trading System Part 3: Get real time quotes using DDE

I am thinking about a fourth article to bring everything together. This article would show how to receive realtime quotes, apply indicators and simple trading rules, then use a SMTP class to send email alerts when a certain condition is met.

Saturday, September 09, 2006

Metatrader Forex Expert Advisors Championship

I found this mechanical trading system championship, organized by Metaquotes:

In the news section, CodersGuru refers to his contributions to the forums.

My profile

My profile

Currently working on the third article for the codeproject, getting forex real time quotes from metatrader 4 in .NET using C# and DDE.

asc0's articles

Tuesday, August 29, 2006 in

Some pages have found their way into

The source code for the average true range indicator, my investorflix queue as well as the writeup on the channel breakout system were bookmarked.

see the urls

Today I also suggested an entry to in the section
Business / Investing / Commodities_and_Futures / Forex / Software /

The entry should look like this when published

4XLab.NET - Offers descriptions and source code for a forex trading simulator, mechanical trading systems and technical analysis indicators.

I am also getting ready to use the 4xlab google groups to send announcements to website members.

Tuesday, August 22, 2006


I have found the FxFisherman forex mechanical trading systems forums looking for a metatrader implementation of the STARC Bands (A moving average surrounded by two bands whose width is determined by a multiple of the Average True Range).

I have the code for the STARC bands implemented in the 4XLab.NET platform but I also wanted to see them in Metatrader. Their forums contained a MQ4 implementation.

My Profile

Saturday, August 19, 2006

Second article

This week, I wrote the second article in the series:

Creating a Mechanical Trading System Part 2: Four Percent Trading System

This article takes a trading system straight from the platform and enough of a gui and framework are wrapped around it to enable it to work. A working project is provided as well. The random walk algorithm is used to create the price data.

Saturday, August 05, 2006 article

This week I wrote an article for the codeproject

Creating a Mechanical Trading System Part 1: Technical Indicators

The article shows how indicators are programmed using C# .NET and the 4XLab.NET platform.

Monday, July 17, 2006 posts

Sunday, July 16, 2006

4xLab.NET Forex Simulation Software updated

The website and the program have both been updated.


- Added indicators: True Range, Average True Range (ATR), STARC Bands (similar to Bollinger Bands, but use ATR instead of Standard deviation).
- Enhanced Optimization. For an optimization run, all the parameters tested, along with the end of trading statistics are written to an Excel file for later analysis.


- Uploaded latest compiled version. Updated and uploaded the trading systems source code version. Uploaded the GUI source code.
- Added a title to the homepage: Forex Lab dot NET. Forex Simulation Software. Mechanical Trading Systems Forums.
- The website has had a standard disclaimer for a week now.
- Added the term Forex Simulator Software in addition to the already existing Forex Lab.
- Updated and submitted sitemaps.

Tuesday, July 04, 2006

asc0 links, a financial resource directory

This is a compilation of all the websites I have found to be useful in my journey to learn about trading the financial markets. This directory points to websites useful for all the stages of the learning process. You will find development tools, trading systems information, quote data among other resources. asc0 links: a financial resource directory

Saturday, June 10, 2006

Forex Lab Trading System: Random Entries

These strategies are based on experiments I am conducting towards the goal of writing an automated FOREX trading robot. You can download the compiled program and its source code for this trading strategies from my website.

One strategy is based on the Stochastics RSI System.

A long entry signal occurs when the StochRSI indicator is below 25 and rising.
A short entry signal occurs when the StochRSI indicator is above 75 and falling.
If the system is long, an exit signal occurs when the StochRSI is higher than 75.
If the system is short, en exit signal occurs when the StochRSI drops below 25.
The first two parameters show how to pass simple parameters to the trading system. The system operates on candles of the lenght specified by the MINUTES parameter. The last parameters show how to do optimization with the built in brute force optimizer.

The first system is the most interesting, it is based on random entries. Each time a candle is received, the system flips a virtual coin and decides to go long or short. A fixed stop loss is set in place, and a fixed take profit is set at a multiple of the stop loss.

For example. MINUTES:5;STOP:0.0010;PROFIT:1; specifies that 5 minute candles are to be used, a fixed stop loss of 10 pips is in place, and a take profit is set at a multiple of 1 times the stop loss, resulting in a 10pips order.

The trade is allowed to run until it hits the stop loss, or the take profit level, which might occur at any time.

Money Management techniques, which indicate to cut our losses and let our profits run might tempt us to use a PROFIT:3; parameter, to have take profit orders which are three times the size of the stop loss, ie: 10 pip stop loss, 30 pip take profit.


Use the FOREX Lab platform to evaluate the following scenarios:

MINUTES:5;STOP:0.0010;PROFIT:3; run several times, note profitability.
MINUTES:5;STOP:0.0010;PROFIT:1; run several times, note profitability.
MINUTES:5;STOP:0.0080;PROFIT:1; run several times, note profitability.
MINUTES:5;STOP:0.0080;PROFIT:3; run several times, note profitability


using LOG:2; after the parameters, quiets the program down and shows only the end of run summary
using LOG:3; is useful when optimizing. It shows only the end of run summaries and optimization results.
LOG:4; shows only the optimization results.
The Log.log.txt files contain all the trade information for all runs, no matter what the log level was.

To get more tick files, the source code to this system, and more, check out the 4XLab.NET Trading Systems Source Code forums

If you need assistance using the software, this Guided Tour might help

Educational Trading Resources: InvestorFLIX.COM

I recently subscribed to This site offers a service similar to that of Netflix. For $20 a month, they send you 2 CDs or DVDs containing trading lectures. This is a very inexpensive way to learn. You can find reviews of the CDs I have received on my website.

Saturday, June 03, 2006

4XLab.NET gets a makeover just got a small makeover. I moved some threads around and reworked the home page a little.

Saturday, May 20, 2006

4XLab.NET Features

4XLab.NET is a .NET FOREX Trading systems simulation platform. You will be able to create a trading system and evaluate it as if it was running in realtime and connected to a real FOREX broker.

The 4XLab.NET platform sits between FOREX tick data (second by second price data) and your trading system. Your trading system can view this data as candles of different time lenghts or as realtime ticks.

The following popular indicators are built in, and source code if provided: Bollinger Bands, CCI, EMA, SMA, Hull Moving Average, MACD, Momemtum, RSI, Stochastics. The platform is extensible, and any indicator the user wishes can be be implemented.

This combination of features allows for maximum flexibility of the kind of trading systems that can be evaluated with the platform. The systems can apply indicators to candles of different lenghts to detemine the entry criteria. Trades can be performed at the end of a candle, or after a tick is received, just as a person would in real life.

Tuesday, May 09, 2006

4XLab.NET gets a new URL

4XLab.NET is now accessible through, or

The program has also been repackaged into three modules: the executable GUI, the account simulator DLL, and the trading systems DLL. You can now download the source code to Forex Trading Systems without registering. Registration is still needed to post in the forums.

The program has been made multithreaded to allow the user to stop a runaway trading system.

Tuesday, January 17, 2006

4XLab.NET, a FOREX backtesting tool

I am currently interested in Automated Trading Systems.
You can visit my website to learn more about this topic.