Download MetaTrader 5

MQL4 and MetaTrader 4 - page 90

To post a new topic, please log in or register
Hi Guys   I'm running a demo account that is matching my live brokers account but my history is missing a lot of trades and the balances are completely wrong.   Is this a common problem and if so any easy fix ???   Thank You in advance 
Hi, I would like to have comments when opening trade (backtesting). It will be indicators values like below. string comment= (" ATRd "+ATRd+"\n"                 " MomentumD1down "+MomentumD1down+"\n"                  " MomentumD1up "+MomentumD1up );string comment= (" ATRd "+ATRd);input int...
Hi, With the following code, I am getting Open_DG , Symbol(), Date all correctly but in case of OPEN,HIGH,LOW,CLOSE, BAR all are writing same value all the time. I mean so OPEN= HIGH = LOW = CLOSE all showing same value for a day. The loop value printing is also wrong with e_P I am back testing this...
for sharing and improving      double Oldest_Open_Price_Order(int Magic){   double open_price = 0;   int TotalOrders = OrdersTotal();         for (int x=0;x<TotalOrders;x++){               OrderSelect(x,SELECT_BY_POS,MODE_TRADES);                   if (OrderMagicNumber() == Magic          &&...
It happens a strange behavior on my terminal where I have opened several charts and sometimes two or three on the same symbol (but different EA): when I remove Expert from one chart in the other charts of the same symbol a "Waiting for update" label appears, an error "Cannot refresh history [4073]"...
You can download Debug view from Microsoft to externalise anything in your code to help debug it . I have learned a great deal about MT4 from using this tool simply to output the results of some code so I understand what it is doing . For example you may see some code that you do not understand but...
Hi, how can I get the first price of every YEAR out of my D1-Quotes? I tried something like that, but it isn't working datetime tm = StringToTime(StringConcatenate("D'",TimeYear(iTime(NULL,PERIOD_M1,i_mn1)),".01.01 00:00'"));iLastClose = iBarShift(NULL,PERIOD_D1,tm);
I'd like to actually put the name of the indicator in there.  Is it possible?
Hello.   I have recently started to have a problem with my scripts.     I am currently running a script that lets you open several trades at once on multiple currency pairs.   I have enabled autotrading everywhere and when I try to run the script no trades open.   I get no error in the journal tab...
Hi, I wish someone can help me on this. I have come across a free 'Pattern Recognition' Indicator in the MT4 market, which draws a rectangle around the candle pattern. However this rectangle is not filled and its outline didn't overwrite the candle's shadow lines. Like in following diagram. I...
I have this news indicator I am calling from an EA, but occasionally it throws an error 5004 cant open xml file, yet the xml file does indeed exist. It will go days working and then all of a sudden something happens and it throws this error. Anything in this indicator code that may be a culprit?
Guys I trade Correlation Hedge, but my Correlation result aren't the same as the big companies such as myfxbook, and oanda! Does that mean the amount of closing data I have I not enough! I use the closing data of 15 minutes, (because I trade 15m timeframe) and I use just the last 24 bars/candles. Is...
I am currently experimenting conditional loops and came across a problem which I need some help solving it. Please see below my codes.  Does MQL4 has a built in function called COUNT ?  So I can do something like count(i), which returns the amount of integers that passes the condition. // get a...
  Moving avrage (2)
Hi  How can i know the moving average of last 55 candles??? tanq
what is the 4055 Error in OrderSend in mql4??? please answer fast!!! 
Hi, I'm kinda' new to using Scripts, and am running into a problem. Using the standard (or any other) scripts on my InterbankFX demo account worksfine, but I recently set up a live acount and whenever I try to execute a scriptI get an error message in the Expert Log that gives number 4109 - which...
Hi, I am building a colour scheme for me and I was using this to get the Hex-code of e.g. yellow 0xFFFF00: But if I use this in mql4 I get clrAqua (light blue): Comment("Clr-Schemes: "+ColorToString(0xFFFF00,true)+"\n") Of course the displayed objects are in clrAqua but not yellow? Does anybody...
My goal was to plot previous news on the chart for unlimited period, as well as the current week's news. Indicator forex_ news_market_clock.mq4 ( https://www.mql5.com/en/code/10459 ) only plots news for limited current week, because dailyFX has only current week file in the url directory http://www...
  one trade a day (21   1 2 3)
Plz tell me why doesnt it work. I mean if there is opened trade in today, dont open any until next day. bool OneTradeAday(){if (OrderSelect(0, SELECT_BY_POS,MODE_HISTORY)==False)                           return(True);                    if (OrderSelect(0, SELECT_BY_POS,MODE_HISTORY)==True...
How can I view all my topics, or all my questions per say? Thank you in advance.
Hi, I'm new to MQL and would like to know if this is the correct way to import my dll. THe function coded in C++ is... bool UnicodeToAscii(const wchar_t * szUnicode, char * szAscii) And my import declaration in MQL4 is... #import "Analytical.dll"bool UnicodeToAscii(const string szUnicode, char...
Hi all. I need to calculate the lot size based on a fixed amount of the account base currency and a StopLoss. But I need to remove the amount charged by the commission on ECN brokers. For EURUSD 5 Digit works fine... but  not for other pair like USDJPY   Then i do this: extern double InvestMoney = 5...
Hi, MT4 Android have red marking besides those currencies to indicate it is currently trading, but Iphone MT4 do not have. Anyway to enable it for Iphone? As you can see from the picture, there is a red triangular marking at the left hand upper corner of the currency (AUDCAD) that is currently...
Hi guys and gals, when i test my ea on a ceratin time (strategytester) it works perfect. But if iincrease the timezone to be tested (e.g. instead of 2004-2005 to 2004-2006) itsomehow doesn't work anymore and i get this error ("TestGenerator: Write fileerror") (btw: i did all backtests on the "every...
How to put Label In-front of Buffer Value in Upper-Left Corner of Sub-Window with different colors? 
1.- OrderSend --> OP_BUYLIMIT (after certain conditions are met blah blah blah) EVERYTHING OK. 2.- Problem comes with OrderDelete() for this limit order, I discover huge flood of ERROR 3 (Invalid trade parameters) when it try to delete that limit order. 3.- I have "break" after print error so it...
Is the spread field in the strategy tester in pips or fractional pips? I can't find it in the documentation. For instance, on a pair with 5 digits should that parameter be set to 1.6 or 16 if you want to simulate a spread of 1.6 pips?
My spelling sucks today!  :P Do you like to have indicators in the same window with your candlesticks/bars?  Or do like to have them in a separate windows to avoid "clutter"?  I'm writing a family of indicators and am stuck on this "philosophical" question.  (Again, bad spelling.).
Hello, I would like to know 'Multi Charts' is working perfect with 'Expert Advisors' (like DOM) and other 'Indicators' in a 'Chart'?  Can I set 2 different color 'BullCandle & BarUp'? (I do not mean you give me codes, but if you give me some good advice that would be better for me.) Thanks
Hi guy! I run the strategy tester on EURUSD. I write an EA that uses the iCustom with symbol EURJPY. The result from the iCustom is 0.  So the strategy tester doesn't support  that ? If it's true.  Is there another way  to run strategy tester and get information from indicators on another currency?...