MQL5 Algo Trading community — forex forum for traders and developers

double FindLastBuyPrice() { double oldorderopenprice; int oldticketnumber; double unused = 0; int ticketnumber = 0; for (int cnt = OrdersTotal() - 1; cnt >= 0; cnt--) { OrderSelect(cnt, SELECT_BY_POS, MODE_TRADES); if (OrderSymbol() != Symbol() || OrderMagicNumber() != MagicNumber)
error: declaration of 'cnt' hides global variable double FindLastSellPrice() { double oldorderopenprice; int oldticketnumber; double unused = 0; int ticketnumber = 0; for (int cnt = OrdersTotal() - 1; cnt >= 0; cnt--) { OrderSelect(cnt, SELECT_BY_POS, MODE_TRADES); if (OrderSymbol()
What is difference AUD/CAD.r AUD/CAD market watch session ? Thank you I read manual with F1 but dont find anything
Hi all, So I clicked something on the pop up menu when I right clicked and now all of my indicators are gone/not displaying. Please help
I have many instances of MT5 configured with demo account number and passwords.Everything was working fine.After I installed the same image onto a new SSD HDD,all the instances of MT5 have lot the account number and password.Indicators and sets seem to be still present .Same is the case with MT4
As the subject title says, and looking have this auto imported to G sheets, or maybe extracted by G sheets from MQL5, or if I need something in between to connect MQL5 and G Sheets. Not sure if this is possible. Can anyone point me to the right direction? Thanks
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
On Friday, September 13, 2024, we will release a new beta version of the MetaTrader 5 platform. The update introduces numerous new features and improvements to the web platform. We have added a crosshair mode for accessing precise values and measuring distances on the chart, as well as a new line
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 all, I have a problem installing an indicator on Mac OS X. I downloaded the indicator for Mac and put it in the indicators directory, as advised somewhere on the net. But the indicator does not show up when I open the MT5 application (I have quit and re-opened it a number of times)....
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
  log in problem  (5)
how to solve this log in problem?
i think after the new metatrader 5 update ,a new problem emerged for me : 2024.09.04 22:56:20.729 Core 04 pass 8 tested with error "no memory for ticks generating" in 0:00:00.036-after this if I don't close the mt5 I will encounter black screen. and changing data ,broker , timeframe , and robot
Hi all! I found a few similar posts (questions) with no solution: when run the same backtest two times (one after another) , the MT5 tester sometimes gives different results. The conditions (real ticks, time range, etc.) are the same. I run the backtests on my laptop. The latest stable build of MT5
Hi every one. I need to close a group of open positions automatically when the the value of equity reaches a certain limit. Is this feature exist in metatrader 5 ? and if not. Is this feature can be generated by a certain code ? Please help. thank you
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'm having some large discrepancies between strategy tester and live trading (shocker). I recall looking through the backtest and forward test results after optimizations and my MFE was always very good, i left little on the table I was content. However after running my latest test it would seem I'm
  Does a safe Martingale exist ?  (203   1 2 3 4 5 ... 20 21)
Hi, With this topic I would like to contribute in a very serious way to the world of the martingale "believers". For those who don't know me or doubt my intentions google on "fxigor". So I hope with this topic that I can make a new wind blowing in martingaling. Let me first answer the question to...
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...
  Scalping system  (193   1 2 3 4 5 ... 19 20)
Recently I was experimenting with a couple of indicators used for a non-scalping system presented by BigBear - https://www.mql5.com/en/forum/177573 I was debugging one of the indicators when I switched to the M5 chart and noticed a nice setup for a quick short trade... hmmm.... probably a...
Discover in 15 Minutes: Watch the Video about Trading Signals in MetaTrader 4 and MetaTrader 5 The most frequently asked questions related to the Signals service will be collected and processed in this topic. The list of questions will be updated from time to time. Soon we will try to give answers
  Multi timeframe, what do you think?  (60   1 2 3 4 5 6)
Good morning Without being the holy grail, I think it is still a step or two in its direction. Here is my opinion It is practically impossible to fit into a time frame even with a lot of information. Often it's trying to make a decision on 1 bar How to choose a bar among many others? I think the
  Stochastic  (103   1 2 3 4 5 ... 10 11)
I decided to make some indicators' review based on trading experience and using them inside manual trading systems. So, please find the first thread about Stochastic Oscillator. Feel free to add or write any comments concerning this indicator about how to use it inside trading systes, how to trade
Hello everyone, I’ve developed an Expert Advisor (EA) that uses a simple neural network architecture to make buy and sell decisions based on historical price data. The EA includes some interesting features, such as dynamic stop-loss adjustments using the ATR indicator and a momentum-based
Hi, I've met this 2 statement that's contradict with each other many many times when reading about trading strategy. Here's the statements: 1. Not all strategy works on all timeframe. And what I take from this statement is that each timeframe act differently to each other. 2. In
  Trading platform  (31   1 2 3 4)
What would be your preferred trading platform and Why
  ICT SmartMoney:)  (35   1 2 3 4)
Let's think how we can automate it. If there is someone who's using this strategy, could you show key-points of it? Let's check together if the strategy is working
Is it possible to send order to MT4/MT5 from Ms Excel? thankyou for your answer
In this thread we will build our own Bollinger Band strategy by combining our heads together. Let's discuss: DISCUSS: - what do you think is the best way to recognize RANGED and BREAKOUT? - what other indicators complement the Bollinger Band? - what is in your experience the best timeframe for...
  Multi currency EA ideas  (23   1 2 3)
For quite some time I have been working on a multi currency EA. It is a trend following architecture  that buys dips in an uptrend and sells peaks in a downtrend. A lot of work has gone into the code. It si built so as to run optimzation one pair at the time and then when running in "multi" reading...
Hello, Can any one please suggest me the best indicator for binary options trading? Thanks...
how to know which of the trade/stock has the highest volume/most gain
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
Until now I am unable to test settings or trade stocks with Galileo FX robot on the MT5 platform. I have a stock-account at OANDA, who say the issue might be at MT5. Galileo FX says the issue might be at OANDA. I start to believe this will never work. Has anyone a suggestion
Hello all, This topic is extended to those who utilise algos or trade manually. I am looking to gain an insight from traders who have maybe migrated from CFDs to trading futures, or perhaps those who trade futures alongside CFDs. I would like to know your "why" - is it due to portfolio
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
Hello community, A code MQL5 for some years. Did my stuff... algos.. indicators... and now I`m facing a new challenge which I think I do not have enough knowledge to foresee the next steps What are the steps in a higher level to achieve an integration with Binance for trading via MQL5? I saw some
  Options Trading  (3)
Hi, Is there any way to access Options Trading in MT5 Platform
Fellow hobbyists, please advise where to find an exit to the NYSE via mt5
hi all every broker has a limited global stock of major or popular companies do you have any idea if i can find any broker uses mt4/5 demo/real account which provide more range of us and europe stocks. and etfs and it will be perfect if its charts have a premarket or night prices as i just want to
Forum on trading, automated trading systems and testing trading strategies Press review Sergey Golubev, 2016.12.25 06:50 Hang Seng Index Q1 2017 Forecast (based on the article) "Underlying sentiment surrounding Hong Kong stocks has remained negative with underlying concerns surrounding...
How to display extended hour prices on the chart and for the EA? There are large price variations between the end of regular hours and the start of regular hours for a stock. We don't see these variations so my EA and almost all EAs designed for stock trading can't track movements and trends well
I'm trying to figure out if I can have a list of all my trades for the same utensils separate rather than one bulk position in the tool box/terminal box. Is this even possible? Thanks
Bitcoin vs USD January-March 2017 Forecast: key resistance level at 850.15 to be broken for the bullish trend to be continuing Weekly (W1) price is located above Ichimoku cloud in the bullish area of the chart. The price is on ranging within the following support/resistance levels: 850.15...
  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...
  ExpertMAPSARSizeOptimized  (14   1 2)
Hi, does any artical talk about MT5 build in EA Sample ExpertMAPSARSizeOptimized? It is wriiten in pure OO style, but metaeditor is not excellent enough as Eclips or VS studio now. Sometimes i feel reading MQ5 OO program using metaeditor is just like using Notepad. :) I cant get the point of the...
Hello everyone. I do optimization based on real ticks. When it finishes I try running single tests and compare with results I see in optimization table. They are not the same. What could the problem be
Hi there! Dear friends, I like automated gold trading using a bot, and very often I reach through technical analysis to the conclusion that the gold price will move intraday inside a price span that includes an upper and lower price. These points (prices) are most likely where the trend will
  Share Data between Terminals  (13   1 2)
Is it possible to share data between MT4 terminals on the same VPS? Is there a location that both terminals could access? For example, I have Terminal 1 using Broker A, and Terminal 2 using Broker B. Broker B has a market that is not available with Broker A. So I want to send the price data for this...
Hi, Lets say I want to write an EA to trade SMA 21 as a baseline on a daily chart, whenever the price crosses the baseline, I want to open a position. I could easily create a Boolean condition and open a position based on that: bool buyCondition = (PriceInfo[ 1 ].close > BufferMA[ 1 ]) &&
Hi, I have an EA that performs trading tests. It is my desire to save customize results data into a CSV file. I found out the function that is called right after a test is double OnTester() , so I created the following code to write the results into a file: for ( int aaa = 0 ; aaa < 100 &&
Hi, i´m running 10 MT5 instances on my Win11 Laptop. To get an live overview regarding my profit/loss of each account i actualy open every instance of the MT5 with the Toolbox open and resize the terminal window to the minimal size so that i can see at the right bottom the live P/L. If i want to
i apologies for my subject topic .Am having trouble with two pivotal logics of my project here is the code i am to enter a trade if there is a squeeze of bollinger bands and a crossing of two moving averages, fastma or rma and slowma as yma if the second crossing happens during a breakout happens
  Neural network  (5)
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  (142   1 2 3 4 5 ... 14 15)
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
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
Hi All, need help with transforming a Source File into a running program for MT5. It's my first time. Thanks
Hello guys. I'm very new to coding started a few weeks ago. And I have build the following EA. But the EA only opens buy trades. Can you guys help me out? What is wrong with the else if statement. Please explain in detail because I wan't to learn as much as possible. #include <Trade\Trade.mqh> //
Hi all, I am new to coding and created a simple script for an EMA cross with periods 3 and 26. The EA is not catching all cross events , only some of them. Can somebody see what is wrong? I added print statemts so in the EA journal you can see the events not being captured as the change from
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 every body I've wrote this code ObjectCreate ( 0 , "Close_Line" , OBJ_ARROW_DOWN , 0 ,Time_0,Close_0); But the result is : Please guide me how to make it's direction downward arrow
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
  RSI Fix value  (1)
RSI_Test.mq5 | //| Copyright 2024, MetaQuotes Software Corp. | //| https://www.mql5.com | //+------------------------------------------------------------------+ #property strict // Input parameters for the RSI input int
  Parabolic SAR indicator  (294   1 2 3 4 5 ... 29 30)
I am continuing posting information about indicators. So, we have information about Stochastic indicator https://www.mql5.com/en/forum/177239 We have the thread about Momentum indicator https://www.mql5.com/en/forum/176430 Now something about Parabolic SAR. OverviewThe Parabolic Time/Price System,...
Hi, I just want to know how does this guy was able to develop such an indicator that can be inserted as an object, and also how can he move the object(volume profile indicator) like this? https://www.youtube.com/watch?v=rH1wUSO1iXo (I know he did it in mt4 but I'm using mt5 and want to do it in mt5)
  Footprint  (2)
Hello, Is there anyone knowing Cluster Delta's footprint mql5 code for EA? Thank you
indicator plot nothing but compile with no error plz highlight my mistake #property indicator_chart_window #property indicator_buffers 2 #property indicator_plots 2 #property indicator_type1 DRAW_ARROW #property indicator_color1 DodgerBlue #property indicator_width1 2 #property indicator_label1 "buy
Hello, I found very useful Key Levels indicator from codebase here But the problem is that it draws lot of lines to the charts and during rapid price movements, like news, this indicator laggs candles, price and charts overall. So I would like to know is there any way to reduce the number of those
This indicator has on the chart buttons that makes it switch between RSI and MACD. The problem is in the fixed min and max in the common tab, there is a prominent difference in readings between MACD and RSI which is the levels. RSI oscillates between 30 and 70 with variations according to the period
Does anyone know any reason why my indicator's graphic objects do not get removed from the chart when the indicator is removed? After the indicator is removed, the objects appear in the chart's object list (CTRL-B). I'm using the latest build 4410 21.06.24 I'm calling ObjectDelete on all graphic
hi i want to add transparency to my rectangles in mql4 , which code should i use
  Divergence Indicators  (327   1 2 3 4 5 ... 32 33)
Hi all, I am looking for an Indicator with show Divergence on the macd version i attach below , with a sound alert signal. Can any one programer help out please. Thank you
Hi everyone. I am currently using Supertrend on TradingView and a similar indicator in MQL5 with the same formula, but the middle line between the two is different. Can someone help me verify which formula is correct to display the middle line similar to the indicator on TradingView? Thank you
Can you help with this indicator cant seem to get it to draw the second timeframe fvg correctly and also not getting alerts for the second time frame //+------------------------------------------------------------------+ //| Fair_Value_Gap.mq5 |
Hi, I was creating an indicator that has 2 buffers. double x_1hr[] , x_30min[]; This indicator has to be used on 4 hr chart (for convenience purpose). But it needs to also populate values in the x_1hr and x_30min buffer array after some calculation in the onCalculate function. The value in these
Position Risk Calculation Tool : An indicator that dynamically calculates risk (in percentages and money) based on the lot size and stop loss Author: Conor Mcnamara
Check out the new article: Spurious Regressions in Python . Spurious regressions occur when two time series exhibit a high degree of correlation purely by chance, leading to misleading results in regression analysis. In such cases, even though variables may appear to be related, the correlation is
AdaptiveTrader Pro EA : This Expert Advisor (EA) for MetaTrader leverages a combination of technical indicators, including RSI, ATR, and moving averages, to identify high-probability trading opportunities. Equipped with dynamic lot sizing, trailing stops, and performance-based adjustments, it is
Check out the new article: Reimagining Classic Strategies in MQL5 (Part III): FTSE 100 Forecasting . In this series of articles, we will revisit well-known trading strategies to inquire, whether we can improve the strategies using AI. In today's article, we will explore the FTSE 100 and attempt to
Extreme_TMA_line_indicator: Extreme TMA Line indicator Author: Scriptor
Close On Trendline : Closing EA Author: Paul Conrad Carlson
Check out the new article: Gain An Edge Over Any Market (Part IV): CBOE Euro And Gold Volatility Indexes . We will analyze alternative data curated by the Chicago Board Of Options Exchange (CBOE) to improve the accuracy of our deep neural networks when forecasting the XAUEUR symbol. We will analyze
Dashboard Panel for displaying information on the chart : This code shows how you can create a dashboard to display all the relevant information on the chart Author: Omega J Msigwa
QuickTrade Control - One-Click Trade Management : This EA allows you to open trades with predefined TP, SL, and Lot Size parameters with just one click. It automatically handles pipette conversions and displays real-time Buy and Sell profits directly on the chart. Author: Kommoju Sahityananda Devi
Check out the new article: Implementing a Rapid-Fire Trading Strategy Algorithm with Parabolic SAR and Simple Moving Average (SMA) in MQL5 . In this article, we develop a Rapid-Fire Trading Expert Advisor in MQL5, leveraging the Parabolic SAR and Simple Moving Average (SMA) indicators to create a
Check out the new article: Learn how to trade the Fair Value Gap (FVG)/Imbalances step-by-step: A Smart Money concept approach . A step-by-step guide to creating and implementing an automated trading algorithm in MQL5 based on the Fair Value Gap (FVG) trading strategy. A detailed tutorial on
Check out the new article: Introduction to MQL5 (Part 3): Mastering the Core Elements of MQL5 . Explore the fundamentals of MQL5 programming in this beginner-friendly article, where we demystify arrays, custom functions, preprocessors, and event handling, all explained with clarity making every line
No Loss EA V2 - No Indicator, No Price Action strategy for MetaTrader 4 : "This is the Updated version of NoLoss EA" - As most of the indicators available in the market are lagging indicators that provide information after some time. This strategy eliminates the need to rely on indicators
Best Logging Class for both MQL4 and MQL5 : The CDebugLogger class is a flexible and comprehensive logging utility designed for use in MQL4/5 environments. It allows developers to log messages at various levels of importance (INFO, WARNING, ERROR, DEBUG) with options to include timestamps, function
Logging V2 for both MQL4 and MQL5 : The CDebugLogger class is a flexible and comprehensive logging utility designed for use in MQL4/5 environments. It allows developers to log messages at various levels of importance (INFO, WARNING, ERROR, DEBUG) with options to include timestamps, function
Hi; I have the following code below to automatically increase the string instead of having to manually enter each character. // Display Divider ObjectCreate ( "Divider" , OBJ_LABEL , 0 , 0 , 0 ); ObjectSet ( "Divider" , OBJPROP_CORNER , WhichCorner); // defined earlier ObjectSet
Does anyone know how to solve the problems of freezing the platform that remains inoperable? Please help from support or wherever, if possible send me a private message
I am unable to connect to MQL5 (Community) in my MT4 terminal - Login Failed, although my login credential is correct. Can anyone help/advise please? My paid robots can't be used
[Deleted]
I thought this might be helpful. I found the original somewhere on the net and expanded on it. It should be noted that many of these commands should not be used because the MQL4 language provides better, cleaner, alternatives. Occasionally though, you find you need to accomplish a particular task
What is wrong with the MT4 platform? After installation becomes MT5! Anyone can help? Kindly please tell me i need help in this matter where from i can download the meta trader 4? waiting for your reply
I have 10 years above experience at forex market specilly trend line breakout strategy . Trend Break out is nicely work as below Feauture: 1.Trend Identify first clearly though Slow MA (period 50 method linear) A.if price stay up from slow MA is defined as Up trend B. if price stay down from slow
Hi My ea runs fine with zero errors on demo but fails uploading to market I use 2 bools to check the correctness of volume and money for trade I get different validation errors If I start with 0.01 lot, the error is no trade operations but if I start with 1 lot, it opens trades but shows error not
Hello, I installed MT4 on a VPS, but when I click on the 'Market' tab at the bottom to download a free EA, I get an error like in the picture. Please advise on how to fix this Best Regards
Hi all, Hope I can find an answer about this. I'm testing an EA and the message appears "trailing is too tight". I don't have any trailing stop on at all, and I'm very positive that this has no relation to trailing stop. Attached is a picture of the settings and messages appeared in experts tab
I downloaded another MT4 with the same broker and i lost my EA forex robot? The trades the EA open are still running but the EA disappeared under Expert Advisor list and from the chart? I tried to paste it under Expert it did not appear? Can anyone please help? the chart
Hi I'd like to open trade on the open candle, to do that I use this code to detect new bar formed from earnforex: datetime NewCandleTime = TimeCurrent (); bool IsNewCandle() { if (NewCandleTime == iTime ( Symbol (), 0 , 0 )) return false ; else { NewCandleTime = iTime ( Symbol
Hello! having downloaded and compiled accurate history data, MT4 turns them into a gigantic file when importing it via the history centre. So large in fact that it easily eats up the free 80 GB on my system HDD. So I tried reinstalling a copy of MT4 on an external HDD with 2 TB of free space. That
[Deleted]
Hi guys, Is there any way to just keep the bands and remove or hide the 20 MA in MT4? Thanks
I read the indicator parameters of the 1-hour period on the 15 minute period, I read the parameter was correct. However, when I run the EA open order, I found that the parameters of the indicators read were not accurate,Causing incorrect Openorder location
Good morning Forum, I have an EA that currently has two variables: buyOrders and sellOrders which increase by 1 each time a new trade is made. I have a maximum number limit which is currently set at 10 buys and 10 sells simultaneously. If a trade closes, then I would like these variables to decrease