Showing posts with label mt4. Show all posts
Showing posts with label mt4. Show all posts

18 October, 2009

Magic number

OK. Let's talk about trade handling. This EA was made to trade alone, and not suitable when there is human interference or other EA trading on the same account. When you try to place a trade on the account with MACD Sample trading at the same time, the EA will take over your position and modify your stop loss according to the TrailingStop you've declared in the EA earlier. Which is why a Magic Number is important. We need a special tag for a robot to recognize which are the trades that they should handle, instead of modify all stop losses for all the trades on the same platform. So, here we go...


Place a new external variable for user to key in Magic Number for the EA to recognize it. Magic Number is a special tag that doesn't show on your trading statement because its hidden. Since we're doing Magic Number, I've take another step to pull out the trade comment. By putting the trade comment as a variable, this can help us trace our trading history. In example, while we're modifying the EA from version 001 until current version 004, we have trouble to figure out from where our EA evolved. By looking at the trading statement, scroll all the way down, all the trade comment saids the trades are triggered by "macd sample". Therefore, in the future we can change the trade comment directly from the variable everytime we modify the EA.

Magic number had taken over the original fixed magic number 16384. Meanwhile, trade comment will automatically refer to the variable we've declared earlier.

Added new filter here. Whilst the EA trying to filter out all the trades from the same pair(OrderSymbol()), we've added new Magic Number as new filter for the EA to recognize which are the trades needs to handle instead of handle all the trades from the same pair.

21 May, 2009

What is trading platform

Trading platform is the software where you execute your buy/sell order. You can put a stop loss / take profit point for the future reference. For example if you bought some gold for the price of $50 from your local goldsmith, you intended to sell it when the price got up to $75, but the thing is, you'll have to monitor the gold price every minute, otherwise you will miss it. Good thing is, when price exceeded your expectation, you'll get more. What if price already hit $75, and you are not around / not aware? Price could fall down again, and you missed the opportunity to make a nice profit by selling the gold you bought earlier with $50 for $75. This is where the trading platform play a role. You can set your target accordingly. When the market price meet your expectation, your transaction will be auto executed in split second. You will never have to worry about missing a transaction anymore.

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:

You can add different studies in the chart to survey current market condition/trend. I have included RSI, Stochastics and MACD to it.



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

My name is David Lai a.k.a davidke20 in forums. I'm a part time foreign currency trader(FOREX trader). Working full time like a donkey day time, taking care of the kid after work, do some codings after family asleep. Most of the time I past out infront of my computer screen while coding some trading system.

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.