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
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
  AI  (6)
HI which Ai would you recommend to program on mql5
Hy guys, new to mql5 and trying hard to understand it. Please help me with the following issue, I am trying to find a solution since 2 days without success. //Global paramters// input parameter opentime = "12:00" (??) //Get the local time// datetime time = TimeLocal(); //format the time and
hello, i have started a demo account to test a new strategy but when i click on GBPUSD it doesn't come up saying "trade" only says chart or details ? i cant find away past it to place a trade
  How do I contact the Service Desk?  (165   1 2 3 4 5 ... 16 17)
I tried to upload money from my paypal account. Some problem occurred. I tried to contact service desk but there ar not link to service desk in my profile . How can I contact service desk
MetaQuotes has launched new MQL5.community information channels on Facebook, X.com (Twitter), and Telegram. These channels provide daily publications of relevant technical materials from the MQL5.com Articles and CodeBase sections. They are designed to promptly update developers on algorithmic
hello nothing. have no sound on my terminal for alerts and open and close positions. i check everything like checked notification settings and... and reinstall mt5 multiple times but nothing. i already have mt4 and it have sound perfectly but mt5 not
I have an EA running, but would like to "disable new trades" at specific intervals during the day for brief periods of time. My EA does not have this option, and I am looking for something else to do this, without affecting/removing/disabling the EA. Is this possible
Web Terminal https://metatraderweb.app/trade?version=5 it only has MT4 login
  Forecast and levels for AUD  (306   1 2 3 4 5 ... 30 31)
AUD/USD April-June 2017 Forecast: ranging within narrow s/r levels for the ranging bearish reversal or the bullish trend to be resumed W1 price is located above Ichimoku cloud for the bullish ranging market condition within the following support/resistance levels: 0.7749 resistance level located...
  Press review  (7271   1 2 3 4 5 ... 727 728)
This link provided to me by RaptorUK, give me the idea that it would be interesting to have a place here on the site to share such links. So I opened a new topic, it will be moderated to follow the rules as usual, but also about the content. Everyone can post but have to provide a quote and the...
I'm interested in MQL5 programming language. So, I need to learn it furthermore. currently I know some basics and have coded some profitable systems as well. but I need to learn furthermore. Do you have any article series to read. I looked in Articles section, but I couldn't find any series of
I love how they make it so easy to sign up to subscriptions and so difficult to find where to cancel them. I can't use the MT5 VPS service as DLL's are not allowed. My mistake. If someone can explain to me how to cancel the VPS and auto renewal plan would be much appreciated. I've spent hours
Good afternoon, everyone, I know that there are machine learning and statistics enthusiasts on the forum. I propose to discuss in this topic (without holivars), share and enrich our own knowledge bank in this interesting field. For beginners and not only there is a good theoretical resource in
Hello everyone, I am running a python code to trade on mt5 IC markets and Fusion Markets. I want to know what should I do, where to run the code to have the least latency, currently running the code in equinix NY, where they both have a server but still its slow. It shows 0.5ms in the bottom right
hi I would like to know if there is a good strategy when forecasting highs and lows (ohlc), any links that can help
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...
Hello, I want to copy the signal but whiles I find it on the MQL5 website, it is not on my list of signals of the MT4 Terminal. There are copiers of that signal so it should be available somehow. Does anybody know how to copy that signal ? May be one of the subscribers ? Regards, Stephan
I have a question. As it possible to make backtesting strategy for the past I am wondering if its possible viceversa. So that you put trades in and take out the strategy? Thanks for ansvers
Hi everyone, I need support because I'm noticing a problem with my custom indicator. The indicator provides me with a KPI that updates for each new bar. I based an expert on it who, based on the value of the previous bar compared to the current one, must do or not do operations. I had the doubt that
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
Trading and training video (from youtube for example) about forex and financial market in general.  thread for April 2013 - look at this thread,  thread for May 2013 - look at here,for June 2013 is here.July thread 2013 is hereAugust thread 2013 is this oneSeptember thread 2013 is hereOctober thread...
SMC (The Smart Money Concept) is different way of market analyzing. I have a SMC strategy which is similar to the bellow example. All I want to know is can I code this thing into an EA or something else to trade automatically? I'm curious to know what is that technology / coding method. Honestly
Whenever I backtest, I look for the result with the higher (Profit / max drawdown) ratio. But in the optimization results tab there is no such a criterion, so after every backtest, I export the result as a spreadsheet and do the calculations there. I'm backtesting on a free EA, so I don't have
Good day dear forum members. After reading the forum a bit, I came across several threads on arbitrage and pair trading . Judging by the threads, some are interested and some are trying it. I used to dabble in this topic a long time ago, but my knowledge was not enough. Now I am a complete mess in
Hello! I need a program that opens a position when the candle closes below or above the line placed on the chart. For example: if you close below or above the neckline of a double top or double bottom, you open a position. Simply put, a pending order to close the candle. Main points: - Work on
Basically I am a beginner at coding but I am working at EMA price crossover EA whereas 1. if price of current symbol crosses above ema ,an alert is triggered as well a buy stop pending order 2. if price of current symbol crosses below ema ,an alert is triggered as well a sell stop pending order. 3
Hi, I'm coding an EA that need to read the past trades, I'm using the function HistorySelect() to read them. But as I could see from other users on the forum, the HistorySelect() feature slows down the backtest and execution of the EA a lot. I would like to select a historical period from
I have an EA created on mql5 and for a few months I have been using it on a live account on icmarkets without problems, today I put it on another broker and I noticed that when I use it on American indicies in live market it does not works, the strange thing is that if I put it on strategy tester on
  Forecast and levels for Dax Index  (76   1 2 3 4 5 ... 7 8)
