MQL5 Algo Trading community — forex forum for traders and developers

This thread will discuss undocumented methods of working with the mql5 language , examples of solving certain problems. It would be desirable, that this branch on the maintenance was closer to FAQ, than to discussion. I suggest that all experienced programmers share their solutions and programming
Hello, why is my EA getting this error code all of a sudden. Yesterday the EA worked fine, today I get this code. 2025.04.01 14:28:25.126 VPR (US30,M5) Failed to place Buy order. Error code: 4752
MQL5 periodically disconnected on a daily basis what can I do to solve this please
Normally, there's an option specifying which VISA card you'd like to withdraw to, after linking the card to your account. I can't find the option any more, additionally, when I'm making the withdrawal it warns me I'm about to withdraw to a new card, without informing me which card I'm withdrawing
  MQL4/MQL5 Dev  (2)
Hi guys, I am looking for an experienced dev in MQL4 and 5. Have some ideas to implement and need someone who would like to work with me
When we use a statically allocated objects only, is the same as using a direct address assignment like c++ vs using a mql5 GetPointer() function ? I emphasize, we are not talking about dynamic (new) objects , instead when we use statically allocated objects only where we can check for the existence
This is an MQL5 documentation page. I was trying to work with function pointers and understand the differences between MQL5 and C++. However, the logic explained in the MQL5 documentation doesn’t even work in their own compiler. This is a formal documentation—how can they make such a major mistake
Hi every one Everything was fine until one day opening MT5 says: A debugger has been found running in your system. Please, unload it from memory and restart your program. I've checked the forum the same problem occurred to people long time ago and was about running in 32 bit which is not possible
Hello and good day. Please tell me, is the following problem mine or the mql5 servers? I messaged support, but they only offered me a video tutorial on using and setting up the server. 2025.04.01 01:25:24.389 Virtual Hosting: 6665973 failed to connect to server 'MQL5 London 63' (13.42.209.119:443
We have updated the MQL5.com Chat to further enhance the user conversation experience. Check out the new service interface and updated functions, such as the revised friending logic. Create groups on financial topics, join existing channels, discuss current issues with fellow traders in group chats
  web terminal  (1)
Hi Can we trade on web terminal with a real account
The metatrader records the number of messages you send to the server (modifying operations, opening, closing, etc.), and i need to generate a code that reads the number of messages and, when reaching a value stipulated by the user, it stops operating and only come back the next day. Does anyone
The latest versions of the MetaTrader 5 mobile app for iOS introduce a range of convenient chart features, along with important stability improvements for a smoother user experience. Added text object for creating custom labels on charts. Open the chart objects menu and tap "Add Text". Next, enter
Dear MQL5 Community, I am seeking guidance on resolving a persistent issue I am facing while developing an EA on the MT5 platform. Despite several iterations and revisions, the problem remains unresolved, and I would greatly appreciate your insights. My Requirements: EA Purpose : The EA monitors
This is strange, why moderator has removed my previous post!!! Seems they dont bother to read fully or using some sort of algorithm which dont understand the difference between two posts. Anyway, I have question as to if my Vendor of indicator asks me to 'reinstall' the indicator sold by them
I'm curious about the effectiveness of a weekly adaptive optimization approach compared to sticking with a single, static rule for EA (Expert Advisor) strategies. Consider an EA that has already been built with one year of optimization. What if we update it every week with slight adjustments based
Hello, Article : https://www.mql5.com/en/docs/series/iclose iClose, iHigh, iLow, iOpen these values provide the current/Live/real-time candle information or previously closed candle information?. How can iClose value is possible for Current candle because ones the candle is closed, it became
The buyers are the loser and helpless from MQL stuffs
As from the title, I mean which method has the best ratio safety/profitability for you (support resistance based, atr based, range based, time based etc etc.) Share your opinion...
Hello, How can I identify a trend or trend reversal (counter-trend) using RSI, Stochastic, and Bollinger Bands ? What are the recommended settings for RSI, Stochastic, and Bollinger Bands
This thread won't be about a question or problem, but rather about the anouncement of the presentation and documentation of an exciting trading concept. I plan to do a series of postings here in order to keep you guys updated. Anybody who has an opinion on the topic, please don't hesitate to comment...
Excuse for my english, i hope to be able explain my idea for trading system Ok I'd like to present a very simple and profitable way to trade eur usd only one important indicator: sma 14,,,,,,,, when price cross sma 14 we take position 5 minutes setting short when price was over sma 1 lot long...
Hi all, I was not able to successfully exploit this divergence wit han EA, anybody has any idea on how to optimize this theoritical strategy
I just started this thread as a continuation of the talking made on this topic (we can read it). Or ...to make it shorter: it was some discussion about forecasting/predicting of the next candle or direction of the movement or market condition evaluation. And it was around standard indiocators in
  All About Price Action  (32   1 2 3 4)
Dear friends/Brothers/Sisters, I want to start this post regarding Price Action. I want people to help about what I know. Please Respond this post, Share the way you know and learn the way I know. I am not a master but a trader like others and also like to know how others doing. Reply and Keep in...
Hello, Could you please provide a list of Forex calendar news events that typically result in significant price movements (more than 500 pips) in the Forex market? For example: USD Non-Farm Payrolls (NFP): Average price movement is 500–1000 pips. USD Consumer Price Index (CPI): Price movement ranges
  Machine Learning and Neural Networks  (741   1 2 3 4 5 ... 74 75)
MQL5 now supports matrix and vector operations which are used in various computational tasks, including machine learning. We have created this thread to select and share some materials that may be useful to you. Machine learning technology is based on neural networks. Neural networks are
M artingale, H edging and G rid <<< MHG >>> M y H oly G rail Over 50% of freelance jobs can be classified as one form or another of MHG. I wonder why ? Martingale : A gambling system of continually doubling the stakes in the hope of an eventual win that must yield a net profit. Hedging : Taking
  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
I wanted to lean on someone's knowledge who has significant experience and knowledge in trading. Is there a relation between intraday pivot point calculations and daily trading signals with regards to buying after the daily low towards the high, and selling after the daily high towards the low
Hey guys, dumb questions from a noob I just created a demo account on ****** to try their MT5 and I'm trying to find the emini futures in there (S&P 500) but I simply can't. Their website says they support it, but I just can't find it. I wonder if I'm doing something wrong here
  DOM Ladder  (10)
Hi. How much would it cost to make this DOM?
  Indexes disabled  (2)
SP500 and NASDAQ Indexes are not up to date and have been disabled for some time now. Is anyone else experiencing this
good day. I'm new here, and I can't find an answer. Please advise: I downloaded a couple of "free" EAs to MT5 and I need to backtest them via "test". But I have a problem that it is counting my profit as a few dollars. I have something set up wrong. I need to set it up for back-testing on stocks and
  Trading Futures  (4)
Hello all, I am new to the MT5 platform & my background is in trading E-Mini S&P500 futures. Of course, I am interested in algorithmic trading but I have not been able to find any source code for this particular instrument. I would appreciate any guidance or assistance in finding some expert
  Who are the resistance?  (12   1 2)
If BTC/USD has support at $68,000 and resistance at $70,000, what type of group or person would keep dumping at $70,000 when they make very little profit from a buy at $69,000
Hi @ all, i´m new with MT 5 and wanted to know if its possible to trade on sim/demo account other markets than forex? For instance, NQ, SP500, etc. For now i only see forex markets to choose from. Any ideas? Thanks
Newbie question I know..trying to place a leveraged buy order for stock RNG.N. Current ask price is at 32,950. Account balance is 103€ with the same free margin (no other open positions) and a 1:200 leverage. For 50 stocks this should be enough, right? Stop loss is not set. Still getting the "not
Hi, I have data export from NT8 and need to import it in MT5 but the formats compatible with the two platforms are clearly different. Is there a process/tool to automate this
Hello all, I'm a software engineer with a C++ background and have been using metatrader for a long time. I've been importing chart data into custom symbols successfully however, I lately have been needing to import historic prices; and in this area, MT5 is limited. The issue --seems to-- lie in the
Dear all, I am trying to import historical data (M1) to MT5 from my Tradestation account. I have export the data in csv format and below there are some rows as example: "Date","Time","Open","High","Low","Close","TotalVolume" 1/2/2008,03:01:00,3841.00,3842.25,3840.25,3841.75,184
[Deleted]
MetaQuotes Software and oneZero Financial Systems announce a new connectivity gateway for integration with Interactive Brokers Group, Inc., available through the oneZero Hub product. The gateway provides the possibility to trade stocks, futures and other exchange traded instruments on the largest...
  Futures Rollover  (1)
does the future contracts on mt5 automatically rollover? Like ES, YM, NQ
Hi I have been trading UNLEVERAGED ETFs on non metatrader broker of Indices (NASDAQ100,S&P500) and Metals(Gold, Silver) . I was always buying .Long The reason for this choice was because no Swap is being charged and I can hold a position for months without much stress. I will now seek MT5 brokers
  "Day of month"  (3)
Deleted/undeleted by moderator William Roeder (wrong post) hi. how can i get day of month in mql5 in integer? I easily used : TimeDay(Time[n]) for comparing, but in ME5 I can't find anything like this. Can someone explain it to me or show me how to write it, cause I'm not a pro coder? thanks
In MQL5 I get this error: wrong parameters count for iSAR: string TestParSar_( int nPeriod, string cPair) { double nResultClose; double nResultSar; nResultSar= iSAR (cPair,nTimeFrame1,Step,Maximum, 0 ); nResultClose = iClose (cPair,nTimeFrame1, 0 ); if (nResultClose < nResultSar)
I wasn't able to find any documentation on how to override the CObject virtual methods Load, Save, and Compare to make use of(CList and CArrayObj ) load, save, and sort features - so I managed to hack my way through it. I'm posting it here in case anyone else is interested in using the
Anyone who can assist me with a free python bridge that links mt4 and python so that l can establish comms btwn the two and test my EA
Hi all. Thanks for all the help so far with a few questions I've posted recently. Here's another. Well, a bunch of related ones... I've read a number of posts and the doc'n about Order vs Deal vs Position, including this documentation , and this , and others . A few things I'm unclear on, and
Hi all , i have bought an EA but it doesn't work. I tried to reach the author but he doesn't respond. The issue is that the EA stop after few second is lauched with reason 9. This happen in both backtest and live. I have tested ICMarkets, AXI and Roboforex, it has the same behaviour on all the
Hello everyone, I’ve noticed that in the standard MQL5 library ( Expert.mqh ), the CExpert class (derived from CExpertBase ) implements its own Init() method without calling the parent class’s CExpertBase::Init() . This seems unusual because: Inheritance Principle : Child classes typically call
  Neural network  (6)
Where can I learn neural network in mql5? Or which book can I use to learn neural network in mql5 or mql4
Artificial intelligence (AI) is changing the way we buy and sell in the stock market. This discussion is about understanding how computers use AI to make quick trading decisions. We will look into how AI can spot patterns in the market, make predictions, and decide when it’s a good time to trade
Hello! In this module, it is supposed to close half the volume after the price moves 10 pips into profit and move the stop loss to the entry point plus commission. However, unfortunately, after 10 pips of profit, the entire volume is closed in consecutive positions. Module code: void
Hi guys how calcolate a stop loss with ATR ? anyone have some example ? i find but not have a good example i tryed double atrSL = 2.0 ; SL = NormalizeDouble (OpenPrice - (ATR_Value * atrSL), Digits ()); but not return me a price correct
Hello, I am new to this? Is there an solution? I don't want to open a new chart for every pair, when I also want to trade manually together with expert advisor, so I want to open also manual trades from there, but without getting interrupted by the EA. The expert advisor has a setting with hidden tp
The product rule -: " Embedding any limitations by time, account type or number, financial instrument, etc. into your Program is prohibited. All such actions will be considered as unfriendly to the Buyer and are prohibited. " I want to code an EA to work only on special instrument also in specific
Im fairly new to all of this and I got started by watching a video of a guy who explained a simple EA called "simple MACD expert". Its a free bot from the market place. The guy in the video I was watching is using the same bot and even the same version and his was displaying a magic number in the
Hello everyone, I'm experiencing an issue with the activator in my EA. The EA is supposed to validate a license key by contacting a verification page using the WebRequest function. Although the EA appears to connect to the page, I never receive any response. In the Experts log, I see the following
Dear Fellows I am trying to customize Volume Profile indicator https://www.mql5.com/en/code/47784 and make it EA Friendly to get signals for POC Price (png attached), HVN and LVN Prices. Google search did not helped much and all the VP Indicators lack the Buffers. Is it really impossible to created
Can someone please help with installing 09_Pretty_Normal.set file to my market profile indicator? I opened the market profile indicator in the editor nut i don't see anything like in the file here is what I see, not sure how to use this. s00=- - - - - - - - - - - - - - - - VisualMode=1
  [DL] Trend scanner and Currency index  (104   1 2 3 4 5 ... 10 11)
Here is my contribution to the community...two very useful custom indicators. If someone dont know how to use them feell free to ask.
There's a given Moving Average indicator, it works in MT5. Now I'm trying to add a text object tagging the MA value of last bar. #property indicator_chart_window #property indicator_buffers 1 #property indicator_plots 1 #property indicator_type1 DRAW_LINE #property indicator_color1 clrWhite
Hey guys, hope everyone is having a good week and closing the week strong. I need help in editing notifications and alerts interval for MT5 shved supply and demand indicator. I copied the lines from the mql4 version on the code, but commented them out. Details in Line 39 and 273. I need it to at
Hi hope you are fine i need help any one have this indicator for meta trader 5 or is there any indicator of SRC for meta trader 05 i need this indicator . any recommended indicator for the SRC meta trader 5
Hi, I have this sample code for the MTF RSI indicator. The first thing we check in onCalculate is whether the number of bars calculated by the RSI handle matches the number of bars in the selected timeframe. If they don’t match, the function returns zero. This works well in the open market, and
Hello, I installed an indicator file, but it did not open, I imagine because it is in the EX4 extension, and I saw that the ones in the EA folder, the ones that open, are in the MQL4 SOURCE FILE extension, SO I wanted to know how to change it, I'm waiting, thank you
[Deleted]
  Multi Timeframe Indicators  (12251   1 2 3 4 5 ... 1225 1226)
Hi all, I've been wanting to have the ability to plot indicators from different timeframes on my chart, but MT doesn't have this capability built in. (Does anyone know of any charting programs that do this natively?) As an example, if you're following the IWCR system, it'd be nice to be able to plot
  Juice Indicator  (29   1 2 3)
Avoid flat tradings (M15 timeframe only).
Hi, I'm developing a custom indicator in MQL5 that uses CopyTime() to get timestamps of previous candles in the daily timeframe (D1). The problem is that after restarting MetaTrader, it seems that previous data is not loaded, and CopyTime() returns -1 . I have tried the following solutions, but none
Hi could someone help me converting this indicator
The supertrend indicator is supposed to plot lines certain points/pips above and below the supertrend signal. Working Supertrend indicator and Daily Open (I ndicator that plots lines certain points/pips above and below the daily open. ) indicator files attached. I was hoping to apply the line
Hi all, I need an indicator for calculate avarage price for all open order, incluse Buy and Sell. I have an Indi for MT4. But MT5 I haven't. Can Someoe help me, Please! Simply calculate W: lot size P: entry For Buy is + For Sell is - Ex: Buy 1lot at 1900 Buy 1lot at 1910 Sell 5 lot at 1890 >>>
If I have data that ins't compare with price, ticks count for example. Can I draw my indicator on the common chart but with the second Y axis? How to releace it with another methods if second axis isn't possible
Check out the new article: Neural networks made easy (Part 78): Decoder-free Object Detector with Transformer (DFFT) . In this article, I propose to look at the issue of building a trading strategy from a different angle. We will not predict future price movements, but will try to build a trading
simple mt5 trade copier : simple mt5 trade copier Author: Allan Maurice Mwesigwa
Check out the new article: Introduction to MQL5 (Part 14): A Beginner's Guide to Building Custom Indicators (III) . Learn to build a Harmonic Pattern indicator in MQL5 using chart objects. Discover how to detect swing points, apply Fibonacci retracements, and automate pattern recognition. In this
  Indicators: Nina  (4)
Nina: Nina Indicator. Author: Collector
PSAR Zigzag (Non lagging) : A zigzag based on the trend change of the parabolic sar Author: Conor Mcnamara
New article Payments and payment methods is published: MQL5.community built-in services offer great opportunities both to MQL5 developers and ordinary traders with no programming skills. But all these features can't be implemented without in-house secure payment system, that provides a convenient
Candlestick Analysis EA R1 : This MT5 Expert Advisor combines multi-timeframe candlestick pattern analysis with fundamental event filtering to execute trades with disciplined risk management. Author: jacklmp
FVG based Momentum Detection : This is an indicator that evaluates FVGs in the inputted "window_size" to detect momentum or trend strength. Author: Yashar Seyyedin
Ranging Market Detector : An indicator which attempts to highlight a ranging market area Author: Conor Mcnamara
Withdrawal Tracking : This is a piece of code to add to an existing Expert advisor to track withdrawals from your account where the EA is running. It helps the user to monitor his or her withdrawals from a particular account. Author: Daniel Opoku
Withdrawal Tracking : This is a piece of code to add to an existing Expert advisor to track withdrawals from your account where the EA is running. It helps the user to monitor his or her withdrawals from a particular account. Author: Daniel Opoku
Half Trend New Alert : Trend indicator. Added alerts (Sound, Alert, email, push) Author: Vladimir Karputov
Trend Zigzag (on ma cross) : A static zigzag which connects the intersections of a moving average crossover Author: Conor Mcnamara
Check out the new article: Neural Network in Practice: Sketching a Neuron . In this article we will build a basic neuron. And although it looks simple, and many may consider this code completely trivial and meaningless, I want you to have fun studying this simple sketch of a neuron. Don't be afraid
Candle Wicks Length Display Indicator MT4 : Candle Wicks Length Display MetaTrader indicator is an indicator that can display the length of candle wicks in pips directly on your chart. You can set the minimum length to be displayed. Alternatively, it can show wick lengths that are less than the
Hello, Article URL : https://docs.mql4.com/constants/chartconstants/enum_timeframes These timeframe only work with offline start or it also work with live market? if ( iRSI ( NULL , PERIOD_M1 , 14 , PRICE_CLOSE , 0 )>overbought) OrderSend (x,x,x,x); This works fine. But these additional
how to install mql indicators if multiple mt4s on 1 computer, i have pepperstone mt4 platform and fusion markets mt4 platform on my 1 computer, if i have install purchase indicator through mql website and have install those paids indicators on my pepperstone mt4 platform how do i install the same
Hello, On the 22 Nov, the beta version 4 of MetaTrader is scheduled to be released. Check it out! Let's see whether current version of API will work or not. Cheers, Scorpion
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
I am redesigning EA, so it can have more accuracy and flexibility. Original code : if ( iRSI (gRandomSymbol, PERIOD_M1 ,RSI_Period,RSI_AppliedPrice,RSI_shift) > RSI_UpLevel && iRSI (gRandomSymbol, PERIOD_M5
Using a Mac First post and I am sorry if this is in the wrong place. My Navigator window and Market Watch have become undocked.....sure it was my fault. Now, I can't get either back docked?? Does anyone know how to fit this? It is a really silly problem to have without any way to get it back
Hi! I really wanted to use Metatrader 4 with my MQL5.com Market EA but I lost control of it, I can't find most buttons, I would need to reset it. Is there a way to erase it and start a new one from scratch? Can someone help? Thank you
You may have already noticed that the most interesting things now happen mainly on the MQL5.community . MQL4.com is about to be switched to the data archive mode. Only Book and Documentation sections will remain on MQL4.com by November. Besides, the entire MQL4.com Forum content is to be transferred
Hi, I am getting the following message repeatedly - every seconds - in the "Expert" folder of the MT4 trading platform. GBPUSD,H4: Check if automated trading is allowed in the terminal settings! How to stop this ? Will it helps if I restart the VPS ? If so, how to do that ? Please help ! Thanks
I am checking iRSI indicator with timeframe M1 to D1. for this i am using string gRandomSymbol = "EURUSD" extern ENUM_APPLIED_PRICE RSI_AppliedPrice = PRICE_CLOSE ; extern int RSI_Period = 14 ; extern int RSI_shift = 0 ; extern int RSI_UpLevel = 80 ; extern int RSI_BelowLevel = 20 ; extern bool
I'm just learning to code. I'm just trying to write a script right now. I want to draw a blue vertical line whenever the MACD line crosses up over the signal line and draw a red vertical line when it crosses down. It seemed to work except that it skips some of the crossovers. Plus there are some
  Drawing Box  (1)
Hello, Has anyone had any experience with drawing a box from the open to the close of the 8 am candle, each day; and then extend it to 5 pm in mt4? Thanks
why i can't set or get to see any push notification for my open orders, closed orders, trades etc on my MT5 mobile app ? How to set that
Why did you post your MT 4 question in the MT 5 General section (a miscellaneous catch-all category) instead of the MQL 4 section , (bottom of the Root page )? General rules and best pratices of the Forum. - General - MQL5 programming forum ? (20 17 ) Next time, post in the correct place
The EA will not open the second order when the first loss level is reached. I have attached the full code and highlighted the relevant section in white. Any hint or pointing in the right direction will be much appreciated. Thank You
This website uses cookies. Learn more about our Cookies Policy.