MQL5 Algo Trading community — forex forum for traders and developers

In the next beta we have released the ability to compile MQL5 programmes using the extended set of instructions AVX / AVX2 + FMA3 / AVX512 + FMA3. They allow you to generate more efficient and faster code. You can configure both general settings for single programmes and personal settings for
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
I was searching and couldn't find, so here's my version. Simply move mouse where you want wingding and press 1-5. It will create the wingding at mouse location. Good for quickly marking up charts. //+------------------------------------------------------------------+ //| Custom indicator
Hello, MQL5 community! I'm excited to start a discussion on a topic that I believe could be of great interest to many of us - using Python-based predictive models for binary options trading. As we all know, the financial markets are full of patterns and correlations. These patterns, when identified
  How to contact MQL5 team  (59   1 2 3 4 5 6)
Hi, I try to post a long message through your chat but we can post long message, we are limited at 30 words... what is the email address to send to you a long message? Some MT4 sellers offer bonus atfer purchase of their EA in exchange of positive reviews and it's not acceptable
//Returns true if last two closed trades ended up in a loss or 0(breakeven) bool LastTwoTradesLost(){ double profitLossArray[]; int totalCount = 0 ; HistorySelect ( 0 , TimeCurrent ()); if ( HistoryDealsTotal ()> 0 ){ for ( int i= HistoryDealsTotal ()- 1 ; i>= 0 ; i--){ ulong
As you're probably aware, prop firms are not allowing US traders to use MT4/5, and are switching to DX. I need a trade copier that can run an EA on MT5 and copy trades to DX. If you know of one that exists, let me know. Thanks
So I noticed recently that with the update, MT has removed the ability to copy signals to a demo account. Reasons why this is a terrible update: - Can no longer use a demo account with the same broker as the signal provider, in order to copy special symbols. Which I was then able to use a copy
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
im not sure whats up, i formatted my computer last week, and now i cant get the agents to connect to the cloud.... CS 0 13:17:20.605 Startup access rights to common directory successfully checked CS 0 13:17:20.607 Startup service start initialized CS 0 13:17:20.607 Startup
My DLL specifically constructs strings for my MQL5 code (eg UTF16, null terminated, on the heap). As far as I understood, metatrader will then automatically copy this string for the EA to use. The problem now is that the specifically constructed string still lies somewhere in memory, causing a
Hi All, Hope you are all well. I've gone through some of the topics here to find a few suggestions to solve this problem which I'm sure many have come across. I'm finding that converting a symbol's profit currency to account currency is way more difficult than expected to be. I've come across a
  Where Do I start from?  (120   1 2 3 4 5 ... 11 12)
