Forex Income Domination Strategies


Monday 25 June 2012

Programming Made Simple for MT4 Forex Trading

With programming, Forex Trader can put their winning strategy into programming codes and run on MT4 trading platform to let the computer trades automatically. This is make possible using MQL or metaquotes languages to write and compile using metaeditor into executable ex files which are called expert advisor to run on MT4 trading account.


The programming is similar to C with declaration of variables, logic comparision and executing of files and functions.


Variables


MQL4 comes with various data types namely integer, Boolean, character, string, float, color and date & time. You can create local variable can using the standard declaration like int, double, string, etc. Related Coverage MT4 Expert Advisor For those who have never heard of mt4 expert advisor, it is a automated trading robot for a charting and trading program called Metatrader. Metatrader is a charting and trading program that you can analysis and trade with it. MT4 expert advisor means Metatrader 4 expert advisor. This type of auto trading script or robot supports the latest version of Metatrader.


Mt4 Forex Admirable ways to improve your success in business with MT4 Forex MT4 FOREX trading platform If you are interested in trading on the foreign exchange market, then you should start by finding out more information on the MT4 FOREX trading platform. While there are many companies out there that promise the best trading platform on the market, the truth is that not even half of them can deliver their promise. You need the best and Metatrader FOREX is indeed exactly what you need. Boons Of Mt4 Here are some of the boons of MT4. In Forex trading, one of the programs people find most useful to them is the MT4.For global variables, you have to declare the variables before int start(). To have your variable available and value retained after program ended, use static variable declaration by static int, static double, etc.


Standard Constants


It comes with many standard constant that you can use which is already predefine by the program. One of the most important standard constants are timeframe which comes with PERIOD_M1, PERIOD_M5, PERIOD_M15, PERIOD_M30, PERIOD_H1, PERIOD_H4, PERIOD_D1, PERIOD_W1 and PERIOD_MN1. This is useful in defining the currency chart to use for technical indicator trigger. Next is the OrderSend() function which uses trade operations constant OP_BUY, OP_SELL, OP_BUYLIMIT, OP_SELLLIMT, OP_BUTSTOP and OP_SELLSTOP which covers all the 6 different trade execution. The last importance standard constant is price related which is PRICE_CLOSE, PRICE_OPEN, PRICE_HIGH and PRICE_LOW which is often used in technical charting.


Predefined Variables


Ask, Bars, Bid, Close, Digits, High, Low, Open, Point and Time are widely use thru out the programming codes. When comparing currency price, Ask, Bid, Close, Open, High and Low are often called for operand operation. Bars is used when counting the number of bars in the selected currency chart. Point is the current symbol point value in the quote currency and Digits is the number after decimal point for the current symbol price. Both are used to compute stop loss, profit take, buy and sell price.


Account Information


This is a group of function which provided important information about your trading account and is used for computing trading lots and money management system including calculating of margin and balance. The often used function are AccountBalance, AccountFreeMargin, AccountLeverage, AccountMargin and AccountProfit. You need to input some margin requirement and usually I use minimum 200% margin requirement for max open lots using account leverage for maximum drawdown to avoid margin call.


Date and Time Functions


The widely used functions are DayOfWeek to get the Monday to Sunday of the date, Hour and minute for time and Seconds for looping. If your strategy is time constraint, meaning it only run during 2 to 4 am and only on Monday to Wednesday, this group of function is definitely the ones that you called to compare and execute codes.


Technical Indicators


This is the most important functions you be calling if you are using technical charting to execute trading rules. The common indicator that I used are iMA which is moving average simple/exponential/linear weighted calculation, iRSI which is Relative Strength Index, iMACD which is Moving Average Convergence/Diverage, iBands which is Bollinger Bands, iCCI which is Commodity Channel Index, iStochastic which is Stochastic Oscillator and iADX which is Movement Directional Index.


Trading Functions


This is required for any trading to be successful. The widely used trade function are OrderSend, OrderSelect, OrderClose and OrderModify. You may refer to MQL4 documentation for more information of the various functions. And refer to my website for more software offers with ready to use program codes. source.

No comments:

Post a Comment