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
3 answers

How to create a DLL, which accepts strings from MT4 and returns back string type?

I am trying for two weeks to create a DLL to which I can pass strings and get back strings. But still no success. I tried this on Dev-C++(TDM-GCC 4.9.2) and visual studio community 2015. I searched a lot about this and tried almost every sample…
1
vote
1 answer

Why MT4 - ChartSetSymbolPeriod() - slows down the platform?

I try to use ChartSetSymbolPeriod() for my [ Custom Indicator ], but this indicator slows down my MT4 platform when I try to use it with another [ Expert Advisors ]. Specially while 'Order, Depth of Market' type of [ Expert Advisors…
Max-Enrik
  • 61
  • 13
1
vote
1 answer

How to open a Buy when a Buy-order hits a T/P, Sell if a Buy-order hits a S/L; a Sell if Sell-order hits a T/P and open Buy if Sell reaches S/L?

I have tried many things but can't get it to work with the code below. I've tried variations of the logic of the code below but have failed and am not sure where to implement it: if ( OrderSelect( OrdersHistoryTotal() - 1, SELECT_BY_POS,…
Rob
  • 69
  • 5
1
vote
1 answer

Database connection error with Postgres & Movable Type

I'm trying to set up MovableType 4.34 using a Postgres database, and I'm getting the following (unhelpful) error message: Connection error: authentication method 7 not supported The database server doesn't support SSL connections, so I suspect…
Doches
  • 3,276
  • 2
  • 19
  • 26
1
vote
2 answers

Why is my EA not moving my position to breakeven?

I'm attempting to modify my market orders to breakeven the position when the position get 100 pips to the good. This also accounts for the StopLevels which are around 20-30 pips for my broker. It checks the param's via a "for(){...} loop"…
user6216142
1
vote
1 answer

mt4 indicators fibonacci / I want to delete fibonacci

I want to delete my "Fibo", the one which I made by the this ( ref.: missing ) indicator, but I wouldn't like to delete all "Fibo"s present in the MT4.graph. How to do that?
Max-Enrik
  • 61
  • 13
1
vote
2 answers

How to stop MetaTrader Terminal 4 [MT4] offline chart from updating the prices

How do I stop MetaTrader Terminal 4 offline chart from updating the price on its own? I want to update the price on my own because of the difference in timezone with my broker. I have checked all the properties and the MQL4 forum. No luck.
miababy
  • 225
  • 2
  • 16
1
vote
1 answer

Import live FX quotes from MT4 to C++

Is there a way to import live data quotes from MetaTrader Terminal MT4 to an external C++ program? Or any possibility to read Excel cells in C++ via a DDE communication? Thanks in advance
Tinto
  • 33
  • 5
1
vote
1 answer

How to create built-in indicator in Metatrader

I need to create custom indicator & add it as built-in indicator to 'Indicator/Trend' directory.How can I do it?
1
vote
1 answer

MQL4: Issue with finding low value

I am trying to get the highest and lowest value from last 20 bar. I have no issue to obtaining highest value, however my code doesn't seem to work properly in order to obtain the lowest value. Just wondering if there is any suggestion about…
user1582596
  • 503
  • 2
  • 5
  • 16
1
vote
1 answer

How to retrieve all the historical bars

I'm building my first indicator. I want to retrieve all the historical bars of a symbol in some graphical period; in concrete in H1 timeFrame. But the next code returns very different results, depending of the Symbol(). For example, for USDCHF, it…
JLLMNCHR
  • 1,551
  • 5
  • 24
  • 50
1
vote
1 answer

'Open' - undeclared identifier

Does somebody know why this code inside a .mqh file throws the error 'Open' - undeclared identifier? It seems like Open, Close, High, Low functions aren´t "detected" in my library. ( Other system functions like Print() are properly loaded ). bool…
JLLMNCHR
  • 1,551
  • 5
  • 24
  • 50
1
vote
1 answer

Explain an MQL4 Cycle Identifier wHistory.mq4 ( a custom technical indicator )

As a MQL4 newbie I have some questions and would be very happy if someone could answer them in detail. a) Could someone please explain how the cycle identifier ( indicator for MT4, e.g. found here ) exactly works?! b) Which value is calculated to…
DaS
  • 31
  • 2
1
vote
1 answer

iRSI() does not open an order at the end of a time frame

First of all I am pretty new at EA coding, second I have looked for a related post on the MT4 forum itself and on mighty google. Now I wrote a simple EA to open an order if certain conditions are met, one of which is double RSI_1 = iRSI( NULL,…
fabio.geraci
  • 305
  • 2
  • 5
  • 18
1
vote
1 answer

Can I retrieve the connection latency information by MQL4?

I am creating EA on MT4 and want to retrieve the latency value ( e.g. 123 ms ) by MQL4 code. Is it do-able? I can't find this feature in MQL4 reference.
tensor5375
  • 126
  • 1
  • 9