As per title, the algo works fine on demo, but operates in the exact opposite way in live. It places trades when it should not, and instead 'sit out' of the market when needed. i.e only place trades when the market is going against the trade (like martingale). What could cause this
Good people, if i have order a trading robot or i have bought the existing one how can i test it to see if it is really working here on the website? There is something i don't get. If the seller or developer have sent the robot i just download it without testing it first
I am trying to code EA/Script, so when I start MT5 it use a list of yesterdays tickets of orders I created. and check each order by ticket to see if order still open or if closed by SL or TP. But no matter what I try I can't find if order closed by TP/SL. This data I can't find in order details
I'm producing some reports in large strings and print them to the terminal and I've noticed that the Print() function with very large strings truncates them after some thousands characters. For example, this scripts does not print the entire string: void OnStart () { string tmp =
Hi everyone, I'm looking to purchase an Expert Advisor (EA) on MQL5 and want to focus on those that have live signals available. Is there an efficient way to filter or identify such EAs on the platform? Any tips or guidance would be greatly appreciated! Thanks in advance
from https://www.mql5.com/en/docs/runtime/testing it mentioned that when using "open price" in modelling mode Suppose we test an Expert Advisor on EURUSD H1 in the "Open Prices Only" mode. In this case the total number of ticks (control points) will be no more than 4*number of one-hour bars within
Hi there, void OnStart () { //--- request all the existing history on the account if (! HistorySelect ( 0 , TimeCurrent ())) { Print ( "HistorySelect() failed. Error " , GetLastError ()); return ; } //--- get the number of deals in the list and display it in the journal
I would be grateful if you could solve the issues with this code
Hi I have to separate the letters of a word , for example "USDJPY", then change it to "U,S,D,J,P,Y". I mean using a Comma or Slash between it's letters. can you help me please
hi there when testing an EA and stopping it in middle of test, the deinit function is not called. i checked this multiple times and read the documents. i have an object that writes csv journal files and in the end (when EA is closed or stopped) i need to add a summery and i decided to do it in
Hello people, I'm experiencing issues importing E-Mini Nasdaq100 Futures (NQ) data into MetaTrader 5 for backtesting purposes. Following the custom symbol guide, I attempted to import 1-minute historical data from January to October 2024. I copied the ENQZ24 symbol and created a custom symbol
Greetings, I am struggling to get rid of a panel's close button. The reason to do such thing is, I successfuly created a CAppDialog panel with a guide found on YouTube, and one of the buttons should wipe all the objects created by the expert so far, but since it is irreversible, I want a
Is there a programagic way (like SymbolInfoDouble, or AccountInfoDouble) to get the broker's commission per lot. From the market watch window, I can get it by right click on a symbol -> symbol specs. Anybody has an idea how the market watch window implemented it? I suggest this feature should be
i tried to do a very simple test in onTick() function just very simple like buy the symbol when 8 days ma cross 20 day ma and close price higher than 20 days ma on 1H graph. for both ma, i use bar close. and check if ma1.Main(0)>ma2.Main(0) && close>ma2.Main(0) as far as i know, this statement will
Hi, I am testing a strategy for the US500 with the python API. My broker ( [redacted] ) has a maximum lot limit of 250 that's creating some issues. For example, if I have $200,000 in my account with 50x leverage (which is not too much for 1 or 5 minute bars outside of peak hours), it would give me
Hey all, I run optimized tests, selected a result that I liked and run the single test but even though the number of positions and profit was the same, the drawdown wasn't. See images. Anyone knows why it might happen? This is how I run the single test This is how I run the optimized test Thanks
I want to use the object manual interaction function during backtesting, but I found that the OnChartEvent() function does not work during backtesting. How should it be set? Or is there any other good way
Could someone please help me with this error "- open parenthesis expected" it happens at line 8 and line 22. I don't know what to do. if (range > 650 * Point) if (total_range > 100 * Point) // Function to check the candle condition bool CheckCandleCondition() { // Get the high and low prices of
I have a simple EA that closes my orders at a time that I specify with inputs. At the moment it closes ALL my orders but I'd like to update this EA to only apply to the symbol NZDCHF . Something to note is that I trade multiple accounts that have different names for the same symbol, such as
I have an EA in MT5 which is designed to convert messages into a trade. The connection works, but I have encountered an issue I don't know how to fix. In telegram, I made a bot which recieves webhooks from tradingview. These messages are correctly recieved and displayed on the chat. However the
Hi, I'm trying for the first time this class and followed this guide https://www.mql5.com/en/articles/481 . Problem is that after placing the order I need to get the ticket because I'm trying to manage the operations by myself. The problem is that even the operation is placed and it has a ticket, a
when we creat OBJ_EDIT, we can modify its value manually. But on backtest, if we modify it's value, it can not change. How to solve it
When I access MT5 from python, I can get date and price information, but not last and tick_volume. I couldn't get them with my own code, nor with the official sample code. The result is always 0. from datetime import datetime import MetaTrader5 as mt5 import pandas as pd if not mt5.initialize()
Hello everyone, I'm trying to develop a pattern robot, it should send the signal at the OPENING of the ZERO candle ( O[0] ). It is sending correctly on the Zero candle, but on the next candle it sends the pattern again, even though it is a new zero candle and the pattern is already one candle
Hi i am developing a backtester in python so i have tried to use the official python example https://www.mql5.com/en/docs/python_metatrader5/mt5copyticksrange_py to copy ticks but the volume seems to be always 0. is there any way i can get the volume information as well. Thanks in advance
Do you think anyone can help to explain what is the reason the order will be cancelled automatically? I am a newbie in the EA trade. Some setting was wrong
Hi I'm David, could anyone help me with a quick question: So basically I need a script that exports the trading accounts info that means (date, profit/loss, commission, etc.), and it has to do it automatically, how do I procede ? Thanks. :)
Hi, I am new in mt5. i am confused about the price used in back test. something very simple as below. i hope someone can confirm my understanding CSymbolInfo info; void OnTick () { double ask=info.Ask(); double close= iClose ( NULL , PERIOD_CURRENT , 0 ); if (ma1.Main( 0 )>ma2.Main( 0 ) &&
hi i need help with my code error 'iMA' - wrong parameters count KILANGI DREAM.mq5 43 21 built-in: int iMA(const string,ENUM_TIMEFRAMES,int,int,ENUM_MA_METHOD,int) KILANGI DREAM.mq5 43 21 'iMA' - wrong parameters count KILANGI DREAM.mq5 44 21 built-in: int iMA(const
Error, martingale calculation. the doubling of the lot in the martinagale strategy proves to be inconsistent. It jumps from 0.1 to 0.2 to 1.6, after the take it goes back to 0.1 and then jumps to 0.8. Which part of the code could be the problem

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.