MQL4 and MetaTrader 4

If you have questions about MQL4, MT4, MetaTrader 4, please post in this thread. Especially when your questions are related to trading functions
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 platform update will be released on Friday, March 24, 2023. 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, January 13, 2023. It contains many fixes and improvements accumulated since the previous release a year ago. The update will be available through the Live Update system
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, I want to ask if there exists already a library for drawing objects and handling according to the error messages (wait, move,...)?
Hi, I'm unable to open my mt4 platform. I've tried so many different things, but none of them seem to work. Does anyone know how to resolve the problem
Hello , i built this code trying to check the results of the EA's in my account based on their magic numbers. i loop through the trades from the oldest to the newest for each magic number and perform calculations in order to calculate values e0 , e1 ,e2 . i will share the code and then explain the
Hi, I want to know today's closed total profit.(whole account) Here is the code. However, when I open a new account and run the EA, it shows as same as account balance like below picture. This is because there is no closed profit today? Do I need to add some code ? double ProfitDey( int type) {
Hi! I am struggling to make a simple indicator, probably by the lack of coding experience. My excuses for my silly mistakes! I am trying to get a indicator, similar to the AO, to show a bar of a different timeframe. So for example: I have the chart on a daily timeframe. But I want the indicator to
Why Money Management? Best system will fail in long-term if it is without proper money management. On the contrary, bad system can turn profitable if used with a good money management. Currency trading always go through the cyclical ups and downs, where winning and losing are just part of the game....
I've been programming and testing strategies in my spare time just for fun, but lately a problem with MT4 has made it impossible.  When I run a backtest, change the parameters, and run a backtest again, the second backtest frequently uses the parameters from the first one and so it gives me the...
  Editor Go to line  (10)
Hi, actually two questions, first: When you got an error from the compiler in line eg. 375. How do you get to that line? I haven't found any "go to" line in the editor, so what I do is I write xxx in some part of the code, hit compile again and narrow down the line where the code has the error. Is...
Hi; I am using this formula to calculate percentage: Profits= NormalizeDouble ((OrderProfit()/orderProf)* 100 , 2 ); (orderProf is preset to $200). It works fine, except it doesn't display properly: Any suggestions? Thanks a bunch
Is it normal? Or is it a bug? const int GLOBAL = 1 ; class CTest { private : static const int MEMBER; public : static void method(); }; const int CTest::MEMBER = 1 ; void CTest::method( void ) { int arrOk[ 3 ] = { 1 + 2 , 1 + 3 , 1 + 4 }; // OK int arrNotOk1[ 3 ] =
  Usefull links/threads/tools  (56   1 2 3 4 5 6)
The thread about threads: what's going around the forum everywhere ============ MT5, mql5, suggestions for improvement thread ============ Requests & Ideas The beginning Requests & Ideas, the beginning - the thread Suggestions for Trading System thread After Requests & Ideas (MQL5
he charge me twice and didnt even give me the program!
Hello Guys, i am little confused in finding the total no. of opened positions. I am only seeing OrderTotal, which is total no of opened and pending positions. It's occurring in Mql4. In Mql5 we simply get opened positions by PositionsTotal(); and pending positions by OrdersTotal(); . If any one have
HI all, I'm trying to load the attached file. When I select it from Browse in History Center the window remains empty. Where is the problem? Thank you
i wana open trade for exemple at 11:00:00 and 12:00:00 and 13:00:00 can some slove my expert plz #property version "1.00" #property strict #include <stdlib.mqh> #define MAGIC 94949449 enum TRADE_TYPE { BUY, SELL }; //--- input parameters input string TimeToOpen1= "11:15:00" ; input string
I need to receive a notification on my phone that the alerts pop up window has appeared on my laptop screen. I don't need to know what the alert is, I just need to know when it appears. What steps do I need to perform to accomplish this
//+------------------------------------------------------------------+ //| news.mq4 | //| Copyright © 2016 Tor | //| |
Which indicator of mladen do you mostly use?
Hi everybody, I have an indicator that draw arrow up and arrow down as object on chart, I want to program an EA that trades by these arrows, I have two questions: 1-How can I find when these objects drawn?(how can I detect these objects?) 2-How can I find out difference between arrow up and arrow
this indicator is not auto refreshing alongwith the chart progress, thanks in advance //+------------------------------------------------------------------+ //| MAB_TD_Sequential | //| v1.2 |
Define the resistance and support zones: Determine the price levels that define the upper and lower boundaries of your resistance and support zones. Track price movements: Monitor the price action using the OnTick() function in MQL4. You can use the iHigh() and iLow() functions to retrieve the high
I'm looking for an EA I used a long time ago and somehow have never come across it again maybe it's not even on the EA store anymore. I was wondering if there is a way to access all the EA's I've downloaded in the past to see the names of them so I could search through them for it
Hi all .. I wanna ask ,, How can I Possibly to make "lotlist[]" in input paramater ?... example : extern double lotlist[] = { 0.1 , 0.2 , 0.3 , 0.4 }; but I can't because 'lotlist' objects and arrays are not allowed as inputs thank you: void BuyOrderVarying2() { int orderid = 1 ; double
Hello my friends. I'm having an issue trying to figure out how to make my management EA just stop the other EA's in the platform from sending new trades after the target is reached. And wait for a set amount of time to allow trading again. The code i have now, pushes the automated trading button so
In the MLQ4 Reference, there is a pre-defined variable called Point with the followingdefinition: "The current symbol point value in the quote currency." Beingnew to this world of trading, I was wondering if someone could provide a betterexplanation of what Point is, maybe in laymen's terms. Thank...