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
2
votes
1 answer

MQL4 OrderCloseBy() returns error 3 == [ ERR_INVALID_TRADE_PARAMETERS ]

I found this error and I am not sure about the reason ( The syntax is similar to C ) The function is supposed to close a buy order with a sell order but I'm getting error 3: invalid trade parameters. Is there some parameter that I am setting…
shuji
  • 7,369
  • 7
  • 34
  • 49
2
votes
1 answer

Automation of Binary Options Trading

Perhaps the easiest way to automate one's Forex trading strategy is to create an automated trading robot (aka expert advisor) using MQL4/5 programming language, that is built into the MetaTrader Terminal platform. A more exotic option is to develop…
2
votes
3 answers

How to disable autotrading globally from MQL4/5 program (EA) without DLLs?

How do I disable autotrading globally in MetaTrader 4/5 from within MQL4/5 code without using DLLs?
Enivid
  • 210
  • 2
  • 9
2
votes
2 answers

How to get OHLC-values from each new candle?

I am new in MQL5 and I am trying to capture the values of Open, High, Low and Close of each new candle. For now I am using a one minute TimeFRAME for each candle. I read the documentation and have not figured out how can I do it. My only clue was…
2
votes
1 answer

How to read a JSON from a URL in MQL5?

How can I read JSON from a url in MQL5? For example this simple JSON from: https://api.myjson.com/bins/56z28 { "employees": [ { "firstName": "John", "lastName": "Doe" }, { "firstName": "Anna", …
fadi
  • 35
  • 2
  • 5
2
votes
3 answers

Why MQL4 OrderModify() will not modify the order when backtesting?

I'm trying to ADD a stop loss to my open market orders in MetaTrader 4 when a position gets 100 pips "to the good" which is to be equal to the Order Open Price; OrderStopLoss() == OrderOpenPrice() But this isn't happening. I've added Print() &…
user6216142
2
votes
4 answers

Reversed array with MQL4

With MetaTrader Terminal ( MQL4 ), I try to have a reversed array, that I append ( prepend ) items to. So, on every tick, myArray[0] becomes the 'newest' value, and the previous value shifts to myArray[1] and so on. But its harder then it sounds. I…
DutchKevv
  • 1,659
  • 2
  • 22
  • 39
2
votes
2 answers

Mt4 Probability Script

I'm fairly new to python I have made a simple script that imports price feeds from mt4 My idea / Project is to turn this into some sort of a probability indicator, that is giving the probability, besides the bid and ask, for example: TIME/ …
2
votes
1 answer

How to include Fibonacci levels in Expert Advisor (EA)?

I want to have access to various Fibonacci levels like 23.6%, 38.2%, 50%, 61.8% and 100% in my expert advisor (EA). How can I define those in my EA so that traders can select them via the inputs? I tried this input double Fibo=23.6; However, is…
Peter Simmons
  • 23
  • 1
  • 5
2
votes
0 answers

How to reverse-engineer and convert a protected EX4 file to MQL4-source in an MQ4 file?

I have a few .EX4-files which are protected / encrypted. I want to decompile them to MQL4-source-code files in an .MQ4 format. Is there any direct solution for this?
Ronak Sharma
  • 39
  • 1
  • 1
  • 2
2
votes
1 answer

What is the correct way to define MQL4 "#import of static class methods"?

What I'm trying to achieve is define classes (using MQL4) in separate files and use the methods from those classes in the main code. Essentially importing static class member functions. class example{ //…
Joel Box
  • 429
  • 1
  • 6
  • 12
2
votes
1 answer

Metatrader4/MQL4 code: "wrong parameters count" with dependent classes

In an effort to simplify the problem I am having, I have included two classes in foo.mqh and bar.mqh. When I compile them, I get: 'bar' - wrong parameters count foo.mqh Line 20 Column 9 which is this line in foo.mqh: foobar(bar & b) { example =…
revivalfx
  • 41
  • 1
  • 3
2
votes
2 answers

Forex MT4 platform - what type of protocol(s)/technology is used to update the charts in real-time?

Forex MT4 platform - what type of protocol(s)/technology is used to update the charts in real-time? Websocket? soap/restful web service? other? The data is updated in real-time,
001
  • 62,807
  • 94
  • 230
  • 350
2
votes
3 answers

How can I use either < or > (or other comparative operator) in an expression depending on a function input?

I have two longish blocks of code that are identical except in various comparative statements > is switched with <, >= with <= etc. I wanted to put these in a function and use one operator or another depending on a function input. I am coding in…
whitebloodcell
  • 308
  • 1
  • 4
  • 10
2
votes
1 answer

Exporting Live data from metatrader 4 to text file

I know how to export historical data from mt4, but what if I need live tick data? How to program an EA for mt4 to export tick data to a txt file?
pietrovismara
  • 6,102
  • 5
  • 33
  • 45