By adding extern in the code, you'll be able to control the external panel. StopLoss is the variable name. double in the code will allow the StopLoss variable to store fractional figures. We temporary put 50point as the default figure. Anytime when you load the EA on the chart, your default TakeProfit and StopLoss will be 50.
27 May, 2009
To put down a stop loss
26 May, 2009
To do list
1) To have stop loss where MACD Sample did not build in readily
2) To have control number of trades allowed at the same time
3) To avoid the EA to manage human trades and or other EA's trades
4) To include a simple money management into the EA
5) To clean up some codes to make the EA more efficient
6) To optimize the parameter uses by the EA
Now we have a plan. We are going to follow it and improve this EA step by step
24 May, 2009
FREE profitable robot?! Where?!
Here is the deal. We're going to review the MACD Sample.mq4 from Meta Trader 4. You can find it freely available after you installed MT4. You may be getting ready to pay some money to buy a new EA from ebay, please hold the horses, because we may have something really worthwhile, and the best part of it is... it is FREE. You may think there is no free lunch, neither do I think there is free lunch. Therefore, we are going to have to do some work here. I've downloaded some history data from the broker and ran some test on it. You can download history by pressing F2 to get the history center.
Once test completed, you'll see the green indicator bar had filled up the entire column. And the Stop had changed to Start button again. Tabs at the lower tester window are for different function. You can view the tester graph, trade's detail, statistic report, and your trade journal.
-Settings is the main console to control your testing parameter.
-Results will show the trade's detail. From what price trade got opened, trade parameter modifications, take profits and stop losses.
-Graph will show the equity in 2D line chart
-Report is where the statistics are.
-Journal can be very useful to troubleshoot if an EA have error. Basically it record all trades in and out.
To generate a full report from your backtest, hit the Report tab in your tester window, right click in any column within your statistic report, select Save and report, and it will direct you to a file save window. Select your folder and it will save a copy of the tester report and open it up with your web browser as HTML format. Its very useful and handy.
23 May, 2009
Meta Editor 4
So, how do we get into Meta Editor? Its simple, by clicking the icon shows at the above picture, you'll be able to access to programming platform. I'm currently drafting on what kind of syllabus we should cover in the coming weeks. There will be a lot of mind blowing things, and I am going to reveal them to you one by one. You'll be able to understand exactly what is worth and what is not. I'll probably start with basic programming guidelines. Then to modify a readily made Expert Advisor in Meta Editor 4. In very short time, you'll be able to understand how does an EA work. You'll be able to program your own indicator/trading discretion in a template provided by Meta Editor 4.
I work with Meta Trader 4
The layout of MT4(Meta Trader 4) is very simple and easy to understand. The Navigator window will show you whether you're on a demo/live trading account. A demo account, the icon is in green color, or it will be gold in color if its a live account. Terminal window is where all your trade statistic situated. All your buy/sell orders will be situated here. The above screenshot shows I'm lossing 14pips. Quote board is in the Market Watch window. By double clicking the Bid/Ask price of desired trading pairs, the trading window will pop up.
This is a order window. You can key in your trade parameter here like lot size in Volume column, your stop loss, take profit and also comment on your trade. Finally, by clicking Sell/Buy button to execute your position instantly.
You can choose to place pending order by changing the value in Type column to Pending Order. You can place your execution price, and other parameter just like a market order. Some of you may not understand how pending order works. I decided to touch up a little bit here:
Buy stop : When current ask price is lower then your desired buy price
Buy limit: When current ask price is higher then your desired buy price
Sell stop: When current bid price is higher then your desired sell price
Sell limit: When current bid price is lower then your desired sell price
There is 1 very useful column here. By ticking the Expiry column, you can also put an expiry date to your pending trade. After the expiry, trade will be automatically deleted.
The best part of Meta Trader 4 is to have an investor password. If you are having a share account, or managing other's account, you can always publish your investor password. By accessing to the account with investor password, you can see all the running trades on the chart. All statistics are available. The only thing that the investor couldn't do is to execute any transaction.
21 May, 2009
What is trading platform
Basically, you can have different type of trading software with you. Below is a series of screenshot I took from OANDA trading platform. Its a JAVA edition trading software. This is a very useful trading platform, offering trade from chart function.
Candlesticks chart:
Account statistics and quote board:
Upper part of this screenshot is my account statistics. The quote board are updating currency price real time by the data feed by broker. Green color indicate up; Red for down; Grey for unchange.
How to trade?
You'll need to understand the quoteboard before you make any transaction. Your tradeboard normally consist of 2 major element, Buy/Sell price, some broker preferred to use Bid/Ask price. Basically these 2 represent the price of a certain currency pairs buying and selling. At the above/side of the quote board are normally the currency name. EURUSD meaning EURO vs US Dollars. The number is representing the actual price of US Dollars exchanged with EURO. The above example shows:
Buy 1 EURO with $1.38102
Sell 1 EURO with $1.38093
Meaning that, even if I buy and sell at the same time, I will still make a loss of $0.00009. Where does the money goes? You're right, my broker need that money to pay their employee, their electricity bil, and ofcourse to pay their boss Rich Olsen
20 May, 2009
Something about my work
What is FOREX
FOREX is the short form of Foreign Exchange. This is the world largest financial market. According to Bank for International Settlement, the currency trading involved of daily 3.2 trillion(3,200,000,000,000.00) dollars turnover. Full article can be found here. FOREX is an investing opportunity, one that can bring an investor profit or loss. FOREX is a volatile market intensified by leverage. Money is made(or lost) when investment values fluctuate. Although a market that moves up and down like a roller coaster can be nerve wracking, it also offers more trading opportunities.
In the 1990s. The currency markets grew more sophisticated and faster because money, and how people viewed and used it, was changing. The notion that money was not just a piece of paper, but also something that could assume electronic form, was accepted fitfully by the public. Today money has moved beyond paper. By depositing a certain amount of money to your retail broker, you can start trading one click basis in front of your desktop. The internet provides rates and price spreads virtually instantaneously, 24 hours a day, seven days a week. You can download a free trading platform, install them on your computer. Thats like having your own currency board infront of your computer, just exactly the same as the money changer you found in your local shopping mall. The only difference is, you get faster response, more accurate pricing compare to them. You can download the software here, its called MetaTrader4. Feel free to pass it around if your buddy is interested on this.
The reason of the existence of this blog
To be honest, I wish to understand how blog works. Meanwhile, to earn a few penny from the clicks paid by AdSense. This blog will be maintain as a trading and on going automated trading system developement journal for my own pleasure, and possibly will be my stepping stone to my next business.
