Forum

OP_BUYLIMIT Expiration Time

I need an example of how to set expiration time in a pending order . In this example, the expiration time is 0. I need example of pending order "Good for the Day Only". ticket = OrderSend ( Symbol () , OP_BUYLIMIT , 1 , 1.3104 , 3 , Ask - 25 * Point , Ask + 25 * Point , " My order #2 " , 16384 , 0

Holy Grail of the Strategy Tester

This is just an example to demonstrate the ability of a MT4 Expert Advisor (non-scalping EA) to produce great results on the MT4 Strategy Tester. These results, with same MT4 EA and settings, are not producible on a forward Demo or Live Trading account. Why? Lack of Strategy Tester to have full

QUESTION - File Function

I am using FileOpen(filename,FILE_BIN|FILE_WRITE ) to write EA produced data to a file in files folder and is automatically updated as data values change. Then use FileOpen(filename,FILE_BIN|FILE_READ ) in an Indicator to use this data. This works great. The problem is when using the Strategy Tester

Text Translation

Many of the Russian mgl files uses a description text language that can not be translated into English by Google Translate or Yahoo Babel Fish. Here is an example: string PuthTerminal = TerminalPath ( ) + " \e xperts \f iles" ; //Ïóòü ê òåðìèíàëó string FileOptim =

Trend Signal Indicator Question

I'm using this Trend Signal indicator and it fails to keep the trend up and trend down arrows on the chart current. When indicator is reset manually by either reloading, opeing propeties and clicking OK or changing chart timeframe and back again, it redraws the latest arrow with new data. But it

Repeated init() Calls

I use GlobalVariableSet() in init() call to count number of EAs running on Terminal. int init() { if (! GlobalVariableCheck ( "Count_EAs" )) { GlobalVariableSet ( "Count_EAs" , 1 ); } else { GlobalVariableSet ( "Count_EAs" , GlobalVariableGet ( "Count_EAs" )+ 1 ); }

Service Desk - No Response

On 2011.06.06, the following was submitted to the Service Desk. As of today, 2011.06.09, no acknowledgement of request receipt or response to stated problem. Why? MT-5 Tester Backtest History Data Access Problem Errors , MetaTrader 5 MQL , Open , Start: 2011.06.06 16:40 , #125732 Client Terminal

Alternating OP_BUY & OP_SELL Orders

I'm writing an EA to alternate buy and sell orders . I can code to alternate orders when there is a history, but not from first start of EA. This is the base simple code. How do I code to alternate orders? if ( OrderType () == OP_SELL ) Buy = true ; if ( OrderType () == OP_BUY ) Sell = true ;

Possible Bug in MT-4 Strategy Tester

It appears that the embedded OrdersTotal() function is not working in Indicator codes when using the Strategy Tester. OrdersTotal() calls in Expert Advisor codes return correct values, but in Indicator codes only returns 0 when there are open orders. MT-4 build 226 To demonstrate this possible bug

Auto Primary Expert Advisor.

Is there a code method to determine number of Expert Advisors running on a MetaTrader terminal