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

How can I resolve "Not all control paths return a value" error for integer

I have the error "Not all control paths return a value". I've seen it before and have been able to resolve it for a simple bool return value. This is a bit different and seems to be a challenge for me since it has a for-loop and at the same time…
BBNN
  • 139
  • 1
  • 9
0
votes
2 answers

Confused on how to code bollinger bands for EA in mql4-mql5

i use bollinger bands when trading in mt4/5 and the setups i look for are the ones with clean, straight bands, i avoid trading bollinger bands squeezes, or the rounded ones which narrows at the current candle or the flared out ones which just go in…
Droid
  • 53
  • 2
  • 7
0
votes
1 answer

Remove carriage return from json text

I get json text returned from an api call and I run it trough a script JSON Serialization and Deserialization from here https://www.mql5.com/en/code/13663. My issue is that it only process the first few parts of the json because of what I believe to…
Keith Power
  • 13,891
  • 22
  • 66
  • 135
0
votes
1 answer

MT4, Retrieve account information NodeJS

I'm looking to build a web application that interfaces with MT4. How would I, using nodeJS or some other web language, retrieve account information from Metatrader4. Information such as previous orders, account balance ect. Is this possible? I'm…
Lorza
  • 459
  • 8
  • 23
0
votes
1 answer

mt4 + ibarshift giving inconsistent results

I am trying to confirm that I am using mt4's ibarshift correctly but the results seem to be not self consistent. I feed ibarshift a datetime, get the indice of the corresponding bar, then ask what time the bar corresponds to but I get a different…
jollywer
  • 26
  • 2
0
votes
0 answers

MT4/MQL4 EA Modification erro

I have an MT4 EA, trying to modify it, I'll share the part I need to modify it below: void exit() { for(int i=OrdersTotal()-1; i>=0; i--) { if(OrderSelect(i,SELECT_BY_POS,MODE_TRADES)) { if(OrderSymbol()==Symbol()…
Traveee
  • 1
  • 1
0
votes
1 answer

MT4 Keyboard shortcut for line drawing mode

Please help. I know how to use CHARTEVENT_KEYDOWN to get the key pressed and to use that to program an action for the key. However, I would like to program extra shortcuts to make use of existing MT4 interface functions and cannot find the…
Jean
  • 137
  • 1
  • 13
0
votes
1 answer

Copy line from one MT4 chart to another

I would appreciate help to copy a line from one MT4 chart to another programatically. If I draw a line on a one hour time frame I would like the line to be recreated on my 15 min chart time frame as well as my 1 min time frame. So I have three…
Jean
  • 137
  • 1
  • 13
0
votes
0 answers

Mt4 recovering loss script

I'm trying to add the (if) condition to my EA for MT4, as this( if amount loss is higher than profit amount then complete martingale until losses are recovered, any one can give an Idea about the script? So if amount loss is higher than profit set…
Traveee
  • 1
  • 1
0
votes
1 answer

Pinescript - current [0] period pivot point as static line?

I'm building on a simple pivot point indicator with pine script and i wanted to have Daily current close, low and high calculated as one "static" moving line "object". Code below is behaving like a moving average now but showing like a pivot point.…
loffe
  • 17
  • 6
0
votes
1 answer

How to disable "Close at Stop" in EA?

When I was optimizing my EA, it always close any remaining positions for me. But I think it will yield "inaccurate" results because the trades are "not finished". The system might close an otherwise profiting trades "prematurely"! Is there a way to…
PiggyChu001
  • 440
  • 6
  • 20
0
votes
1 answer

MQL4: How can we separate a class definition across files?

I would like to be able to split classes in MQL4 across files, i.e. into the definition in an include/.mqh file and an implementation in a library/.mq4 file. How do we do this - I keep getting compile errors ("'function_name' must have a…
Nikhil
  • 11
  • 4
0
votes
0 answers

BeautifulSoup cant find existing tag also returning wrong tag

The code I've got now cant even find the span text i'm looking for. import bs4 from urllib.request import urlopen as uReq from bs4 import BeautifulSoup as soup my_url = 'https://mt4webtrader.fxpro.com/' uClient…
vinny9592
  • 37
  • 5
0
votes
0 answers

MT4 Manager API how to get opening positions

I would like to get the list of opening positions from MT4 via MT4 Manager API, I am using the ClrWrapper library. Below is my source code, I tried few methods, but all returned me empty list. Code 1: var mt = new ClrWrapper("\mtmanapi.dll"); var…
Poh
  • 1
  • 1
0
votes
1 answer

How do i send data from my website to MT4 software?

I am trying to build a build a platform where in the user enters data and that data is sent to the MT4 platform. Trades are to be done based on these data. Simultaneously i need updates about the trades happening at my platform from the MT4…
Soumil_13
  • 17
  • 4