MQL5 Algo Trading community — forex forum for traders and developers

Hello everyone, I am developing a trading bot in MQL5 and I'm facing an issue with partially closing a position. My goal is to close half of a position when a certain profit threshold is reached, and to update the position's comment to reflect this partial closure. Here are the key parts of my code
Hi there, I've moved over to programming MQL5 after several years with MQL4. In the past, if I wanted to process information from other timeframes than the chart hosting the indicator, I would likely use the iHigh/iLow/iClose/iOpen functions specifying the target timeframes as an argument to the
I ordered EA multiplied ATR trailing and There is some problem to make it work for me.All seems to be good to go but nothing happening.I believe EA works fine.Looking for someone Who would be able to give me some helpful hand and explain what am i missing or doing wrong about goal i am trying to
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
Tens of thousands of traders use MetaTrader 5 VPS as a secure, reliable and fast hosting solution for automated trading. Recognizing the growing popularity of the service, brokerage companies approached us for the possibility to utilize VPSs to reward loyal users. This is how the Sponsored VPS
Good day; I'm trying to prevent my EA from opening a new position within 60 from having closed the previous position. //declared global variable datetime LastTradeCloseTime = 0 ; //then under void OnTick (){ //I've included it in my buy / sell conditions as follows: if (!isPosOpen &&
Hi, I am new to MT5 and know that I cannot get recommendations for products on this forum. I do not have the time to go through every Stochastic product here and wonder if there is anywhere I can put my request "out there"? I basically need an indicator combo that will alert me when Stochastic main
Hi everyone I have a situation with mt5 where I imported and requested data on created custom symbol , but it turned out to be without volume on display which made it useless. moreover, I have asked the data provider about this and they informed me it's issue with mt5 and better to ask
There seems to be a clear and upsetting scene when two different brokerages with different platform ownerships, are added unto a computer/VPS. When stored on the same data storage, the encoded connection to the mql5 profile on all the metatraders on the VPS/computer disconnected/abandoned
I am able to connect to MQL5 on my regular platform... but on my VPS all I get is the above view and... which does not recognize my password, or any password which I have applied for repeatedly. What am I doing wrong? Thanks for any helpful thoughts Nick
Hello, I was wondering if someone could help me understand why when I'm doing a genetic optimization, a run could take up to 3 hoursto complete, but when I'm making a simple backtest, it takes only 30 min. I'm usingusing the exact same modelling, exact same period or timeframe. I really don't
I just paid 15$ for the server. I have no idea how to use it. Any can explain
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
I have a question, my mt5 can't find any server. I will log in under CapialMarkets-Live. But I don't have any servers in the bottom right corner. Only 0/0 kb... What should I do. I use mt5 on macbook
Good morning I look at the products in the marketplace With my current display I get this For Metatrader 5 Experts => 119 pages Indicators => 231 pages Bookstores => 1 page... utilities => 88 pages Metatrader 4 Experts 323 pages Indicators 405 pages Bookstores 1 page utilities 124 pages First place
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
Hi guy! I'm new here , i stuck with how to combine that on MT5 can you help me . Thanks So much
I study correlation pairs and hedge strategy. 2 pairs hedges are difficult to get profit. Does 3 pairs hedge system really work or not? example USDCHF EURUSD EURCHF BUY BUY SELL / SELL SELL BUY Please suggest me some useful hedge system.I want to code it as EA
Good morning I'm handing over my post, obviously there have been some problems The question was quite simple How many phases have you defined for your trading? I have 5 Range Start of trend Full trend Weakening Counter trend
I just started this thread as a continuation of the talking made on this topic (we can read it). Or 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
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
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
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...
Dear people, I spent some times already looking into the forums and documentation and cannot really understand how is it possible that SymbolInfoMarginRate() is not behaving according to specifications. I'm running MT4 Version 5, release 4380. I have compiled a little script (which is very similar
Hi everyone could Anyone explain How HHHL LLLC works
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
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
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...
  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
  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
  Options Trading  (2)
Hi, Is there any way to access Options Trading in MT5 Platform
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
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
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
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...
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
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...
Hello, is anyone also experienced some missing tabs in the manager? There is no mql5 cloud network and scheduler tab
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
hi vereyone How do I make profit appear above the candle? can anyone help me to get this code plz
Hello! Thank you for having a look at this thread! I'm looking to use multiple EAs on the same symbol and the same timeframe but each EA has its own magic number. Could someone give me a short algorithm which will close an open position which was open by a EA which has its own unique magic number?...
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
Thank the platform for sharing so many free excellent EA, I learn and get a lot from here, in order to thank you, I also wrote EA, welcome to exchange and discuss together. (Do not know how to contact the webmaster, whether you can cooperate to publish a share)
I've been going round and round in my head until I can't see straight trying to wrap by brain around the differences between the "forward test" and the "back test" in the MT5 Strategy Tester . Watching the great darwinex youtube series on backtesting, he says to never trust the optimized "backtest"
Hello there, I do believe I might have hit a wall with Mql5, I am in need to generate an image at runtime so that it can be passed to a AI model and based of the results continue with the execution of the program, I would like to have this functionality integrated in the EA/Indicator so that it
Dear All I am trying to use strategy based on price action. It involves looking 'Reversal Candle Patterns' Support and Resistance at specific Central Pivot Point and / or Volume Profile levels for entry. The challenge I face is, it usually a cherry picked bar position to initiate the code. All
Hello. I realize we have something like TesterStatistics to access those values in testing mode but how about live chart
Hello! I have an issue with the strategy tester. Kindly advice what am I doing wrong. The calculation of the profit in the tester seems wrong. Pls find attached screenshot from the log
I would like to know if it's possible to create and run a EA when trading binary options. If so, what platform or broker can help me achieve that? Thanks in advance
  Multicurrency  (1)
Hi. im currently developing an EA with that you can trade different currency pairs on one single chart. When I add a currency in the input field settings, how can i refresh/update it automaticly? It only start trading when I close and open the terminal
Hello I was trying to find a way to get Trade history report automatically on a daily or weekly basis, I searched a lot and found a few scripts that almost do that, but what I want is to be able to get a standard history report by coding, just like which can be taken manually inside the
Hi, I have one EA that i use for personal use and I wanted to also use it for a prop firm. So I got a second MT4 account from the prop firm and set up my EA on there and also set up a VPS for this account. So on one account I have the EA running with my private funds and on the separate account the
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
I created a script to show the error. When I tried to run it in the original script, it gave me: Error: <4113> [CHART_WINDOW_NOT_FOUND] ... even if I hard-coded the symbol "USDJPY" ( which appears as the first in the list in my Market Watch window in the terminal), and used "_Period" as the
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
Hey guys, I have the following problem and it seem I am not the only one. I cannot change the colors of indicators. I can change text in a text field , but if I double click the color fields, nothing changes. No menu appears. It is with all indicators. What is the solution? Thanks
Hello, How can I, in an indicator, detect when the current bar closes and breaks the current daily high/low? I need to check when a bar closes, if it breaks the daily high/low so far, from the first daily bar to the last bar (not counting the current bar). If I use " iHigh ( NULL , PERIOD_D1 ,0) I
  Pivot indicators  (758   1 2 3 4 5 ... 75 76)
Everything about pivot indicators you may find in this thread. Besides there are some usefull links as well: - how to trade with pivot (manuals) is here . - some trading system based on pivot - pivots, camarilla, high/low etc.... is
I'm working on an custom indicator on the CHART window and there I call the iRSI indicator successfully: I can see all the data and windows in the META-5 main window. My indicator runs in the CHART and the iRSI runs in a separate window and I can see both graphics, my indicator on CHART and RSI in
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, I want to use the Heikin Ashi for trailing my stop loss. That is, when i'm in bullish trend if the candle n closes below the opening of the n-2 candle i close the order. Since there is already an HA indicator that has been made can you help me reading this to use it with iCustom ? here's the
I am currently experiencing an issue where the iBarShift function returns a bar position ( pos ) that is outside the expected range when reading date and balance data from a CSV file. Specifically, the bar position often exceeds the actual number of bars. This results in the balance value not being
Been attempting to convert this indicator from proRealTime to mql5 but running into issues with specifically duplicating the AMA to plot higher and lower. There is obviously a way to specify a price for the MA to be plotted but I can't figure out how exactly. The inputs are the same so it should be
Hey buddies, I am looking for code to get 1st 1 Hour candle High and Low for MT5 chart. I am very much new for MT5 coding. Thanks in advance. Rajiv
Hello How can I make the text bolder/thicker on the label? I use this code: string idxLabel="hello";ObjectSetInteger(0,idxLabel,OBJPROP_COLOR,clrBlack);ObjectSetString(0,idxLabel,OBJPROP_TEXT,"Text");ObjectSetInteger(0,idxLabel,OBJPROP_FONTSIZE, 10);ObjectSetString(0,idxLabel,OBJPROP_FONT
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...
Simple Parabolic SAR with alert : This indicator shows a standard parabolic SAR another way. Also it send alert when SAR dot changes side. Author: Raymond Codjia
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
Root Mean Square : Root Mean Square Author: Mladen Rakic
Trend Dashboard Indicator : Trend Dashboard Indicator MetaTrader 5 indicator — a multi-timeframe indicator that is based on three standard indicators: Stochastic oscillator, RSI (Relative Strength Index), and CCI (Commodity Channel Index). It displays current trend directions for M1, M5, M15, M30
XP Forex Trade Manager Grid MT4 : Forex Trade Manager Grid MT4 helps you to managing orders and achieve the goal. You only need to place first order with Take Profit, run EA and set in params profit (pips) you want to get. EA will be managing your positions, as will gather appointed number of pips
Check out the new article: Triangular arbitrage with predictions . This article simplifies triangular arbitrage, showing you how to use predictions and specialized software to trade currencies smarter, even if you're new to the market. Ready to trade with expertise? Arbitrage is very curious, it's
Check out the new article: Multibot in MetaTrader (Part II): Improved dynamic template . Developing the theme of the previous article, I decided to create a more flexible and functional template that has greater capabilities and can be effectively used both in freelancing and as a base for
Check out the new article: Building A Candlestick Trend Constraint Model (Part 5): Notification System (Part I) . We will breakdown the main MQL5 code into specified code snippets to illustrate the integration of Telegram and WhatsApp for receiving signal notifications from the Trend Constraint
New article MQL5 Wizard techniques you should know (Part 01): Regression Analysis has been published: Todays trader is a philomath who is almost always (either consciously or not...) looking up new ideas, trying them out, choosing to modify them or discard them; an exploratory process that should
Check out the new article: Data Science and Machine Learning (Part 24): Forex Time series Forecasting Using Regular AI Models . In the forex markets It is very challenging to predict the future trend without having an idea of the past, Very few machine learning models are capable of making the
Check out the new article: MQL5 Wizard Techniques you should know (Part 23): CNNs . Convolutional Neural Networks are another machine learning algorithm that tend to specialize in decomposing multi-dimensioned data sets into key constituent parts. We look at how this is typically achieved and
New article How to earn money by fulfilling traders' orders in the Freelance service : In our service MQL5 Freelance developers are paid to create trading applications for traders customers. The service has been successfully operating since 2010, with over 100,000 projects completed to date
ASCtrend_HTF_Signal: ASCtrend_HTF_Signal shows a trend direction or a signal for performing a deal generated by ASCtrend indicator as a graphic object with colored trend indication or deal direction. Author: Nikolay Kositsin In case there is no entry signal at the current bar, the indicator...
Check out the new article: Angle-based operations for traders . This article will cover angle-based operations. We will look at methods for constructing angles and using them in trading. Angle-based operations have been used in trading for a very long time. The main advantage of these operations is
Check out the new article: DoEasy. Controls (Part 33): Vertical ScrollBar . In this article, we will continue the development of graphical elements of the DoEasy library and add vertical scrolling of form object controls, as well as some useful functions and methods that will be required in the
I have a question I use the below code to remove certain figures from arrays from a specific index. How can I make the code work for arrays example RunningTrades[].symbol void RemoveIndexFromArray( string &MyArray[], int index) { string TempArray[];
If you have questions about MQL4, MT4, MetaTrader 4, please post in this thread. Especially when your questions are related to trading functions
Hello all, I tried to make a panel with a checkbox, It works well, but how can I catch the checkboxevent (is checked or not) Some advices are apreciated, thank you Greetings //+------------------------------------------------------------------+ //|
Hi , anyone who can build Mt5 indicator for me , with really simple steps. Let me know Will pay
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, Just wondering if anyone else is getting this odd problem where the terminal is unable to download/update to the new version? I just get this message repeated constantly: "LiveUpdate: old version, try to download new one" Have tried on different days to, just in case there was a server issue
The MetaTrader 4 platform update will be released on Friday , March 1, 2024. This version provides error fixes and platform stability improvements. The update will be available through the Live Update system
Dear Metaquotes Team, I am writing to express the concerns of the MetaTrader 4 (MT4) community regarding the recent update from build 1415 to build 1420. While we understand that updates are necessary to improve the platform and ensure compatibility with new protocols, we are deeply concerned about
Hi, the error messages below were generated in the journal while an EA was trying to place pending orders. Error 136 (off quotes) is captured by waiting for the refreshrates() in a loop and immediately sending the order again with the new prices; However, the process below keeps repeating itself....
var bool gbroken= false var bool rbroken= false //-----------------------------------[MARKET STRUCTURE INDICATOR]-----------------------------------{ //--------------------------- //market breaking indicator // //-----------------------------------------------------------------------------
Hi guys I have a coding that could show high time frame value (like H1) on lower time frame (M5), the attached file is xx.mq4, but it is just made for IMA, I could like to chage it to make it work for the indicator "UltradeFX - Master Entry.ex4", but I don't know how to do that. I am not good at
I've been using the ALPARI UK Demo for a few months now and this is the firsttime I came across this error. My journal has the following lines (they repeat a few times): DataCenter connecting failed [6] unknown command C6 login The expert that was running during this stopped working, but did...
Hi Guys I have an ea with traling stop, when that tralling stops is active and move with every tick there are messages coming in journal and expert, I just got message from broker that my account is over loaded with messages as they limit to 2000 a day. Is there a way to disable them
Hi All, I have created an EA that relies so much on candle and MA statuses at the close of period for both entry and exiting of trade condition. The only exception is if SL is triggered or max drawdown reached. This means that considering I use the 1H time frame, it can only place a trade or exit a
hi guys, i am trying to find the signature of OKX request. the screenshot is showing what i find, the last value in the screenshot is what i should find, and the value before it is what i am finding. any help? it says that hash256 should give raw binary code, after that we encode it on base64... any