MQL5 Algo Trading community — forex forum for traders and developers

Hello Everyone, I'm writing this forum because I'm a little puzzled on why some this. So recently I have always had accounts on IC-Markets EU server but something happened with the server and we are no longer allowed to open demo accounts on it. I transitioned to IC-Markets SC Demo sever. I use an
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
Given OHLC price data and a trading strategy , we can evaluate how profitable the strategy is. We could run a historical back test in MQL5 or if you have the data in CSV format you could use a library in Python or R to backtest your strategy. But how is this being done under the hood? I want to
So today I tried renting a vps for a month trying it, tried with my cc didnt work then i tried with paypal it seemed fine till the end but it cancelled on the app its said like that and i got a notification from paypal that the transaction went through so basically i dont have a vps rn , i dont have
How do I recover my MT4 password? I can't log in there, can anyone help me? as it is impossible to receive support
I have noticed multiple times that the CPI news event is not listed as High Impact. We all know that NFP / CPI and FOMC are the highest impacting news all the time. all calendars outside marks these three events as high impact. but the MQL calendar keeps ignoring it sometimes. why is that
void OnNewCandle() { rsi_value = iRSI (symbol, period, 14.0 , PRICE_CLOSE ); } So, i have made this code (this is a custom function that run at the oppening of a candle), but the RSI is stuck to 10.0 forever. In the chart i see its updating correctly, but in the code its stuck at 10.0. Any idea
Hi all, Anyone got link to the MT5 web terminal? Thanks
I bought 2 EAs but only 1 has successfully installed, the other one has always "installation failed" message
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
  Errors, bugs, questions  (31880   1 2 3 4 5 ... 3187 3188)
Error after the CopyClose command #include <Trade\Trade.mqh> double Arr1[],Arr2[]; int OnInit () { ArraySetAsSeries (Arr1,true); ArraySetAsSeries (Arr2,true); return ( 0 ); } void OnTick () { CopyClose ( "EURUSD" , PERIOD_CURRENT , 0 , 50 , Arr1); //CopyClose("GBPUSD",PERIOD_CURRENT
  no otp  (1)
no otp to sms no otp to telegram bot how to verify number phone? tks
Hello every one, How I can create a bitmap label but use at as an Edit box or Lebel text object. I noticed that, some products use bitmap label instead of EDIT, BUTTON and LABEL objects and it help to speed up in MT5. But I don't know how to do that, is there anyone who can suggest any ideas for
Hello, The phone verification is completely broken on the website and I cannot register as a seller , moreover it's impossibile to contact their support becuase they only provide chat support which is absolutely useless.. I cannot register, I cannot open a ticket.. I hope I can open at least this
Hi, I've clicked on the 'seller' link in my profile, and tried a few times to confirm my phone number, however it never sends the message. This is to an australian number. If anyone could provide any suggestions please that'd be great. Thanks
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
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
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
Now let me make this clear. What I'm about to share is not the Holly grail. In my 2 years of trading, using indicator combinations, and learning different strategies. I've finally come to the réalisations that the fundamental force driving the markets is liquidity. It can further be broken down but
  Trading System by Xard777  (3898   1 2 3 4 5 ... 389 390)
