Expert Advisors and Automated Trading - page 3

Hello , so i got a situation with my one of my EAs , so basically on the backtest everything works fine, trades are set to be when they should and closed when they should , but on live trading , the bot is not setting trades to be , and is not respecting the rule of not opening a new trade if the
There is a EA that i downloaded from MQl5. I changed some settings and added 2 inicators to it, it seems very profitable now. Can someone rescripts that Ea with the new indicators added
Hello everyone I have an EA that works well in the MT5 strategy tester but it does something else in the real demo.I hope you can help me correct this. This is a very profitable strategy 📈, I will provide the source code .mq5 file if anyone wants to help me.Thank you in advance
I am currently working on optimizing an EA based on SuperTrend clustering, and I am honestly struggling to find a solid and reliable optimization process. I have tried different approaches, and the ones that seem the most logical to me involve using genetic optimization with a large set of
Hi everyone I would like some feedback on my code or how I can make it more efficient as it uses several conditionals and loops. I wanted to create a multicurrency news filter for when 30 minutes before and after the current time there is an important news event. For each news event I need its
Dear Forum Members Wish all Marry Christmas & Happy New Year. I have got above error while running Strategy Tester. Any clue what is this could be? Regards
Since the latest version of MetaTrader 4 - Verion 4 - Build 1400 - 10 Nov 2023 was released I get the message that my product requires active MQL5 account in Tools->Options->Community. My user ID and password is entered on the Community screen. The same user ID and password I used to enter this
I've noticed that after copying history with CopyRates MT5 keeps copied array in memory. It's ok for cached access but when I run through lots of symbols my memory ends fast. And memory stays occupied until MT5 exits. Is there any way to forcibly release memory occupied by CopyRates cache
  Notification  (7)
Hello! I keep receiving this notification on my terminal send request failed(invalid certificate). This notification starts once I open the first trade on terminal. I closed the trade, notification keeps coming. If I restart the terminal, notifiation stops until I open again one trade. Kindly
Hi guys, I made an EA and back tested it on historic data. I want to test it in the same demo account but on live real time data to see how it will go if I run it real time. How can I run it on real time data not on historic data? I will highly appreciate your support as usual. Thank you very much
Hi, i readed this book's reference page, and now i'm really confused. It's clear that OrderSendAsync doesn't get any in the result but "request id", but it seems that with OrderSend we cannot have guarantee on what we can get on result data. Reading these two statements: "It's important to note
I'm mostly talking about issues with the "Visual Mode" of the strategy tester 1) If I start a backtest, but then stop it using the stop button of the main MT5 window and then try to start a new backtest by clicking "Start" : it doesn't work. I have to go to the Visual Mode window and click stop
Hello, How to know the number of the week? MqlDateTime gives a lot of info, but I did not find the number of the week. //+------------------------------------------------------------------+//|                                                   WeekNumber.mq5 |//|...
I'm using CustomRatesUpdate() function . It costs up to 2-3GB of disk space on real time running interval 1 sec in 24 hours (version A) but while I copy M1 timeframe data from server then CustomRatesUpdate() from 8/2024 just in 7MB (version B) . CustomRatesReplace() also has the same effect Version
In market execution mode, we can't specify an opening price and a maximum deviation, but the broker sets the openprice for the trade. This raises two questions for me: 1. Cannot we set a limit to slippage? Could the broker set an open price significantly different from the one I got before opening
Hi, reading documentation it seems (maybe i'm wrong) there is no EXACT way to know, before a trade is open, how much margin the trade will take. Reading OrderCalcMargin , doc specify: The function calculates the margin required for the specified order type, on the current account, in the current
I want to check weather the deal in history is SL or TP. How do I track the deal from the order number that assigned when place order (name: ticket01). I understand that ' HistoryDealGetTicket' parameter is 'Number of a deal in the list of deals'. But what is that? ulong deal =
As I run optimization test ,get result and run single test result not match the result. Get huge deviation, not sure it's optimization get error or single run get error. It's so confuse me. I do lot of tests base on this version code,over one month. MT5 base on version 5, build 2981. Always skip the
  pip install MetaTrader5  (19   1 2)
ERROR: Could not find a version that satisfies the requirement MetaTrader5 (from versions: none) ERROR: No matching distribution found for MetaTrader5 This is no longer working
// MT5 – minimal heartbeat tester #property strict input string CONFIG_FILE_NAME = "***\\***_mt5_config.ini" ; string gApiKey = "" ; string gAccountId = "" ; string gIngestUrl = "" ; string gHeartbeatUrl = "" ; //----------------- helpers ----------------- string TrimBoth( const string
In an EA that I am developing in MQL5, I use the function SymbolInfoDouble(symbol, SYMBOL_TRADE_TICK_VALUE ) to get the tick value of pairs that I am trading. It gives me the correct tick value when I run the EA normally. However, when I run it on the strategy tester the function returns wrong tick
Hello guys, I have a problem when try to use example for vector::Sort at https://www.mql5.com/en/docs/matrix/matrix_manipulations/matrix_sort when I compile it said error that: 'Sort' is not a member of 'vector' type I try some another ways but still don't know the way to use Sort method Can you
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,...
Hi there, the documentation on OpenCL ( https://www.mql5.com/en/book/advanced/opencl ) mentions CPU- and GPU-support. OpenCL is an integral part of the book Neural Networks for Algo Trading with MQL5 ( https://www.mql5.com/files/book/neuronetworksbook.pdf ), therefore I'd like to ask whether OpenCL
Complement of the new year. I need help to make sense of the tester results. I have developed several EA for Mt5. When I optimize the EA using the same range of parameters with two different laptops, I get different set of results. Further, when I take optimized results/parameters from one Laptop
Using MetaEditor version 5.00 build 5430, Nov 14, 2025 I've read the docs on vectors, and trying a toy example, which compiles with the errors: 'vector_a' - unexpected token, probably type is missing? playground.mqh 32 1 '.' - semicolon expected playground.mqh 32 9 Here's the toy code
My problem is the following : Even after create a python script into the MQL5 IDE and select the MetaTrader 5 library into my script I receive the following error ModuleNotFoundError: No module named 'MetaTrader5' can somebody help me with that problem
When placing a BuyLimit and a SellLimit order (both with SL=0 and TP =0) and a freezelevel is defined in the symbol config file, the SellLimit can be removed using OrderDelete, but the BuyLimit cannot. I have correctly implemented the consideration that (ask-price_open)>freezeLevel*point for
[Deleted]
Hi, Everything is OK with my Python environment in which I work every day, but when I want to import the MetaTrader5 library, I get an error message : ERROR: Could not find a version that satisfies the requirement MetaTrader5 (from versions: none) ERROR: No matching distribution found for
When running on the Strategy Tester the optimization results are up to yesterday even if you mark the today/next day in Custom period. How to optimize on M1 today's data ? Thanks in advance