Thursday, May 7, 2009

MetaTrader 4.0 Error Codes

The GetLastError() function returns the last error code. The Error code constants are defined in the stderror.mqh file. 

To print text messages use the ErrorDescription() function defined in the stdlib.mqh file. 

The following table lists the Error codes returned from the trade server


 

ERR_NO_ERROR  
0  
No error returned. 

ERR_NO_RESULT  
1  
No error returned, but the result is unknown. 

ERR_COMMON_ERROR  
2  
Common error. 

ERR_INVALID_TRADE_PARAMETERS  
3  
Invalid trade parameters. 

ERR_SERVER_BUSY  
4  
Trade server is busy. 

ERR_OLD_VERSION  
5  
Old version of the client terminal. 

ERR_NO_CONNECTION  
6  
No connection with trade server. 

ERR_NOT_ENOUGH_RIGHTS  
7  
Not enough rights. 

ERR_TOO_FREQUENT_REQUESTS  
8  
Too frequent requests. 

ERR_MALFUNCTIONAL_TRADE  
9  
Malfunctional trade operation. 

ERR_ACCOUNT_DISABLED  
64  
Account disabled. 

ERR_INVALID_ACCOUNT  
65  
Invalid account. 

ERR_TRADE_TIMEOUT  
128  
Trade timeout. 

ERR_INVALID_PRICE  
129  
Invalid price. 

ERR_INVALID_STOPS  
130  
Invalid stops. 

ERR_INVALID_TRADE_VOLUME  
131  
Invalid trade volume. 

ERR_MARKET_CLOSED  
132  
Market is closed. 

ERR_TRADE_DISABLED  
133  
Trade is disabled. 

ERR_NOT_ENOUGH_MONEY  
134  
Not enough money. 

ERR_PRICE_CHANGED  
135  
Price changed. 

ERR_OFF_QUOTES  
136  
Off quotes. 

ERR_BROKER_BUSY  
137  
Broker is busy. 

ERR_REQUOTE  
138  
Requote. 

ERR_ORDER_LOCKED  
139  
Order is locked. 

ERR_LONG_POSITIONS_ONLY_ALLOWED  
140  
Long positions only allowed. 

ERR_TOO_MANY_REQUESTS  
141  
Too many requests. 

ERR_TRADE_MODIFY_DENIED  
145  
Modification denied because order too close to market. 

ERR_TRADE_CONTEXT_BUSY  
146  

Trade context is busy.

MQL4 run time error codes

ERR_NO_MQLERROR  
4000  
No error. 

ERR_WRONG_FUNCTION_POINTER  
4001  
Wrong function pointer. 

ERR_ARRAY_INDEX_OUT_OF_RANGE  
4002  
Array index is out of range. 

ERR_NO_MEMORY_FOR_FUNCTION_CALL_STACK  
4003  
No memory for function call stack. 

ERR_RECURSIVE_STACK_OVERFLOW  
4004  
Recursive stack overflow. 

ERR_NOT_ENOUGH_STACK_FOR_PARAMETER  
4005  
Not enough stack for parameter. 

ERR_NO_MEMORY_FOR_PARAMETER_STRING  
4006  
No memory for parameter string. 

ERR_NO_MEMORY_FOR_TEMP_STRING  
4007  
No memory for temp string. 

ERR_NOT_INITIALIZED_STRING  
4008  
Not initialized string. 

ERR_NOT_INITIALIZED_ARRAYSTRING  
4009  
Not initialized string in array. 

ERR_NO_MEMORY_FOR_ARRAYSTRING  
4010  
No memory for array string. 

ERR_TOO_LONG_STRING  
4011  
Too long string. 

ERR_REMAINDER_FROM_ZERO_DIVIDE  
4012  
Remainder from zero divide. 

ERR_ZERO_DIVIDE  
4013  
Zero divide. 

ERR_UNKNOWN_COMMAND  
4014  
Unknown command. 

ERR_WRONG_JUMP  
4015  
Wrong jump (never generated error). 

ERR_NOT_INITIALIZED_ARRAY  
4016  
Not initialized array. 

ERR_DLL_CALLS_NOT_ALLOWED  
4017  
DLL calls are not allowed. 

ERR_CANNOT_LOAD_LIBRARY  
4018  
Cannot load library. 

ERR_CANNOT_CALL_FUNCTION  
4019  
Cannot call function. 

