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
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
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
  Good Indis =)  (9)
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. Is it possible to create a button that when pressed behave like when you press the "draw rectangle" button but it gives you a rectangle of a certain color? Like create a button called "white" rectangle and when you press it then you can draw a white rectangle with your cursor, without having
Hello everyone, I need a help about coding. Actually, I am learning about coding and decided to make an expert advisor, but along the way I got stuck because it doesn't work well in MT4. I want to make an EA with following specifications: - To Buy or Sell when MA crosses. - When the opened Buy order
I have download the a new MT4 app from a new broker. but unable to log in to the MQL5 community. I used forum log in and reset password few time but nothing worked Any help or suggestion is welcome. Thanks
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 just purchased an EA and when I try to download it to the terminal and login, I get this message. Any help would be appreciated. Thanks
  OBJ_TREND  (3)
ObjectCreate ( 0 , "Low" , OBJ_TREND , 0 , iTime ( NULL , PERIOD_MN1 , 3 ),lowY, TimeCurrent (),lowY); ObjectSetInteger ( 0 , " Low" , OBJPROP_RAY , true ); ObjectSetInteger ( 0 , " Low" , OBJPROP_COLOR , clrRed ); ObjectSetInteger ( 0 , " Low" , OBJPROP_STYLE , STYLE_SOLID ;
  ILAN- Need Stoploss!  (24   1 2 3)
Hi everybody, I request you to kindly plz take out your precious time to code the stoploss in this version of Ilan. I like this version and used it in live account too. But sometimes when markets moves long direction it blows cause the stoploss is not working when set to certain level as well as it...
Hi, Im trying to change the iExposure indicator view from sub window to main chart window. I've already tried modifying the code from #property indicator_separate_window to #property indicator_chart_window, but still can't see the indicator in the main "chart" window. Any suggestion?  Here is the...
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...
I am doing everything as normal but when I start MT4 on my laptop it deletes any ea’s that I have copied into the MQL4/experts folder. Seems to also happen with indicators as well. Everything was working fine on Friday but something happened over the weekend that has me stuffed. Things I’ve tried
I have written a code that I use to take profit in XAUUSD for 1 minute time frame. the problem with this EA is that it can make a profit when it follow the trend line, but when reversal came I keep taking losses, thus diminishing my profit. is there any way to fix my code ? As you can read from the
[Deleted]
  Terminal window missing  (22   1 2 3)
I have been running MT4 on my laptop for several months. All of a sudden the terminal window won't appear? i have tried re-booting and several different profiles, no go. Any ideas will be greatly appreciated! Thanks, Steve
  problem with iCustom  (11   1 2)
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
Hi, I need help to create an EA base on the following terms EA will open trade base on chart M1, M5, M15, M30, H1, H4 and D1. EA will not open a new CYCLE of trade if the previous CYCLE is not close. Example:- M1-Sell, M5-Sell, M15-Sell, M30-Buy, H1-Sell, H4-Buy and D1-Sell EA will open sell...
  Elite indicators :)  (15187   1 2 3 4 5 ... 1518 1519)
Hello, Does anyone know where I can find an indicator that takes in price values, which when reached or surpassed will cause the indicator to send a sound alert
Hi, I'm trying to build my own EA using EMA. When the program starts it will buy/sell according to the relative position of slow and fast EMA. Then the program should close the trade at the next EMA crossover. My first obstacle was to find a way to calculate EMA at the closing of candlestick, so I
  Initial Deposit  (14   1 2)
Is there a way to access the initial deposit in my EA?
Hello ; I want the value of S1Buffer in time frames lower than 15 minutes to be equal to its value in time frame 15 minutes, but currently the value of S1Buffer in lower time frames is not equal to its value in time frame 15 minutes At the same time, the rest of the buffers, which include
I keep getting an authorization failed message when I attempt to login to my account in MetaTrader 4. Please help
[Deleted]
Hello, I try since Friday to creat an EA that can open orders of 5 mintues expiration cause I will link it later to a Binary options plateform. I almost used all solution on this forum creat a datetime variable in order to use for closing the order: Exemple 1:  datetime et = Time[0]+(5*60); int...
  EA continue to open trades  (11   1 2)
Hello, i'm trying to build an EA. When I run it works as coded, the problem verify once the condition for Long or Short position are met. Let me explain deeper, when the price met all the conditions to open a Long/Short position the EA open the position, when the price hit the StopLoss or TakeProfit
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...
Hello, Normally, Stop Loss execute in broker server and it send a data of Stop Loss value to broker. This has a disadvantage of too many operation and also Stop Hunting from most of the Forex brokers. To avoid this, i heard there is a concept called Virtual Stop loss which act same as normal but it
Who knows which technical index of mt4 is better and whether the bollinger band works well