Expert Advisors and Automated Trading - page 25

First off all, sorry for my bad english, my mother language is Spanish. Im programming an EA for Forex on MQL5 that opens positions when some conditions are met, the EA places a TP and SL based on some conditions and of course calculates the lotage to only risk 1% of the account. While doing
I checked with several brokers and found that, in cases where a broker offers both something like EURUSD and EURUSD.m ( it can be any symbol that has two versions in a broker ) and only the second symbol has full trading access while the first one is disabled However, the tester incorrectly returns
Hi all, I use this code to set Breakeven for my EA, but i got message : 2025.02 .05 23 : 14 : 28.843 2025.01 .20 05 : 51 : 32 failed modify #2 buy 1 XAUUSD sl: 0.00, tp: 0.00 -> sl: 0.00, tp: 0.00 [Invalid stops] 2025.02 .05 23 : 14 : 28.843 2025.01 .20 05 : 51 : 32 OrderSend error 4756 2025.02
Hello, I want to know if anyone else is having this problem. Since last update on mt5, my bot is running into problem when backtest in real ticks. When I start the backtest it goes normal, the cpu goes to 100% while the memory is loading each agent, normally it would be 100% CPU and about 40% of
Hi I have a graphic interface wrote with c# for my Expert Advisor. How can I just have a single instance of my interface for all the chart that I want to use my EA? Thanks for helping to solve this problem
Well, I have the next issue. I create button inherided from CButton class. TryIng to iverride OnMouseUp and Down functions to prevent a button click. But it doesn't work. I want to use a button as a label with a background and the ability to change its color. Or as a color indicator (light bulb)
Hello, I tried to debug EA in MetaEditor 5.0 (Start/Resume debugging on History data). Debugging works well but calling CTrade::PositionOpen results 'Market closed' error. I am debugging on history data, why market must be open? In reality, market is now open, but it doesn't work. I thought that
  EA issues  (12   1 2)
Hi, I tried to download an expert advisor on MT5, however it would not work. I then reached out to the company who then tried to install the EA, they told me to contact yourself as there were some errors in my EA's in MT5 (I have not messed with any settings). I was told to inform you that I’m
Hi, I have MT5 open with 5 or 6 charts. I use an expert advisor and various custom indicators . The charts move automatically, each tick is refreshed. But there comes a time, some chart stops, the ticks do not update, as if the market were stopped. The only way to refresh and resume tick event is
i am trying to capture latest closed position and print its info , everything is printing correctly but the comment is not at all , i tried to add small delay but no show !. void OnTradeTransaction ( const MqlTradeTransaction &trans, const MqlTradeRequest &request, const MqlTradeResult &result) {
Hello, If I start a fast genetic optimization including the use of cloud agents the optimizations proceeds normally through the backtest and works like intended, when it then proceeds on to the Forward testing it gets stuck just like you can see in the attached screenshot. Same thing applied to many
Hello I've found a small issue on canvas where if you erase a canvas with 0 opacity and subsequently save the placeholder bmp it does not save the bmp as an empty fully transparent one. Change ColorToARGB from ,0 to ,1 to see the difference . Thanks #include <Canvas\Canvas.mqh> CCanvas DESIGNER; int
Never needed before, but when you need, you can't find them ;) https://www.mql5.com/en/docs/constants/environment_state/marketinfoconstants#symbol_order_mode Not a bug, just incomplete ;) `pip list` shows: MetaTrader5 5.0 .4803
Hi, Buy 1 (+1 long) then Sell 2 (-1 short), then Buy 2 (+1 long)… Can I use "TRADE_ACTION_CLOSE_BY" for this strategy ? Is it useful, does it save transaction fees in this case ? If yes, how?? No Ctrade library please. I've spent hours trying to find a MQL5 code example !! Thank you
My debug tab seems to be missing I am missing something obvious
Hello, for Metatrader5 in python, market_book_get is not working. It always print "mt5.market_book_add('EURUSD') failed, error code = (1, 'Success')". How to solve this problem ? Thanks This is the script: import MetaTrader5 as mt5 import time # display data on the MetaTrader 5 package print(
double lots= GetBoomLots(inpRiskPercent); if ( PositionsTotal (B1Comment)> 0 || PositionsTotal (B2Comment)> 0 ) { if (TakeprofitnPartialClosure(inpEA_Magic,inpTypeLot,flotsize,inpTsl_percent,inpTsl_trigger,inpPClosePercent)){ //trailstoploss
  Feature Request  (2)
Hello MetaQuotes Team, not sure, if this is the right place. I give it a try. Is it possible to implement a general function for opening an url using system browser? That would be very useful, as it would be possible to make help / reports available right from within expert. Currently this is not
ChartGetInteger ( 0 , CHART_BRING_TO_TOP ); It should return a value of 1 (or true) in visual testing, but it returns 0 (or false). Meanwhile, in MT4 testing visual mode, it returns 1 (or true). It should be the same. Could you please check this? Thank you
Dear community, when publishing my expert I get an error message that external DLLs are not allowed. I do not explicitly use external DLLs, but it could be, that this means user32.dll and/or shell32.dll. The DLL shell32.dll is used to open a browser from the Expert. I would like to use it to open
ChartSetInteger ( 0 , CHART_SHOW_TRADE_LEVELS , false ); It does not work in MT5 Strategy Tester (visual mode). You can try it yourself. This is important for me because it obstructs my trading bot’s display. Please check and fix it in the next build version. Thank you
I have a problem, I'm running MetaTrader 5 Strategy tester with 8 agents (my computer has 16 cores). He hasn't worked for me for a month. There is no collision with the anti-virus program. Reinstalling didn't help either. All 8 testers are marked as "not connected" in AgentsManager. I have Win 11
Hello, I have been having issues with the Meta Trader 5 strategy tester since i logged in to my [redacted] account on there. When trying to backtest on EUR.USD tick data from 2022 - 2025, it has a quality of analyzed history of 9%, and fails to load anything before the end of 2023. I have attached
Hi, I have some experience in pinescript and other languages but new to mql5. I want to save a number in US session open. But I have some problems. double test = 0 ; if (time.hour == usOpenHour && time. min == usOpenMin){ test = 1 ; } Comment( "\n session max : " + test); The problem is at
Hello everyone. Is there a way to change account balance programmatically(in tester mode)
The MQL5 documentation -> ONNX section -> " Creating Model " article offers the "ONNX.Price.Prediction" shared project for an example on how to use Machine Learning in MetaTrader5. I tried running the project, but faced some problems: - I noticed the code doesn't run with the library versions
Good day i'm new to mql5 and have been struggling for a week now to get it right but still no luck. i'm willing to pay someone to just edit my EA so it has a trailing stop loss and a Tp if anyone is willing to help me please send me a massage or a email nielotto5@gmail.com Here is the EA code
Hi! We obviously know the strategy back tester uses historical data to test scripts. Is there a software that uses machine learning ie pattern recognition from past historical prices to 'project' artificially future prices and allow the script to be tested 'forward' in this regard
I'm getting error: there are no trading operations from automatic validation.But it's not true 'cos I'm using this EA on my live account as you can see from picture
I deployed an EA in MQL5 VPS since October 2024 and it worked fine until Jan 15 2025.. I presume Metatrader migrated the EA to a different sever and in that process the EA was removed. Fortunately, all the positions open were at profit and this issue was not negative but it could have been. MQL5