MQL5 Algo Trading community — forex forum for traders and developers

Code: MqlCalendarEvent events[]; Print ( CalendarEventByCountry ( "" , events)); ArrayPrint (events); Print ( GetLastError ()); Log: RI 0 11 : 39 : 03.378 sand (EURUSD.sml,H1) Executed RE 0 11 : 39 : 53.725 sand (EURUSD.sml,H1) - 1 JQ 0 11 : 39
Is there a way to load a data file once in the optimizer and not on every pass ? For math calcs mode . I'm loading a 1.6 gb file and it appears it's loading per pass. I'm using tester file property In other words i want to pull it up once (or however many agents there are locally) and optimize on
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
  Market
Is it permitted to sell an EA on the Market that is designed to only trade a list of pre determined currencies
Hy guys! I would need some advice and opinions how far to lookback when optimizing parameters and how often should I optimize? Should I consider updating parameters every week or even day, to include most current data or is it enough to do it on a monthly basis? Logically I would assume, the more
Hi! I 'm trying to use the cores of my own laptop from my VPS . Both have MT5 terminal open . Went to Agents Manager on laptop to set up the agents and get the IP address + ports . So should be fine . Then added them in MT5 terminal on VPS (agents tab) , but once an optimization launched, these
Artificial intelligence (AI) is changing the way we buy and sell in the stock market. This discussion is about understanding how computers use AI to make quick trading decisions. We will look into how AI can spot patterns in the market, make predictions, and decide when it’s a good time to trade
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 Sentiment Analysis and Deep
Hi, i 've tried to close my profit positions and the system close ALL my positions.... Profit and Losing Positions...Why? There is a problem with MT5 ? What can i do to have my previous positions? I lost 750 euros with this false action from the MT5. Best regards
Since its launch, MQL5 Cloud Network has completed more than 16 billion tasks. This figure shows how many times users have tested their trading strategies. Every day, the network enables algorithmic traders to run calculations on tens of thousands of computers worldwide with just a few clicks
[Deleted]
I use candlestick chart, with red for bearish candle and Green for bullish candle. i know how to detect pin bar and other patterns programatically. How to change programatically the color for pin bar candle , hammer etc... to specific colors.
MetaQuotes has launched new MQL5.community information channels on Facebook, X.com (Twitter), and Telegram. These channels provide daily publications of relevant technical materials from the MQL5.com Articles and CodeBase sections. They are designed to promptly update developers on algorithmic
Good day, I have this simple EA that screenshots a chart on every tick(Code below). I was wondering if there is a better way of taking chart screenshots dating back from a year from now till recent?. I tried running the EA on the strategy tester and it does not save the screenshots in my Files
I have a requirement where I want to print some text to the chart. The text should remain under a specific bar (i.e., a fixed time and price) as new bars are printed the text should move left with the price `OBJ_TEXT` does this but when I run ChartScreenShot the text is not captured. I then tried
I subscribed to a signal . It has no trading for 7 days (since May 19). Can I cancel the subscription and get refund in this case?
  Black arrow v2 indicator  (11   1 2)
Hi, Has anyone tried the black arrow v2 indicstor strstegy? it says it doesnt repaint but on my mt4 sometimes the arrow disappears if the candle goes in wrong direction to the arrow. Is it a useless indicator or is there any other confirmation indicator/MA that sdd to my charts to make it perform
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
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 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...
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
  Does a safe Martingale exist ?  (198   1 2 3 4 5 ... 19 20)
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...
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...
hi I would like to know if there is a good strategy when forecasting highs and lows (ohlc), any links that can 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
  Brainwashing System / Asctrend System  (260   1 2 3 4 5 ... 25 26)
This is the thread about Brainwashing system. We will start with original version of this system and will improve it later. ========== Just something about the history. There are 3 famous signals system (manual trading systems based on signal indicators): Asctrend, BrainTrend and Brainwashing. First
I study correlation pairs and hedge strategy. 2 pairs hedges are difficult to get profit. Does 3 pairs hedge system really work or not? example USDCHF EURUSD EURCHF BUY BUY SELL / SELL SELL BUY Please suggest me some useful hedge system.I want to code it as EA
  PriceChannel Parabolic system  (313   1 2 3 4 5 ... 31 32)
