MQL5 Algo Trading community — forex forum for traders and developers

I have used the mql5.com OAuth authentication for years, but all of a sudden the user endpoint ( https://www.mql5.com/api/oauth/user_info) returns the status code 400. I still successfully receive the tokens from https://www.mql5.com/api/oauth/access_token, but I just can't receive the user_info
I have been renting MQL5 VPSs for a while; super convenient and very affordable. However, recently I came across a situation I do not know how to fix: One of my VPSs has been running for a while demos from different EAs, but recently I used this VPS to host an EA in a real account. For over a week
  ArrayIsSeries  (1)
I am wondering what went wrong! here is the situation: writing an indicator, declaring a double array to be used as buffer, and it still shows that it is not timeseries!! double BufferInd; OnInit () { ArraySetAsSeries (BufferInd, true ); return ( INIT_SUCCEEDED ) } int OnCalculate ( const int
  GOLD, Gold and XAUUSD  (1100   1 2 3 4 5 ... 109 110)
Hi! Is it worth buying gold at 1130
We are preparing MetaTrader 5 module for Python. As with the R package , we are testing on simple functions to extract data from a running copy of the terminal. How you can test how it works: Install Python 3.7.6 x64 from https://www.python.org/downloads/windows/ with the %PATH% path included , Get
The Main Study MetaTrader module for integration with Python - documentation Python Releases for Windows - website MetaTrader5 : Python Package - website ---------------- The Article MetaTrader 5 and Python integration: receiving and sending data - the article MQL5 Integration: Python - the
Hi everyone, I wanted to know if the developers of Metatrader will be doing an upgrade to install metatrader5 for python 3.13. If yes, do you have any idea when it will be done. Thank you
I am new in trading, please help me out to setup metatrader5 to show values on the right side on the application. please see the attached to see what i am asking
WARNING: After you've synchronized your trading environment with your MQL5 VPS, you DO NOT NEED TO CLICK THE AUTO TRADING BUTTON AGAIN in your local MT5 terminal, because if you do, you will trade with your Expert Advisor twice and that is very dangerous! Because of this warning, I turned off the
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, When I insert a vertical line on a charts last candle (the one not yet closed) the time coordinate some times gets the current server time value instead of the candle open time. E.g. the figure below shows time coordinate for a vertical line inserted on H4s last vorking candle. The expected time
Hi, I see that that standard download of MT5 does not show commissions on each open trade line. Is there any way to add that so that it gives the same info as MT4
While investigating another issue, I came across the situation where I would need to see the results of macro substitution within the source file, or better their results. So I tried to make clang's preprocessor read and output the mq4/5 and included mqh files. But I am unsuccessful in making clang
I have challenges with MQL5. My funds matured but I can't withdraw. It counts days going in the negative direction after the 7 days they require for one to withdraw. Now I wanted to create a support ticket but I can't. The button is blank and cannot be clicked. Its been like that for days now. What
Hi group! I just subscribed to a signal, and the GOLD symbol for the creator is available as XAUUSD.pro and XAUUSD+, and for me it is available as XAUUSD. Could someone please tell me if there will be any problem when copying the deals? Is there anything I can do to add a "Dictionary" or define
Well you open two positions at the same time and price. So you close the loss/negative one as soon as you realized the trend. I can only think of swap if it took too long to find the trend
  Does a safe Martingale exist ?  (206   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...
Hi everyone, I've been struggling a bit with understanding the Forex trading times and spread variations, and I'm hoping some of you experts can help me out. My broker's website states that "server time and charts are GMT + 2 or GMT + 3 (when daylight savings is in effect)." The broker also
  Is trading a zero sum game?  (17   1 2)
Yes No
  Multi timeframe, what do you think?  (70   1 2 3 4 5 6 7)
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
Hello, Anyone tell me that, which trailing stop loss is best for Gold scalping in 5m, because when i set fixed trailing stop loss its hits and Trend wave goes up or down, so i eagerly want to know about any dynamic trailing stop loss, which will handle my Trade manager as long as trade
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...
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...
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
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...
  Trading Journal  (6)
What is the best way to journal in trading ? [Edited by moderator]
  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...
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
  Programming tutorials  (174   1 2 3 4 5 ... 17 18)
In our technologically advanced world, programming and computer science have become transformative disciplines that drive innovation and shape society. Programming, as an art form, combines creativity, logic, and problem solving to create elegant and efficient solutions. Fusion of science and
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
Newbie question I know..trying to place a leveraged buy order for stock RNG.N. Current ask price is at 32,950. Account balance is 103€ with the same free margin (no other open positions) and a 1:200 leverage. For 50 stocks this should be enough, right? Stop loss is not set. Still getting the "not
I have a custom symbol for heating oil futures. At times, historical prices have dropped below zero. It seems that MT5 will not accept negative numbers for prices (see image). Is there any way to load negative values or is this not supported
HI all, how can I recall CFD expiration date indicated in properties window? I tried with SYMBOL_EXPIRATION_TIME but I seem it's not correct. Thank you
There are plenty of resources on the internet with analytics. But I am interested in the opinion of real traders, not analysts. Please share your expectations and forecasts. Do not copy analysts' posts and insert links to them. I am interested in traders' opinions and news + links to the news, which
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...
Hi, I am trying to fix some issues with my martingale algo. The lot size isnt doubling after a losing trade The Total Profit/Loss for the day is not updating I have research the forum and Im still looking for the solution for this code, thank you #property copyright "Copyright 2024, MetaQuotes Ltd."
  OnTimer bug  (2)
There seems to be a bug with the OnTimer event. I'm trying to restart the timer inisde the OnTimer event and the first cycle after the restart is not executed. Let me show you an example: void OnInit () { EventSetTimer ( 2 ); } bool timer_set = false ; void OnTimer () { if (!timer_set) {
Here is the code for my iRSI and I have altered the period, RSI period etc and there are no errors with the code but it sets the rsiValue in line 2 as 10 constantly regardless of what the actual in-built RSI is. Any help? It was working before but I can't find the backup where it worked so I cannot
can anyone please tell me why this code is not running ,it is modification of one of my previous expert advisors, which are running perfectly fine but this one is not. i really need to solve this please help me,deadline is tight #include <Trade/Trade.mqh> // Include the trade library for trading
  Objects in MQL5  (2)
Hello, I´m stuck with my code. I always get the "invalid pinter access" failure and I can´t fix it. Would be great if someone can see where I´m going wrong. class CAOI : public CObject { public : ENUM_AOI_TYPE type; datetime time; double highAoi; double lowAoi; }; CArrayObj aoiMn; CArrayObj
Hello All, As an example, I'd like to display an indicator created by an EA on the parent chart. I can do this using the below code, I worked this out with a little help from Google and on line help, so you'll probably recognise the code (ish). Here is my open code: /* open_indicator() * *
Hi All, I would like to ask is it possible to create the code for martingale strategy with BE/trailing stop. is it possible to calculate the BE with min profit + trailing stop. and those calculation will update all the same symbol and position at the same time. is it possible and is it can test in
I have a code. I want order Buy Limit. But when used For loop find entry buy limit. Have more order at same price. for(int i = 0; i < ArraySize(Dinh); i++) { if(CountLevel(Dinh[i])=0){ trade.BuyLimit( 0.01 ,Dinh[i], NULL ,DinhtoFVG[i],Dinh[i]+ 500 * _Point ); }} How to have only 1 order at a
Good morning Apparently there are two ways to code indicators for EAs. The first, put all the indicator code in the EA code. The second, put the indicator code in an indicator and call it via icustom() or CreateIndicator() I am clearly in favor of creating the indicators in an indicator and making
Hi, The documentation of SocketSend is really poor about the function behaviour : It says that the return value is the count of byte sent, but it does not say if it always 0 or the len of the buffer. Is there situation where this value could be different, and the socket still open ? And in this
Hi all Please may i have urgent help here. I have an EA running on MT5 since Thursday, it executed and managed trades as expected, but on the last 3 candles of Friday, it didn't switch positions, it held the position, when i run the back test for friday, it shows the correct changing of positions
Hi, I would like to know how to know if the market I trade is closed or no currently using the MetaTrader5 library on Python? Any ideas? (The order_check function doesn't detect that the market is closed so it makes me send the order when market closed) Thanks in advance
Hi, during optimization I need to calculate the Sortino indicator, but for Equity. For Balance it is simple: based on the history of deals. Please suggest strategies on how to collect equity data during optimization, so that the data can be processed in OnTester(). Thx in advance, Koval
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
Cant seem to figure out why I am not getting a good response from the mt5. 2024-10-11 08:42:42,641 INFO worker.py:1786 -- Started a local Ray instance. Initialized MetaTrader 5 (downloadasset pid=16728) Fetching data for ticker: GBPJPY (downloadasset pid=16728) No data available for GBPJPY. Error
Hi all, I would like to ask for a feature in MQL5, basically a counterpart to the "IndicatorSetDouble" method that allows to get the values. Ideally it would work like the "IndicatorParameters" method, so that one can pass an indicator handle and the double property values are returned accordingly
Hello, I am attempting to create an exponential moving average indicator but i am having an issue with the performance. I am using tradingview.com with the indicator "deloreanEMA" it has 5 EMA indicators. sample of 5, 13, 50, 200 and 800. The 15 minute chart below shows what the ema indicators look
Hi guys anyone can explain me why this indicator not plot nothing ? //+------------------------------------------------------------------+ //| CorrelationIndi.mq5 | //| Indicatore per calcolare la correlazione tra due strumenti
  RSI + BB + EMA  (1)
I took my own crack at coding today. This is supposed to be an indicator that connects BB and an EMA to the RSI indicator data that will be displayed in one indicator window. However, after fixing all of the errors Meta Editor has given me, the indicator window shows up blank on my chart. When I
  MACD indicator  (1530   1 2 3 4 5 ... 152 153)
We are continuing discussion about the indicators. We have the following thread: https://www.mql5.com/en/forum/175886 https://www.mql5.com/en/forum/177239 https://www.mql5.com/en/forum/177358 https://www.forex-tsd.com/forum/debates-discussions/9785-rsi-indicator https://www.mql5.com/en/forum https...
I can't find this MACD for MT5. I tried the built-in MACD, but it seems to be different from the image I attached. So, the question is, where can I find the MACD that shown in my image
I'd like the ability to add lines a certain number of pips from the MA line, like the below image, but I don't know how. I've written the code (below) for the colour-changing MA, but I'm hoping someone would help me add the extra lines 200 pips from the MA in either direction. //--- indicator
Hi, I Need assistant the indicator script thatni generated from chartgpt.. this are my values below. Code me a RSI and CCI MT5 indicator with the following parameters. RSI input 1color blue, Level 10. 90, 80, 20 and 50 CCI input 5000 with color red Send a pop-up alert when CCI input 5000 touches RSI
Hey guys, how can I anchor a text to a vertical line. Any hints to go about it? I created a line for every hour. Works great. Now when I create a text I want to anchor it to this line. Ideally to the bottom with offset. And when I change TF or zoom in or out it should always keep this relative
Hi, I'd like to know how can I know, within an indicator's OnCalculate, that the current bar is finished (that is, no new ticks will be send to that bar) without having to wait for a new tick, a new call of OnCalculate, addressed to the next bar. The scenario I have in mind: I have an indicator that
Indicator not showing arrows to indicate when to buy , sell , close buy , close sell . please help
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
  ADX indicator?  (253   1 2 3 4 5 ... 25 26)
Hi, Was wondering where I could get my hands on the ADX indicator with color changing when above a certain level
I have an mql4 indicator code but i wanted to convert into mql5. I changed the old start() -> OnCalculate(), solve all the time,Bars,High,Low function but i think missed some array modification because i get all the time "Out of Array " error and i don't know what i missed, because the same code is
I just downloaded .mq5 from mql forum and when I double clicked it, it opened meta editor. My question is how can I apply the indicator(mq5) to the current chart in MT5 desktop? I'm really clueless
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: Livio Alves
Check out the new article: Developing a multi-currency Expert Advisor (Part 12): Developing prop trading level risk manager . In the EA being developed, we already have a certain mechanism for controlling drawdown. But it is probabilistic in nature, as it is based on the results of testing on
Check out the new article: Reimagining Classic Strategies (Part V): Multiple Symbol Analysis on USDZAR . In this series of articles, we revisit classical strategies to see if we can improve the strategy using AI. In today's article, we will examine a popular strategy of multiple symbol analysis
  Scripts: Close-All  (41   1 2 3 4 5)
Close-All: A script to close all market positions and/or pending orders. Author: amrali
Trade Copier - Open Source - Multiplatform - Transmitter Side: Trade Transmitter will Transmit Trades from MT5 Demo or Real accounts using CSV Files. Each trade request created manually or by other EAs on MT5 terminal will be automatically transmitted. Positions and orders summaries are also
Check out the new article: Creating an MQL5 Expert Advisor Based on the Daily Range Breakout Strategy . In this article, we create an MQL5 Expert Advisor based on the Daily Range Breakout strategy. We cover the strategy’s key concepts, design the EA blueprint, and implement the breakout logic in
CHistoryPositionInfo Class: A class for easy access to the closed position properties. Author: amrali
HistoryPositionInfo version 2: Returns the profit of a position in points, as well as commission, swaps and profit in money based on the trading history. Author: Vladimir Karputov
Perfect Seconds Chart : Perfect Seconds chart indicator allows you to convert minute candles of live data into seconds. 1. Choose any number of seconds to close a bar with accurate time. 2. This is Live OHLC rates based data, It works even if ticks are not available. 3. No external DLL required, it
  Experts: Grid EA Pro  (18   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
Simplified "EuroSurge" Expert Advisor (EA) for MetaTrader 4 (MT4) : This expert opens trades based on signals from multiple technical indicators. Author: Bernard Petrus Le Roux
Check out the new article: Integrating MQL5 with data processing packages (Part 3): Enhanced Data Visualization . In this article, we will perform Enhanced Data Visualization by going beyond basic charts by incorporating features like interactivity, layered data, and dynamic elements, enabling
Check out the new article: Gain An Edge Over Any Market (Part II): Forecasting Technical Indicators . Did you know that we can gain more accuracy forecasting certain technical indicators than predicting the underlying price of a traded symbol? Join us to explore how to leverage this insight for
  Indicators: iForexSessions  (65   1 2 3 4 5 6 7)
iForexSessions : Highlights the Forex Market Sessions (Sydney, Tokyo, London, New York). Author: amrali
Local Timezones and Local Session Hours : Class to access to the local time for the specified location, as well as time zone information and the local trading session hours. Author: amrali
Hi Can any of you add alerts to the attached code as tried using AI tools but all are producing code which are giving continuous alert but not whenever a new arrow is appeared , want to automate this using MX2
Dear Support, I have a technical question. If an indicator automatically uses higher timeframe candles (for example, M1 chart uses M15 candles, M5 chart uses M30 candles, etc.) and the indicator runs on a chart where I change the chart symbol to one that I loaded a long time ago, even though I can
  Coding help  (7909   1 2 3 4 5 ... 790 791)
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
Hi, I'm teaching myself how to program in mql4 and while working on an indicator I came across this problem on line 83. MaxH = Prices[ ArrayMaximum (Prices,period,i)]; the compile error is: 'MaxH' - some operator expected I wondered if anyone could give me some advice as to what I've done wrong
How can I download my transaction or trade history in csv or xl
For some reason the top part of MT4 is white . No longer blue (or red when in loss ) . Any idea why and how it can be corrected? I even uninstalled MT4 from my phone and reinstalled it. That didn't work either. I'm using an S24
hi everyone can somebbody convert mt4 indicator to mt5 indicator
  How to Deal with Bar0 ?  (12   1 2)
Hi coders, I have a technical issue that I cannot resolve it. I have an entry condition as follows :- double Hi0= iHigh (sym, 60 , 0 ), Hi1= iHigh (sym, 60 , 1 ), Lo0= iLow (sym, 60 , 0 ), Lo1= iLow (sym, 60 , 1 ); bool BuySignal= ... && Lo0>Lo1 && ...; bool SelSignal= ... && Hi0<Hi1 && ...; To
Hi; wrote this code that will send order entry confirmation to monitor screen and cell phone. if (TimeStamp != Time[ 0 ]) { SendNotification ( "SELL Order Possible! / " +Currency); MessageBox ( "SELL Order Possible! (" +Currency+ " /
[Deleted]
  open order after TP or SL  (22   1 2 3)
Hello, I have tried without success to get an order opened after my current trade stop loss or take profit has been hit. Here are my requirements. I currently enter a trade where my ea sets the stop loss and take profit. I wait for the market to hit either my stop loss or my take profit and when...
Hello in the mt4 we have fibonacci retracement tools for point C we can use of static retracement of percentage that is not exact I need tool for calculate point C with exact percent of retracement is there Indicator , EA , Script or anything can help me do that? I attaced picture for more detail "I
Hi All, I am trying to find an indicator similar to One-Sided Gaussian Filter w/ Channels [Loxx] on TradingView in MT4. Anyone get a chance to build similar indicator
Hi, this EA must read a custom indicator with iCustom, when I charge the EA for the first time it read correctly the Buffers, but after a couple of bars the same reading returns EMPTY_VALUE, as you can see from the Comment. See photos Pre (when EA is loaded) and Post (after a couple of new bars)
I have done amount version of my EA and done amount of backtest, some results are good some are bad, I dont sure which result is much closer to live account. My EA is only for crudeoil or usoil in 1M CHART with 1:100 account. "Spread: 50 pip for 0.xxx / 5pip for 0.xx" I have apply a features to this
Hi I would like to incorporate a trading rule that when price is below a certain price for instance USD JPY 148.37 then it will allow a sell based on other parameters. The EA would run on the time frame and currency. I have all the coding for the mechanics of the sell etc. I just can't find how to