MQL5 Algo Trading community — forex forum for traders and developers

hi everyone!! a lot of trades is being taken when condition met but I want only one trade to be taken an manged then once closed look for another trade. can you give me a guess where im having issue?? //+------------------------------------------------------------------+ //|
So, as illustrated in the images, if I hard code in the values, the trendline will draw. But if I use functions that return identical values, nothing happens. No error message is thrown, which as I read means the create function went to the stack but didn't necessarily execute. No object appears in
Hello everyone, I am facing an issue on MetaTrader where my indicator is not counting objects that have dates later than the current server time. Below is the code for reference. Can someone help me resolve this? Thanks in advance for the help
Artificial Intelligence: The New Frontier in Coding for Expert Advisors and Indicators Hello everyone, In recent years, we have witnessed an incredible evolution in the field of artificial intelligence (AI). One of the areas rapidly benefiting from this innovation is the creation of source code for
I have a problem, I'm running MetaTrader 5 Strategy tester with 8 agents (my computer has 16 cores). He hasn't worked for me for a month. There is no collision with the anti-virus program. Reinstalling didn't help either. All 8 testers are marked as "not connected" in AgentsManager. I have Win 11
I have an EA I like, running on the current version of MT5 and it's performing well. I'm keen to lock it down and avoid changes to anything (OS, MT5 Client or the EA)... but what happens if I stop the MT5 updates? Will it still operate on into the future or is there a corresponding MT5 server the
I provide agents by using my CPU power, i have now GPU 4070 super and I'd like use it too(to earn money)
Have anyone has some examples of Coding MQL5 for TimeDaySavingLight How to use this function
I have a question, does anyone know how to use funds from a canceled purchase to purchase a new EA
i want to ask for a refund for all of the indicators and EA's i have bought. recently you have blocked prop firms including all brokers i have used and i can't even use your platform anymore so i want my $ back
  Gallery of UIs written in MQL  (129   1 2 3 4 5 ... 12 13)
Recently, while tidying up my old laptop, I accidentally stumbled upon a folder lost in the wilds of directories. I clicked on it. And there it was. Nostalgia. A darkness of pictures, gif-files, screenshots and all kinds of windows of multi-coloured GUI and controls.... All written by me in MQL4/5
The MetaTrader 5 platform update will be released on Friday, June 7, 2024. The new version features the following changes: MetaTrader 5 Client Terminal Terminal: Fixed errors which could cause incorrect operation of the Live Update system under certain conditions. Terminal: Added new hotkey, Alt+X
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
Hi In all indicators, I'm unable to change colors that can normally be changed. I can change other parameters, but not the colors... Any idea why colors fields don't react when I click on them ? Wil
Good morning If I put an indicator in the marketplace for rental let's say at $40 per year One person rents this indicator at this price of $40 for the year The indicator evolves and so does its price, let's say $80 still for the year How much will the same person renew their indicator, $40 or $80
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
I was affraid to open this thread. Why? because it is difficult to manage many threads on one forum. Anyway - I will try :) So, we are talking about SIGNAL SYSTEMS
  ASCTrend system  (1329   1 2 3 4 5 ... 132 133)
Some people say that it is the best signal system in the world. It is very famous system and it was developed in the interesting way: Russians recognized this system for MetaTrader some years ago and this western trading system was not very profitable (I am talking about MetaTrader only) but had as
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...
  ICT SmartMoney:)  (27   1 2 3)
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
  PriceChannel Parabolic system  (311   1 2 3 4 5 ... 31 32)
Some people asked me on the other forums about re-enter. But I am not using any indicator for re-enter. So I decided to create some simple trading system with re-enter based on indicator's arrow on the chart. Let's name it as PriceChannel Parabolic system. M1 timeframe. This is image for EURUSD for
Dear traders. The common belief is reward risk ratio is not enough in evaluating profitability. You also need to know the win rate. I have a theory for myself. I just want to know how you think of this. "You cannot stay profitable in long run with reward risk ratio less than one. Regardless of win
I just started this thread as a continuation of the talking made on this topic (we can read it). Or ...to make it shorter: it was some discussion about forecasting/predicting of the next candle or direction of the movement or market condition evaluation. And it was around standard indiocators in
  Signals Trading  (19   1 2)
Hi everybody Before opening this new thread I already red all the FAQ and the forums topic about signals trading.  All I'd like to know why I get an orange icon on the Signal part.  By mistake I first activated it on my personal PC (and I don't remember of which color it was) then I moved everything...
  Chaos Theory by Bill Williams  (83   1 2 3 4 5 ... 8 9)