ERR_EXTERNAL_EXPERT_CALLS_NOT_ALLOWED  
4020  
Expert function calls are not allowed. 

ERR_NOT_ENOUGH_MEMORY_FOR_RETURNED_STRING  
4021  
Not enough memory for temp string returned from function. 

ERR_SYSTEM_BUSY  
4022  
System is busy (never generated error). 

ERR_INVALID_FUNCTION_PARAMETERS_COUNT  
4050  
Invalid function parameters count. 

ERR_INVALID_FUNCTION_PARAMETER_VALUE  
4051  
Invalid function parameter value. 

ERR_STRING_FUNCTION_INTERNAL_ERROR  
4052  
String function internal error. 

ERR_SOME_ARRAY_ERROR  
4053  
Some array error. 

ERR_INCORRECT_SERIES_ARRAY_USING  
4054  
Incorrect series array using. 

ERR_CUSTOM_INDICATOR_ERROR  
4055  
Custom indicator error. 

ERR_INCOMPATIBLE_ARRAYS  
4056  
Arrays are incompatible. 

ERR_GLOBAL_VARIABLES_PROCESSING_ERROR  
4057  
Global variables processing error. 

ERR_GLOBAL_VARIABLE_NOT_FOUND  
4058  
Global variable not found. 

ERR_FUNCTION_NOT_ALLOWED_IN_TESTING_MODE  
4059  
Function is not allowed in testing mode. 

ERR_FUNCTION_NOT_CONFIRMED  
4060  
Function is not confirmed. 

ERR_SEND_MAIL_ERROR  
4061  
Send mail error. 

ERR_STRING_PARAMETER_EXPECTED  
4062  
String parameter expected. 

ERR_INTEGER_PARAMETER_EXPECTED  
4063  
Integer parameter expected. 

ERR_DOUBLE_PARAMETER_EXPECTED  
4064  
Double parameter expected. 

ERR_ARRAY_AS_PARAMETER_EXPECTED  
4065  
Array as parameter expected. 

ERR_HISTORY_WILL_UPDATED  
4066  
Requested history data in updating state. 

ERR_END_OF_FILE  
4099  
End of file. 

ERR_SOME_FILE_ERROR  
4100  
Some file error. 

ERR_WRONG_FILE_NAME  
4101  
Wrong file name. 

ERR_TOO_MANY_OPENED_FILES  
4102  
Too many opened files. 

ERR_CANNOT_OPEN_FILE  
4103  
Cannot open file. 

ERR_INCOMPATIBLE_ACCESS_TO_FILE  
4104  
Incompatible access to a file. 

ERR_NO_ORDER_SELECTED  
4105  
No order selected. 

ERR_UNKNOWN_SYMBOL  
4106  
Unknown symbol. 

ERR_INVALID_PRICE_PARAM  
4107  
Invalid price. 

ERR_INVALID_TICKET  
4108  
Invalid ticket. 

ERR_TRADE_NOT_ALLOWED  
4109  
Trade is not allowed. 

ERR_LONGS__NOT_ALLOWED  
4110  
Longs are not allowed. 

ERR_SHORTS_NOT_ALLOWED  
4111  
Shorts are not allowed. 

ERR_OBJECT_ALREADY_EXISTS  
4200  
Object exists already. 

ERR_UNKNOWN_OBJECT_PROPERTY  
4201  
Unknown object property. 

ERR_OBJECT_DOES_NOT_EXIST  
4202  
Object does not exist. 

ERR_UNKNOWN_OBJECT_TYPE  
4203  
Unknown object type. 

ERR_NO_OBJECT_NAME  
4204  
No object name. 

ERR_OBJECT_COORDINATES_ERROR  
4205  
Object coordinates error. 

ERR_NO_SPECIFIED_SUBWINDOW  
4206  
No specified subwindow


Monday, May 4, 2009

Monthly Technical Analysis - May 2009

EURO

Despite the pair failed to successfully breach the 1.3350 level, we see signs of short term incline as seen in the above image and we see the pair was able to show a weekly close above the 20 MA at 1.3215 where from there the pair will attempt to extend its gain towards the key resistance for the downside channel that started in the week starting 13-07-2008 at 1.3545. What helped provide the pair with bullish momentum was rebounding from the 61.8% correction for the above seen bullish wave

SEE MORE HERE >>>>>

Forex Trading Comedy Etoro

FUNNY FOREX :)

