Questions tagged [mt4]

MetaTrader 4 is a software platform for manual and automatic trading, including free clients (end-user terminals) for Windows, iPhone, and Android, as well as server-side modules for processing trade transactions, storing and distributing history of quotes, proxy-servers, and administration tools (for brokers).

MetaTrader 4 is a widespread online trading platform designed to provide brokerage services to customers in FOREX Majors, Metals, Commodities, CFD, Indices, Futures and recently even BTC cryptocurrency markets.

The MetaTrader Terminal 4 natively supports a built-in programming language MQL4 and other DLL #import-s, which together allows users to extend the standard functionality with custom scripts, expert advisers (trading robots) and technical indicators.

MetaTrader server-side functionality is also extensible with their proprietary MetaTrader 4 API.

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

225 questions
1
vote
2 answers

Defining an array, depending on Symbol(), in MQL4 MetaTrader4 [Expert Advisor]

I have an EA that trades breakouts. I run this on multiple pairs. The problem arises when two pairs with high correlation trades the same direction ( or opposite, if negative correlation ). That doubles my risk. So, I added a snippet in my EA that…
1
vote
1 answer

How to import historical OHLCV-data in MT4? ( Problems with all brokers MT4)

I am from a Software trading company and we are troubleshooting. We have been using a lot of different brokers and FOREX data providers. We are working with historical data to optimize and improve our software, but we have a big challenge that all…
user6932188
1
vote
1 answer

how to draw an arrow with mql4 in all of the chart?

my problem is that i want to draw an up arrow(Green) and down arrow(Red) in bullish candle and bearish candle respectively in all of the history of specific currency chart here is my code so far …
user3741124
  • 111
  • 2
  • 2
  • 9
1
vote
3 answers

How to get price of Chart HLine objects and calculate Fibonacci levels

Three part question: How to find 2 user created horizontal lines on a chart by name and return the price of each. Then determine which HLine was crossed by the price most recently to determine trend direction. Calculate Fibonacci levels based on…
Tomasz Waszczyk
  • 2,680
  • 5
  • 35
  • 73
1
vote
0 answers

How to calculate a true-MACD for a single point in MQL4?

I know you can utilize the built in iMACD() function but it uses a variant of what I need. I am only interested in the first point. When accessing MACDLineBuffer[1] I get the correct value. However SignalLineBuffer[1] and consequently…
SolidCloudinc
  • 329
  • 10
  • 27
1
vote
1 answer

MT4 trading platform API Manager - get securities per group

I am using API manager for the trading platform MetaTrader 4 I need to get ALL SECURITIES per GROUP for example GROUP=preliminary|SECUTIRY_0=Forex|SECUTIRY_1=CFD|SECUTIRY_2=| i have some tips how to do it below: After request Securities config…
aaa
  • 446
  • 2
  • 8
  • 29
1
vote
2 answers

MT4: How to plot existing data under the price chart as an indicator?

I have some COT data that I want to plot under the main price window as an indicator. The COT data are external data, i.e. independent of the prices. So one can not write it like a traditional indicator calculated from the prices. Since I have all…
fyang
  • 89
  • 9
1
vote
3 answers

Where do I place external variables in MQL4 language?

I am quite new at programming and can't figure out why the code is not compiling and how to make it compile. It's a simple EA in MetaTrader Terminal 4. I think the problem is the position, where I declared and initialised variables, I tried placing…
ITM7
  • 135
  • 10
1
vote
1 answer

MT4 sends multiple outdated emails

My EA is set up to send an email when a trade is initiated. Over time the standard body of the email has been changed & improved upon. However, on forward testing my EA, it spurts out older versions of the trade notification email I designed…
user6216142
1
vote
1 answer

Can MT4 send an email, when a trade S/L is triggered, as an example?

Morning all, Just wanting to ask, is it possible to be able to send an email with the outcome of your trade details ( i.e. your loss, trade number and account number ) when your S/L is triggered? I know this will need to be achieved through the…
user6216142
1
vote
2 answers

Arranging the code for an (X) OR (Y) variable to return TRUE

How would I group a list of (x) variables to be true, OR and group of (y) variables to be true to activate a command. The following I have here, which includes the || Boolean. if(OrderSelect(PosSel,SELECT_BY_POS,MODE_TRADES)) …
user6216142
1
vote
1 answer

How to use a MetaTrader4 Error Code Refresh for proper error handling?

I have a "set up" on my EA to ping me an email when my Expert Advisor experiences an error and provides me the error code in accordance with the pre-determined 3-4 digit error code in the documentation on the MQL4 website. /* technically speaking, …
user6216142
1
vote
1 answer

MT4 Enumeration

I am using the MT4 enumeration for a selection input: enum ENUM_myChoice{ a, b, c, e, f, g }; The problem is if I have to add "d" to the list in alphabetical order, all of my templates using e, f or g are ruined because they are off by…
1
vote
1 answer

Specifying the start and the end date of the trading

I just added the ability to specify the start and end date of the trading to my EA, however, I discovered a weird behaviour! If I have specified the starting date for trade from 2016.05.01 00:00:00and the end date to 2016.05.10 00:00:00 the EA…
Engr.MTH
  • 1,002
  • 1
  • 11
  • 23
1
vote
2 answers

How to decrypt a string ( encrypted by a MetaTrader Terminal 4 fixed version of AES256 ) with PHP tools?

I have a string, say "My secret text". It has been encrypted using MQL4 CryptEncode() function ( where the used method was CRYPT_AES256 ). The key ( 32 bytes ) was, say, "1234567890ABCDEFGHIJKLMNOPQRSTUV". MQL4 function doesn't offer input IV…
ZsG
  • 73
  • 1
  • 8