Dax Index January-March 2017 Forecast: flat within bullish with key resistance at 11,649 W1 price is located above Ichimoku cloud in the bullish area of the chart. The price broke 11,485 level to above on close weekly bar with 11,649 as a nearest bullish target to re-enter. Thus, the weekly price is...
The indices market is extremely slow these days and I'm not seeing many trading opportunities... The VIX is at 12.25 right now, what do you do when VIX is this low? Do you switch to other markets or do you just take a break? Also curious about Forex traders, are you seeing a similar problem
how to know which of the trade/stock has the highest volume/most gain
  Forecast and levels for CAC 40  (31   1 2 3 4)
CAC 40 January-March 2017 Forecast: bullish with key resistance at 4924.69 W1 price is located above Ichimoku cloud in the bullish area of the chart. The price broke 4860.85 resistance level to above on close weekly bar with 4924.69 as a nearest bullish target to re-enter. Thus, the weekly price is...
  HFT Stock Manipulation In Action  (125   1 2 3 4 5 ... 12 13)
Trading has a few simple rules - do the opposite of Goldman's Thomas Stolper; don't fight the Fed; and buy low, sell high. However, as this series of charts from Nanex shows, it is the latter rule that is the easiest to comprehend and yet - thanks to massive and obvious HFT manipulation - is an...
I would like to build futures trading mql robot (mostly focus on oil but other commodities interesting also). Unfortunately it's problem to gain hist. futures data, what's necessary for backtesting. So, I wish to ask: perhaps somebody knows where to receive ticks expired futures
Hi, I have recently started learning MQL5 language and all the tutorials are only focused on Forex market. I have been trading Futures contracts(manually) with <Deleted>. So, my question is If i keep learning Mql5 language, will I be able to develop EA for Futures market(with <Deleted>)? Thank you
Hello all, I have a few questions for anyone with knowledge and/or experience trading futures. Any input would be greatly appreciated. From experience scalping in live market conditions, how does slippage and spread compare to trading CFD in markets such as FX? Is there a notable difference, and
  Welcome to the new section!  (15   1 2)
Inspired by comments and reviews received from MQL5.community members, we have added a new forum section called "Trading stocks, futures, options and other exchange instruments". Share your ideas and trading experience with the website visitors. Reach out to MetaTrader 5 developers if you have...
  Forecast and levels for Nikkei  (44   1 2 3 4 5)
Forum on trading, automated trading systems and testing trading strategies Press review Sergey Golubev, 2016.12.24 17:18 Nikkei Q1 2017 Fundamental Forecast: Bullish (based on the article) Fundamental Analysis  "The Bank of Japan has been buying stocks for over two years now. And in September, the...
On which MT5 platform can I find the S&P 500, Nasdaq, and Dow Jones index? It's not the type of CFD, it's the real S&P 500, Nasdaq, and Dow Jones indices on the exchange
I want to demo Options board on MT5 but cant find ANY one who offers it? Where can i try the MT5 options board? Who is currently demo/ real trading with MT5 options platform? its ridiculous i cant find ANY information on how to actually do it/ who offers it. Its almost as if it doesnt exist/ noone
DJIA January-March 2017 Forecast: long-term bullish; resistance level at 19,987 is the key W1 price is located above Ichimoku cloud in the bullish area of the chart: the price is on testing 19,987 resistance lkevel to above for the primary bullish market condition to be continuing. The price is
  Forecast and levels for S&P 500  (474   1 2 3 4 5 ... 47 48)