Here is a suggestion for a possible trading system... System one is MT4-Xard777.rar and System two is XARD-BOX.rar Enjoy... All the best Xard777
For instance, if you have $10,000.00 in your account, how much are you comfortable losing in a day? Is a 3% risk, which amounts to $300.00 per day, too risky
Maybe someone can help me
  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
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
I have written an EA (in MQL4) to test a strategy which involves placing a buy and sell pending order at the same price on a grid, with target profit, and once the orders are triggered, another pending order of buy and sell is placed at the next level in the direction of travel. I am not a
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
I am trying to post a pending Orderasync on a DEMO account but no matter i do the error persist. The symbol specification says Order Expiration : TODAY Here goes my code and tries: bool Trade_OrderAsync( double volume, ENUM_ORDER_TYPE MyOrderType, double Order_Price, double Order_Stop_Loss_Price
While working with multi-currency EAs, most commonly one has a unique EA that is applied over to multiple currencies. In theory, there is an infinite loop, running the same operations over data from multiple currency pairs. While studying how to do this, I came across three alternative suggestions
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
这是我的代码: // 输入参数 input int MagicNumber= 1 ; // 魔数(MagicNumber) input double Lots= 0.1 ; // 每个订单的交易手数(Lots) input double MaxOrders= 5 ; // 订单总手数上限(MaxOrders) input double StopLoss= 50 ; // 止损点(Take Profit-以点数为单位) input double
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
  Control the EA  (10)
Hi, can you control your EA so that when it's an uptrend he can only buy and downtrend he can only sell, is there anyone who can do it
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
Hi there! I´m coding an EA that should place a BuyStop / SellStop order at a specific price and if it doesn't reach this price it should be cancelled after 2 bars (10 min since im using it on M5 timeframe). I tried to do that by setting an expiration time but when I test it on the strategy tester it
What is MQL5 Wizard : The MetaTrader 5 Trading Platform includes the MQL5 Wizard , which allows to quickly generate code of an Expert Advisor (Expert Advisor builder). With MQL5 Wizard, knowledge of programming languages is no longer a prerequisite for creating trading robots . In the past, it
can someone help me with adding a function to close open buy position when my two moving averages crossover takes place
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
@Lorentzos Roussos @Dominik Egert I was just trying to start with Matrix and Vectors, but reading this thread ( https://www.mql5.com/en/forum/448355 ) makes me think again. Tell me frankly man, is it worth to invest time in learning them? The documentation is very poor to explain the correct ways
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
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
  Need help indentifying indicator  (2701   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...
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
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 | //|
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
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
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
Good morning I have a problem with testing it for one of my codes and I cannot test it in the debugger because it generates an out of range, but not on the terminal where it works Here is the code gf_TfNumberbars = Bars ( gf_Symbol, gf_TFDef); g_message += StringFormat ( "Number of bars retrieved =
I've been looking at the Custom Moving Average.mq5 code that is in the Indicators\Examples folder. My understanding of the calculation of a simple moving average is as follows: Simple Moving Average (SMA): This is the most common type. The formula for calculating an SMA is : SMA = (X1 + X2 + X3 +
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: 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
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
Check out the new article: Design Patterns in software development and MQL5 (Part 4): Behavioral Patterns 2 . In this article, we will complete our series about the Design Patterns topic, we mentioned that there are three types of design patterns creational, structural, and behavioral. We will
All Pivot Points MT5 : An indicator for drawing all important Pivot Points including: "Classic", "Camarilla", "Woodie", "Floor", "Fibonacci", "Fibonacci_Retracement". Author: Hossein Nouri
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
  Indicators: iForexSessions  (52   1 2 3 4 5 6)
iForexSessions : Highlights the Forex Market Sessions (Sydney, Tokyo, London, New York). Author: amrali
Determine Broker's Daylight (DST) schedule : Script to determine whether your Broker follows the US, UK or AU daylight (DST) schedule. Author: amrali
FFC - Forex Factory Calendar: Modified version of FF Calendar Indicator with new features. Author: awran5
Examples from the book "Neural networks for algorithmic trading with MQL5" : The book "Neural networks in algorithmic trading with MQL5" is a comprehensive guide, covering both the theoretical foundations of artificial intelligence and neural networks and practical aspects of their application in
Check out the new article: Modified Grid-Hedge EA in MQL5 (Part III): Optimizing Simple Hedge Strategy (I) . In this third part, we revisit the Simple Hedge and Simple Grid Expert Advisors (EAs) developed earlier. Our focus shifts to refining the Simple Hedge EA through mathematical analysis and a
Check out the new article: Quantitative analysis in MQL5: Implementing a promising algorithm . We will analyze the question of what quantitative analysis is and how it is used by major players. We will create one of the quantitative analysis algorithms in the MQL5 language. What is quantitative
Check out the new article: Build Self Optmising Expert Advisors in MQL5 . Build Expert Advisors that look forward and adjust themselves to any market. Self-optimizing automated systems are essential in today's dynamic financial markets. Developing a trading bot that can adjust to current market
TrendChannel: The indicator draws two trend lines for the closest price extremes Author: Nikolay Kositsin
  Experts: Breakout H1 Trading  (13   1 2)
Breakout H1 Trading : Short description. Author: Dao Thanh Tan
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
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
hi everyone, I'm trying to create an indicator for MT4 that displays a chart inside another chart. Goal is to directly compare two different instruments within the same (full size)window. For example main chart is EURUSD and the one to compare is USDCAD. Similar as in tradingview where you can open
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 am trying to make Second-to-Second Chart. That´s all fine less that the candle formed intro each second is drawn but on the final of the second it isn´t recorded, only the close price remains. What is wrong? Could someone give a light, please?...
Hi coders, good day to you. Let's say :- I've 4 Symbols with Open Trades now :- string opSym[]={ "AUDCHF" , "CADCHF" , "EURUSD" , "GBPJPY" }; My EA has a total of 12 trading symbols readily for trading (set up in user input variable) :- string trSym[]={ "AUDCAD" , "AUDCHF" , "AUDJPY" , "CADCHF"
Hello everyone, I have coded an EA and when I test, it keeps giving me a weired error: It seems like it is MT4 bug and I cannot do anything about it, I know how to reproduce it and I hope Moderators can help me. I can share the code, it is a very big EA, but I can send the code for any Moderator or
The problem I have is that when reading a CSV file it does not link directly to the robot, that is, to read this file it must be stored in the data folder "Files". My question is, is there any way to include a CSV file directly using for example #include and be able to read the file from there
  Coding help  (7895   1 2 3 4 5 ... 789 790)
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
Hello, I am adding Moving average indicator with Period 5, Shift 0, Method Linear weight, apply to close price to GBPUSD Chart. I want this same value 3 moving average indicator for same currency pair for 3 time frame (1 Min, 5 Min and 15 Min). I can do this by adding the moving average by opening 3
Hi coders, my EA has 4 arrays in the Exit function :- string bSym[]; double bSymBEPx[]; string sSym[]; double sSymBEPx[]; My mission is to close a bundle of open trades (BUY and/or SELL) for a symbol if emergency conditions are met. If a symbol with only 1 single open trade, the exit can close
  telegram.mqh reply to msg  (38   1 2 3 4)
Hello, I am currently coding an EA with telegram.mqh that send mt4 signals to my telegram. What I'm trying to do now is to make updates about my trades when they hit a TP and send a 'TP hit' message in telegram. This is no big deal but I was wondering if it was possible to link this 'TP hit' message
Several days trying to correct this fateful error, reading on the forum and following the recommendations of pre-publication checks on the Market at: https://www.mql5.com/en/articles/2555 . I have already implemented the following checks: 1.- Insufficient funds 2.- Invalid volumes 3.- Takeprofit
  US vs UK Keyboard  (19   1 2)
Does anyone know if there is a way to detect the keyboard or current language settings without using DLL calls ?
Hi All I want to increment my lot size by 0.1 but the first lot size has to be my default lot size calculation and then the 2nd lot just increment by 0.1 so on and so forth. I've tried to back test but the increment is incorrect, if there's any better way to do this your help will be appreciated