Expert Advisors and Automated Trading - page 9

According to https://www.mql5.com/en/docs/series/copybuffer , we can simple use double indicatorArr[]; CopyBuffer (m_indicator.Handle(), 0 , 0 , 10 , indicatorArr); // puts the latest 10 indicator values into array But why do I see many examples where it is used like this: double indicatorArr[];
I don't know if I'm the only one who came to think that making a successful autonomous expert advisor is like playing a tedious chess game against the market. Some people may say that it is impossible longterm, however it will also depend on how positions are managed. The way I see it, a manual
Hello, I've encountered soo many EA's being sold at MQL5 that shows good backtesting result but always fail when used in Live environment. I know there are discrepancies with spread, slippage and all others between backtest, demo and live but it's easy to see if the difference is too big so that
I have an array-based index (i.e., the index comes not from a time series based array). Now I want to use this index : double high[]; m_high.GetData( index , numberOfBars, high); // Method from Indicator.GetData() with calls common CopyBuffer()-method However, since buffer access is series-based
According to https://www.mql5.com/en/docs/standardlibrary/technicalindicators/cindicators/cindicator/cindicatorrefresh, it is recommended to always call Refresh() when retrieving data with GetData(). However, looking at the standard lib code (e.g., ExpertBase.mqh ),it does not follow this pattern
Hi, I have read https://www.metatrader5.com/en/automated-trading/strategy-tester and https://www.metatrader5.com/en/terminal/help/algotrading/testing#forward But I still don't understand what is actually going on here... nor can I find a proper answer anywhere else thus far! What is actually going
Hello dev. I wanted to make a bot that interacts with an API i built . Only issue is that WebRequest keeps returning -1. Whet i run the same code in mt5 it is able to GET data from the API. I have googled and rummaged through other peoples code to no avail. I am guessing the issue is in the code of
Hi, is anyone else having problems with the WebRequest() function calling an AWS API gateway resource? The issue I am experiencing is that the "Connection: keep-alive" is automatically added to the header. I tried to overwrite it with "Connection: close" in the header, but I have read that this is
I am having trouble creating a snippet of code to sit within in a EA to close all trades at the end of the day. MT5 build number 5.00 build 5260 Account type Netting Tester settings Model: 1-minute OHLC My expectation To close the trade as close to EOD as possible, and on Fridays must close before
Do you think there is an EA that combines multiple MT5 strategies and manages them automatically based on drawdown, equity, or market conditions? Would that be useful or just overkill
Hello everyone, While testing my Expert Advisor (EA) in the Strategy Tester , I encountered a strange and critical issue related to account data readings, and I’m hoping someone with experience can shed light on it. Problem Description: I’m using built-in account functions like
I have tried to upload my .ex5 file as indicated by the seller platform, however every time I try it, it throws up the following error, which does not seem logical given that in EURUSD a position of 0.01 should be perfectly possible. I've been thinking about this a lot and can't find a solution
[Deleted]
Hello, For example, let’s take the RSI indicator and EURUSD. Suppose you buy at oversold and sell at overbought, and you are trading across all timeframes. How do you decide what Take Profit and Stop Loss levels to set? On the 1-minute timeframe, the average gap in points/pips between overbought
  EA sharpe ratio  (1)
May I know the back test sharpe ratio value of your EA you developed yourself or got it from mql5 .com
  check pointer by "!"  (68   1 2 3 4 5 6 7)
Is this if (pointerObj == NULL || CheckPointer (pointerObj)== POINTER_INVALID ){..} the same as this: if (!pointerObj){..} As it is said in https://www.mql5.com/en/docs/basis/types/object_pointers ; > To quickly validate the pointer, you can also use operator "!" ( LNOT ) which checks it via an
[Deleted]
Sorry for my bad English. I built an expert in mql4 that creates more than 200 objects on chart and in 'onchartevent' event and 'ontimer' event change the objects properties like width, height, color and... it works like a charm in mt4 without using of ChartRedraw() or WindowRedraw() functions
I recall in the past the SendMail function working seamlessly with gmail, but now it doesn't any longer. I created an external app password at http://myaccount.google.com/apppasswords but using this password in the SMTP password field (at Tools - Options - Email) made no difference and gave the
This functions goal is to close all open trades that are in profit -- AND the worst trade with worst loss, designated by "worst" as the ticket number. The worst trade is closing, however only some of the profit trades are closing! Maybe I am just tired, but i can not see why! HELP. If i have failed
Hi guys, I was wondering if there is around some kind of indicator or EA that disable and enable again the autotrading button at a specific time. Reason is I use an EA that disable and close all the trades before news. Now if it disable the autotrading when market is closed it will stop the EAs,but
  Tradetime  (6)
hello, i have some troubles with the trade time, i have written an expert to convert the trade time to i time i want to trade here as example the settings that works with the conversation but in the trade history i find following, its always couple of seconds before the time that it makes 2 trade
Cool Discovery: Press Spacebar to Toggle 3D Optimization Graph to Bar/Histogram View in MT5! Hi everyone, While cleaning my keyboard during an optimization run in Strategy Tester , I accidentally discovered that pressing the Spacebar switches the 3D graph from surface to a bar-like view (like
Hi together, I will give you short example of a massiv performance issue in MT5 while backtesting - that's really, crazy!! Testcase: three symbols: EURUSD, GBPUSD and USDCAD Testperiod: 2025.09.15 - 2025.09.20 (one week) , Timeframe M5 Testresult's with single Tests: EURUSD needs 8 seconds GBPUSD
Recently I made a new build featuring the new Intel Core 7 Ultra 265K, downloaded the latest build for the agents manager however despite the agents being created and running successfuly for a short while, they will disconnect and stay like that. I've made sure there is nothing blocking them from
I am developing some Expert Advisors in which I heavily rely on structs and arrays of structs. After the last MT5 Update I was getting compile-time warnings, so I decided to extract the Code-Snippet that caused these warnings: struct myStruct{ string thisString; }; myStruct structArr[]; void
I want to use a rectangle with rounded corners inside MetaTrader. When I export the image as PNG , everything looks fine — it has transparency (see image on the left). But when I save the exact same image as a BMP , the transparent background turns white. I also tried the alpha channel method in
I try to validate in automatic validation a new version of my EA, the report shows: Validation completed with errors test on EURUSD,H1 (hedging) not synchronized with trade server strategy tester report 42 total trades What can I do? For me it seems mql5 automatic validation doesn't work well. Or am
Hi guys is possible in mini chart , have only a chart of rsi with sma
double, string, string, color, color Nothing wrong here but I get an error. Build 5200 In Detail where CVSButtonMenu inherits from CVSwitch, while definition in CVSButtonMenu is and in CVSwitch it is
Dear all, class CMovingAverage { private : string m_Symbol; // Symbol ENUM_TIMEFRAMES m_Timeframe; // Timeframe int m_Period; // Period for the moving average ENUM_MA_METHOD m_Method; // Type of moving average
Hello I want to call zigzag in my expert and I want indicator to be in same folder. I read icustom description and it says it should be something like this: "\Experts\myExpert\zigzag" but it returns invalid handle. can anyone help with this