MQL5 Algo Trading community — forex forum for traders and developers

void OpenSellPosition() { double lowest_values[], highest_values[]; CopyLow ( _Symbol , _Period , 0 , recent_lows_period, lowest_values); CopyHigh ( _Symbol , _Period , 0 , recent_high_period, highest_values); double entryPrice = iLow ( Symbol (), Period (), 1 ) * 0.9998 ; double
I wrote a function for a trailing stoploss and the logid seems air tight. however while testing, the stoploss is stuck an interval away from the current price no matter which way it moves. what could be the problem? heres the code (MQL5) Help would be much appreciated.. void SLmodify() { //
Hello everyone, I am currently developing a custom indicator in MQL5 which utilizes multiple Exponential Moving Averages (EMAs). However, I am encountering a parameter count error with the iMA function and need some assistance in resolving it. The code is intended to calculate four EMAs (5, 10, 20
I use Copilot help me make code first time. Today it doesn't work. "too many tokens sent, change Maximum tokens". But Tools Option is maximum setting. My "prompt" isn't long. It was worked yesterday. Someone else have problem
This thread will discuss undocumented methods of working with the mql5 language , examples of solving certain problems. It would be desirable, that this branch on the maintenance was closer to FAQ, than to discussion. I suggest that all experienced programmers share their solutions and programming
I just noticed that my rating has dropped by around 20000 points recently. I wonder what might be the reason and would it be possible to restore my rating
Hello, The fonction I've written bellow should count the total profit filtered by current symbol and magic number but not working... please help , thank you in advance //+------------------------------------------------------------------+ //| ProfitHistory
Is there an issue with the live servers? My demo account connects with no issue, however, I can not connect to any live server
  Vps  (3)
I have been using mql5 vps for 1 month and it is about to run out. I want to extend more, how to do
The purchased tab is only showing the last two purchases I made some time ago, I can't find the other items even when searching through the store's tab, but I can find them when searching using the browser. I received an update notification, but I can't update it this way
I do not understand the purpose of creating these two types of rectangles: OBJ_RECTANGLE_LABEL and OBJ_RECTANGLE Ultimately they look similar. The OBJ_RECTANGLE_LABEL does not even give a preference to write text on it, how is that a label? OBJ_RECTANGLE_LABEL and OBJ_RECTANGLE are simply 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
Hello Community, I tried building an indicator that shows the range of two moving averages. The indicator is designed to have 3 buffers and 1 plot, with the plot being a single line showing the range data. The goal is to be able to track proximity to the crossover. Need help please. Below is my
  Where Do I start from?  (126   1 2 3 4 5 ... 12 13)
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?
  indicator  (3)
i have have built an indicator it compile well without error but it doesnt seems to trade its only profiling in the charts. Like for example i press ide run it history or real time it doesnt give anything. if someone could help with that it would be nice
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
int Consecutive( int Count) { //--- int BB = 0 ; for ( int i = 1 ; i <= Count; i++) { if ( iClose ( _Symbol , PERIOD_H1 , i) - iOpen ( _Symbol , PERIOD_H1 , i) > 0 ) { BB++; } else { BB--; } } //--- return (BB); } Besides using
Hello everyone, I am running a python code to trade on mt5 IC markets and Fusion Markets. I want to know what should I do, where to run the code to have the least latency, currently running the code in equinix NY, where they both have a server but still its slow. It shows 0.5ms in the bottom right
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...
  Volatility Expansion system!  (160   1 2 3 4 5 ... 15 16)
There are so many systems out here based on indicators and it takes so much time to go through all of them to see which one deserves merit,I simply did not feel like adding one more. However most are indicator based and lagging indicators make it difficult to really simplify trading decisions and
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
Hello, i need create backtest with MA, MACD and Stochastic indicators on daily historical data BTC/USD. I created custom symbol based from EUR/USD and than I changed them to BTC/USD. AFter that I imported the daily historical data to the current symbol. But if I try to make simple backtest than I
Hi everyone, I need support because I'm noticing a problem with my custom indicator. The indicator provides me with a KPI that updates for each new bar. I based an expert on it who, based on the value of the previous bar compared to the current one, must do or not do operations. I had the doubt that
  Something Interesting to Read  (131   1 2 3 4 5 ... 13 14)
This is the thread about books related for stocks, forex, financial market and economics. Please make a post about books with possible cover image, short description and official link to buy (amazon for example). Posts without books' presentation, without official link to buy and with refferal links...
  Mr.Nims, Renko Ashi Scalping System.  (3550   1 2 3 4 5 ... 354 355)
Renko Ashi Trading System 2 Please read the pdf manual for this system. Good luck everyone. PS: Reuploaded the fixed ma in applied price indicator. Special thanks to FXchaser PS: Reuploaded the fixed macd alert indicator. Special thanks to Puzzlebird PS: Reuploaded a Special Settings Template for...
hi I would like to know if there is a good strategy when forecasting highs and lows (ohlc), any links that can help
Hello, I want to copy the signal but whiles I find it on the MQL5 website, it is not on my list of signals of the MT4 Terminal. There are copiers of that signal so it should be available somehow. Does anybody know how to copy that signal ? May be one of the subscribers ? Regards, Stephan
I have a question. As it possible to make backtesting strategy for the past I am wondering if its possible viceversa. So that you put trades in and take out the strategy? Thanks for ansvers
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...
SMC (The Smart Money Concept) is different way of market analyzing. I have a SMC strategy which is similar to the bellow example. All I want to know is can I code this thing into an EA or something else to trade automatically? I'm curious to know what is that technology / coding method. Honestly
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...
I would like to build futures trading mql robot (mostly focus on oil but other commodities interesting also). Unfortunately it's problem to gain hist. futures data, what's necessary for backtesting. So, I wish to ask: perhaps somebody knows where to receive ticks expired futures
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...
  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...
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
Hello to all and thanks from now. My code can send "Buy Market Orders" to Binace (SPOT) successfully, but only this. I'm trying to do the same for Sell, Limit, StopLimit, Getting Current account Info, etc. But I could not. I need the URL structure for the mentioned other actions. Is there anyone
what do you think about this: I'm doing it for other days .... but think I've hit hard with this one... I'm now testing with other symbols and random days (its all from a random day). This result is for 1 h time frame for 1 day
Hi everyone, I am looking for a trailing stop loss which is activated after after reaching a certain value and it moves repetitively. I try to explain with an example: I buy XAU/USD from 2025.0, SL to 2023.0 (20PIPS) and traling stop loss from 2028.1 (30 PIPS). When the profit reach 31 PIPS (2028.1)
I created several Expert Advisors and want to upload them to the market for subscription signals. They use several indicators in unison to detect reversals, break out and perfect buying and selling opportunities on Gold and Dogecoin. I have one version that strictly buys and sells, and another
i have a setup,which i trade manually, but now i want to make an expert advisor about it. but i do not have an knowledge about it, how can i do it please guide
Hello everybody, I would have a simple question about backtest... Is there a way to know the total of traded lots ? It is possible to know the number of trades, but I cant see the number of lots... that's all.. :) bye bye
Morning I'm traying to publish my EA, and after local testing, i don't find any error. But when i update to market, verification process say: test on EURUSD,H1 (netting) 2020.05.05 10:06:00 failed modify #6 sell 0.3 EURUSD sl: 1.09088, tp: 1.08857 -> sl: 1.09075, tp: 1.08857 [Modification failed due
Introduction Anticipating the unforeseen is a cardinal principle in the realm of automated trading. Despite the meticulous design and rigorous testing of trading algorithms, the reality remains that even the most sophisticated Expert Advisors (EAs) are susceptible to making erroneous trades
Hi, Can an Expert Advisor manage copytrading services (mql5, signalstart, etc.) ? For instance, one of its function could be to suspend/stop copytrading when a specific DrawDown is reached and then resume it after a specific time period. I know we'll likely need DLL imports in order to handle such
Lets say you have an array that stores 100 lot values . And you have 100 inputs of different lots. You have to create 100 inputs input Lot1; input Lot2; . . input Lot100; and then have to store them in the array LotsArray[ 0 ]=Lot1; LotsArray[ 1 ]=Lot2; . . LotsArray[ 99 ]=Lot100; I would do this
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
Can an EA be able to completely halt trading from all sources ? Signals, other EAs, manual trading, etc. If so, can it resume trading from all the previously halted sources ? Such EA would have complete power over the account so I don't know if it's possible
Hello, Any expert advisor or script out there that when I open a trade it automatically places stop loss based on Previous X Number of candles high/low (Buy order the stop loss will be on previous X number of candles low and vise versa) . And not tied to any pair (open for all pairs and markets) on
  ExpertMAPSARSizeOptimized  (11   1 2)
Hi, does any artical talk about MT5 build in EA Sample ExpertMAPSARSizeOptimized? It is wriiten in pure OO style, but metaeditor is not excellent enough as Eclips or VS studio now. Sometimes i feel reading MQ5 OO program using metaeditor is just like using Notepad. :) I cant get the point of the...
Please help How to copy from one dimension array directly into the second dimension array of multi-dimension array, without using looping ?? Or is it possible to copybuffer from indicator result into the second dimension of multi-dimension array ?? Thank you
I have attached two order block scripts that I coded. Any kind soul willing to help turn it into a indicator. Am sure the community will benefit from such kindness
Hi Writing my first EA, steep learning curve but managed to get so far with it using various online sources to sort through most issues. Come across a few issues when using the PVT indicator that I can't explain or find the answers to. EA is running ok but results are not correct and what I have
Problem ObjectName() does not work as per the object list index. I wrote a script to display the names of all objects on the chart in the new order on the terminal, referring to the documentation of ObjectName(), but it does not work in the order of the object list. What I want to do I want to know
Good Morning Please I would like to know what code to type for putting a MA on Stochastic indicator . I want a MA that will be in the second indicator windows with the stochastic indicator. And when the MA will crossover and close below the sell zone or the buy zone of the stochastic indicator it
  Dynamic zone indicators ...  (1585   1 2 3 4 5 ... 158 159)
It seems that David Stendahl can not help him self Where his name appears "attached" to some indicator or TA way, it sure is worth trying it out and studying it. The basis for these were originally published in the Stocks & Commodities July 1996 issue (attached the original article here). Do not be...
Hi everyone. I am currently using Supertrend on TradingView and a similar indicator in MQL5 with the same formula, but the middle line between the two is different. Can someone help me verify which formula is correct to display the middle line similar to the indicator on TradingView? Thank you
how do I backtest an indicator, it doesn't work for me
Hi everyone, before you throw the handbook on me and send me away, please, I confirm that I have tried and done all the research possible. Maybe I have a simple misunderstanding in my edited code, but I can't figure it out alone. 1.) i took the ALMA Indicator V2 and all I wanted to do is to add the
hi. i want to calculate iStdDev on excel, so i tried to compare iStdDev value and my calculated value. at first, simply period=2 and increases 3, 4... SMA is no problem, but LWMA is not equal. (there is a correlation) Maybe EMA and SMMA are different too. so I wondered why. *calculation accuracy is
  Need help indentifying indicator  (2704   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...
  Everything about RSI  (1460   1 2 3 4 5 ... 145 146)
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
I made a simple candlestick chart in the separate window (DRAW_COLOR_CANDLES). I wanted to make a moving average in the same window, but when the buffers have very different values it causes the candlestick chart to scaled down so much that you can't see it anymore. Is it not possible to do what I'm
Hello, Dear sir or madam, Can someone modify this indicator to work with the current build of MT4? Thank you! Chris
  Issue to fix please in mq5  (11   1 2)
Hello i am coding indicator for mt5 And 1.after i launch it the buffers draws out of their values that i didnt load in code this is the first question 2.when i call time value in oncalcuulate indicator freez dont respod to other duals like onchert events or ontimer..etc 3.when i run this function it
  Indicators with alerts/signal  (15924   1 2 3 4 5 ... 1592 1593)
Some indicators with alert/signals with author's comments: - EMA-Crossover_Signal: Enter two Exponential Moving Average periods and it'll tell you when they crossed. - SMA-Crossover_Signal: Enter two Simple Moving Average periods and it'll tell you when they crossed. - SMMA-Crossover_Signal: Enter...
Harmonic AI Pattern : HarmonicEA is an Expert Advisor (EA) developed for MetaTrader 4 (MT4) that utilizes harmonic pattern recognition and RSI-based signals to identify potential trading opportunities in the forex market. The EA is designed to detect various bullish and bearish harmonic patterns
Check out the new article: Data Science and ML (Part 22): Leveraging Autoencoders Neural Networks for Smarter Trades by Moving from Noise to Signal . In the fast-paced world of financial markets, separating meaningful signals from the noise is crucial for successful trading. By employing
Get Nth Active Trade from the end in MT5 : This EA will scan all the open trades and then print the nth trade from the end Author: Biswarup Banerjee
  Experts: Forex Calculators  (37   1 2 3 4)
Forex Calculators: Margin Calculator, Point Value Calculator, Profit Calculator and Swap Calculator. Author: amrali
Get Nth Closed Trade from the end in MT5 : This EA will scan all the closed trades and then print the nth trade from the end Author: Biswarup Banerjee
Moving Average (MA) Crossover EA : This is an EA based on Moving average crossover. Author: Satyam Shivam
New article Neural networks made easy (Part 2): Network training and testing has been published: In this second article, we will continue to study neural networks and will consider an example of using our created CNet class in Expert Advisors. We will work with two neural network models, which show
Geometric Moving Average : MQL5 version of geometric moving average. Author: Sardion Maranatha
New article Synchronizing several same-symbol charts on different timeframes has been published: When making trading decisions, we often have to analyze charts on several timeframes. At the same time, these charts often contain graphical objects. Applying the same objects to all charts is...
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....
New article Native Twitter Client: Part 2 has been published: A Twitter client implemented as MQL class to allow you to send tweets with photos. All you need is to include a single self contained include file and off you go to tweet all your wonderful charts and signals. Attached is a working MT5
  Indicators: Equity Chart  (93   1 2 3 4 5 ... 9 10)
Equity Chart: The indicator displays the equity and balance charts. Author: transcendreamer
Indicator of Equity and Balance: The indicator draws the charts of equity and balance by the data of accounts history, it uses the current opened positions for updating the charts in the real time mode as well. Author: Игорь Корепин
Check out the new article: Ready-made templates for including indicators to Expert Advisors (Part 2): Volume and Bill Williams indicators . In this article, we will look at standard indicators of the Volume and Bill Williams' indicators category. We will create ready-to-use templates for indicator
Custom Bollinger Bands : Standard Bollinger Bands indicator with averaging features added Author: Lucas Moura Vidal Da Silva
  Good Indis =)  (14   1 2)
Hi, some good indis found in the internet (4shared) in this topic! First, a smoothed non-repaint version of macd indicator coded by igorad and mladen. Cheer´s
Hi, I would like to have the following structure: template < typename T> class RingBuffer { public : class AccessResult { public : bool valid; T item; }; AccessResult getAt(idx i) const; }; With this, I can declare a RingBuffer like this: RingBuffer<SomeFancyElement> elems; and
Hi all, I'm new to MT5/trading in general, still using a demo account. I was entering a trade into my trading log and looking at the the history tab it reads "Price: 153.837" on the left, then further along it states "Price: 154.475", now I went short on this trade so I understand it moved against
Hi all, i have developed a forex trading strategy that works on a daily pattern of events as well as signals, yes it is true!!, the problem is is that windows 10 does not like offline charts in a simulator and simply freezes when advancing backtesting speed. Windows 7 on the other hand will run the
Hello, Anyone knows the location of MT4's data folder for build 1417 released on 1 May 2024 ? For a M1 MacBook Thanks
Hello community, unfortunately, I'm too stupid to find out whether, and if so, how, I can achieve the following: Suppose I have a basket of positions: - USDCAD, Sell, 0.05 lots @1.36300 - USDCAD, Sell, 0.08 lots @1.36600 - USDCAD, Buy, 0.05 lots @1.36900 Is there a way to calculate at what price
Hi everyone, I'm Matteo, I have a question about backtesting on MT4. I need to backtest an EA on different cross at the same time... ...for example an EA on EURUSD and the same EA on USDCHF starting from 01.01.2024 to 01.02.2024 with the same capital. Is it possible? Or, maybe, is possible make two
I'm got a C# DLL that calculates my trades for MT4. It is compiled as x86 and uses RGiesecke.DllExport for unmanaged code. So far so good, but I'm not able to call any other class libraries from it. As soon as I instantiate a class in an external dll file (which I manually copy into the Libraries...
Goor afternoon guys, I am currently coding an Expert Advisor to automagically trade for me. I already got the indicators, their respective buffers, the names and all of them are on the correct folder. I am using the iCustom() function to read out the buffer values and perform calculations. So far so
Hi, I am trying to write code which determines which chart is currently on top, in MT4. For example, if an EA or indicator is running on a particular chart, how to determine whether the EA/indicator's chart is currently on top? I know that you can bring chart to top: ChartSetInteger(chartID,...
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
Dear friends I wrote an expert advisor in mql4, when I run in live account the expert put pending positions at wrong prices. I want to put two limit pending with 100pip distances to each other. in live account most of a time its work fine but some times it put both of them in same price. when I run
If you have questions about MQL4, MT4, MetaTrader 4, please post in this thread. Especially when your questions are related to trading functions
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
Hi, I'm trying to build my own EA using EMA. When the program starts it will buy/sell according to the relative position of slow and fast EMA. Then the program should close the trade at the next EMA crossover. My first obstacle was to find a way to calculate EMA at the closing of candlestick, so I