An Asian man was trying to exchange yen for dollars and asks the

American bank teller, "Why it change? Yestaday I get two hunnet 
dollar fo yen - today I get hunnet eighty?

The bank teller says, "Fluctuations."

The Asian man says, "Fluc you white guys too!"

FOREX MARKET TRADING HOURS

FOREX MARKET TRADING HOURS
Forex is a highly dynamic market with lots of price oscillations in a single minute, this characteristic of the Forex market allows traders to enter the market many times a day and pull some profit from these number of trades. If you want to find an appreciable number of profitable trades you need to enter the forex market at the best period of time, i.e., when the activity, the volume of transactions, is the highest. 


The main timing characteristics of the Forex market are the following:

* Forex is 24 hour market – It starts from Sunday 5pm EST through Friday 4pm EST. Rollover at 5pm EST
* Forex Trading begins in New Zealand, followed by Australia, Asia, the Middle East, Europe, and America
* The US & UK account for more than 50% of the market transactions
* Forex Major markets: London, New York, Tokyo
* Nearly two-thirds of NY activity occurs in the morning hours while European markets are open
* Forex Trading activity is heaviest when major markets overlap.


From this timing facts, it is quite visible that at any given time, somebody somewhere in the world is buying and selling currencies. As one market closes, another market opens. Business hours overlap, and the exchange continues as day becomes night and night becomes day............

BANK HOLIDAYS CALENDAR 2009

United States 



Thu, Jan 1 2009 New Year's Day

Mon, Jan 19 2009 Martin L King's Birthday

Mon, Feb 16 2009 President’s Day

Mon, May 25 2009 Memorial Day

Fri, Jul 3 2009 Independence Day Bank Holiday

Sat, Jul 4 2009 Independence Day

Mon, Sep 7 2009 Labor Day

Mon, Oct 12 2009 Columbus Day

Wed, Nov 11 2009 Veteran’s Day

Thu, Nov 26 2009 Thanksgiving Day

Fri, Dec 25 2009 Christmas Day




Japan 



Thu, Jan 1 2009 New Year's Day

Fri, Jan 2 2009 Bank Holiday

Sat, Jan 3 2009 Bank Holiday

Mon, Jan 12 2009 Coming-of-Age Day

Wed, Feb 11 2009 National Foundation Day

Fri, Mar 20 2009 Vernal Equinox Day

Wed, Apr 29 2009 Showa Day

Sun, May 3 2009 Constitution Day

Mon, May 4 2009 Greenery Day

Tue, May 5 2009 Children's Day

Wed, May 6 2009 Greenery Day Observed

Mon, Jul 20 2009 Marine Day

Mon, Sep 21 2009 Respect-for-the-Aged Day

Tue, Sep 22 2009 Autumnal Equinox Day

Wed, Sep 23 2009 Fall Equinox

Mon, Oct 12 2009 Health-Sports Day

Tue, Nov 3 2009 Culture Day

Mon, Nov 23 2009 Labor Thanksgiving Day

Tue, Nov 24 2009 Labor Thanksgiving Day Observed

Wed, Dec 23 2009 The Emperor's Birthday

Thu, Dec 31 2009 Bank Holiday



United Kingdom 



Thu, Jan 1 2009 New Year's Day

Fri, Apr 10 2009 Good Friday

Mon, Apr 13 2009 Easter Monday

Mon, May 04 2009 Early May

Mon, May 25 2009 Spring Bank Holiday

Mon, Aug 31 2009 Summer Bank Holiday

Fri, Dec 25 2009 Christmas Day

Sat, Dec 26 2009 Boxing Day

Mon, Dec 28 2009 Boxing Day Bank Holiday



Australia 



Thu, Jan 1 2009 New Year's Day

Mon, Jan 26 2009 Australia Day

Fri, Apr 10 2009 Good Friday

Mon, Apr 13 2009 Easter Monday

Sat, Apr 25 2009 ANZAC Day

Mon, Jun 8 2009 Queen's Birthday

Mon, Aug 3 2009 August Bank Holiday

Mon, Oct 6 2009 Labour Day

Fri, Dec 25 2009 Christmas Day

Sat, Dec 26 2009 Boxing Day



Canada 


Thu, Jan 1 2009 New Year's Day

Fri, Apr 10 2009 Good Friday

Mon, Apr 13 2009 Eastern Monday

Mon, May 18 2009 Victoria Day