Hi fam! Am a total newbie in the forex niche... Just signed up here on this platform... Please where do i start from? I need help... Anyone willing to put me through?
Hi all, As tittle, im trying calculate rsi using python follow this code: # Calculate RSI window_rsi = 14 delta = df [ 'close' ]. diff () gain = ( delta . where ( delta > 0 , 0 )). rolling ( window = window_rsi ). mean () loss = ( - delta . where ( delta < 0 , 0 )). rolling ( window
Hey Guys, Just throwing this out there? I'm trying to test my manual strategy out and my understanding is that with Metatrader (I use 5), there are very limited options to do it; and maybe it's my lack of knowledge too. I want to go back in time, in my chart and trade it as if it were real time with
Discover 3 swing trading strategies that work so you can profit in bull & bear markets
Has anyone tried setting up algorithms/EA to trade economic data releases depending on whether the release was above or below expectations? Is the MQL5 economic calendar real-time or is there a delay for trading purposes? Which economic calendar do you think is best
  Efficient Trading System  (16   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
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
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
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
Hello, I am finding little difficult in understanding Trailing Stop loss . How does it work, does it take value from Stop Limit, Trade Entry Price or Current Price or Highest Peak in Favorable direction. After reading some blogs about Trailing Stop, This what i understand :- Condition 1: If the
What im looking for are other ways/alternatives of no loss Systems, pls dont get defensiv when hearing the word no loss strategys. The point is im looking for safer alternatives with the same Prinziple, we all know grid or martingale is primitive, just one sided price averaging with exponetiall
  Breakout Strategy  (16   1 2)
The way I trade breakouts is to first look for an area of resistance or support that has at least two touch points and when there is a break of this area I wait for a retest to enter. I am wondering if it would be a possible strategy to trade simple breaks of structure and changes of character the
Good day dear forum members. After reading the forum a bit, I came across several threads on arbitrage and pair trading . Judging by the threads, some are interested and some are trying it. I used to dabble in this topic a long time ago, but my knowledge was not enough. Now I am a complete mess in
Hello, I am new to coding and I cant seems to properly identify the trend direction using below codes. Your inputs is greatly appreciated. Thank you This is the logic: Trend Direction = 1 (if MA50>MA100 and MA50 last 3 candles is "Rising" and MA100 last 3 candles is "Rising" Trend Direction = -1 (if
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
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
  Economic Events  (4)
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
  modifying HFT EA  (1)
hi, i was wondering if there was any way I would be able to modify a HFT EA to only trade once a minuet so it wouldn't be considered HFT anymore so I would be able to use the EA on prop firms which allow EA"s but not HFT? and what time scale and rules determine if i EA is considered as HFT or not
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
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
  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
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 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
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...
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
  Neural network  (4)
Where can I learn neural network in mql5? Or which book can I use to learn neural network in mql5 or mql4
I used to be able to read news on forexprostools.com, but now getting error 5004, "cant load file"..... has something changed there? Here is my code: string ReadCBOE() { string cookie= NULL ,headers; char post[],result[]; string TXT= "" ; int res; string investingUrl=
Hello, I am scripting an EA to send post request using sockets in mql5. void OnTick () { Print ( "history-->" , HistoryOrdersTotal ()); int socket = SocketCreate (); // Check the handle if (socket != INVALID_HANDLE ) { // Connect if all is well if ( SocketConnect (socket
Is it possible to get a huge slippage during strategy testing? I've been testing an EA on M5 XAUUSD chart and found that the test account was stopped out due to a huge slippage. The stop loss level was about 160 pips, but the filled price was about 1080 pips, which was about 7 times the SL distance
Hi, I wan to ask about buy and sell or entry price. I've heard about the word 'buy at the ask and sell at the bid' but there's no one talking about spread. Using the code below I want to know which one is correct between adding spread or not. void OnStart () { int distance = 100 ; double entry
Hi Everyone, I'm developing my EA. The thing is that I want to make only one trade each time. How can I check If the current trade is open in order to avoid the enterTrade functionality while it is opened? And also I've noticed that I had some problems related to "failed market sell 0.1 XAUEUR sl
Hello guys! I created that topic because I am having some issues trying to set an expiration date in my orders. I am using the MT5 Python API, and that´s the structure: request = { 'action': mt5.TRADE_ACTION_PENDING , 'symbol': [stock symbol], 'price': [price] , 'sl'
Hi - is it possible to add more than 1 MQL5 signals to the same MT4 account? If yes, please provide some tips, pls. And can you trade say 90% of the account funds with one signal and say 40% with the other signal? Thanks
anyone can make a Simple EA from this alert indicator and when it alerts to place the order? based on alert message notification
Hello, I'm trying to verify the settings of the Options > Signals tab via MQL5. Is there a way to do it? The signal subscription keep disconnecting and I need to monitor that. Thanks
  Strategy Tester  (14   1 2)
Is there a way to test all time frames in one run, that out puts all results per time frame?
wanted : encrypt a string using AES256 method, format the encrypted data into hexadecimal string, then decrypt it again using same key into the original string. here's my try uchar src[], dst[], key[]; string Original_text = "bla bla bla" ; string SKey = "012345678901234567890123456789AB" ; string
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 really...
Having trouble to opening sell trade on all currency that the second currency is JPY (AUDJPY, NZDJPY, etc). I've check stop level I've check freeze level I've check calculated lot against min lot I've check stoploss price above open price and take profit price I've check take profit price below open
I am trying to code my own triple exponential moving average. Here is what I have: tema1ema1 = MathMean(typical); //typical is an array for the last 20 bars where 0 is the most recent for ( int i= 1 ;i< 20 ;i++) { tema1ema1 = typical[ 19 -i] * . 0952 + tema1ema1 * . 948 ;
I am trying to code an expert advisor but I don't really know how good different indicators are. I'll end up throwing a couple in there and seeing how well it does, but if anyone has any suggestions on where to start I'd appreciate it
Hi, I am looking for a regular macd indicator in which I can set an alert in MT5 when the signal line crosses the 0 line. Regardless of the direction of the 0 line crossing. Signal generated after candle closed. It used to be on the forum, but I've been looking for a few days and haven't found it. I
Sir, I created this Volume Indicator but I am getting error " Array out of Range ". I have some wronged this Source code. Please check this 👇 #property indicator_separate_window #property indicator_minimum 0 #property indicator_buffers 3 #property indicator_color1 clrBlack #property
Hey guys! Title says all. The thing is a want to load an indicator to the chart using ChartIndicatorAdd . Some of them are oscillators - but I don't know which ones I'm loading are oscillators and thus should be loaded on a subwindow. How can I do this? I looked into the documentation, but couldn't
#property strict enum EMyCapitalCalculation { FREEMARGIN = 2 , BALANCE = 4 , EQUITY = 8 , }; enum EMyRiskCalculation { ATR_POINTS = 3 , FIXED_POINTS = 9 , }; class CMyToolkit { protected : virtual void _Name() = NULL ; // A pure virtual function to make this class abstract public
Hello, Can you help identify what the type of the indicator is this? Seems (and in the indicator's description it says so) like just three Moving Averages, the first MA with applied to high prices, the second MA with applied to median prices and the third MA with applied to the low price. But not
Hi everyone I have written a code to create 2 graphical objects of type OBJ_TEXT as per the picture bellow The first object is an arrow (using Wingdings Font Type) placed at the last low and right bellow it is a text. My question is the following . What is an efficient way to determine the spacing
//---- the indicator will be plotted in the main window #property indicator_separate_window //---- three buffers will be used for the calculations and plot of the indicator #property indicator_buffers 4 //---- only one graphic plot is used #property indicator_plots 1 //---- the indicator should be
Hi there! Attached you can see a source code of a good indicator which I am using by myself. Unfortunately this indicator has no push alert option for mobile terminal and I'm not into coding at all. Is there somebody who can please code a push alert into this indicator? I would appreciate it a lot
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
good day. I recently saw this arrow on a Chart. I searched in Wingdings and I can not seem to find it. how is it placed. and how can i put it into mql4 or mql5
Dear Fellows I am getting following error and have no idea, how to resolve it. Search on forum/google did not help much. 2023.12 . 13 19 : 31 : 45.367 iStochRSI (US30,H1) Not all data of RSI calculated ( 38018 un-calculated bars ) Regards
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
Hi, I'm testing some features, and am stuck trying to use data from another indicator using iCustom() The goal is that I want to pass applied price or an indicator handle to iCustom, but in that Indicator it always returns value = 0. My TestMA indicator works without any problem Specifically here, I
Good day everyone. Firstly, I appreciate everyone who have contributed on this forum. Thanks a lot I need help with a particular arithmetic. I want to add some values together In mql5 , the value might be currently unknown, But would be known during the execution of the code For example, If want to
MQL Plus Enhanced Debugging Support : An (optional) include file to enhance debugging experience. Author: Dominik Egert
No Loss EA - No Indicator, No Price Action strategy for MetaTrader 4 : This strategy eliminates the need to rely on indicators, candlestick patterns, chart patterns, or any price action. This EA employs a progressive system that I have been using for the past six months and have backtested for over
  Experts: Hedging Martingale  (54   1 2 3 4 5 6)
Hedging Martingale: Hedging Martingale opens two trades of buy and sell together,and uses the martingale method. Author: Aharon Tzadik
New article How to Access the MySQL Database from MQL5 (MQL4) has been published: The article describes the development of an interface between MQL and the MySQL database. It discusses existing practical solutions and offers a more convenient way to implement a library for working with databases....
Boa_ZigZag_Arrows_Duplex: Two Boa_ZigZag indicators with different periods, which appear as arrows on one chart. Author: Nikolay Kositsin
Check out the new article: Learn how to deal with date and time in MQL5 . A new article about a new important topic which is dealing with date and time. As traders or programmers of trading tools, it is very crucial to understand how to deal with these two aspects date and time very well and
Check out the new article: Developing a Replay System (Part 27): Expert Advisor project — C_Mouse class (I) . In this article we will implement the C_Mouse class. It provides the ability to program at the highest level. However, talking about high-level or low-level programming languages is not
Check out the new article: How to create a simple Multi-Currency Expert Advisor using MQL5 (Part 5): Bollinger Bands On Keltner Channel — Indicators Signal . The Multi-Currency Expert Advisor in this article is an Expert Advisor or Trading Robot that can trade (open orders, close orders and manage
Check out the new article: Integrate Your Own LLM into EA (Part 1): Hardware and Environment Deployment . With the rapid development of artificial intelligence today, language models (LLMs) are an important part of artificial intelligence, so we should think about how to integrate powerful LLMs into
Check out the new article: Developing a Replay System (Part 26): Expert Advisor project — C_Terminal class . We can now start creating an Expert Advisor for use in the replay/simulation system. However, we need something improved, not a random solution. Despite this, we should not be intimidated by
New article Handling ZIP Archives in Pure MQL5 has been published: The MQL5 language keeps evolving, and its new features for working with data are constantly being added. Due to innovation it has recently become possible to operate with ZIP archives using regular MQL5 tools without getting third...
  Indicators: SL&TP Values  (32   1 2 3 4)
SL&TP Values: Indicator displays the value of defined stop loss and or take profit in the deposit currency. Note: It calculates an estimated value based on a simple calculation and does not take into account brokerage commissions. Author: MhFx7
MQL5 Version of Position Size Calculator - Based on VP Money Management rules: MT5 (MQL5) Version of Position Size Calculator - Based on VP Money Management rulesThis version has been tested and works in both versions; in MT4 (MQL4) as well as in MT5 (MQL5).See the original MT4(MQL4) only version...
Check out the new article: Data Science and Machine Learning(Part 20) : Algorithmic Trading Insights, A Faceoff Between LDA and PCA in MQL5 . Uncover the secrets behind these powerful dimensionality reduction techniques as we dissect their applications within the MQL5 trading environment. Delve into
As the title says, are built-in indicators pre-computed in the strategy tester? I was wondering if the only overhead for theses indicator functions (i.e iMA) is just extracting the values from the buffer? I couldn't find anything the documentation, but I don't want to assume things
I was looking in the documentation and I only find run-time casting (<dynamic_cast>) but I was wondering if static_cast is available in MQL4? If not, is there a workaround to implement static polymorphism in MQL4
The MetaTrader 4 platform update will be released on Friday, February 23, 2024. This version provides error fixes and platform stability improvements. The update will be available through the Live Update system
As in topic what is the difference between them? Documentation in mql5 seems to be avoiding proper definition and examples for extern type
Hello, Even when Automated Trading setting is turned off, EA functions are getting called. Is this normal? or it due to some error?. if ((!Close_Buy_Limit) && Buy_Limit && trades_count(BuyLimitMagic) == 0 && istochastic_16 > up_level) { ResetLastError (); gTicket = OrderSend
The tooltips created with OBJPROP_TOOLTIP in MQL4 disappear after 20 seconds. I'm wondering if there is a method, through MQL4 programming, MT4 settings, editing specific configuration files, registry tweaks or even using the Windows API, to extend the length of time these tooltips remain visible on
In this thread I want to begin to help those who really want to understand and learn programming in the new MQL4 and want to easily switch to MQL5 - the languages are very similar. This blog will be a good place to discuss tasks, algorithms of their solution and any other questions concerning MT
[Deleted]
does anyone have pivot point indicators for quarterly and half yearly levels or can any programmer modify yearly pivot to quarterly and half yearly pivot dividing the year into four quarters the first begin at january and february and march and the second quarter include april and may and june and...
Hello Support and all, I've found problem of no any alert sounds from MT4 after update as build 1408. I've confirmed all setting for sounds are Enable (Option-->Events-->Enable for all). I've confirmed MT4 teminal for 2 brokers with 1408 update have the same problem, while MT4 teminal for other 2
Hello guys, can sameone help me? I have this indicator that give me sentiment %, i use iCustomCall to have data % but i dont receive values, looking in the chart there is no buffer values and no data object. How can i manage it
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
Hello, I coded an custom indicator which is already on the chart and working. I also coded a button (contains to that indicator) which should open the indicators properties when I click on that button. The button itself works fine (I tested him with Print()). I only need to know the function, method...
When using the MACD indicator on the chart it shows 2 values - a Histogram and a Signal line. If you use the iMACD() function to calculaute the MACD values you have 2 options - MODE_MAIN and MODE_SIGNAL. I have always assumed thet MODE_MAIN represents the Histogram values. Now to my dismay I
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
I'm not sure what I'm doing wrong but I'm positive it's because I'm new. When I try to open a buy or sell order other than instant execution the place order button is disabled. I can change the order to instant and sell/buy become available. It seems to be only when I specify a buy/sell limit or