S&P 500 January-March 2017 Forecast: long-term bullish ranging within the narrow s/r levels for direction W1 price is located far above Ichimoku cloud in the bullish area of the chart. The price is on ranging within the following narrow support/resistance levels for the bullish trend to be resumed...
I have recently started using MT5 and am a US resident but I am having difficulty finding a broker that supports MT5. Is there a way around this? I have heard some people using Tradingview and pine connector but looking for the best way to setup MT5 with a US broker. If anyone can help it would be
Hello everyone, I am encountering a problem with the backtests of several Expert Advisors (EA) on MetaTrader 5 using the Libertex broker. I have found that neither the EAs I have developed nor the ones I have downloaded (even those highly rated on the MQL5 market) execute backtest trades, while the
My Expert Advisor uses some technical indicator (like RSI) for trading. but the EA loads all the indicators that EA use to trade to the chart when it's on strategy tester . I want not to load any indicator on the strategy tester. How can I achieve this
Hi all, is it possible to change color, and font dimension of the text displayed with the COMMENT instruction ? Please help me. thank you
  Neural network  (4)
Where can I learn neural network in mql5? Or which book can I use to learn neural network in mql5 or mql4
  Better NN EA  (120   1 2 3 4 5 ... 11 12)
Hi Better has really good EA and is winning the championship Participants - Automated Trading Championship 2007 Profile Better - Automated Trading Championship 2007 What is NN ? Where are the NN threads in this forum? Can anyone here make this EA El cid
Can you tell me if this is a realistic tester figure? And is this a good or bad result for a year with a deposit of $3,000
Hi everybody, I'm experiencing a problem with Metatrader 5 optimizer which I've never encountered before. I don't know since when this is happening. When I run a single test from the optimization result list, sometimes the result is different: different number of trades, profit etc. Here is an
Hi Everyone, It's my first post here. I am not a developer and I tried to ask CHatgpt and different tools for help in creating the code (hopefully I will learn the MQL5 and write on my own some day) . Could you pls help me with checking why I get some syntax errors? I gave up.... initial scope: I
I need some help with this EA don't add SL and TP on live trading but when i use it on strategy tester it works normal sorry if the code is missy I'm just using chatgpt for this the mean EA concept is to open buy and sell position at every new candle Open. Thanks
#property strict int OnInit () { MqlDateTime _Time; TimeToStruct ( TimeCurrent (),_Time); Print ( "_Time.day_of_year = " +_Time.day_of_year); Print ( "TimeDayOfYear(TimeCurrent()) = " +TimeDayOfYear( TimeCurrent ())); return ( INIT_SUCCEEDED ); } It's should same value ? I also tested with the
I have an EA I am working on but I can't get the trailing stop to work. The original stop loss is at the low/high of the candle we will call it Xrange and as price moves away from open I want to trail it by values of X the rules I am looking to implement are: when price moves away from the open
Hello, I am learning to code and came across these 2 functions that calculate the optimal lot size for the order. I tried both of them however, they are both giving me a bigger than supposed lot size sometimes (e.g. returns a 1.5 lot size for a $1000 account) so it's causing an error 134 all the
Is there a way to prevent a pending order from executing when it's hit? For example: when an open buy stop order is triggered, I want to have an "if" statement to then decide if the order is filled or not. I just don't know if there's anywhere to interject the order. Thanks for any guidance
Is there a design form that EA builders use, to get the best design from the person who asks to code his strategy? How should a full detailed request look like, when someone asks a coder to write the code
Hello there, I'm trying to code a collective SL for all the buy positions, that is triggered once that the outcome is a positive collective Profit, and updated just in increasing sense (for buy), decreasing sense (for sell). Of course such procedure relies on the correct evaluation of the positions
  Need help indentifying indicator  (2702   1 2 3 4 5 ... 270 271)
