MQL5 Algo Trading community — forex forum for traders and developers

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, I purchased a few EAs and now I am looking for the corresponding receipts. When I visit the "purchases" page of my profile I can see all purchases, but I need actual receipts for the individual bots for tax reasons. Where can I find them? Thanks
Hi, edit... I have Metatrader 5. Version 5.00 build 4232 11 March 2024 I just made a very small change to my EA code and now it wont compile. I get the following error which I wasn't getting before. I haven't changed this bit of code at all. Code: int Lin_Reg_Slope( int diagFileHandle, double
How to calculate the amount(USD) corresponding to each point fluctuation in the case of one standard lot. Is there any convenient calculation method
hi folks my mt5 on my laptop keep crashing after i place indicator after i open back to normal please help
Hi, My mql5 VPS loses connection every 5 mins and is unusable, can I get a refund? Or is there a way to get this escalated, I just got this subscription yesteraday and as you can see from the screenshots, it is unusable, there is no 99% uptime. This is a really frustrating experience. Thanks, Vik
I am trying to do a script that trails a market by 500 points and when it reverses and break out then activate a trade but just cant get the code to work. Can someone please help me void OnTick() { static double lastHigh = 0.0; static double lastLow = 0.0; static double trailingStop = 0.0;
Hi everyone, for several days now, I've been experiencing problems with my MT5 during optimization runs: In addition to the local agents, I use Local Network Agents on several computers. This has always worked well, but for about 2 weeks, after an MT5 update was installed, I've had the problem that
  Forex broker and regulation  (21   1 2 3)
There are lots of forex brokers, some of them are regulated while rest not. Is it needed for a broker to be regulated from financial regulatory agencies or firms? If a broker or agency is registered in a particular country where it is doing business. Is regulation compulsory in this condition as...
Hello, Is this information is correct MT5 supports up to 8 trade contexts MT4 supports only 1 trade contexts
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
Hallo people, I was testing in mql5 the mql5-slightly-modified winfile_v600.mqh library provided to the community by the Mighty JC ( https://www.mql5.com/en/forum/150831 ). Now look at this strange behavior: if I write something like #include <winfile_v600.mqh> void OnStart () { int hdl =
  Does This Exist?  (4)
Hello All, I am new to the forum, so please pardon me if this question has been asked/answered before. As you know, a lot of the institutional tools have been making their way to retail. I want to know if there is an AI solution that exists for day trading. Specifically, I'm referring to day trading
i can't login with my google account because mt4 pc terminal not have google login options how can i login with G account in mt4 pc terminal? ( i try many name options but cant login) , if i try new account option, system said me "this account in use)
Is there a way to move your Stop Loss and/or Take Profit by a predefined number of points using keyboard shortcuts/hotkeys
Hi, please help me by adding trade times on EA, i want my EA to stop placing trades at 10 PM GMT +2 and start placing trades at 1 AM GMT +2. i have the source code but i have no idea how to do it, please help
  Efficient Trading System  (17   1 2)
Good afternoon, could anyone recommend me where I find en efficient trading system, or a platform that provides graphic proof of the efficiency. Any suggestions? I generally operate intraday or with short to medium time trades. Thank you
  Economic Events  (7)
Hello everybody ,a very long period of time i triyng to understand how the (economical events) news affect the market , and i never seen some logical effect in this. For example today for GBP is no news at all but he is rising against USD,on USD we have a lot of positive news,why EUR going rise if
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
Has anyone actually used an EA for passing their prop firm challenge and maintaining their prop firm accounts over a long period of time? If so, do you have proof? Trade history on myfxbook, for example? Thanks
Hello, Swap on Forex pairs is variable, and changes from day to day. In the MT5 Strategy Tester, is the historic Swap realtime and variable or is it performed with the fixed Swap read at backtest start? Thank you
Do you believe that the strategies have expire time? Is market algorithm train itself to have more losers? Which strategy used to work well but not now? I will be appreciated if you answer theses questions
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
  Programming tutorials  (174   1 2 3 4 5 ... 17 18)
In our technologically advanced world, programming and computer science have become transformative disciplines that drive innovation and shape society. Programming, as an art form, combines creativity, logic, and problem solving to create elegant and efficient solutions. Fusion of science and
[Deleted]
  Artificial Intelligence  (19   1 2)
Do you have any experience in Neural Networking or Machine Learning Trading
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...
I've got MT5 running well on Linux/wine and now I'd like to try out some free EAs. When I click on the link Firefox tries to load a page starting with "mql5buy://" and fails miserably because it isn't a recognised protocol. I assume that on Windows the protocol is associated with the MT5...
Hello, I'm thinking about new EA. The EA is free, but if customer wants to use it, customer needs license key which is subscription payment. They need buy subscription plan external website and get license key then they can use the EA. Is it OK to that kind of business model in MQL community? Or it
ENUM_CALENDAR_EVENT_IMPORTANCE has four levels as below. ID Description CALENDAR_IMPORTANCE_NONE Importance is not set CALENDAR_IMPORTANCE_LOW Low importance CALENDAR_IMPORTANCE_MODERATE Medium importance CALENDAR_IMPORTANCE_HIGH High importance But the visual calendar in website has Holiday also
Can someone help mewith a code? I have download aHedge EA from this site named: OverHedgeV2.mq4. The EA works very well only I have 1 code in it,I'm not so happy with.  That is the hedge codeof doubles. Now, with each hedge, the EA doubles the lotsides. Example: eachtrade, after the start trade,...
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
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
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...
  HFT Stock Manipulation In Action  (124   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...
  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 Dax Index  (75   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...
  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...
  Forecast and levels for CAC 40  (30   1 2 3)
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...
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
I have been trading price action for over 14 years and in this YouTube course I am sharing my most important tips and provide a step-by-step approach to mastering any price chart. ►Timestamps: 0:00 Start 2:28 Chapter 1: Candlesticks 15:37 Chapter 2: Chart Patterns 32:51 Chapter 3: Trend Analysis
for the life of me, I cannot accurately get the upper and lower bollinger bands. I apply my code and when referencing with the same input settings on the real-time chart, they don't align! The upper is in sync with the middle bollinger line (average). Here's my code: - CopyBuffer function should be
Hi guys, this is topic often discussed. However, I cannot get the strategy tester started in batch mode from the command line. Can anyone held? Here is my ini file: [Common] Environment=--- MQL5Login=programminggeek MQL5Password=--- Login=--- ProxyEnable= 0 ProxyType= 0 ProxyAddress= ProxyAuth=
  make a new EA  (1)
i want to build a Ea for MT4 and MT5 but i dont have the skils...can somebody help me for free...? is a very simple EA
Good morning, I would like to know if anyone has already tried to write some MQL5 code to determine the high and low of the current candle. Thank you
Dear All i was trying a trading strategy to buy or sell all the USD Currency pairs together, i only check the daily strength of the USD, then i take decision to buy or sell (open 7 positions), then i check after so many hours, sometimes waiting for days looking  for total positive profit after that...
  Bug in strategy tester  (35   1 2 3 4)
Hi there. I searched the forums but could not find an answer or similar existing topic. The issue I have for a while with MT5 is freezing after selecting "Run single test" from optimization results window. The version I have is latest version from my broker (version 5.00 build 4153 dated 22 Jan
I am trying with this part of code to add to a string array and to testers marrketwatch forex and crypto. I do not understand what i am doing wrong.. litle help? string symbolss[]= { }; int OnInit () { int total= SymbolsTotal ( false ); Print (total); for ( int i=total- 1 ; i>= 0 ; i--)
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, Can anyone help with calculating indicators within a for loop. I am trying to call out the moving average and atr indicators within a loop of bars in a chat. I already calculated the indicators handles and set the array for each indicator as a series in the "Oninit" function. It keeps saying
Hello, I've Googled extensively for this answer, but can't find it! I've just setup a signal, and obviously the initial lot sizes are based off the % set of the initial deposit, but is this always the case? Ie, the lots don't get bigger as profits are made? It clearly says "use no more than x % of
{ m_trade.PositionModify( _Symbol ,sl,tp); Print ( "ch slb sl=" ,sl, " tp=" ,tp); } // Normalised like: double tp=NormalizeDouble(m_position.TakeProfit(),Digits()); This is inside an EA working with cfd
//CAN SOMEONE ASSIST ME TO SOLVE THIS ORDERSEND WRONG PARAMETERS COUNT// #include <Trade/Trade.mqh> // include Trade library for OrderSend function #define OP_BUY 0 #define Ask SymbolInfoDouble ( NULL , SYMBOL_ASK ) input double TradeSize = 1.0 ; // input parameter for trade size input double
I was testing the ENUM_SYMBOL_CALC_MODE enumeration with the TradeCalcMode () function of the CSymbolInfo class ... I tried EURUSD and USDJPY. I was expecting that (TradeCalcMode() == SYMBOL_CALC_MODE_FOREX) Becouse (Leverage()==200) But however (TradeCalcMode() ==
Hello everyone. I have a problem that is really driving me crazy. I don't understand why the if of the while is not activated. I already checked (with the prints) that the values are valid enough to enter, but it doesn't happen and the while continues executing skipping the if. Can someone explain
Hello, I want to know if anyone else is having this problem. Since last update on mt5, my bot is running into problem when backtest in real ticks. When I start the backtest it goes normal, the cpu goes to 100% while the memory is loading each agent, normally it would be 100% CPU and about 40% of
Good day. I have an indicator and on trying to upload it on the strategy tester i get the error cannot load expert. what is the cause of this error as it doesn't have an error code. even bug check cant help as it works fine in a live chart
  Oscillators  (41   1 2 3 4 5)
Does anyone have a large collection of oscillators (works best in a trading range) that he/she put together? Maybe we could start a thread where all oscillators are gathered. And let's go a little beyound RSI and Stochastic
  Zigzag indicators  (645   1 2 3 4 5 ... 64 65)
Different zigzag's indicators please post here
I have no idea why the statement " double dD10th = 4.1 ;" would result in the value "4.0999999999999996", but oh well. So I'm trying to round it back to what I originally assigned it, "4.1". I tried " double dRnd10th = NormalizeDouble (dD10th, 1 );" but that did nothing: Not sure why 4.1 <>
Hi there, i found this script to remove all windows borders. But infortunately, it does not work. Can you please help me (or fix it for the community) ? Regards //#property script_show_inputs #import "user32.dll" int SetWindowLongA( int hWnd, int nIndex, int dwNewLong); int GetWindowLongA( int
Another newbie question about this code, found at CopyBuffer - Timeseries and Indicators Access - MQL5 Reference - Reference on algorithmic/automated trading language for MetaTrader 5 //--- we can copy not all data int to_copy; if (prev_calculated>rates_total || prev_calculated<= 0 )
Suppose I am running indicator_1 in EURUSD chart. The indicator_1 code opens a GBPUSD chart and adds indicator_2 to that chart using ChartIndicatorAdd . The objects in indicator_2 are appeared in EURUSD chart and not GBPUSD. Is it normal behavior? Can I avoid this? long chart_id= ChartOpen
Hi, I created a simple custom indicator to display a ratio between 2 instruments. It's display a line, calcul is ok. But now i want to add an EMA7 on this custom indicator and when i try it display nothing. Could you help me? Thanks in advance :) My code
Obviously, I'm doing something wrong, but I can't see it for the life of me. I'm testing against AUDUSD on a 5-minute chart. (FYI - I name my variables so their types are evident: dVARIABLENAME for double, iVARIABLENAME for integer, s VARIABLENAME for string, etc.) iDfnRngBars = 5; dDgts =
I found a Pivot indicator, that identifies the highest candle among a set or before and after candles. It only marks the position of the pivot candle. This is the same idea of the fractal indicator, with the difference that the pivot indicator is flexible on how many candles on the right and left to
Here is the code for this, my RSI always returns as 12 for every symbol i use my script on Moving averages always return at 10 and 11 as well I Cannot for the life of me figure out why. // Calculate Moving Averages correctly double maShort = iMA(_Symbol, PERIOD_H1, 50, 0, MODE_SMA, PRICE_CLOSE);
Hi Can someone help me to know which piece of code is causing Zero Divide error, so I can fix it. 2024.03.09 13:30:06.707 login (build 4153) 2024.03.09 13:30:06.722 template file tester.tpl added. 7012 bytes loaded 2024.03.09 13:30:06.725 expert file added: Experts\Algo\EAToTest\TestEA_iVP-v6.ex5
  mql4 to mql5  (4)
i tried to convert this indicator code from mql4 to mql5. mql5 code shows nothing. what is mql5 code problem? mql4 code: //+------------------------------------------------------------------+ //| WelchHMABB.mq4 | //|
Hi All, I wrote the simple indicator. I want this indicator in the separated windows. the first run in OnCalculated function is working correct. But the updated the value is not proper as shown in the picture. It seems it just show the closed value in green. #property indicator_separate_window
  Multi pair indicators  (569   1 2 3 4 5 ... 56 57)
Something I have been working some time ago. Multi pair MACD Multi pair CoeffOfLine
Breakout H1 Trading : Short description. Author: Dao Thanh Tan
New article How to Become a Successful Signal Provider on MQL5.com has been published: My main goal in this article is to provide you with a simple and accurate account of the steps that will help you become a top signal provider on MQL5.com. Drawing upon my knowledge and experience, I will explain
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
Slope Entry Points : Indicator based on basic slope moving average and cloud around. Indicator shows two types of signals: prepearing - dot and entry - arrow. Author: Gelvema
Check out the new article: Introduction to MQL5 (Part 5): A Beginner's Guide to Array Functions in MQL5 . Explore the world of MQL5 arrays in Part 5, designed for absolute beginners. Simplifying complex coding concepts, this article focuses on clarity and inclusivity. Join our community of learners
AllAverages v4.9 : One of the latest version of this indicator at the moment. Huge base of different modifications of moving averages, with multitimesframe function, sending signals to e-mail and push notifications. Author: IVAN ASTAFUROV
Dealing with time (2) functions : Calculate DST for USA, EUR, AUD and RUB and the offset time of the broker from the 70's until 2030 and the automatically even in the Strategy Tester of MQ. Author: Carl Schreiber
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
Volume Profile : This is an indicator for showing volume profile on the chart, using simple calculations and very fast execution. Author: Mohammad Baset
New article Can Heiken-Ashi Combined With Moving Averages Provide Good Signals Together? has been published: Combinations of strategies may offer better opportunities. We can combine indicators or patterns together, or even better, indicators with patterns, so that we get an extra confirmation
wd.Range_MACD : This indicator calculates the range difference between the 'MACD and Signal lines' and also the range distance between 'the last two MACD bar'. Author: Widy Prasetyo
Check out the new article: Trader-friendly stop loss and take profit . Stop loss and take profit can have a significant impact on trading results. In this article, we will look at several ways to find optimal stop order values. Stop loss and take profit are stop orders that close a position when the
  Indicators: Multi Forex Scanner  (44   1 2 3 4 5)
Multi Forex Scanner: Instead of having to analyze each pair individually, you can see at a glance what are the most promising pairs according to your own criteria. Author: Carlos Oliveira 
Check out the new article: MQL5 Wizard Techniques you should know (Part 13). DBSCAN for Expert Signal Class . Density Based Spatial Clustering for Applications with Noise is an unsupervised form of grouping data that hardly requires any input parameters, save for just 2, which when compared to other
Check out the new article: How to create a simple Multi-Currency Expert Advisor using MQL5 (Part 7): ZigZag with Awesome Oscillator Indicators Signal . The multi-currency expert advisor in this article is an expert advisor or automated trading that uses ZigZag indicator which are filtered with the
I am using MT4 and I have used mql5 marketplace from it. It was working well three months ago. Today when I am trying login I am getting the following message "MQL5.community authorization failed". The MT4 version I am using is download from "Octafx" broker website. Please help me solve this
// Define input parameters input int ADX_Period = 14 ; input int RSI_Period = 14 ; input int RSI_Overbought = 70 ; input int RSI_Oversold = 30 ; input double Risk_Percent = 2.0 ; // Risk percentage per trade input double Max_Lot = 0.1 ; // Maximum lot size per trade input double Slippage = 3 ; //
How can I get the value of the position, which is marked in the picture, in the EA code
When I set “Long Only” or “Short Only” in the advisor settings, the terminal sees error 4110 or 4111, how can I write a check for position allowing in the code before completing the OrderSend function
hi everyone I have indicators code in MQL4 and I want to use it in Mql5 How I can change codes into Mql5 I don't know any thing about Mql5 codes below are my indicator's code I really need it as soon as possible Best Regards Neda
  MT4 End Of Life  (66   1 2 3 4 5 6 7)
Hi all I have heard reports that MT4 is soon to become 'End of Life' with no active support or updates. Can anyone explain what the future holds for MT4 and the vast array of millions of ex4 Indicators, Scripts and EA's? Any plans to provide a port or emulator for these to help transition over to
Greetings everybody! I have been working on a meta trader 4 trading bot for a while. When tuned all the algorithms and parameters I get a impressive results as shown below in the screen capture. This is for the time period Jan 1st 2024 to Today (14 Mar 2024). It gives similar results for any time
Any body know the code for this strategy When I Click The EA the following steps i want its possible? Step 1 : Buy Order TP-20 pips SL-24 Pips Step 2 : Sell Order TP-20 pips SL-24 Pips Step 3 : Pending Order Sell Stop Price (First Step Buy Order SL) with TP-30 Pips SL-24 Pips Step...
hi, I have used this great article for mt5 to connect to a wss api. which is working fine. but the same code in mt4 does not work at the very first line long http_open_result = WinHttpOpen("mt4",WINHTTP_ACCESS_TYPE_DEFAULT_PROXY,NULL,NULL,/*reserved parameter*/0); I think sending that string is
how to write a check in the code of the mql4 advisor "Only Short" and "Only Long" so as not to get errors 4110 or 4111
  OrderSend: Error code 131  (31   1 2 3 4)
I get this error on validation my product but it is running well on backtests.
I try to create a code which will work on all instrument to calculate the right lotsize based on 1 percent risk, but my current code show me only a right lotsize for forex currencys, when i put the indicator on bitcoin chart i get to big lotsize, can you help to make a working code which will
Is there any code, function or something which is able to return Account Balance of an specific time? For example at the beginning of the day.
OrderProfit() - This will return only Pips value or Final Profit/Loss after calculating swap and commission also. Default Code : double CalculateTradeFloating( int A_magic_0) { double CalculatePL= 0 ; for ( int pos_12 = 0 ; pos_12 < OrdersTotal (); pos_12++) { OrderSelect (pos_12
Hello all, I'm new to coding and I'm really not finding a way to get what I'm looking for. Maybe one cool/savior programmer out there can help. I'm trying to find out the high/low for a certain period. The period is fixed. Let me explain a bit better. I'm trying to find out the highest high and the...