MQL5 Algo Trading community — forex forum for traders and developers

Hey guys, Im new here in coding, I tried to code together an EAm which simply uses the last 6 Candles, if thosse 6 are down-candles it opens up a long-position. That seems to work, but I cant get my EA to close that position on the next candle. I would be glad, if theres anyone who can help me on
MQL5.community is growing every day and in less than 2 years our site has changed beyond recognition. Today the mql5.com website includes the following sections: Documentation to the MQL5 language.Code Base with hundreds of indicators, Expert Advisors and scripts in MQL5.Articles on various...
Hi all, I am testing the same EA, on the same broker, same server, same settings, but two different accounts - One test results in 10 times more profit than the other? How is this possible? I am at a point where I do not trust the MT5 tester anymore. Please help
This will be used to see if the slave account (myfxbook) has the same performance as the master one (mql5). This allow you to spot any significant difference between the two accounts. In case the discrepancy is too big and not in your favor you might want to stop copying the signal. The only purpose
  Hedging Strategy  (2)
Hello everyone, I'm using an EA which is working based on hedging strategy. It put several pending orders at the same price, However after triggering prices are not the same. Can anybody help me to solve the issue
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
I am wondering if the broker can tell where the copy of mt4 is from and what ea's etc are loaded on the current platform. Thanks
  Forecast and levels for Oil  (255   1 2 3 4 5 ... 25 26)
Brent Crude Oil April-June 2017 Forecast: weekly correction with possible breakdown; 49.69 support is the key W1 price located above Ichimoku cloud in the bullish area of the chart. The price is on the secondary correction which was started in the beginning of January located within the following...
  Press review  (7276   1 2 3 4 5 ... 727 728)
This link provided to me by RaptorUK, give me the idea that it would be interesting to have a place here on the site to share such links. So I opened a new topic, it will be moderated to follow the rules as usual, but also about the content. Everyone can post but have to provide a quote and the...
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
hello unfortunately i entered wrong word in my name so how i can edit it can please some one guide me. and please also tell me that it can be issue for withdraw the payment in future
  Help please  (3)
Hello, I've been using an EA expert in MT5 since a long time for my main account. i just opened a new secondary account in MT5 and once I log into it the EA goes under the secondary account. is it a glitch or is it actually moving there? and any recommendation because I wanna open the same bot for
  test indicator  (1)
