MQL4 and MetaTrader 4

The MetaTrader 4 platform update will be released on Friday , March 1, 2024. This version provides error fixes and platform stability improvements. The update will be available through the Live Update system
The MetaTrader 4 platform update will be released on Friday, February 23, 2024. This version provides error fixes and platform stability improvements. The update will be available through the Live Update system
In this thread I want to begin to help those who really want to understand and learn programming in the new MQL4 and want to easily switch to MQL5 - the languages are very similar. This blog will be a good place to discuss tasks, algorithms of their solution and any other questions concerning MT
If you have questions about MQL4, MT4, MetaTrader 4, please post in this thread. Especially when your questions are related to trading functions
This topic will discuss undocumented ways of working with the mql4 language , examples of solving certain problems. It would be desirable that this branch would be closer in content to the FAQ, than to the discussion. I suggest that all experienced programmers share their solutions and programming
Hi everyone, I'm trying to write mql4 code that.... as soon as the last open trade in chronological order closes due to reaching TP, all the other open trades and all pending orders also close. Obviously I'm not an expert, however I tried different solutions but I was stuck. Can anyone give me
I want the value of S1Buffer, which is calculated in the 15-minute time frame, to show the same value for lower time frames, such as the OpenBuffer, CloseBuffer, and COBuffer buffers, which work the same way. Can anyone help
//+------------------------------------------------------------------+ //| qjol sol for wininet.mq4 | //| Copyright 2023, MetaQuotes Ltd. | //| https://www.mql5.com |
  Change chart line width  (19   1 2)
Hello traders How would i change the width of chart line? There is setting for color in chart properties but I'd like to have the line thicker. Thanks
Hi guys, was wondering if anyone knows how to do this, just bought an EA and the author advised this, not sure how though
Dears, Here I encounter a problem when I want to call the color out of my custom indicator. For example, I have a trendline in changing color. Green means uptrend and Red meand downtrend. When the color changes from red to green, place buy and vice versa. The question is how to call the color or...
Is there any way to automate the process of strategy testing. l want to run multiple tests for various assets with different parameters of each and save the reports. Is there any native or third party api to write code and execute the tests automatically or can l write a script to do the whole...
I'm using MT4 4.00 build 509, but this bug has been around for quite some time. The attached program draws Daily cycle lines using DRAW_HISTOGRAM to draw vertical DOT lines. The desired line style is DOT, which works when zoomed out, but if one zooms in to the 2 closest zoom levels (5th or 6th),...
Greetings, I would like to inquire about displaying dots in a histogram. When the Shape style of an indicator is set to DRAW_HISTOGRAM and the line style is set to STYLE_DOT, changing the chart scale to 4 or 5 causes the line width to become STYLE_SOLID, even when the width is set to 1. Is there a
  Good Indis =)  (3)
Hi, some good indis found in the internet (4shared) in this topic! First, a smoothed non-repaint version of macd indicator coded by igorad and mladen. Cheer´s
Hello, I've build a Server implementing some neuro-network functions and i want to communicate from an EA with this server. To do so, I implemented some socket-communication functions as an DLL but I got the following problem: - when calling the connect - function of WinSock via the DLL I always...
hi here I have a custom indicator , But when I use it in my expert 's backtest, I only receve maximum one signal ! and in the back test I only have maximum 1 trade (depending on start time of backtest ) !! here I have deleted the SendOrder to minimize code size , i only receive one print
Trying to upload my productto the market place and I keep seeing this at the Upload screen. "Your product's category is Experts, correct program type for it is Expert Advisor" Problem is there is no way to pick this option. As MQl4 has changed since then. And the how to page was made in 2012. And
  Usefull links/threads/tools  (57   1 2 3 4 5 6)
The thread about threads: what's going around the forum everywhere ============ MT5, mql5, mql5.com suggestions for improvement thread ============ Requests & Ideas The beginning Requests & Ideas, the beginning - the thread Suggestions for Trading System thread After Requests & Ideas (MQL5
Hello, I am creating a trading robot in MT4, part of it works with resistance and support zones: iHigh ( _Symbol , PERIOD_M1 , 0 ); //Example The problem is that by using such a small time period, the broker simply does not have enough historical data, is there any way to solve this problem
Is there any way to add a default comment for every trade, i have a EA but the comments are adding the name of the EA? I would like to have the settings automatically hide that for every future trade the bot places
Hello, I made the code, which close old trade after X time from Order Open Price. My code : void StopOrderSL( int trade_close_magic) { for ( int pos_0 = OrdersTotal () - 1 ; pos_0 >= 0 ; pos_0--) { OrderSelect (pos_0, SELECT_BY_POS, MODE_TRADES); if (OrderSymbol() != Symbol () ||
i need this script according to the following list: take buy,buy2,sell. at same time vice versa for sell,sell2,buy symbols need to be in input parameters gbpusd-buy,usdcad-buy,gbpcad-sell. take profit at input parameters thats it simple opening trades will in group and closing trades will also in
[Deleted]
Hi I want to make an EA that closes all orders and exits metatrader if certain criteria have been reached. I know how to close the orders, but I can't seem to find how the EA could close the whole metatrader program. Anyone knows? thx in advance
  Current Month Name mql5  (18   1 2)
How please write a formula so that I can display the name of the current month in the label
I'm wondering if it's possible to have a trace on the mobile chart of all the past closed trades. I'm not talking about desktop version, I'm talking about MT4 mobile APP. Thanks in advance
Dear all, I try to make the custom indicator about the cutting of MACD main & signal. Rule is (with the upTrend): 1. With M15 the MACD main line cut up the signal line -> sign1. 2. Sign1 = true -> with H1, check the MACD on the up or down trend (uptrend when mainH1 cut up signalH1 & oppsite). ->...
  Tools to analyze the trades  (102   1 2 3 4 5 ... 10 11)
First of all I am using this small script (attached) created by Beluck and fixed by Igorad. To use it be sure that you have "all history" in "account history" in your Metatrader (for the right calculation)
Several days trying to correct this fateful error, reading on the forum and following the recommendations of pre-publication checks on the Market at: https://www.mql5.com/en/articles/2555 . I have already implemented the following checks: 1.- Insufficient funds 2.- Invalid volumes 3.- Takeprofit
While interacting with sellers of signals and trading applications, we have decided to launch the affiliate program. It allows all sellers to interest MQL5.community members in promoting their products and signals. Thus, both sellers and promoters will benefit from the program. Sellers will receive...