Yahoo! 360° News | Beta Feedback
Start your own Yahoo! 360° page

davidke20

Top Page  |  Blog  |  Friends  |  Lists

Add

davidke20 is not connected to you in Yahoo! 360°.

Last updated Wed Nov 28, 2007 Member since June 2006

1 - 5 of 7 First | < Prev | Next > | Last

davidke20's Blog Full Post View | List View

FOREX automated trading robot development journal. Making money while you're busy

Horrible experiences

Dear all,

I am really fedup with yahoo 360. This is basically a terrible experience! I've been trying to make my post for the 3rd time in this month. Everytime I composed my blog entry nicely and well, when i click on post this entry, the FUCKING YAHOO ASK FOR PASSWORD!!! When I keyed in the password, then all my paragraph DISAPPEAR!!! Is yahoo FUCKING IDIOT?! or they're just basically DOWN SYNDROME!!! I'm so FUCKING PISSED!!! Cant they save my paragraph 1st, then ask for my password again?! Cant they just be kind enough to repost my paragraph after I verify my password again?! This is FUCKING NUTS!!! You know what?! This post is the 3rd try of the day! The initial post is how to make the EA! It got disappeared after I click on post entry. The 2nd post was a complain, just like this 1. But it disappear again! This is the 3rd post composed in a word pad, just incase they said my session expired! FUCKING IDIOT! Do not ever register 360 with the fuckin idiot yahoo! FUCK THEM!

p/s: Meanwhile, I'm still here. EA creation journey are doing fantastic. Only thing is the fucking yahoo giving me rubbish experience and over secure issue that causing me unable to post more detail. Am looking for a suitable blog entry to continue my construction.

Saturday December 29, 2007 - 01:23am (SGT) Permanent Link | 0 Comments
Basic Function #1

Basic Function

"IF" Statement

The "if" statement can come with 2 solution for the programmer to help the EA to decide what to do "if" it meet specified criteria. "if" statment comes with a pair of parent brackets (), where as the solution comes with a pair of child bracket s{}. An example as below:

if(a>b) //if A is greater then B
{Comment("A greater then B");} //show on screen A is greater then B
else //A is not greater then B
{Comment("B greater then A");} //show on screen B is greater then A

"Comment" function

The Comment function doesn't comes with any other solution. It can display wordings on the chart by adding quotes " to after the parent open bracket. Example as below:

Comment("Testing testing");

Another case is, just incase you needed the "(quote) to show on the chart itself, you need to put down 2 x ' (hyphant) to become a "(quote). If you use "(quote) directly may confused the auto trading system that thought you're finishing your conversation(display).

Comment("System:'' Testing! '' ";); // Read carefully as before Testing!, that is not a quote. Its a double hyphant

"Print" function

Print function also doesn't comes with any otehr solution. It will record anything to the log file provided by MT4 standard platform. When the criteria is met, it will diplay the message on the Expert tab under the your Terminal window. Example:

Print("Testing debug mode");

When the EA triggered met the criteria to print that debug message, it wil appear on the Expert Tab in the Terminal window. Meanwhile, you can also retrieve your history log from your meta trader 4's folder. Which will be located at

<Drive letter>:\Program Files\<Meta Trader 4 Folder>\Experts\Log

Then you can browse for your desire date, open up and read your MT4's activities.

I personally prefer Comment() better then Print(), because I can identify immediately on the chart itself. But belive me, most professional profer Print() function, my personal opinion think that is good for book keeping, for keep tracking and debugging with proper write outs.

Wednesday December 12, 2007 - 01:11pm (SGT) Permanent Link | 2 Comments
Need to find out

Here is a small topic on what needs to be done before an EA(Expert Advisor) start its routine. Basically we need to put down some limitation, in order to control this little critten from hurting our trading account if something goes wrong. So, here we go.

Limitation of lowest margin available

This is what we concern about, which is to protect our capital if the expert advisor keep lossing like nobody's business. As everybody know what is the purpose of having an automated trading system. When we're not around our trading desk, this system will continue make us money so we can spend our summer in Costa Rica In order to limit the EA from over trading your account, you need to put down certain parameter in your EA. I give you example here:

extern double ProtectMargin = 2000;

And add this line after the int Start() line

if(AccountFreeMargin() < ProtectMargin)
{
Comment("Not enough money! Margin below ", ProtectMargin);
return(0);
}

This way, the EA will not open any trade if your free margin is below 2000.

History data check

Now, its very important that you have enough historical data on the currency pair you planned to trade with your EA. Because incomplete data could give you bad indicator, and that would result a false signal that trigger bad trades by your EA. Add another variable to the external input as below:

extern int MinimumBar = 500;

Below are the codes that should add to the EA after the Margin protection line:

if(Bars<MinimumBar)
{
Comment("Bars less then ",MinimumBar);
return(0);
}

The above 2 simple rule are the border line of creating a decent EA that will not blow your account away for no reason. I have compile a source code as usual, so you can download and double check with your codes.

Tuesday December 4, 2007 - 01:27am (SGT) Permanent Link | 0 Comments
Getting started

Template

We create a template of an Expert Advisor. This way we can eleminate most of the hassle everytime we start a new project. We can use the same template to create different type of Expert Advisor on the same platform.

I assume you already downloaded the Meta Trader 4 platform and playing around with it. So, here we start with the core of programming an Expert Advisor(Automated trading software). By clicking on the MetaEditor, you'll be able to use the programming tool provided by MetaQuotes as a standard equipment installed simultaneously while MetaTrader4 are installed on your computer. To start a new project, simple go to the File menu on your tool bar, select New, you'll be able to see a window pop up with different selection of project you can start with. Since we're talking about automated trading, so I will not get into other project, we select Expert Advisor. Once the selection has been made, 2nd window will pop up for your information input. You can now put down your name and your copyright status. You may also preset your parameter if you already have a system flowchart. Basically TakeProfit, StopLoss, TrailingStop, LotSize are standard parameter needed by a basic EA.

I have uploaded a sample copy of the work we done today. Click here to download the EA to verify see whether your work are close to mine.

Monday December 3, 2007 - 12:11pm (SGT) Permanent Link | 0 Comments
Introduction

Meta Trader 4

Meta Trader 4 originally created by MetaQuotes Software Corp. They're the leading provider of industrial software products for financial markets. The main focus of MetaQuotes Software Corp. is the development and implementation of professional, high quality online trading platforms for automated online brokerage services in Forex, CFD and Futures markets. On July 1st, 2005, MetaQuotes Software Corp. released its latest up-to-date online trading platform - Meta Trader 4. It comprises all the best features of previous platforms, as well as introducing a whole new set of components and functions.

Automated trading - Expert Advisor

The MetaTrader 4 Client Terminal provided with C-like programming language for trading strategies, and has been widely recognized the best language for automated trading. The productivity and flexibility of the language closely resembles the professional C programming language. Expert Advisor is a mechanical trading system linked up to a certain chart. An Advisor starts to run with every incoming tick for a given symbol. The Advisor will not be launched for a new, tick if it is processing the previous one at this moment (i.e., the Advisor has not completed its operation yet). The Advisor can both inform you about a possibility to trade and trade at an account automatically sending orders directly to the trade server. Like most trading systems, the terminal supports testing strategies on history data with displaying trading in-and-out positioned in the chart.

Credit: MetaQuotes Software Corp.

Sunday December 2, 2007 - 12:26am (SGT) Permanent Link | 0 Comments

Add davidke20's Blog to your personalized My Yahoo! page:

Add to My Yahoo!RSS About My Yahoo! & RSS
1 - 5 of 7 First | < Prev | Next > | Last