I have built a trading bot , and when i back test it from may last year to now it is profitable genarating 57% profit when risking 1%, but the issue is when i back test from january last year the bot does not produce the same results within the same period it was profitable that is from may to now
Can I programmatically clear the StrategyTester journal on the start of my backtest run? Thanks.
Hi, So i'm trying to build a scalping system that watch the market in 5 minutes timeframe and execute trades based on simple algorithm, until here its all okay (I hope so), but when it comes to lot size its a bit tricky. The formula i calculate lot size is: willingToSpend = accountValue * .01 //
My MT5 EA is creating a file that will be read by an external system, and then that system creates a response file that my EA reads. This process happens once per M1 bar and takes about 1-2 seconds, so when running live, timewise there is plenty of margin. The problem occurs when running a backtest
I have a problem with optimization: when I run a backtest with a strategy, it takes about 8 minutes. However, when I run a simple parameter optimization over the same strategy and period with 10 variants, the optimization takes around 58 minutes, which is more than 7 times longer. I didn’t have this
I have omitted error handling for brevity. Let's assume there are no error while opening a position. The below code works fine for me. MqlTradeRequest request; MqlTradeResult result; ZeroMemory (request); // Ensure request structure is clean ZeroMemory (result); // Ensure result structure is clean
Hi all! I try to create a code to check if the last buy position (what is closed) if it closed ik loss or in profit. i Try to create a bool function so before the trade started , the EA is sure that the last buy position is not closed in loss (false). if its closed in loss it return true and then i
Hello! Am working on an EA and I wanted to alternate orders. I have failed to make it possible. I want to check if previous trade was BUY the next trade should be it's opposite and vise versa. Help will be much appreciated folks
Dear I try to optimize a trading robot from my PC, after running sometime optimize running my all core show status finished and some core show disabled. but my optimize show running, but core show finished. Do i know what is this status mean, is my optimize stop or it is running. I have some
Hello, My name is Oskar, I have good performing strategy which would perform even better with quicker executed trades , I got idea that something like button would help me, So my question is... Is possible to create button for MT5 which after clicking would open automatically 2 position Buy and Sell
Hi, I'd like to perform a series of tests, +30 presets, with an EA across multiple symbols, 20+. I could do that manually, opening the .set file in the Tester, runnnig, waiting, and then doing it again, but of course that would be a hell of a work, so a script-based automated mode would be
Just got round to using services and suddenly the services context menu has been replaced by the scripts context menu. My service will only run on a chart! MT5 version 5.0.0.4626 from [redacted] Any ideas
Below is aportion of my code that once the condition is met it has to draw an arrow above the next opening candle. Teh arrows do not get drawn waht am i doing wrong if (open[ 0 ] > rsiLevel && close[ 0 ] < rsiLevel) // If candle opens above 50 and closes below 50 { // Position the
I used the predefined list, but it gave 1 error that says: cannot convert enum enum MY_TIMEFRAME { D1 = PERIOD_D1 , H4 = PERIOD_H4 , H1 = PERIOD_H1 , M15 = PERIOD_M15 , M5 = PERIOD_M5 }; input MY_TIMEFRAME Timeframe = H4; int OnInit () { datetime time = iTime ( _Symbol
A thread for metatrader 5 coding related questions : coding questions and general code development issues questions (and answers if there is an answer)
Hi all, Is there anyway to run the mql script or service on mt5 start (user open mt5)? Thank
I created an EA for strategy testing, it has no error or warnings, yet it can't detect Horizontal lines, or Moving Average . more explanation: the EA is supposed to open a trade when price touch Horizontal lines i draw on the chart, or Moving average.... . same rpoblem happened when i created an
hi guys! i developed a news scalping EA for xauusd pair an i have some issues with it in strategy tester: 1-it does not trade all interval days that i set! only 3-5 days 2- when i try to implement SL i get error in strategy tester! the Ea is based on zlsma and ema crossover
i have developed range breakout EA,it is running perfectly on my mt5 and i am using it on live account. but when i try to upload it on market place it is giving erros like these 2022.02.01 06:00:00 failed instant buy 0.1 EURUSD at 1.12332 sl: 1.12282 tp: 1.12432 [ Invalid volume ] 2022.02.01
why did my code has no trade order? //+------------------------------------------------------------------+ //| celue1.mq5 | //| Copyright 2024, MetaQuotes Software Corp. | //|
'OrderSymbol' - undeclared identifier mq1.mq5 219 50 'OrderSelect' - wrong parameters count mq1.mq5 165 13 'OrderType' - undeclared identifier mq1.mq5 167 58 'OrderSymbol' - undeclared identifier mq1.mq5 176 34 'OrderVolume' - undeclared identifier mq1.mq5 177 34 'OrderTicket' - undeclared
Hi, I find the following fact quite shocking: I have an EA that I tested with exact same settings, exact same spread (chosen in the startegy tester) and exact same time period on 3 different brokers. Believe it or not, all three results were different. Not only that, in one broker, the EA was
I bought an EA from a seller, I have issues with the trading bot , but he doesn't reply to my queries. What is there to do? Please advise
Hi there, I subscriped to a signal (MT5) additional to running Expert Advisors. The EAs open an close pending orders every 5 minutes when they run normally. When I activate the signal on this account, then error 4752 occurs for every attempt to open such a pending order. As soon as a stop the signal
Hi Everyone, I am looking to hire a developer to create an Expert Advisor (EA) for MetaTrader 5, utilizing two custom indicators: HalfTrend and Squeeze Momentum . The EA should be designed based on specific trading conditions which I will detail below, and it should also include comprehensive
I created a simple function that sends a message do Discord from any MQL5 EA, I hope it can be useful to others. Now I want to create an EA that reads that message from Discord. While reading about this, I found that one can use the GET function as a WebRequest, which can be implemented in the
I have a script in MQL5 derived from MQL4 with the appropriate libraries to make it 'work' on MQL5. It does work... but only when it feels like it. Here is the piece of code in MQL5 derived from MQL4. string _Apri_Primario( string oPen, double lott, int slipp, double STp, double TKp, string
please help, My ea can't close all position with profit or Stoploss after 1st order is loss, it can't stuff and open new order when it enough condition please help me make code correct, thank you //+------------------------------------------------------------------+ //|
Can I build MT5 DLL files with C# , or must I use C++ ? If it's possible in C# , is there an example for this
Hi all, I couldn't find a dedicated bug-reporting channel, so I'm posting here. I'd appreciate any confirmation from the community on this issue, and ideally, someone could escalate it to the development team if confirmed as a bug. When using the Python API’s order_send() function in MT5, the
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.