http://www.alpari.co.uk/en/market-analysis-guide/chaos-theory/index.html I had a quick read through and it sounds very impressive. what do other people think? is it good? has an AE been done before based on this theory?
Hi! I'm considering to build a portfolio of diversified forex pairs to be traded with an EA, my account currency being USD ( IC markets and Eightcap as brokers) E.g. I'm thinking of EURUSD, GBPUSD as main pairs and AUDCAD, NZDCHF for diversification purposes as an example. Though, wouldn't this
Hello, In view of the general level of interest and the number of inquiries I've received from many of the folks here, I've decided to start a thread to discuss on a low-risk hedge trade strategy which I've recently developed. The idea behind this strategy is derived partly from the FR/FFS type...
What is the difference Average down forex strategy vs buying coin crypto
I need a false entry script, where can i get one
Is there a proper order in which Include files should be loaded? Some special order to prevent conflicts? Why do I ask? I thought something I was reading mentioned it momentarily. I cannot re-locate the reference, but it left a concern in my mind. Any problem with this
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...
Hi I am trying to get the Broker session times using symbol properties with below code. However I am getting compiler warnings. Please let me know how to correct it. Documentation and search did not help much. // Variables for Symbol's other properties
  ASX stock CFDs  (1)
How do I get the live data to trade ASX stock CFD's and view the charts
Hello house, I am developing a strategy for trading wide intraday gaps on stocks gaps, The type of gaps I am particularly intetested in are the type that appear like minus aigns all over the chart, the price is static for a period of time amd then suddenly takes a leap ans stays put again
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...
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
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
how to know which of the trade/stock has the highest volume/most gain
  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
  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...
