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
0
votes
2 answers

Email Notification when Expert Advisor fails to close a trading position

I'm trying to develop a piece of MQL4 code which sends you a notification when an position opened by an Expert Advisor fails to close/liquidate when the conditions specified by the Expert Advisor are met. Here is what I have so far.The…
user6216142
0
votes
1 answer

How to send an HTTP request via MQL4 Expert Adviser?

LI have found a code which sends http request via MQL4 Expert Adviser and modified it for my personal EA logic. Technically, it works, but there is a huge problem, it sends requests on every tick. I need to change it to - one request per each…
Tinto
  • 33
  • 5
0
votes
1 answer

mt4 indicator count day

I need to use "Count Day" code for indicator. It does work fine, but this indicator keeps previous day object till I restart MT4. What is wrong below code? if(day >= drowDays) { break;} Also you can see chart screenshot link.
Max-Enrik
  • 61
  • 13
0
votes
1 answer

MT4 Manager API => .Net ClrWrapper

I am using mtmanapi.dll with a .Net CLR wrapper I am getting correct Ask and Bid values for symbols without any special characters in the Symbol name - ( e.g. EURUSD, GBPUSD and so on ), but if symbols have some special character in it ( e.g.…
Dharmesh
  • 11
  • 2
  • 6
0
votes
1 answer

How does MetaTrader 4 script 'normalize' time?

I try to understand the MetaTrader 4 scripting language ( and convert a couple of scripts to C# ), so I started with the PeriodConverter.mq4 ( it came with the MT4 install ). Here are the values for the script: periodseconds == 1800 Time[start_pos]…
DavidO
  • 3
  • 5
0
votes
1 answer

MT4 cannot open file error 4103 when running an EA in Strategy Tester

I wrote an EA using an indicator which reads in a configuration file. This configuration file is put in the folder MQL4\Files. When I run the EA with the live chart, it works well. But when I tried to test this EA using the strategy tester, it…
Carter
  • 1,563
  • 8
  • 23
  • 32
0
votes
1 answer

How to read candle data from a MetaTrader4 Terminal ( MT4 ) from vb.net in realtime

I try to read data from MetaTrader 4 with my app ( on vb.net ) I catch data with DDE but it is only bid, ask, high, low. So I must try another way. I want to read realtime data for finished candles ( M5 and M15 etc. ) How can I read realtime candle…
Pisagor
  • 147
  • 1
  • 2
  • 16
0
votes
1 answer

MQL4: Global trend/variable or text files for Single trade per signal/event

On each new bar/tick, my variable is re-initialed, I am trying to execute a trade once per signal, the problem is that once TP is achieved, if same trends continues, it triggers another trade. I am thinking to store variable in Text file. So just…
user1582596
  • 503
  • 2
  • 5
  • 16
0
votes
2 answers

MT4 DLL / TA-LIB Linker errors

This is my second attempt at a C++ program so I'm still learning. I'm trying to create a DLL to work with Metatrader 4 which uses the ta-lib technical analysis library using Visual Studio 2013 Community. However, when I build the solution I get the…
Andrew
  • 626
  • 6
  • 16
0
votes
1 answer

How to change server time on mt4

After Googling it I haven’t found how to change the time showed in my MetaTrader4 terminal, when the local time is different from the time of the server of the broker. Is there a parameter in some of the .ini configuration files that do the thing?
JLLMNCHR
  • 1,551
  • 5
  • 24
  • 50
0
votes
1 answer

OrderSend color ignored

Does somebody know why the color arrow isnt get painted in the next order call? OrderSend(symbolName, lotsNumber, bid, slip, 0, takeProfit, coment, Red); Thanks!
JLLMNCHR
  • 1,551
  • 5
  • 24
  • 50
0
votes
1 answer

Event to use in an Expert Advice that triggers when a new bar gets created

Is there any event to use in an Expert Advice that triggers when a new bar is created? I think OnChartEvent, OnTick, OnTimer doesn't do that.
JLLMNCHR
  • 1,551
  • 5
  • 24
  • 50
0
votes
1 answer

Does ShellExecuteW(...) work only once in MetaTrader 4 or not?

Trying to launch an .exe from MQL4 using ShellExecuteW(). Does this command work only once, or not? #import "shell32.dll" // MQL4-syntax-wrapper-Bo[#import]Container // v-------------- caller-side interface to DLL …
NJK
  • 53
  • 2
  • 8
0
votes
1 answer

how do i declare variables, compare them and then use them inside a function

i am developing an ea that requires me to compare the high of previous 2 bars and whichever one is higher, use that as a stop loss value. same for opposite side trades, i need to compare previous 2 lows and use the lower one as stop loss value. what…
mmdel
  • 1,279
  • 4
  • 21
  • 30
0
votes
1 answer

MT4 export script

The following MQL4 script exports data from MetaTrader to a csv file. Unfortunately ( for me at least ), the order of the data in the generated csv file from 0 to 1000, 0 being the most recent ( present to past ). I want the file to be sorted from…
1 2 3
14
15