Download MetaTrader 5

MQL4 and MetaTrader 4 - page 937

To post a new topic, please log in or register
I'm trying a new Demo with a different broker, but I'm unable to get my setup exactly the same. On a 5min chart, I like to see what the 200HR SMA is(2400 on 5min). The MA dissapears as soon as you change it to around the 2200 mark. The platfrom even allows you to add a 2400EMA, but not the...
  Display time (3)
I planning to do an indicator to display the current time on the chart as the font are really too small to see. Can anyone advise me what's the function to use for time? I read the code and found they use Datetime constant 'D' but i dont' understand this area. anyone can advice me on this. Secondly...
hi i want to ask for help - i want to write alert for two indicators crossing, look at pictue: the problem for me is that this two indicators has different scale values. Red line indi has 1.36 value and blue line has 25.23 value. So indi that looks with higher value in fact has lower value. Does...
As far as I can tell GetTickCount() does not work in Tester (if I'm wrong then PLEASE correct me). So my question is, how can I "inject" a delay into Tester? For example, let's I want a more realistic OrderClose() function - obviously in Live/Demo closing an order takes time - a few 100 mili-seconds...
  Spread Indicator (25   1 2 3)
Hi traders, several times traders from forums ask if there is an indicator simply showing the current pair's spread. I already programmed such an indicator for my own use and decided to contribute it to the community. Feel free to comment! By the way, it's also posted @ codebase.mql4.com Indicator...
Hi, I have a probleme with comit extern int value in an array. extern int a = 1;extern int b = 2;extern int c = 3;int array_tmp[]={a,b,c}; When i compile, i have theses errors: a - expression on gobal scope not allowedb - expression on gobal scope not allowedc - expression on gobal scope not allowed...
Hi guys, I am tryng to find historical data for the cross eur/usd. I need the data with a maximum time frame 1 minute and if it is possible 1 year data.... I need the data to test my EA I developed. Thanks a lot for your help.
  GRID? (1)
Removing the Grid chart, directly from EA? I checked this link, but would like to know how to make the grade when using the examiner? https://www.mql5.com/en/forum/117904
Does anyone know how to programatically turn the checkerboard grid off? Not a real issue, when I launch the session and open a new chart, my next key stroke is <ctrl-g> -- but, isn't there a way to handle this in code? Also, short of creating horizontal lines on the chart, is there a way to get to...
I'm trying to implement code to fix the ''Error 146 Trade context busy' not working code problems' If I add this line to the start of the TradeContext.MQ4 file int init() I get the follwong error: 'init' - no dll defined for the imported function If I 'rem it out' I get the following errors: Start...
Hello, First of all, although I'm not totally new to programming, I am quite rustythough and very new to mql4. With the help of this site I've tried to piece together an ea that can take trades from an external source. That external source drops a txt file in the experts\files folder, this bit I...
I used the script below and does not appear on the chart, have some error? I used OBJPROP_BACK, along with a ObjectSetText but could not put a color in the background text, I found that with the Rectangle is possible, but also could not.if (ObjectFind("RECT") != 0){ ObjectCreate("RECT",...
I like to send an html formated email with attachment from MQL, how to do that? is there any external dll to do this?
OrdersTotal () - How do I separate Buy and Sell orderstotal count ()? In number of orders for each type In values of orders of each type Example OrdersTotal () = 6 Sell = 3 Buy = 3 Value Buy = -120.00 Value Sell = -135.00 I tried the script below but lacks a loop that I have no idea. if...
Might seem like a daft question, but is it possible to compile an indicator or EA from within itself.... I have been building a custom indicator which changes some of it's settings as it goes, and the only way to get it to update in the terminal is to keep compiling it in the editor. I have tried...
Anyone can advice me, what i lack off in this script? I wanted the script to prompt me how much lot i want for this trade, but once i excute this trade, it just self excute without prompt. I insert the "extern" but still no use, did i use at the right way? Sorry, still new to programming and keep...
New MetaTrader 4 Client Terminal Build 216: Tester: Provided correct initialization/deinitialization of librariesused by the Expert Advisor under test, at repeated passes and atoptimization. Tester: Fixed the triggering of Sell Limit orders when tested by open prices. MQL4: Eliminated memory leaks...
Ok, I'm a newbie to MQ4, but I have a lot of programming experience, therefore I understand the syntax and logic fairly well. I have created a custom indicator that uses a manually calculated MACD formula (the internal one doesn't seem to work right for me) to identify my buy and sell signals. I...
Hello, I tried writing my own custom indicator and I have run into 2 problems. The first problem is when the indicator runs it kicks out the same value for every bar and I don't know why this is. The second is this value is being calculated wrong. What I am looking to do is create a simple...
Hello, I hope you can help me to edit my EA with the following rules: Take Profit Take profit 1 : Take off half profit and leave the other half of the lot running. Take profit 2 : Close the rest of the position. I also want the EA displays the top and left on the chart, the trend given by the moving...
Hallo Trader, suchen Sie einen zuverlässigen Partner für erstklassige Programmierung Ihrer Handelssysteme? Dann besuchen Sie uns auf: www.meinmetatrader.de Gruß, meinMetaTrader.
Hi there! I'm new to EA programming. This is my second EA since six months now that I started out into mql coding. It is based on the T_S_T strategy of FxiGor. I have slightly modified the original code and have included some features, but it will compile with one error. I have tried to fix it but I...
I need help on how to set up in MT4 Tools/Options/Email I need alerts go to my verizon cell phone as text message. All I know so far is mynumber@vtext.com 1. SMTP Server 2.SMTP Login 3.SMTP password 4. From 5. To that would be great help. Thank you.
Hi All I was wondering if there is a way to remove the words "Expert Advisor"from the email that an EA sends using Sendmail and replace it withsomething a little more meaningful ? Ive looked for the answer so apologies if its been answered elsewhere
Another trader that I know is trying to become a registered member of this site, however, despite trying various options, he has not yet received an email confirming that his registration has been received. Therefore, he is unable to access the site...any suggestions? I can send you his email...
I have a tool that I am going to attempt to make that obtains the difference between two time stamps. If the difference is greater than x hours, I want to take action on the trade. A good example of this, is a trade has been open in the market for more than 4 hours, because of this, we are...
  USD to Russian (16   1 2)
I have some clients using my EA. I wrote it in ENU/USD. I perform the following formula to determine lot size, is it possible that this will work fine with lot sizes of around .30 or less in USD and in Russian, it could be more like .80 up to 1 lot +? AFM = Available Free Margin = 3000 MO =...
Any ways to cancel the S/L or T/P after placing the order. Best there is any script to reset the value back to zero. Is it possible?
I'd like to create a Sidebar gadget (like the Clock in Windows Vista) that show how an account is going (balance/open positions ecc). Is there an API/a library to access the account history using the investor password? Thanks! --- Massimiliano
  So Many Pips EA (11   1 2)
Hello Guys, picked up this EA online, can't remember where or when. It's a MA EA but it needs to close trades when MA crosses. Can anyone help with that?