how i can test indicator mq5
How to enable trade_allowed=True by default I am getting False but we don't want set manually i want set this value by using python code please help
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! I'm considering to build a portfolio of diversified forex pairs to be traded with an EA, my account currency being USD ( IC markets and Eightcap as brokers) E.g. I'm thinking of EURUSD, GBPUSD as main pairs and AUDCAD, NZDCHF for diversification purposes as an example. Though, wouldn't this
Hello I uses below function for calculate lot size in MQL5 for use simple OrderSend (symbol EURUSD_i and Alpari broker). double dblLotsRisk( double dbStopLoss, double dbRiskRatio ) { double dbLotsMinimum = SymbolInfoDouble ( _Symbol , SYMBOL_VOLUME_MIN ), dbLotsMaximum =
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
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
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
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 I have the following code that calculates the open orders in a given Timeframe, but I don't know how to count also the pending orders. int TradeCount( ENUM_TIMEFRAMES TimeFrame) { int Cnt; ulong Ticket; long EntryType; datetime DT[ 1 ]; Cnt = 0 ; if ( CopyTime (
I want to use Multiple indicators each responsible for either CheckClose or CheckOpen() of standard library of ExpertSignal.mqh in the source of ExpertSignal.mqh there is parameter called m_direction in the Direction() function which works with a mask and another called m_ignore now that I want to
Please help me what could cause subjected error while running the strategy tester
Hi there! I´m coding an EA which uses pending orders - i know that some people find that EAs shouldn´t use pending orders but it makes sense for my logic - and i want to modify its price depending on the last high/low. Im having trouble with the trade.orderModify parameters count. I´m using it the
Hi everyone, I hope you are fine. I am having a hard time with the following error. I get an error cancelling an already placed pending order due to invalid stops.... 2016.05.12 06:00:00 failed cancel order #226 sell stop 1.20 EURUSD at 1.14209 sl: 1.14462 tp: 1.13653 [Invalid stops] Why am I...
Can you tell me if this is a realistic tester figure? And is this a good or bad result for a year with a deposit of $3,000
I've searched all the MQL5 market looking for an Expert which can do (Multiple Close By) with the ordinary closing actions like (close all, close pending orders, close only buy, close only sell, etc.) I didn't find a one that can do this important feature (Multiple Close By) I know that not all
Does anyone know why timeout whrn performing a webrequest is ignored? Looking the documentation ti says, timeout in miliseconds. Any value I use, 1000 (1 sec), 2000 or 100000, any value, it is always taken 10 to 12 seconds. Thanks for any input
Hi All, I am having this error when calling OrderSend function . I hope someone can help me. This is error log : 2021.11 . 11 04 : 10 : 45.254 TEST (EURUSD,M5) Alert : Open market order: Error 10013 - Invalid request 2021.11 . 11 04 : 10 : 45.254 TEST (EURUSD,M5) MqlTradeRequest - action: 1
  Canvas is cool!  (942   1 2 3 4 5 ... 94 95)
I set myself a task: to demonstrate the capabilities of custom graphics via CCanvas class in a short code. Here's what came out of it. This script works in both MQL5 and MQL4. But it is much faster on MT5. Each frame is unique and does not repeat, i.e. the script is not cyclic. #include
Hi everyone, I have an odd question about something I have noticed in the strategy tester. I am using a bitcoin as my deposit currency (since I am trading BTCUSD and want to ensure my fees are calculated in btc). Next to the deposit section, there is a dropdown box with a value selection between 0
Hi all, I've read lots of conflicting information about this question so i'd like a clear and simple answer if possible. Are commissions and swaps taken into account during the MT5 strategy tester and optimization process? I see a column for commissions in my final backtest report, however it is
I am using MetaTrader 5 for python and regardless of the specified range, symbol and timeframe, copy_rates_range() almost always returns 0 or 1 bars. In the docs they say it's normal for the first call and that the requested data will be ready for subsequent calls but it just never is
I have been using AI to create custom expert advisor for my needs, I have provided code below for the custom EA that should send alerts to my telegram channel. There is no error in compilation. This ea sends initial message that "Alert system initiated" to my telegram which means that the API and
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
This was introduced in a recent update, didn't used to work like this. When I'm debugging, I'm focused on the problem at hand. Filling the screen with variables that are irrelevant to the problem just amounts to noise. I delete all the ones I don't want, but the very next F10 puts them all right
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
I'm just genuinely interested in your opinion. What is it which makes an indicator a freebie, and what is it which makes an indicator have a cost attached to it
I'm talking about oscillator based indicators, and by normalization I mean that the plot is in a stable range and the 0.00 level remains directly in the center of the window. My knowledge is limited on this, but I figured out that if you have a plot ranging from a negative value to a positive value
The follow indicator was modified to works in MTF But it makes the graphic slow and freeze Any body have a ideia how to avoid it ? #property copyright "Copyright © 2015" //---- indicator version number #property version "1.00" //---- drawing the indicator in the main window #property
I've seen one for mt4 which I use and it's really nice and simple and even free. Just surprised I can't find the same for mt5. Anyone know of one
For an indicator that was not how it was described I have politely asked the seller ... no response
I have made an indicator that will show me valid highs and lows following a certain logic. But when after a while (maybe some hours) when i have it on the chart it will start to do weird things, draw lines that shouldn't be drawn, or delete certain line without any logic behind it. I have used the
  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
Hello, By reading through this website i am trying to make a (hopefully) very simple indicator. This is for learning purposes as I am a total beginner. My first step is that I want to store the closing price in a variable at a specific time. Later on I want to compare this closing price to a closing
I've got two indicators I'm experimenting with, having not plotted a histogram before. The first one works but was just fooling around to make sure I got the color side of things right. The second one is set up just like the first one in the relevant areas, but doesn't work. Code for the one that
This one is for those that use metatrader 5 Metatrader 5, unfortunately, did some things that hardly are logical. One of the things done by it is that builtin averages (and all the other builtin indicators) are not functions any more. That is as big a nonsense as it can get. Instead of making...
I have noticed that this level indicator on chart causes bad price lagging when US market opens and trading activity steps in. How to reduce the number of lines so that lines are drawn only in the active screen? At the moment lot of lines will be drawn. #property indicator_chart_window #property
Hi every body, I have wrote an custom Indicator (A) like zigzag, and it works fine, however the problem is when I call it in to another custom Indicator(B) it refers "2.781888206090574e-308" for empty values. As an example, A(10)= empty values, means the value of Indicator "A" in candle "10" is
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
New article Better Programmer (Part 07): Notes on becoming a successful freelance developer has been published: Do you wish to become a successful Freelance developer on MQL5? If the answer is yes, this article is right for you. Do not apply for a job that you are not sure how you are going to do
New article Triangular arbitrage has been published: The article deals with the popular trading method - triangular arbitrage. Here we analyze the topic in as much detail as possible, consider the positive and negative aspects of the strategy and develop the ready-made Expert Advisor code. The...
Pivot_Points_Lines_v1.3 MT4 : Draws Pivot Points Formulas Author: NickBixy
New article Transferring an Indicator Code into an Expert Advisor Code. Indicator Structure has been published: This article dwells on the ways of transferring an indicator code into an Expert Advisor Code and on writing Expert Advisors with no calling to custom indicators, and with the whole...
  Indicators: iForexSessions  (57   1 2 3 4 5 6)
iForexSessions : Highlights the Forex Market Sessions (Sydney, Tokyo, London, New York). Author: amrali
New article Learn how to design a trading system by Ichimoku has been published: Here is a new article in our series about how to design a trading system b the most popular indicators, we will talk about the Ichimoku indicator in detail and how to design a trading system by this indicator. In this
Check out the new article: Building A Candlestick Trend Constraint Model(Part 2): Merging Native Indicators . This article focuses on taking advantage of in-built meta trader 5 indicators to screen out off-trend signals. Advancing from the previous article we will explore how to do it using MQL5
Breakout Strategy with Prop Firm Helper Functions : This is an update of the "Simple Yet Effective Breakout Strategy". In this code, I have added some helper functions for prop firm challenges. Author: Anh Quan Duong
pivots calculation based on pine script v4 : This is the exact conversion of pivotshigh and pivotslow functions from pine script v4 as an mql5 indicator. Author: Yashar Seyyedin
New article Improve Your Trading Charts With Interactive GUI's in MQL5 (Part I): Movable GUI has been published: Unleash the power of dynamic data representation in your trading strategies or utilities with our comprehensive guide on creating movable GUI in MQL5. Dive into the core concept of chart
Check out the new article: MQL5 Wizard Techniques you should know (Part 11): Number Walls . Number Walls are a variant of Linear Shift Back Registers that prescreen sequences for predictability by checking for convergence. We look at how these ideas could be of use in MQL5. For a few time-series, it
Check out the new article: Introduction to MQL5 (Part 2): Navigating Predefined Variables, Common Functions, and Control Flow Statements . Embark on an illuminating journey with Part Two of our MQL5 series. These articles are not just tutorials, they're doorways to an enchanted realm where
RSI adaptive EMA: RSI adaptive EMA Author: Mladen Rakic
Close biggest winning / losing trade in MT4 : This script will scan all the open trades and then will close the biggest winning/losing trade Author: Biswarup Banerjee
New article How to create bots for Telegram in MQL5 has been published: This article contains step-by-step instructions for creating bots for Telegram in MQL5. This information may prove useful for users who wish to synchronize their trading robot with a mobile device. There are samples of bots in...
Good day or night to my fellow coders, I would the clear help of someone to check these codes I think i have a few errors in them and can't find them myself. So I would like the clear Assistance, I do thank you all for your time and pleas DM me, if you're willing to help me on them
  double order  (12   1 2)
While testing my EA on a demo account, I noticed that I got an order executed twice in the same second. Although I have a check before using OrderSend to make sure that I do not currently have an order open. What would you suggest I do to prevent this?    total=OrdersTotal();      if(total<1)...
hi am using a code to draw a horizontal trend line from t1, p1 to t2,p1 (which will draw it horizontally and to the right) . some time i tried to draw the trend line for example : over 90 bars but because of the holidays the trend line will not cover 90 bars.. how to solve this
When I select orders with OrderSelect(), the manual says, "Sorting of the resulting list of orders cannot be guaranteed." OK. But can I at least rely on their opening times or ticket numbers? Is it guaranteed that newer ones will always have larger OrderOpenTime() and OrderTicket() values
Hi, since today my mt4 version doesn't work anymore with a EA i purchased from this site. Friday all was working normally, now I'm getting the message : 2023.03.19 22:34:38.360 CAP Strategy Builder EA XAUUSD,M1: array out of range in 'Calendar.mqh' (617,11) It doesn't matter, if I try it on my local
  Good Indis =)  (20   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 have built two basic indicators today for my own use but I cannot finish them due to 4/5 red lines that I have tried many scenarios with no avail what do I need to put in the following boxes Copyright Link Version Atrict indicator chart window It may seem obivious to some I know but nothing
I am hoping you can help fix my code. I am trying to code a MT4 indicator to indicate a powerful downward bar. No matter what I do, I still get :1 errors, 1 warnings OnCalculate function declared with wrong type or/and parameters line 42 column 6 OnCalculate function not found in custom indicator
Greetings, I am new to metatrader and I am wondering if its possible to place manual test orders in strategy tester? This feature have to exist but I can not find it =(
Good evening everyone, I'm looking for an indicator that shows me all open positions + Long/Short + Magic No. in MT4. Similar to the attached image (unfortunately the indicator shown doesn't work for me). Does anyone know something like that? Would be grateful for any help ;) Thank you very much
Hello There I I am new to coding ! I`ve been developing my EA But I`m geting this error 'Ask' - function not defined ! The code is This if(OrderSelect(s,SELECT_BY_POS,MODE_TRADES)) if(OrderMagicNumber()== MagicNumber) if(OrderType()==OP_SELL) if(OrderOpenPrice()-Ask> MoveToBreakeven*pips)
  Coding help  (7898   1 2 3 4 5 ... 789 790)
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
HH = iHigh ( Symbol (), TimeFrame, iHighest ( NULL , 0 , MODE_HIGH ,NoOfBars,StartingBar)); LL = iLow ( Symbol (), TimeFrame, iLowest ( NULL , 0 , MODE_LOW ,NoOfBars,StartingBar)); Please, is it possible to use a formula to find out which bar had highest high and lowest low or the time when it
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
Hi coders, hope you can help a non-programmer myself ... I have 2 strategies written in 2 EAs. Currently, I load the 2 EAs into 2 different charts but with different coded conditions (same magic), in other words, at any point of time, only one EA is trading and the other EA is in dormant state (both