MQL4 and MetaTrader 4 - page 726

Hy! Is there some way for the MT4 to play a sound when an order closes?
Hi there, I run an EA in ST ok.  It reads dates and times from a file in tester\files. If I run the EA in debug mode, FileOpen() returns -1.  It appears when using debug mode the EA looks for the file in MQL4\files because trying to open that file in debug mode displays a blank screen with a message...
[Deleted]
I have the .ex4 file for the test, but not sure how to open it. I double clicked it,no response from the MT4 terminal. I tried to open it in MT4 ea windows, but no response. How can I open it?
hello there,  I'm building my ea with a mql programmer. I'm a programmer also, but I know vanilla javascript, not mql. Things are not going the way i expected, the ea was made but it works in a certain way, that according with the mql programmer, is an issue with the mql4 language itself, how the...
I'm having an issue with a for statement, constantly returning 0, even though it shouldn't (by my expectation). Any help would be appreciated. I can post entire code if it's not enough to assume everything is correct except something here (for statement checks a variable (min) versus an array's
Is there a script , when you mouse over on bar, it will show the bar max spread ? Like in MetaTrader 5 in the data window thanks
Hi, I apologise in advance if this topic has been covered already, however, I have three computers all with Windows 7. When I install MT4, the data folder appears in a subdirectory of a the terminal with a long name under user data, which I believe is correct. But when I install in my main computer,...
Hello, I try to write the data of the lower bollinger band and the date(time) for an amount of candles into a *.txt file. I don't know why there's an error that says: array out of range in 'save file 3.mq4' (32,19) Thanks for any inspirations. Greez Dan   
Hello! I'm having struggles with my EA.  Right now, it runs the code each tick, not every bar. With doing so, I get ALOT of orders in the same place, effectivly draining my account balance in the backtesting. Here is a picture for demonstration.    As you can see in the picture above, it opens up...
Hello Expert, I'm very new at programming.  The following code I copied from the mt4 tutorial.  It helped find the lowest/highest of the day before.  How can I find the "close" value of that "lowest or highest" candle from the day before?  I tried iclose, but nothing come out correctly.  Thank you...
[Deleted]
I am trying to create a basic hello world dll using codeblocks and metatrader4 and trying to do it in a striped version. my compile .dll and .def are in the same dir as the .mq4 file. in file test.mq4 #property link "https://www.mql5.com"#property version "1.00"#property strict#import "C...
[Deleted]
Hello, is it possible to get in a EA programm the value of a indicator which is "Apply to: Previous Indicator's Data"?
On time frames like hour 4 the last open bar time is 16:00 right before market closes at 17:00. Then when it reopens the first bar starts at 16:00 again. On m1 timeframe chart says market closed at 17:00 and reopened at 17:00. Are these bars cut off or something on hour 4 chart? So the price between
Hello I do all the instructions that one can read 1) delete all hst files  2) change max bars in history to 9999999999 3) and import  M1 Data  4) convert with period_converter but after an exit and work next day all data has disappeared and I have to do all instructions again. Grrrr ! What is the...
If you run the following you get back a time that is not on par with hour timeframe. int n=iBarShift(NULL,PERIOD_M1,iTime(NULL,PERIOD_H1,2))-60;Print(iTime(NULL,PERIOD_M1,n));//Returned value equals something like 23:03 Also in chart, If you count 60 bars with crosshair(click and drag) from an hour...
Hi there I am trying to send some information from metatrader to excel using (mt4excel.dll) but I have problem to wright text into cell using the function (ExcelSetTextCell (int X, int Y, string Value)) for example if I wright (NAME) the excel shows only the first letter (N) any help with this??...
Hello, I have a weird problem: Using EURUSD D1 (Day) data from the History Center for a specific day I see as the Closure value:  1.34286  Now when I run an EA to calculate the RSI for the past 100 D1 bars using closure values, those don't match the RSI indicator in the chart.  When I printf the...
[Deleted]
Hy! I read a lot of article in this topic, but I don't find the solution for my problem. I had a code which is work fine before upgrade MQL4. (My last upgrade was about 1 years ago, so I know a lot of things changed.) But now my MySQL connection doesn't work. I insert the code, and the error
Hi, I'm trying to code an EA that will not react to the huge spread my broker generates during news.  I realize "guarantee" is a strong requirement so maybe "reduce the impact" is a better.  I know there is a slippage parameter in the OrderSend() function but it doesn't seem to work. As always, any...
Hi, I am new to MQL and can someone able to write MQL code based on the following conditions. I would like to draw continuous line based on the following conditions: 1. If current bar close higher than previous bar close, draw the lower price level line (The lower price level is the lower price...
[Deleted]
//+------------------------------------------------------------------+ //| MTF2 MACD BDv09_01_20.mq4 | //| Jeff | //| wolfboy@att.net |
[Deleted]
Hi Guys I am using Meta Trader 4  Server FXCM-USDDemo02Build 670 version 4.00 (4th July 2014)I am in the UAE using Etisalat as my ISP. I have a CISCO router and have port forwarded the port 443. When I use another ISP "Du", this problem does not seem to happen. The connection shows as red/green...
To import a csv or ASCII file into Metatrader 4 ---you have to go to Tools---History center---import.Then you have to select a symbol in the window on the left of history center and ---navigate to the folder on your PC and click import.Supposing the symbol I want to import is not showing in the left
Hi I need an indicator that can calc the lot size based on given percentage. anyone has any scripts to give? it must consider the equity and also leverage for that calculation.
Hi there, I have code that opens and reads a file when run in a script.  When I copy the function and put it in an EA and test it in ST an error returns as below. 5004 ERR_FILE_CANNOT_OPEN Cannot open file The script: input string fileName="eventdates.csv";string token,year,month,day,time;datetime...
Hi, to assign a variable a specific ASCII-Char e.g. 7 (BEL) one can do this:         string b = CharToStr(7); but I cannot use this function if I want to define B as Bell:       #define B 0x07 This will be just 7 :( Is there a way to define B as Bell using #define? Thanks in advance Gooly
Hi guys,   Since a few days I can't use the MetaTrader 4 application (android). I can open this application but it hasn't a connection with internet. If I open it with a wifi connection, everything is all right. I have this problem single on this application.    Is this a bug or is this to do with...
When I compiler following code ---------- code begin ------------ enum ENUM_ORDER_SYMBOL{ EURUSD, S&P500, OILUS };  ---------- code end ------------    there're "comma expected"  error #155 it seems we can't use "&"  and "-" characters in enumeration.   how to solve this issue? 
Hi, I need to check the time is between midnight and 12:05 (GMT +2) in an IF statement. How could I do this?? Thanks, sam
  Trailing stop?  (5)
How can I check to see if the price has increased since the last tick so EA knows when to change the stoploss