Im trying to setup 2 accounts with my EA but switching accounts turns off algo trading for the second account. Is this just a feature of MT5? I have 1 account running the EA on 2 pairs, and 1 account i want it to run with 1 pair
Hello everyone, I have developed an Expert Advisor (EA) for MetaTrader 5 (MT5) and, to test it with high-quality data, I used QuantDataManager to download historical tick data . After downloading the necessary data, I went to MT5, created the symbols, and loaded the ticks (the image below shows the
Hello, I would like to be reimbursed because the EA makes many loss. I would like to earn money, not to lose money. Please, how to be reimbursed from an EA. I already activated the EA but it's a scam, it makes only loss money. Please help me to be reimbursed. Also the service desk didn't reply me
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 am making a EA that will run on accounts with low leverage. To avoid runtime errors, I am trying to find the maximum number of lots that can be opened given the available free margin. Here's my attempt at the calculation. double marginRequired; double freeMargin; double maxOpenLots; void OnInit ()
Gents, I'm running backtests using the 'Run Single Test' function directly from the Optimization Results tool and the Strategy Tester with the same parameters, but the results are significantly different. Has anyone else experienced this? Any insights on why this might be happening?"
My EA in tester only shows sells. At the same time the journal registers both sells and buys. Notice the vertical dotted lines which must be interconnected between the buys a nd the sells during b a cktesting in the normal situation . Ple explain what's wrong with the settings?? The code is as
Hello, idk why my ea work perfectly from my PC but also don't open any position if it run on a vps. MT5 terminals have the same settings, algo trading enabled etc... Anyone can help me please
void Trail() { Print ( "Trail() called for symbol: " , _Symbol ); // Log the function call and current chart symbol int totalPositions = PositionsTotal (); for ( int i = 0 ; i < totalPositions; i++) { ulong ticket = PositionGetTicket (i); if ( PositionSelectByTicket
Hello, I have 2 installations of MT5, on 1 when I perform backtest with visual mode I can also see the trades made during the backtest on my main chart directly in MT5 main window, so I can further play with indicators and all the values and still see the trades. In my another MT5 installation this
Hi folks, I have built an algo that trades 6 different strategies.... I want to establish the best strategy to trade. I wouldn't like to do a slow complete optimisation for all 6 strategies as it will take many weeks to complete. So my question is: Would it be a good idea to run a faster genetic
Hello I want to make my indicator signals that are given as alerts automatically. It means to automatically open a trade for me and set profit and loss limits. Is there a cheap tool? Introduce some examples of it
Hello, how can one get the same, actual New York-time all year long , no matter whether it's summer- or winter-time there? How can this be achieved with MQL5 if one doesn't live in the New York-time zone themselves? Something like the missing TimeNewYork() -function? Because MQL5 only provides our
  Strategy tester  (2)
Hello, Bellow function giving always result of 0 in the strategy tester, but is working when loaded on a script. I do not understand why Thanks! double ATR( int index, ENUM_TIMEFRAMES timeframe) { double atr[]; double res= 0 ; int maxtries = 3 ; int retrycount= 0 ; ArraySetAsSeries (atr
For those who are experienced in programming EAs, I'd value your opinion on this. If you have an EA that makes buy and sell positions based on valid strong signals, is this better than having a lot of position management code (recovery trades, PnL analysis etc.)? I wrote a script full of position
Hey , I have not yet worked on indicators that much and therefore I'm now facing a problem that might be easy to solve for soeme or does not make any sense. The Indicator Automatic Trendlines paints a candle which fufills certain criteria in a colour. Now I want to create an indicator thats relys on
Hello al, I have this code for an indicator that should display the number of manually opened trades during a particular time span, however it gets stuck to 0. I'm using hedging mode and the orders are opened manually. The script compiles without errors however, the totalTrades is always 0. I'm not
Hello everyone, I am creating a custom indicator for MetaTrader 5, but I am encountering the following compilation error: 'Backtest Balance Display.mq5' Backtest Balance Display.mq5 1 1 ')' - open parenthesis expected Backtest Balance Display.mq5 39 49 1 errors, 0 warnings 2 1 Purpose of the Code
Good morning I am developing for my codes, all the smoothing for the moving averages. So how do I say I'm head in the formulas I don't have much to say about the averages SMA, EMA etc. But here I am on the VEMA The Volume Weighted Exponential Moving Average (VEMA) is a moving average that places
  Need help indentifying indicator  (2706   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...
I want to bind trendlines horizontal lines vertical lines rectangle like the cross cursor (ctrl + f) thank you
Good morning Does anyone know what the formula is used by MQL5? I can't find and there are no formulas missing on Google... I wouldn't want to try them all before coming across them by chance THANKS
Some of you might remember this one : originally it was a part of an expensive system. Than it was coded as dots because of the repainting problems in metatrader. Here is a version for metatrader 5 : slightly changed the look of it (Bollinger bands is drawn as the "shadow" in the background) Also...
I already have the IndicatorRelease statements in my OnDeinit, and I'd expect the terminal to be smart enough to run that function before completely shutting down the test run, but I guess that's a no. I'm testing an indicator that calls 13 iCustom indicators. The terminal finally does a force
I am looking for but cannot find a free or low cost, simple Stochastic indicator which alerts when it crosses overbought and oversold areas? Any help appreciated. Thaks
  I need help  (6)
This is my first post here. Please forgive me for my weak language. This indicator gives you a signal for the next candle and appears at the end of the candle. I want help with it appearing and disappearing on the same candle it appears on and not after it is closed. Is it possible to help me with
Hello Are you okay? I am looking for ideas for developing indicators for the dummies . These codes will be put in CodeBase and therefore free. These codes will be very simple and therefore a very good support to start learning because that's the goal. The beginner, or the confirmed can very easily
I've got an indicator that's very similar to other indicators I've written, all of them running super-simple algorithms (90% of the code or more is just about getting the data in) that calculate the slope of another indicator's values between two bars, a simple Y2 - Y1 for a user-selectable period
  Everything about RSI  (1461   1 2 3 4 5 ... 146 147)
RSI indicator We are continuing discussion about the indicators. We have the following thread: Parabolic SAR indicator Momentum indicator Stochastic Oscillator Divergence Indicator Now we are talking about RSI. "Technical Analysis from A to Z": Overview The Relative Strength Index ("RSI") is a
  Multi pair indicators  (571   1 2 3 4 5 ... 57 58)
Something I have been working some time ago. Multi pair MACD Multi pair CoeffOfLine
Trailing Stop Management Function : Filter orders based on the set magic number, execute the final stop loss management function, adjust the Stoploss and TrailingStop parameters, and place the Management function according to the structure of ea. It is recommended to place it under void OnTick()
Check out the new article: Reimagining Classic Strategies: Crude Oil . In this article, we revisit a classic crude oil trading strategy with the aim of enhancing it by leveraging supervised machine learning algorithms. We will construct a least-squares model to predict future Brent crude oil prices
  Indicators: GG-TrendBar  (26   1 2 3)
GG-TrendBar: This indicator shows you the trend on every timeframe simultaneously Author: Gordon Gekko
Check out the new article: Using optimization algorithms to configure EA parameters on the fly . The article discusses the practical aspects of using optimization algorithms to find the best EA parameters on the fly, as well as virtualization of trading operations and EA logic. The article can be
New article How to connect MetaTrader 5 to PostgreSQL has been published: This article describes four methods for connecting MQL5 code to a Postgres database and provides a step-by-step tutorial for setting up a development environment for one of them, a REST API, using the Windows Subsystem For
Check out the new article: MQL5 Wizard Techniques you should know (Part 22): Conditional GANs . Generative Adversarial Networks are a pairing of Neural Networks that train off of each other for more accurate results. We adopt the conditional type of these networks as we look to possible application
Lesson 9 Buy sell stop Order : This is a lesson on buying or selling with pending orders stop Author: Dao Thanh Tan
Check out the new article: Neural networks made easy (Part 73): AutoBots for predicting price movements . We continue to discuss algorithms for training trajectory prediction models. In this article, we will get acquainted with a method called "AutoBots". Effectively predicting the movement of
Check out the new article: Bill Williams Strategy with and without other Indicators and Predictions . In this article, we will take a look to one the famous strategies of Bill Williams, and discuss it, and try to improve the strategy with other indicators and with predictions. Bill Williams has a
New article How to create bots for Telegram in MQL5 has been published: This article contains step-by-step instructions for creating bots for Telegram in MQL5. This information may prove useful for users who wish to synchronize their trading robot with a mobile device. There are samples of bots in...
Breakout Strategy with Prop Firm Helper Functions : This is an update of the "Simple Yet Effective Breakout Strategy". In this code, I have added some helper functions for prop firm challenges. Author: Anh Quan Duong
  Experts: Grid EA Pro  (12   1 2)
Grid EA Pro : A professional Grid advisor works according to RSI ( Relative Strength Index ) indicators. And has the function of Reducing the Drawdown on the account by overlapping unprofitable orders. The chart displays information about the profit. It can be a very useful tool, For manual trading
New article Understand and Efficiently use OpenCL API by Recreating built-in support as DLL on Linux (Part 2): OpenCL Simple DLL implementation has been published: Continued from the part 1 in the series, now we proceed to implement as a simple DLL then test with MetaTrader 5. This will prepare us
Check out the new article: Neural networks made easy (Part 72): Trajectory prediction in noisy environments . The quality of future state predictions plays an important role in the Goal-Conditioned Predictive Coding method, which we discussed in the previous article. In this article I want to
Check out the new article: News Trading Made Easy (Part 2): Risk Management . In this article, inheritance will be introduced into our previous and new code. A new database design will be implemented to provide efficiency. Additionally, a risk management class will be created to tackle volume
I have an EA that talks to a server, but sometimes a communication error might happen, and the EA can have a hard time recovering after, so it would be better to restart the MT4 instance. Is there some way I can close the chart AND MT4 itself to enable that? TIA! Dennis Gundersen
Indicator TLB OC v02 and its reliability in Forex trading
Good evening everyone I have a short question. I'd like to send messages from an EA to my telegram. That works but I can't make a new line in the message. with the \n Does anyone know what the problem could be? message = StringFormat ( "%s %s \n Entry: %s" , orderType
The MetaTrader 4 update will be released on Friday, May 24, 2024. This version provides important security improvements, error fixes, and platform stability enhancements. The update will be available through the Live Update system
Hi all I added a feature for auto lottery but after inserting it it gives me the problem of OrderModify error 4051 and invalid stoploss for OrderModify function I will insert the code below, I can't figure out what the problem is double lot;
im trying to install mt4 on my windows laptop but its not installing and returning an error any ione hl me to solve this problem below is the screen shot
I find it inconvenient to go thru the cycle of: move pointer > right click > buy/sell limit > set lot > set SL/TP >= 6 operations But the cycle of: move pointer > right click > buy/sell limit + preset lot + SL/TP >= 3 operations Is that possible to code this thing out? Searching the internet doesn't
I used an EA, whch at 3om today opened a trade 900 pips above the 5pm price. As you can see the open price hasnt even been hit for the past day or so. MY EA has no slippage so it cant be that. Im thinking it might have somehting to do with the EA executing so early that it didnt register the
The following statement in my code is resulting in Pending Order getting created but it somehow is not respecting ordertplvl. int
Hi coders, I need your help for my learning process. I'm using a Multi-Symbol EA which it can run sizeable pairs and it was written by someone else. My Mission :- 1) To get the 1st OrderOpenPrice 2) To get the 2nd OrderOpenPrice 3) Finally, get the difference MathAbs( 1 - 2 ) I have written the
For example, I have a BUY LIMIT position, But when the march has continued and the order is still not executed, I want to change the TP to the highest between the order placement date and the current date
  make a loop  (2)
I want that, in every 15 minute candle, the cobuffer value of the previous 26 candles will be added together Can someone help me in this case
Hi guys i try to create a indicator that calculate a CCI over the ratio of 2 instruments i code this //+------------------------------------------------------------------+ //| CCI_Ratio.mq4 | //| Expert Advisor created by
Hi bros, I have Expert Advisor and want to sell it, on the other hand i want to protect source code too. EA can be place at Metatrader market or user can be download .ex4 code website which to be ready later. Monthly subscribers for example must be paid 1000 usd for to use it. But if the subscriber