Some people asked me on the other forums about re-enter. But I am not using any indicator for re-enter. So I decided to create some simple trading system with re-enter based on indicator's arrow on the chart. Let's name it as PriceChannel Parabolic system. M1 timeframe. This is image for EURUSD for
  Elliot Wave Indicators  (222   1 2 3 4 5 ... 22 23)
request Wave Indicator or Elliott Wave --
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
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
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
  Options Trading  (2)
Hi, Is there any way to access Options Trading in MT5 Platform
Hello all, I have a few questions for anyone with knowledge and/or experience trading futures. Any input would be greatly appreciated. From experience scalping in live market conditions, how does slippage and spread compare to trading CFD in markets such as FX? Is there a notable difference, and
Forum on trading, automated trading systems and testing trading strategies Press review Sergey Golubev, 2016.12.25 06:50 Hang Seng Index Q1 2017 Forecast (based on the article) "Underlying sentiment surrounding Hong Kong stocks has remained negative with underlying concerns surrounding...
How to display extended hour prices on the chart and for the EA? There are large price variations between the end of regular hours and the start of regular hours for a stock. We don't see these variations so my EA and almost all EAs designed for stock trading can't track movements and trends well
I'm trying to figure out if I can have a list of all my trades for the same utensils separate rather than one bulk position in the tool box/terminal box. Is this even possible? Thanks
Bitcoin vs USD January-March 2017 Forecast: key resistance level at 850.15 to be broken for the bullish trend to be continuing Weekly (W1) price is located above Ichimoku cloud in the bullish area of the chart. The price is on ranging within the following support/resistance levels: 850.15...
  Forecast and levels for S&P 500  (474   1 2 3 4 5 ... 47 48)
S&P 500 January-March 2017 Forecast: long-term bullish ranging within the narrow s/r levels for direction W1 price is located far above Ichimoku cloud in the bullish area of the chart. The price is on ranging within the following narrow support/resistance levels for the bullish trend to be resumed...
On which MT5 platform can I find the S&P 500, Nasdaq, and Dow Jones index? It's not the type of CFD, it's the real S&P 500, Nasdaq, and Dow Jones indices on the exchange
how to know which of the trade/stock has the highest volume/most gain
  Forecast and levels for Dax Index  (76   1 2 3 4 5 ... 7 8)
