Questions tagged [metatrader4]

MetaTrader 4 is an electronic client/server trading platform widely used by online retail foreign exchange speculative traders. Anthony Papaevagorou, head of sales at MetaQuotes, has announced MetaQuotes no longer intends to issue upgrades to the MetaTrader 4 (MT4) [ recently reported on 2016-11-15 ]

MetaTrader 4, also known as MT4, is an electronic trading platform widely used by online retail foreign exchange speculative traders. It was developed by MetaQuotes Software and released in 2005. The software is licensed to foreign exchange brokers who provide the software to their clients.

The software consists of both a client and server component. The server component is run by the broker and the client software is provided to the brokers customers, which use it to see live streaming prices, charts and to place orders as well as manage their account.

MetaQuotes head of sales, Anthony Papaevagorou, has announced MetaQuotes no longer intends to issue upgrades to the MetaTrader 4 (MT4) [ reported on 2016-11-15 ]

437 questions
5
votes
1 answer

Handling exceptions in MQL4

In the Java language one can handle exceptions with a try-catch mechanism. Does it exist any similar behaviour in MQL4? This code throws the error 'array out of range' in the Close[bar] expression and I cannot handle it properly. Any help will be…
JLLMNCHR
  • 1,551
  • 5
  • 24
  • 50
4
votes
0 answers

Grpc notifications from server to client

I work in a fin tech company that develops trading systems using Meta Trader Manager Api implemented in C#, we have our own process that hides the meta trader dependencies and exposes server to client and client to server operations to other systems…
4
votes
1 answer

Getting prices of broker without MT4

I am trying to do some stuff in Forex with low latency. I'm currently using mql. But as far as I see MT4 terminal is very slow and I can't execute as fast as i want. I am guessing mt4 terminal getting the prices with some FIX message and sends…
mert
  • 88
  • 9
4
votes
2 answers

How to post from MetaTrader Terminal 5 MQL 5 a request to my nodejs server, which is running locally on my MT5 host?

I'm trying to get FX rates in my nodejs server and socke.io emit them to the client, while running MetaTrader Terminal 5 or 4. So I guess I have to use MQL4/5. I know how the handle the request in my nodejs server. What I dont know is where to write…
Georgi Antonov
  • 1,581
  • 21
  • 40
4
votes
1 answer

Simple function to read file from an URL to a string buffer ( C++ / MQL{4|5} using WinInet.dll )

I am looking for a simple function which is able to read a text or binary file from the internet into a string variable. It´s unbelievable that I could not find anything in the web, just low level descriptions of all the WinInet functions and…
Doerk
  • 71
  • 8
4
votes
1 answer

Metatrader Plugin: what is it?

What is Metatrader plugin? I have seen the term in several promotions and articles. What was described in these articles was a species expert with inserts of libraries in other languages ​​(not MQL4 / 5).
user1749081
  • 63
  • 1
  • 5
4
votes
1 answer

Server to Client Communication Architecture

We have a "trade copying" software, which, as the name suggests is used to mirror trades from one trader(sender) to multiple other traders (receivers). It has three main components: 1. Sender client. 2. Server. 3. Receiver client. Sender -> Server…
Aziz
  • 534
  • 5
  • 23
3
votes
2 answers

How can I use iOpen(), iClose(), iLow() and iHigh() to find these pinbars?

I want to find the pinbars circled in the attached image below. For the one on the right, the body is about 1/5th of the candle size and for the one on the left, let's say the body is 1/7th the size candle size and it also has a wick of 1/7th the…
SuperHueman
  • 165
  • 15
3
votes
2 answers

How can I calculate lot size risking X% of account balance

My question is in two closely related parts: Given the entry price and stop loss, how can I calculate my lot size so that 2.5% of my current account balance would be risked on trades? Also in cases where the 2.5% lot size is not a tradable lot…
3
votes
0 answers

How can I write an mt4 indicator that draws a rectangle and horizontal lines over first 6 hours of hourly candles

I am a quite new to mql4 coding. I would like to know how I write an indicator that does the following, based on the image below: Draw a rectangle over the current day hour chart that covers the highest and lowest price points of the first 6 hours…
hutfelt
  • 321
  • 1
  • 8
3
votes
2 answers

MQL4 run EA on all symbols by adding to just one chart

In MetaTrader4 Terminal I write a simple alert EA I would like to run my EA on all FOREX Majors and FOREX Minors, I've got my code all done, but I want it to automatically run on all symbols in my [ Market Watch ] panel. Here is my code, it is very…
3
votes
4 answers

How to return a string from a C++ DLL into a MetaTrader 4 code-execution ecosystem?

I have following function __declspec(dllexport) wchar_t* __stdcall __getJson(wchar_t * listN){ setlocale(LC_ALL, ""); //function logic wstring ant = utf8_to_wstring(result); const WCHAR* constRes = ant.c_str(); WCHAR* tempObj=new…
3
votes
2 answers

Can't run a simple Expert Advisor with [ nquotes ] using Visual Studio 2015, MetaTrader Terminal 4

Can't run simple expert advisor. Wnd.dll - file from "bin" folder, created with VS2015. Wnd.dll file is inside a correct "MQL4\Libraries\" folder.So I tried to run this Advisor on a Live mode but nothing happened. Please help what I am doing…
Alexey Gapon
  • 73
  • 2
  • 11
3
votes
1 answer

MQL4 - ERROR 4111 when calling OrderSend() method

I am trying to place order, but my call to OrderSend() method ( https://docs.mql4.com/trading/ordersend )is failing: 2016.08.01 00:51:09.710 2016.07.01 01:00 s EURUSD,M1: OrderSend error 4111 void OnTick() { if ( OrdersTotal() == 0 ){ …
user285594
3
votes
1 answer

Writing an expert adviser in [ MQL4 ]

So if I wanted an EA in MQL4 that took the open price and when current price was 10 pips below the open it places a buy order and when it was 10 pips above the open it sold. Only one order at a time and the open changed daily. Q1: How could that run…
1
2
3
29 30