Anyone has a sample EA written in MQL5? The 2 samples that come with the download chart on chart and a naked woman is not useful for mere mortal just trying to code a simple EA
Anyone know how to handle an order that has been accepted by the server but failed to be executed? The broker's server has actually given the impression that the trade was accepted! 5:10:00 'XXXXXXX': instant order buy 0.10 EURUSD at 1.42253 sl
Anyone aware that the new rule 2-43 from NFA concerning the first-in first-out principle of orders processing means that we even have to consider how our same currency pairs orders ought to be closed? for example if you have a series of long orders
I tried to use the & to return values in a library and it does not seems to work, but in the program main it is fine eg if this function is in the program main, it works void CalValue(string symbol, int magic, double& value1, double&
I want to write a function to closeallorders based on a variable parameters input of Symbol and MagicNo eg CloseAllOrders() - close every orders CloseAllOrders(Symbol()) - close orders that are Symbol() CloseAllOrders(MagicNo) - close orders that has
Hi Could someone explain what are these informaiton for and how to use them Point Ticksize (seems like point and ticksize are always the same) tickvalue thks in advance
I understand that to test different strategies and EA, one has to install different instances of MT4 with different folder names. Is there a way to install one instance of MT4 and have it run different EA on different accounts. If not, will this be
Hi i discovered that my code can run a lot faster by changing the && to multiple ifs. But how does one handle multiple ifs when an else is involved eg if (A>B && C>D) { Do_XX; } else { Do_YY; } it is not correct to use if
Hi I use the IsTradeContextBusy and IsTradeAllowed to ensure a BUY or SELL order is made. However I encountered an occasion today where the server accepted the order but no trade was taken. Reading the journal, there was apparently a requote. How can
Suppose I use the Hourly bar of a technical indicator for some order entry (this period is hard coded into the EA). eg iAC (NULL,PERIOD_H1,.... When testing using the Strategy Tester, shld I use the H1 or M5/M1 timeframe. I noticed the results are
Hi I would like to manipulate a two dimention array with one row containing strings (ie symbol pairs) and the second row with an associated boolean state. I hope to link the boolean state of a condiction to a symbol pair. Many thks ronaldosim
Hi I have often experienced lost connection and sometimes metatrader does not get reconnected unless i reset my router. Is there a way to be informed of lost connection by an EA/script and maybe to be alerted after a certain time via
Hi I would like to reference extern variables as follows. How can I do this? thks extern lot1=0.1; extern lot2=0.2; extern lot3=0.3; //and so forth until a certain no eg 10 : extern lot10=1.0 double LotArray[]; for(int i=1; i<11; i++) {