sisi: Hi,Mr. Guru could you please help me to constantly refresh an ea after each tick movement. I have tried everything, But I just can't make it refresh constantly. What lines of code must I insert to keep an ea and indicator refresh after every tick? Tnx I hope you could attach your EA so...
But i can't change to ema mode because I can't get the prev_value
I am trying to customize ichimoku cloud in MT5 to better fit the volatility of cryptocurrencies. Default Ichimoku cloud in MT5 allows changing the Tenkan (conversion line), Kijun (base line) and Senkou span B (Leading line 2). I cannot set time displacement, somehow it is linked to the Kijun (base...
It would be awesome, before using IndicatorCreate, to get a total/count of the indicator's input parameters. Where can I get this in MQL5
Hello i am coding indicator for mt5 And 1.after i launch it the buffers draws out of their values that i didnt load in code this is the first question 2.when i call time value in oncalcuulate indicator freez dont respod to other duals like onchert events or ontimer..etc 3.when i run this function it
hi. when i want to copy 100 number of rsi information to buffer , it copy all time information to buffer and plot unwanted line in all time. //+------------------------------------------------------------------+ //| 3 time.mq5 | //|
This one burned a full three days dogging it. I've been trying to call this iCustom indicator. No matter what I do, it keeps returning zeros -- no data. I've coded these many times before and haven't had a problem. What's been more mind-boggling, the indicator works just fine when added to a chart
Hey Guys, Able to help create a notification for this indicator? (Alert & Push Notifications) This indicator shows a up or down arrow base on this, Moving Average 50 > Moving Average 100 & Moving Average 100 > Moving Average 200 & MACD > 0 & Stochastic < Oversold = UP ARROW Moving Average 50 <
It's got type and values, why not let us say that the internal name of the variable is? It would really help in check if we got things out of order, and besides, it's just polite, don't you think? But the real rub here is: What do you do about an indicator you're trying to set up that wants a
I've written an indicator for the Ulcer Performance Index, also known as the Martin Ratio. It works, but on chart refresh, it often doesn't recalculate and update the display correctly. I used code from the Ulcer Index to try to prevent constantly recalculating the whole thing, but it still has
i have the code below for creating simple order blocks. however it throws an index out of range error once i shift to higher time frames. Can you help me understand where i got it wrong: 2024.04.13 08:29:06.242 AM_Fractal_OrderBlock (AUDUSD,MN1) array out of range in 'AM_Fractal_OrderBlock.mq5'
[Deleted]
  Multi Timeframe Indicators  (12250   1 2 3 4 5 ... 1224 1225)
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
I just wanted an indicator that would give me each bar's index value, to make debugging easier. Simple code is at the bottom of the post. I know rates_total is significantly more than the oldest bar that shows on the chart. What I don't know is whether the chart is just limited to 99998 bars (or
The question has been dogging me for a while, are there any advantages/disadvantages one over another? I'd just as soon use _Symbol and _Period, are there any downsides
Hi, I am trying to convert an indicator from MQL4 to MQL5. I am struggling with the last part of it, which collects the highest and lowest prior values. This indicator is suppose to add and subtract the ATR to the high and low of each bar, and from a given lookback period select the largest or
Tap4Fibs: Creates Fibonacci Retracement on the chart based on the ZigZag indicator. Tap the "X" or "Z" key to scroll through each swing in the ZigZag, to the right or to the left. For those who do not like clutter on their charts. The indicator can scroll to the right until it disappears from the...
New article How to create a custom indicator (Heiken Ashi) using MQL5 has been published: In this article, we will learn how to create a custom indicator using MQL5 based on our preferences, to be used in MetaTrader 5 to help us read charts or to be used in automated Expert Advisors. The Heiken Ashi
Check out the new article: Population optimization algorithms: Changing shape, shifting probability distributions and testing on Smart Cephalopod (SC) . The article examines the impact of changing the shape of probability distributions on the performance of optimization algorithms. We will conduct
Simple Order Panel : Source code of simple order panel Author: Manuel Alejandro Cercos Perez
Close_all-e: Script that closes orders and (or) deletes pending orders. Author: Vasyl Nosal
  Indicators: iForexSessions  (55   1 2 3 4 5 6)
iForexSessions : Highlights the Forex Market Sessions (Sydney, Tokyo, London, New York). Author: amrali
Local Timezones and Local Session Hours : Class to access to the local time for the specified location, as well as time zone information and the local trading session hours. Author: amrali
MoveStopLoss : Move the stoploss as the trade moves in your direction at a specific distance. Author: Daniel Opoku
Price Channel Stop: A new variation of a well known price channel indicator. The indicator shows the current estimated trend based on channel period and desired risk. It also shows two levels of values that can be used as a stop loss for orders opened based on this indicator (using the trend...
Check out the new article: Population optimization algorithms: Simulated Isotropic Annealing (SIA) algorithm. Part II . The first part was devoted to the well-known and popular algorithm - simulated annealing. We have thoroughly considered its pros and cons. The second part of the article is devoted
Check out the new article: Population optimization algorithms: Simulated Annealing (SA) algorithm. Part I . The Simulated Annealing algorithm is a metaheuristic inspired by the metal annealing process. In the article, we will conduct a thorough analysis of the algorithm and debunk a number of common
Simple Yet Effective Breakout Strategy : A simple yet effective donchian channel breakout strategy. This strategy is timeless! Author: Anh Quan Duong
How to Disable/Enable Auto/Algo-Trading in both MT5 and MT4. : Just simple codes to Disable/Enable Auto/Algo-Trading in both MT5 and MT4. Of course, DLLs must be allowed, This cannot be done without DLLs Author: Kailash Bai Mina
New article Backpropagation Neural Networks using MQL5 Matrices has been published: The article describes the theory and practice of applying the backpropagation algorithm in MQL5 using matrices. It provides ready-made classes along with script, indicator and Expert Advisor examples. As we will see
Check out the new article: MQL5 Wizard Techniques You Should Know (Part 15): Support Vector Machines with Newton's Polynomial . Support Vector Machines classify data based on predefined classes by exploring the effects of increasing its dimensionality. It is a supervised learning method that is
I have an account with the broker "World Trade International, LLC" that works great on desktop (they offer their own MT4 version for download: https://download.mql5.com/cdn/web/10518/mt4/worldtradeinternational4setup.exe ). I tried connecting to the same account with MT4 on my android smart phone
Dear, Anyone can support, I can not find the problem. It keep reporting error 5002 void ReadTextFileAndExecuteSignals() { //--- correct way of working in the "file sandbox" ResetLastError (); int filehandle= FileOpen ( "D://GBPUSD.txt" , FILE_TXT ); if (filehandle!= INVALID_HANDLE ) {
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
MT4 is not letting me place trades dude to the buy / sell buttons not active Full reinstall not fixing problem Android phone up to date Across 3 brokers all the same regardless of currency pair Accounts still active when using brokers websites just not on MT4 thanks Tim
As a seller, I want to rent the ex4 file I uploaded on a monthly basis. Is the buyer automatically restricted at the end of this period or do I need to specify this in my code? satıcı olarak yüklediğim ex4 kazanç aylık olarak kiralamak istiyorum bu süre bitiminde otomatik olarak alıcı kısıtlanıyor
I get always login failed so i can’t download the robots i bought. I already tried to reset the password but i didn’t solve this weird problem. Any advices to share
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
Crystal Ball S.A. //+------------------------------------------------------------------+ //| Crystal Ball.mq4 | //+------------------------------------------------------------------+ #property copyright "http://www.FinanceWave.com™" #property
Hello. When loading default mt4 indicators on chart the input screen retains previous settings. i.e. I load a moving average on my chart and I chose blue color as input, now if I load a new moving average the input color is blue by default. Is it possible to have the same with custom made indicator
I am developing a EA. I am new in MQL, i just want to organism my EA's input. Like below image. How i create a blank input and how i create input with space . Please some one help me coding example how can i create blank input
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
Hello, I have 2 problems. 1- When I try to edit a value or a string in the edit box it is constantly flickering before the end edit, how can I stop it? 2- Also when I select the text in the edit it goes higher during the editing. How can I vertically align it in center of the edit box? I cannot
Indicator is attached. Copyrighted material from Stocks & Commodities Jun 2009 After the reveal of the ATR, which includes the calculation of the GAPS to pick the volatility, the happy Sylvain Vervoort discovered that taking an ATR volatility of 9 periods as a Trail, after there is a close out of
  Wrong RSI on my EA project  (14   1 2)
Hello Everybody, I try to create an EA based on RSI calculation. I am using the following fonction : void CalculateRSIValues() { int totalBars = MathMin (BarsToCalculate, iBars ( _Symbol , _Period )); Print ( "BarsToCalculateMathMin:RSI " , BarsToCalculate); Print ( "Taille de
Hi, ADX is the powerfull popular indicator in the markets, from "New Concepts in Technical Trading Systems" Book by J. Welles Wilder Jr. Knowing the ADX of all time charts gives you a good idea if there is a trend, and if it is starting or ending. Just read the combination. When this smooth