MQL4 and MetaTrader 4

The MetaTrader 4 update will be released on Friday, February 21, 2025. This version provides important security improvements, error fixes, and platform stability enhancements. 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
The MetaTrader 4 update will be released on Friday, May 24, 2024. This version provides important security improvements, error fixes, and platform stability enhancements. The update will be available through the Live Update system
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
The MetaTrader 4 platform update will be released on Thursday , October 14, 2021. This version provides error fixes and platform stability improvements. The update will be available through the Live Update system
  Fisher  (30   1 2 3)
RAVI FX Fisher.mq4 posted by Bubble.
I started this thread to post all news/signals indicators and EAs we have now and will have in the future.
All lessons of Codersguru: https://www.mql5.com/en/forum/175653 Mql - Metatrader Development Course | www.metatrader.info https://www.mql5.com/en/forum/172885 All Codersguru lessons + questions/replies and so on are on this section Metatrader 4 mql 4 - Development course - Forex-TSD Book: https...
Hi, I read this post by Moderator32455 William Roeder 2022.07.05 14:42 #1 https://www.mql5.com/en/forum/428159 about renko backtesting. He said "The tester can only read the regular timeframes. Open the «DataFolder»\..\history and save the M1 and copy the Renko (probably M2) to M1. You don't want
Apparently, MQL5 's system thought I wanted something decompiled! I do not. I'm looking for the source code link if possible......... It's the modified zigzag from Dr. Richard Gaines (which is public code btw) but with added code to leave a shadow copy of the pointer behind as it keeps making
Hello friends. I am having problems with MQL4 indicator coding. I am not that good at programming. I am having the problems I mentioned below with the RSI indicator. Can you help me? When I add this code after the rssi buffer, both lines disappear. It does not produce an error code. Compilation is
  error need help  (13   1 2)
when i put my indicator in the market it gave me this error EX4 file must be compiled using <a target="_blank" href="http://docs.mql4.com/en/basis/preprosessor/compilation"> #property strict</a> directive. what can i do to fix this error thanks in advanced
//+------------------------------------------------------------------+ //| ReverseTrade.mq4 | //| A fully functioning EA that opens a reverse trade when price hits | //| -50% of SL of an existing trade, and keeps original trade open. |
Hello, I have a very simple histogram indicator displayed in a subwindow. It displays fine unless val2 > val1 then the val2 histogram 'covers' the val1 indicator colour. Is there a simple fix to this? Is there a way to send val2 colour to the background so that both histogram colours show on this
  Copy string to clipboard  (17   1 2)
Hello, for to copy text to clipboard, I tried the solution of ricx on https://forum.mql4.com/30795 It's running through without error, but in the clipboard there only is the first character of the input string. I tried to find an explanation and a solution and then replaced "CF_TEXT" with
Even adviser that works on ticks, or any other code, cannot save a variable in memory. Because of this, the ability to make a cool code fades away greatly. When code execution ends, the values ​​of all variables are reset.... And already doesn't matter , that function OnTick (other global function
Hey coders, I found a code about how to maximize a chart window by using SendMessage but I can't find something like WM_MDIMINIMIZE. I googled it but I didn't find a command to minimize a window. Can someone help me? This script is working fine to maximize a chart and I figured out that
Hi! Hope everyone is doing well! I have couple of questions: In MT4: 1. When I double click for example in XAUUSD D1, this data is downloaded from trade server, right? 2. When I select Download, this gives you an alert saying that data will be downloaded from MetaQuotes, so, data is overrided with
Hi everyone, i want to change the default settings for price alert from sound to notification! When i add new alerts over the chart than the expire date is activated. I want this also off as a default. Thanks@all!
  Previous tick's value  (40   1 2 3 4)
I, a custom indicator , just got a new tick and am currently in Start already. I need to find out whether I am to move up from the previous tick or down. Where do I fetch this information
How can I fetch Tick data from MT5 and MT4 broker terminal in real time (live tick data)
From the topic u will get fast my problem I'm a beginner EA programmer, this is my first EA pls see my Code I really dont get why its still not working, I mean why do I get still "invalid error" //+------------------------------------------------------------------+ //|
  Terminator v2.0  (564   1 2 3 4 5 ... 56 57)
Here it is guys. Check out the ReadMe file thoroughly. I've been using the H1 chart. Updates will be posted here so they are not dispersed throughout the thread. If a zip file has a low number of views, it's due to a recent update, if only in the readme file. Enjoy, Tom
Hello, I'm having an issue getting the correct signal from my indicator. Previously the line of code stated ( if x > 1) and it signalled correctly now i want it to signal if x is between 1 and 2, but the back test seem erratic, I'm using the code below if (x > 1 && x < 2) it seems as though it'll
Hello, I am trying to avoid 6 hours before market close and 6 hours after market close in my EA. i am using SymbolInfoSessionTrade to get opening and closed time of assets. What mistake i am making? extern int MinuteToAvoid = 360 ; void MarketHoursMonitor() { datetime serverTime = TimeCurrent ();
  MTF Stochastic  (32   1 2 3 4)
Hi, The attached stochastic is an mtf version that is great. However it does not show interim values on higher time frames when used - it only updates the values on close of the higher time frame values. Could you change it to show higher time frame values in the interim before bar close, during...
Hi, I've tried using several EA's on MT4 and keep getting the attached error message. Any help would be much appreciated. Thaks Steve
Hi all. I have recently used ChartSetInteger function to programmatically change sub window height (MT4 latest build 830). Once this code is applied to the chart, then I can't change sub window size manually afterwards. It seems the code fixes the sub window height and even if I drag my mouse...
Guys, Ive been trying to withdraw funds from my MQL5 account and MQL5 frustrating my effort. I created a webmoney account to receive funds and their response was "Our payment provider does not support your region" Please let me know how an international payment system such as webmoney is not