Wed, Jul 1 2009 Canada Day

Mon, Aug 3 2009 Civic Holiday

Mon, Sep 7 2009 Labour Day

Mon, Oct 12 2009 Thanksgiving Day

Wed, Nov 11 2009 Remembrance Day

Fri, Dec 25 2009 Christmas Day

Sat, Dec 26 2009 Boxing Day



France 



Thu, Jan 1 2009 New Year's Day

Mon, Apr 13 2009 Easter Monday

Fri, May 1 2009 Labour Day

Fri, May 8 2009 Victory Day (Fête de la Victorie)

Thu, May 21 2009 Ascension Day (Ascension catholique).

Mon, June 1 2009 Whit Monday (Lundi de Pentecôte)

Tue, Jul 14 2009 National Day (Quatorce Juillet)

Sat, Aug 15 2009 Assumption Day

Sun, Nov 1 2009 All Saints' Day

Wed, Nov 11 2009 Armistice Day

Fri, Dec 25 2009 Christmas Day




Germany 



Thu, Jan 1 2009 New Year's Day

Fri, Apr 10 2009 Good Friday

Mon, Apr 13 2009 Easter Monday

Fri, May 1 2009 Labour Day

Thu, May 21 2009 Ascension Day

Mon, June 1 2009 Whit Monday

Thu, Oct 3 2009 Day of German Unity

Thu, Dec 24 2009 Christmas Day's Eve

Fri, Dec 25 2009 Christmas Day

Sat, Dec 26 2009 Boxing Day

Thu, Dec 31 2009 New Year's Eve




Hong Kong SAR 



Thu, Jan 1 2009 New Year's Day

Mon, Jan 26 2009 Lunar New Year Holiday

Tue, Jan 27 2009 Lunar New Year Holiday

Wed, Jan 28 2009 Lunar New Year Holiday

Sat, Apr 4 2009 Ching Ming Festival

Fri, Apr 10 2009 Good Friday

Sat, Apr 11 20009 Holy Saturday

Mon, Apr 13 2009 Easter Monday

Fri, May 1 2009 Labour Day

Sat, May 2 2009 Buddha Day Holiday

Thu, May 28 2009 Tuen Ng (Dragon Boats Festival)

Wed, Jul 1 2009 HKSAR Establishment Day Holiday

Thu, Oct 1 2009 National Day

Sat, Oct 3 2009 Chinese Mid-Autumn Festival

Mon, Oct 26 2009 Chung Yeung Festival

Fri, Dec 25 2009 Christmas Day

Sat, Dec 26 2009 Boxing Day




Italy 



Thu, Jan 1 2009 New Year's Day

Tue, Jan 6 2009 Epiphany

Mon, Apr 13 2009 Easter Monday

Sat, Apr 25 2009 Liberation Day

Fri, May 1 2009 Labour Day

Tue, Jun 2 2009 Anniversary of the Republic

Sat, Aug 15 2009 Assumption Day

Sun, Nov 1 2009 All Saints' Day

Tue, Dec 8 2009 Immaculate Conception

Fri, Dec 25 2009 Christmas Day

Sat, Dec 26 2009 St. Stephen's Day




Singapore 


Thu, Jan 1 2009 New Year's Day

Mon, Jan 26 2009 Chinese New Year

Tue, Jan 27 2009 Chinese New Year

Fri, Apr 10 2009 Good Friday

Fri, May 1 2009 Labour Day

Sat, May 9 2009 Vesak Day

Sun, Aug 9 2009 National Day

Mon, Aug 10 2009 National Day

Sun, Sep 20 2009 Hari Raya Puasa

Mon, Sep 21 2009 Hari Raya Puasa

Sun, Nov 15 2009 Deepavali

Mon, Nov 16 2009 Deepavali

Fri Nov 27 2009 Hari Raya Haji

Fri, Dec 25 2009 Christmas Day




Switzerland 



Thu, Jan 1 2009 New Year's Day

Fri, Jan 2 2009 Bank Holiday

Fri, Apr 10 2009 Good Friday

Mon, Apr 13 2009 Easter Monday

Fri, May 1 2009 Labour Day

Thu, May 21 2009 Ascension Day

Mon, Jun 1 2009 Whit Monday

Sat, Aug 1 2009 National Day

Fri, Dec 25 2009 Christmas Day

Sat, Dec 26 2009 Boxing Day