Forum

Uniting Open Orders to one Single Order

In this example an EA (in MT4) should open orders partially, but should close all orders together and time is critical in this case. If there are for example 20 open orders, when they will be closed, they will be closed successively and this process will take several seconds. Is there a way in MT4

EventSetTimer(xxx) error 1158

Hi, ‌‌Does anybody know the meaning of the following error: ‌EventSetTimer(xxx) error 1158 ‌‌ (‌xxx: time specified for the timer within the EA) ‌ T‌hanks in advance

Changing Refresh Timer from 15.6ms to 1ms

In MT4, when callling EventSetMillisecondTimer(1), the code inside in fact is not executed every millisecond. It gets executed about every 15.6ms (1000 / 64 ms). I want it to be executed every millisecond, so I tried to call timeBeginPeriod(1) from winmm.dll on Windows Server 2008, 2012 as well as

Custom Event: Call from EA1 to EA2

Let's say in the same MT4 terminal there is one EA running on a EURUSD chart and one EA running on a GBPUSD chart. If there is a new tick for EURUSD, the code inside of the OnTick() function of the EURUSD EA will be executed. Under certain conditions I want it to make a call to the GBPUSD-EA, so

Messages between MT4 terminals on the same network

Hi, I have two VPS servers running on the same network (VPS1 and VPS2). I want to send a message from one MT4 terminal running on VPS1 to a different MT4 terminal which is running on VPS2. Latency is not extremely important, however this process should not take longer than 500ms. What do you think

Sending Data from Java Application to MT4 EA

I want to send data (values of 5 string-variables) from my Java application to my MT4 EA. I have tried this by making the Java application write to a txt-file and copying the file to MT4-data-folder and an EA accessing the txt-file using FILE_SHARED_READ, however this was not working. Does anybody

Execute MQL Code on External Event

Is there any way to execute a code on an external event instead of executing thre code on every tick ? For example when a .txt file in MQL/Files folder gets refreshed. The idea is to send information/quotes to MT4 by an external (e.g. Java coded) program. This (Java coded) program creates/refreshes

Execution of EA between Ticks

Hello, I want my EA to be executed on every tick and, if there is no new tick for several seconds, to be executed every xxx ms (for example 500ms). What is the best way to code this in MQL? Thanks in advance

Execution of EA between Ticks

Hello, I want my EA to be executed on every tick and, if there is no new tick for several seconds, to be executed every xxx ms (for example 500ms). What is the best way to code this in MQL? Thanks in advance

Are EAs visible to the Broker?

Can brokers see if you use an EA in MT4 or not? If so, can they only see the name of the EA or also the source code of the mq4 file? Thank you very much in advance. Best Regards