Dax Index January-March 2017 Forecast: flat within bullish with key resistance at 11,649 W1 price is located above Ichimoku cloud in the bullish area of the chart. The price broke 11,485 level to above on close weekly bar with 11,649 as a nearest bullish target to re-enter. Thus, the weekly price is...
The indices market is extremely slow these days and I'm not seeing many trading opportunities... The VIX is at 12.25 right now, what do you do when VIX is this low? Do you switch to other markets or do you just take a break? Also curious about Forex traders, are you seeing a similar problem
Hello! I like to change the lot size of the following MT5 EA ExpertMAMA-mq5. Does anyone have a idea how i can adjust the lot size? Many thanks for your support! Kind regards, Frank //+------------------------------------------------------------------+ //|
In general, my performance with backtesting and optimizing got worse and worse since I started with MQL5, but for some reason, since 2 days, some cores have just been disabled out of nowhere and get auto-disabled when I enable them again. Today, when I tried to optimize something, all my cores got
Hi all, My funtion: double ProfitCheck(long const magic_number){ double profit=0.0; HistorySelect(0, TimeCurrent()); int trades_total = HistoryDealsTotal();   for(int i=0; i < trades_total; i++)     { long ticket = HistoryDealGetTicket(i); long...
//+------------------------------------------------------------------+ //| ma.mq5 | //| aniruddha | //| https://www.mql5.com |
I have created a custom symbol using CustomSymbolCreate(). The sole purpose of this symbol is to create a chart that will be used for displaying data, so I am not interested in any tick data. When I run my EA, I switch to the new symbol using... ChartSetSymbolPeriod ( 0 , "MySymbol" , PERIOD_M1); My
  Better NN EA development  (865   1 2 3 4 5 ... 86 87)
Hello everyone, I will start this thread by first stating that if you are a beginner and have no high level programming experience you are better off reading other threads. I intend this thread to be for the very experienced programmers with some Artificial Intelligence background. I am attaching...
I have 8 Core with 32GB RAM, still get this error. 2024.07.26 18:10:35.495 Core 1 not enough available memory, 11500 Mb used, 16322 Mb available, maximal available block is 16322 Mb How can I handle this? Thanks and regards
Hello All My modify TP/SL code below won't modify sell positions instead I get modify errors. With Buy positions everything modifies as normal, please assist me as to why sell positions will not modify. #include <Trade\Trade.mqh> #include <Trade\SymbolInfo.mqh> #include <Trade\PositionInfo.mqh>
  Neural network  (5)
Where can I learn neural network in mql5? Or which book can I use to learn neural network in mql5 or mql4
Hello fellow traders, I'm running optimizations on an EA I'm currently developing and when I backtest on a 4 years period from 2020.01.01 to 2024.01.01, this is the results I get: And when I backtested it on a 3 years period from 2021.01.01 to 2024.01.01 here are the results I get: I don't
In my EA, I use the following line of code to register its Magic Number: m_trade.SetExpertMagicNumber(Magic); The function has no return value, so is there a generic method to check whether a Magic Number is already in use? I'm looking to block an EA from loading if the Magic Number already exists
Hi, I have a MQL VPS bought recently. I am using an EA which requires an indicator. When I setup the chart and try to upload it says, 2024.07.25 14:06:44.504 Terminal ' ': 0 charts, 0 EAs, 0 custom indicators, signal disabled, last known ping to Access Server - Singapore is 2.35 This indicator
Hi guys, i have this code: bool PriceMovedFar() { double distance = 0.0; double pipValue = SymbolInfoDouble(_Symbol, SYMBOL_POINT); distance = (price2 - price1) / pipValue; return distanceInPips > 50 ; } if i use this code in usdjpy, that function return true as soon as the price moves higher
Hi, I don't find examples in the Documentation (probably looking wrongly), how do I extract I single value from a matrix? this doesn't seem to work static vector x_norm(SAMPLE_SIZE); static matrix input_data[ 1 ][SAMPLE_SIZE][ 1 ]; for ( int i = 0 ; i < SAMPLE_SIZE; i++) { x_norm[i] =
Hi I like to copy my trades from an account to other. But I already use an EA with specific HotKeys. Is there a technical solution to copy the trade between accounts to this situation
[Deleted]
Is there one out there that I can download?
I'm trying to create a recency-weighted performance indicator that averages the annualized performance of various lookback periods. For each lookback period, it uses a 5-day moving average to avoid the problem of idiosyncratic results depending on the daily results of the specific lookback day. I'm
Greetings, Below I have a function intended to determine the intersection of 2 ('Object Trend') lines drawn on a chart. The issue is that the 'intersection time' being reported does not seem to equal what I am seeing visually on the chart. In the function the 'time' of the intersection is set as
Hello everyone, can anybody please explain to me, why there is a limitation of the width and size of objects within MQL5, where MQL4 didnt have these limitations? In MQL4 you can size objects like you want to, but within MQL5 there´s a limitation to width 5 for example. I can´t see the reason behind
for ( int i=start; i<rates_total && ! IsStopped (); i++) { ExtSignalBuffer[i]=( low[i]-open[i])* 1000000 ; if (open[i]-close[i] > 0 ) // in case bear indicator_type2 [i] = clrAqua ; //change color ExtSignalBuffer[i]=(low[i]-close[i])* 1000000 ; }
This indicator is similar to the RSI. The idea is to calculate net_profit / [sum(positive returns) + abs(sum(negative returns))] in a rolling window. But after I changed the code in the main loop, the terminal says: 'for' expressions are not allowed on a global scope //--- the main loop of
Hi, I'd like to use my Mt5 custom indicators also on Mt4. They compiled with 0 Errors on Metaeditor 4, however, when applied to a Mt4 chart I get the unspecific error message: "indicator on custom buffer is not supported yet" What does that mean? Thanks, Tim
  RSI MAKER  (3)
I want my indicator to mark all bearish candles that have RSI below 30 and all bullish candles that have RSI above 70. I'm not sure where the issue is. //+------------------------------------------------------------------+ //| RSI_Marker.mq5 | //|
  Moving Average  (1547   1 2 3 4 5 ... 154 155)
Post all MA indicators here
hi guys . I'm new in indicator and English language too.I've tried to convert an indicator from MT4 to MT5 . i downloaded an include file ("<mql4_2_mql5.mqh>") to make my work easier . this is my code that give me "array out of range in Line ( 171:18 )" error will you help me to solve my problem
hi this code is mql5 script and print the ma value of D1 period and work as it expected: void OnStart () { int mahandle; mahandle= iMA ( NULL , PERIOD_D1 , 1 , 0 , MODE_SMA , PRICE_MEDIAN ); double mavalue[ 1 ]; CopyBuffer (mahandle, 0 , 0 , 1 ,mavalue); Print (mavalue[ 0 ]); } but same
Dear Fellow Members The documentation says: ERR_INDICATOR_WRONG_HANDLE 4807 Wrong indicator handle I have included following check, but still in live chart I get error 4807 though none of handles return no error: if (mHandleFast == INVALID_HANDLE || mHandleMid == INVALID_HANDLE ||
can anyone help with this datetime time6= D'2024.07.10 07:15' ; string symbol= "EURUSD" ; ENUM_TIMEFRAMES tf= PERIOD_M5 ; bool exact= false ; //--- If there is no bar at the specified time, iBarShift will return the index of the nearest bar int bar_index=iBarShift(symbol,tf,time6,exact);
Trying to convert an mql4 to mql5 breakeven indicator but nothing is drawn on the chart. My mql5 conversion What is wrong ? //+------------------------------------------------------------------+ //| Average Price v3.0.mq4 | //|
Check out the new article: MQL5 Wizard Techniques you should know (Part 29): Continuation on Learning Rates with MLPs . We wrap up our look at learning rate sensitivity to the performance of Expert Advisors by primarily examining the Adaptive Learning Rates. These learning rates aim to be customized
Manual Backtest Bar Replay Simulator : A simple indicator which may help you in manual backtest by just moving a vertical line to show hide bars. Author: Rajesh Kumar Nait
Check out the new article: Causal analysis of time series using transfer entropy . In this article, we discuss how statistical causality can be applied to identify predictive variables. We will explore the link between causality and transfer entropy, as well as present MQL5 code for detecting
  Experts: Grid EA Pro  (16   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
Decision Colored Candles - MT5 : higher confidence to get into trade Author: Mohamed Hassan Mohamed Hassan Alsherbiny
Check out the new article: A Step-by-Step Guide on Trading the Break of Structure (BoS) Strategy . A comprehensive guide to developing an automated trading algorithm based on the Break of Structure (BoS) strategy. Detailed information on all aspects of creating an advisor in MQL5 and testing it in
Check out the new article: Twitter Sentiment Analysis with Sockets . This innovative trading bot integrates MetaTrader 5 with Python to leverage real-time social media sentiment analysis for automated trading decisions. By analyzing Twitter sentiment related to specific financial instruments, the
Check out the new article: Building A Candlestick Trend Constraint Model (Part 7): Refining our model for EA development . In this article, we will delve into the detailed preparation of our indicator for Expert Advisor (EA) development. Our discussion will encompass further refinements to the
New article How to Become a Signals Provider for MetaTrader 4 and MetaTrader 5 is published: Do you want to offer your trading signals and make profit? Register on MQL5.com website as a Seller and specify your trading account to offer your signals to traders. Keep in mind that you can create only...
Check out the new article: Build Self Optimizing Expert Advisors With MQL5 And Python . In this article, we will discuss how we can build Expert Advisors capable of autonomously selecting and changing trading strategies based on prevailing market conditions. We will learn about Markov Chains and how
Check out the new article: Developing a Replay System (Part 42): Chart Trader Project (I) . Let's create something more interesting. I don't want to spoil the surprise, so follow the article for a better understanding. From the very beginning of this series on developing the replay/simulator system
Check out the new article: Population optimization algorithms: Whale Optimization Algorithm (WOA) . Whale Optimization Algorithm (WOA) is a metaheuristic algorithm inspired by the behavior and hunting strategies of humpback whales. The main idea of WOA is to mimic the so-called "bubble-net" feeding
Check out the new article: Developing an MQL5 RL agent with RestAPI integration (Part 4): Organizing functions in classes in MQL5 . This article discusses the transition from procedural coding to object-oriented programming (OOP) in MQL5 with an emphasis on integration with the REST API. Today we
New article Payments and payment methods is published: MQL5.community built-in services offer great opportunities both to MQL5 developers and ordinary traders with no programming skills. But all these features can't be implemented without in-house secure payment system, that provides a convenient
Check out the new article: Seasonality Filtering and time period for Deep Learning ONNX models with python for EA . Can we benefit from seasonality when creating models for Deep Learning with python? Does filtering data for the ONNX models help to get better results? What time period should we use
Hello experts I want make two dropdown list inputs in first one will select a list from main lists and the second input will show the list that selected in the first input when assign the second input to the first one I got constant expected error. enum List1 { ITEM_A, ITEM_B, ITEM_C }; enum
Please help me add selllimit and buylimit orders to this line of code so that I can place both stop and limit orders at the same time. Thank you <Improperly formatted code removed by moderator>
  HFT bot  (2)
I can’t install my HFT bot on MT4 terminal
Hello everybody, I'm developing a tool to backtest my EA and I want to change the symbol, the time frame and the spread in the MT4 strategy tester automatically by mql4 code. How can i refer to the symbol, the time frame and the spread in the MT4 strategy tester in mql4 code ? Thank for your idea
  Ema Cross!  (858   1 2 3 4 5 ... 85 86)
Hi folks, Could somebody tell me what does he think about this simple EA? It works good in metatrader back tester . Note : The back testing optimized for the maximum accuracy results
  indicators issue on mt4  (17   1 2)
Hi Guys. I bought some indicators few years ago. Everything was working perfect until about 3 months ago. When my mt4 in not running for few days and when I want to open it, it freeze. I already noticed that when I delete the indicators that I bought from MQL4 then mt4 is opening with no problem. So
Please Guide Me To Programming in MQL4: I Want to Define Selected TimeFrame and Loop for this How to Programming this? is this false? enum ENUM_TIMEFRAMES timeframe [5]= {PERIOD_H4,PERIOD_H1,PERIOD_M30,PERIOD_M15,PERIOD_M5}; for(timeframe = 0; timeframe < 5; timeframe ++ ) { . . . }
Intro. So I have a setup whereby a chart button is displayed on the chart only from which the order was executed from. Within the button, there is text which displays the ticket number, as well as the running profit. The button comes in two parts, the Static Attributes and the Fluid Attributes: the
By the way, you have to keep an eye on him because the minimum stop changes from 2 to 20 and he keeps on placing bets but does not put them in the free flight, they need help him at this point to close the bets in profit! The best time to trade is in a dynamic corridor! this way you gain......! 1
I am using #resource directive for importing a technical indicator . The code on compilation always shows the error "Unknown Resource Type". It would be great if anyone could help me. Thanks in advance
  Elite indicators :)  (15191   1 2 3 4 5 ... 1519 1520)
Hello, Does anyone know where I can find an indicator that takes in price values, which when reached or surpassed will cause the indicator to send a sound alert
Right, I just do not get the logic behind why MQL4 is outright refusing to display the correct order position information on the correct chart, as in the chart with which the order was placed upon. I just do not get why - despite the fact that I have specifically told it to loop through ALL of the
Hey programmers I don't get any further with my simple webrequest to a google drive file, to just pull out a simple word, how the sentiment of nas100 is. (https://drive.google.com/file/d/1Cu9HVjzxKZoZ5E1z_hYL1wO0pKWfz2jC/view?usp=sharing) I always get an 404 Error when trying to access the file over
how to add crypto symbols to meta 5
I ordered EA multiplied ATR trailing and There is some problem to make it work for me.All seems to be good to go but nothing happening.I believe EA works fine.Looking for someone Who would be able to give me some helpful hand and explain what am i missing or doing wrong about goal i am trying to