I have a simple EA that enters long when an ema is going up, and short when an EMA is going down. When I run this EA in the Strategy Tester Visualization, the price at which buy operations are entered is much larger than the real price. In turn, the Sell operations appear to be on the right price
HI all, is there someone who can help me to developp an EA that prevent to stop trading for the day whenever I reach my daily loss max or got 2 SL. MT4 blocks me for any new trade and can only trade the next open market. MANY thanks in advance
Hi there I don't know if anybody else has experienced this issue with MT5. When EA's close a trade, MT5 starts automatically cycling through different timeframes resulting in the EA opening more trades based on a different frame, including opening opposite direction
Hi everyone, How do I trade candles from a higher timeframe to a lower timeframe? I've researched on the forum, and I know that to switch timeframes, I should use ChartSetSymbolPeriod , but I'm really confused about what I want to do. For example, taking this example case (example.PNG attached)
Hi, I recently ran into a issue with MT5 where my EA does not seem to be setting the magic number or know that it opened a position. #include<Trade\Trade.mqh>CTrade cTrade;ulong magicNumber = 123456;void OnInit() { cTrade.SetExpertMagicNumber(magicNumber); ulong tradeMagicNumber = cTrade...
I can't sync with the VPS, it says it can't connect 2023.09.28 20:36:21.671 Virtual Hosting: 6512116 failed to connect to server 'MQL5 Singapore 03' (18.136.60.134:443 failed)
I have this EA that makes renko graphs, but I see that some wicks are bigger than the bars and I think that should not be there, that instead a new bar should be created, can you tell me if that is correct or not? and if it is correct what is the logic to keep the wick bigger and not create a bar
Gday, these lines aren't showing in the subwindows on the strategy tester. ObjectCreate(0, "MyLine7", OBJ_HLINE, 1, 0, GLOB_MTF_RangeHighs[2]); ObjectSetInteger(0, "MyLine7", OBJPROP_COLOR, clrYellow); ObjectSetInteger(0, "MyLine7", OBJPROP_WIDTH, 1); ObjectCreate(0, "MyLine8"
Hi I ran the tester with the fast genetic algorithm with forward testing. Then I picked a specific result, put the exact parameters into my bot, and ran it in visual mode. I got very different results in both backtest and forward test visual tests . Even the number of trades doesn't match. Any idea
Hello, I have a Python script that automates backtest reports in MT5, starting the platform with a .ini file. Currently, there is a delay when the platform connects to my broker, taking about 18 seconds to log in, followed by 3 seconds to generate the report. Since I need to run many reports, every
I need a hand, I'm using this indicator "Shved Supply and Demand - indicator" for MetaTrader 5 of Behzad Movaghar but I can't find all the low and high values of the blocks that this indicator forms. Can someone tell me what I'm doing wrong or how I can find the other values? I would like to keep
I'm running some backtests and noticed that the strategy tester with some instruments (forex) works well, while with indexes (date range set from 1 jan 2019 to 2023) starts in 2021, as if didnt see data before that year. My data is fine and I can open a chart and see the chart until 2014. Anyone
Hello everyone, I am trying to upload a product to the market. I have checked the strategy tester reports on my local computer, and there are no errors. The lot size is normalized according to the rules outlined here: https://www.mql5.com/en/articles/2555 Can someone please explain why a volume of
I'm trying to convert my EA from trading a singular currency pair to multiple. Before trying to change the number of pairs in use, i didn't have any errors. Since replacing Symbol() with symbol_loop[i], converting the handle into an array, looping the RSI handle in the OnInit and looping the symbols
Some of my Windows VPS range from 98% to 100%. My Mac shows 0% History Quality. Ouch... Someone let me know how to improve history quality. Thanks
Good afternoon colleagues, I'm starting to think that I have some serious understanding problem, but I can't figure this out. It's a rectangle, and I want it to be built from the bottom left corner. This is the code: // ChartIdent is ChartID() ObjectCreate (ChartIdent, "BGRectangle"
Hello esteemed community, I have developed an Expert Advisor (EA) for MT4 which is designed to trade multiple symbols concurrently. I am interested in submitting my EA to the MQL5 Market, but I am aware that the standard strategy tester in MetaTrader 4 may not support multi-symbol backtesting, which
I have an error in the WebRequest section. Can anyone help me edit it // Define your Telegram bot token and chat ID input string BotToken = "YOUR_BOT_TOKEN" ; input string ChatID = "YOUR_CHAT_ID" ; //+------------------------------------------------------------------+ //| Expert initialization
I am trying to calculate iBandsOnArray for MQL5 but i am only able to get the middle line value in my expert my upper and lower line keep giving me wrong values i think the problem is from the standard deviation if i can get a standard deviation function that i can apply to the current bb mid value,...
Sorry for the simple question, I am very new to MQL5. I know how to create a generic array, but am now trying to create a list of undefined size, which values can be added to. Most of the literature I read seemed to go over my head
hi, i want to create an EA which has 3-5 profit targets for every trade in a hedging account . is the best way to achieve this is by placing 3-5 different trades and setting different TPs? Are there any other potentially more efficient ways to achieve this
Hi, I'm trying to make my first ea and I wanted to add to it that it would open a long opsition when a short one is closed and viceversa only thing is I can't seem to find a function that calls to the last closed position, I thought it would be one of the History, Position, or Order functions but I
Hi, I tried to calculate profit from long position and short position. When I print it I notice there's difference in profit between print statement and trade tab on strategy tester. Here's the screenshot on trade tab, and here's the print statement. CS 0 22 : 23 : 21.027 Averaging
Hi, I'm trying to create a function which returns the number of indicators in use at a given time. For now the code is showing no errors or warnings but the function always returns 0. Since both the final 2 parameters are set as true, the function should be returning 2. How can i resolve this issue
Hello everyone, I'm looking for a way to send a hotkey or simulate a keyboard shortcut from within my EA without using the Win32 DLL. I understand that using the Win32 DLL is a common approach, but I'm exploring alternative methods to achieve this functionality. Is there a non-Win32 DLL method or
I have looked everywhere but I cannot find an answer to this. When I am testing a bot and looking at the optimization results , in the result column the numbers are different colors. What does that mean/indicate
Hi, could someone help me? I'm trying to write a code to modify a position with up and down buttons. The button are correctly working but the attempt to modify the position ends in unknown retcode 0. Here's the code for ( int i = PositionsTotal () - 1 ; i >= 0 ; i--) // loop all Open Positions { if
Hi I have this code to close position when reach a specific profit(0.50) e loss(-10) buy when i run strategy tester i get profits like 2,3,4 and losses like -23,-12 Can someone help me, double TargetLoss=- 10 ; double TargetProfit= 0.50 ; double profit= AccountInfoDouble ( ACCOUNT_EQUITY )-
Hello, I would like to ask for help with my Expert Advisor that runs only first time after compilation. Every other attempt to run EA fails with OnInit with runtime error code 5035 . For example: I make no change in my Expert Advisor mql5 file I compile EA mql5 file I run the Single test in Strategy
Hi, When I make more MT5 EA backtest with enabled ZigZag indicator filter with same settings on my EA panel, sometimes I get different backtest result. If I made a backtest with same EA settings on same data I must get same backtest result no matter how many times I do it. This is a serious problem
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
If you do not have an account, please register
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.