Hi, I'm working on an EA and I'd like to be able to pause trading without deselecting Autotrading Button or deleting it from the chart since it is holding important data in memory in form of arrays that are needed to continue after unpausing: I'm using the following code
I saw in the MQL4 Document: If FILE_READ is specified, an attempt is made to open an existing file. If a file does not exist, file opening fails, a new file is not created.FILE_READ|FILE_WRITE – a new file is created if the file with the specified name does not exist.FILE_WRITE – the file is...
Hi, I have written a dll in C# (used dllExport). The dll basically connects to a host and performs sql queries. This dll works perfectly on my laptop. When I try to run this dll on my VPS which runs on windows server 2012 R2, I receive an error: Unhandled exception 0xE0434352. I know this is a very...
I was hoping someone would know how to check the current chart symbol....for the example below i have tested a couple of variations... such as... if( Symbol()==CADCHF) {gur=gur+1;} thanks in advance
Hi, Newbie here. I'm an experienced MySQL developer and am trying to get a reliable and consistent ability to read from a localhost MySQL 5.6 database. My code works, but there seems to be issues with it. First off, if I have more than 2-3 columns of data (1 row returned), it returns errors. Also,...
I have an Excel spreadsheet with live data from MT4. Works nicely. Here's the problem: I am running 2 instances of MT4, (different broker feeds). Question: How can I defferentiate the 2 instances of MT4 in Excel ? My link looks like this: =MT4|BID!'#FDXU2' I thought that maybe I could somehow rename
Hi guys, I have some problems whith an EA I'm trying to write... The EA is simple. There is and indicator that draw a down arrow for sell and a up arrow for buy. My EA will buy or sell where the arrow appears (at the same candle). I tryed to do this but there is something wrong..... please help me....
I want to add the parameter to choose ordertype using enum or any easy funtions available! can you share your suggetion! OrderType StopOrder LimitOrder I want to do the following. currently i use both parameter, eg: StopOrder=true ; LimitOrder=false; If user choose StopOrder only pending order...
i use: #property indicator_label1 "Myline1" SetIndexStyle(0,DRAW_LINE,STYLE_SOLID,1,clrMagenta); .................. i see such connections with lines: how to make them like this (without the connecting lines) ?? :
Hey everyone, we wrote a short post on how to improve your position sizing. This uses R but is easily applicable to your MT4 strategy or EA. Position sizing is an important , often overlooked aspect of trading. Many traders look at position sizing as a way to decrease downside risk without seeing it
Hi, I triying to read data from metatrader 4 with my app (on vb.net) I catch data with DDE but it is only bid/ask/high/low. I want to read realtime data for finished candles (M5 and M15 etc) How can i read from metatrader 4 Thanks in advice.
New article Evaluation and selection of variables for machine learning models has been published on mql5.com: This article focuses on specifics of choice, preconditioning and evaluation of the input variables for use in machine learning models. Multiple methods of normalization and their features...
Hello, I've got a question more about MT4 itself then on mql4 language. I'm wondering how the folder management works. I tried to change the name of the installation folder of a terminal, and when I started it, it had candelled everything, it was like a new terminal just started for the first time...
I want to be able to have tooltips appear when hovering over graphic objects (created using a canvas object). This facility is available for buttons but not for custom graphics. I was just wondering if anyone has implemented this feature.
Hello Forum, I would be curious to have a look at the actual code behind the MT4 Strategy Tester, so that I could get a first-hand understanding of how the numbers are computed. I'm looking at analysis of gains vs. losses now (average, %'s, totals, etc.) but there are some other grey areas too.. Is...
Hello, I have an Indicator, which use the Functions High, Low and Close. Now I want to change it. I want to add the parameter "Timeframe", so that I can put the indicator on the H1 chart and see the indicator for the M30 oder D1 Timeframe. Is this possible? How can I do it?!
Hello, i´ve been trying to make my ea read the price of an horizontal line to work as a trigger. I can type the price manually and it´ll work the way I want, but if i could "type" it graphically would be great. I´m not an expert coder... :) I used ObjectGet. Note that I also place a horizontal line...
Hi there all... Just wondering, does anyone know if you can partially close an open order manually on the MetaTrader platform. I've got orders under EA control that I want to manually close partial... thx, t
Hi Guys If I trade myself on MT4 platform and I'm using broker 1 and I want to make use of Broker 2 and Broker 3 on the same platform window. Is that possible?
Hi I am a newbee in this and have a simple question... I'm trying to write a simple EA witch should calc the current bar. Using it on a 15 min chart. To get both openprice closeprice on the current 15 min bar chart I use "Everytick" in the model for backtesting. But it seems to me that...
I must be going blind.... why does this code cause my MT4 platform to hang? I'm assuming an infinite loop.... but the code looks good to me.... please help....THanks! #property indicator_chart_window //+------------------------------------------------------------------+ //| Custom indicator...