Hello all, Long time lurker, first time poster, as I always find my answer by searching the forum. Not this time though, and I have been scratching my head for a while. After calling ChartSetSymbolPeriod (either to change Symbol or Period), my EA deinitializes (as it should), my chart is updated
//+------------------------------------------------------------------+ //| Antfruition.mq5 | //| Expert Advisor for MT5 | //+------------------------------------------------------------------+ #property strict
Hi guys, I have a script composed of two scripts: PanelDialog.mqh and TradeManager.mq5 . I'm trying to access the function CheckAndCancelOrders(); , which is inside a class that, in theory, should be fully public, so I should be able to access it. However, there's no way to make it work. Basically
hi guy i have a part of my code that i try to calla OrderType void CheckAndCancelOrders() { // Verifica se il primo ordine è stato eseguito if (ticket1 != 0 && OrderSelect (ticket1)) // Selezioniamo l'ordine con il ticket { ENUM_ORDER_TYPE type1 =
Is it possible to integrate the DLL into the EA internally so that it can function properly during runtime without explicit import? Market considerations are not needed; this is for personal use only
Hello, In ' Strategy Tester ' > ' Trade Settings ' > ' Margins ' I can adjust ' Unrealized profit ' from ' use unrealizez profit/loss ' to ' do not use unrealized profit/loss '. However, after pressing 'OK' this option switches back to its default setting. Is this a known issue/bug or am I doing
Hi, During strategy testing, results appear that are either really good, or very much into the negative. But when I try to run their parameters standalone, the outcome is completely different, not even close. I observed this on Zen 2 and Zen 4 based CPUs as well, not sure if it is caused by the
I have written an expert advisor (admittedly first attempt) which uses a canvas as well as a cAppDialog to simulate the TradeView trade visualiser and it works great. However, when removing the EA using the "Expert List" option on MT5, it also closes the chart to which the EA is bound. I am clearly
Has anyone ever seen this problem? I ran a single back testing on my EA. Graphical show there are profit on trading. However, the history show loss in all trading. I don't known what the issue is
Hi, Can someone help me please to understand the maximum drawdown in the strategy tester. I have a setting in the EA to close all positions when the drawdown reaches -$50k, that's why you see the many drops in the attached equity chart, that's understandable. But what I don't understand is that the
Sup guys, i hope u can help me again. i got this code. this is from the customindicator: void SendSignalsToEA( const int rates_total, const double &close_price[], int &buy_signal, int &sell_signal) { double ma = ExtLineBuffer[ 0 ]; if (close_price[rates_total - 1 ] > ma) {
I have written a bot that automatically places trades based on multiple indicators, after some trying and compiling I succeeded and went on with Metatrader 5 on Vantage, in the strategy tester it is giving me error code 4756 Invalid Request in the journal, I've already tried analysing the problem
Hi, I encounter this error when I execute my code: ')' - open parenthesis expected , I am unable to solve this error, I don't know what the problem is, would please help me to solve this error if possible? Here is my code: //+------------------------------------------------------------------+ //|
Can anyone explain me how to find contract size programmatically? Like the one which is on MT4 contract specification... Market Watch -> Right Click -> Specification -> Contract size -- 100,000 (for ex, for EURUSD=100,000, for Bitcoin it is 1, for XAUUSD=100, and so on) It is used in formula for
Hy! If Anyone can Help me with this PLEASE.... I have an EA I want a change in little bit that place a stop order at the place of Stop loss for close trade on SL price to fix slippage issue and I also want that stop order act as a trailing stop and stop order has a fix user define SL I attached my
Hi Last night I ran my expert and it automatically traded without any problem. But now, even when I activate auto trading, it still gives an error and does not trade I activated and deactivated it several times, but it did not work. What is the problem and how can I fix it
In Ninja traders 8 platform one can customize time frames when getting the return value for the OHLC by adding a data series which one square bracket would say how many bars ago, and the other square bracket would give the time frame value calculated in minutes. Is the same thing possible with
As in the title, I want to have realtime information via MT5 in Python whether a given symbol currently allows trading or not. I want to have the same real-time information as what I have when opening MetaTrader and attempting to buy/sell a given instrument. The UI will not allow me do that for
How can i get total position with PositionGetTicket() MQL please someone help me
I want to build two information panels in one indicator and use the Canvas class for that. Because I want only 2 bitmap label objects on chart. I could find this article for creating a panel using canvas class , but unfortunately, it is only possible to create one panel in each indicator. - If you
Hi, i need help. I would to display a bar, cloured, to indicate a status. What i have to do ? Is it possible to have an example of code ? thank you
hi guys i have this part of code , i call it from button void CPanelDialog::OnClickButtonSellLimit( void ) { // Magic Number double lotSize = StringToDouble (m_edit.Text()); // Reads the lot size value double stopLoss = StringToDouble (m_editPrice1STP1oco.Text()); // Stop Loss (0
Hello everyone, I am working on an EA that follows an Alternating Buy/Sell strategy based on price movements, but I have encountered an issue where it keeps opening consecutive Sell orders instead of alternating between Buy and Sell . Strategy Requirements: The EA starts with a manual Buy order (0.1
consider the following code: /* * Curiously recurring template pattern * In my use case the following inheritance tree was intended to work with Candlestick Patterns */ #include <Arrays\ArrayObj.mqh> // base class for all patterns template < typename Derived> class CBase: public CObject {
Hi, i got a few strategies developed and coded by me, i test them to be profitable for the last 7 years (2018-2024 included). i now have a strategy in my hands that is decently profitable 2016-2024 but is not profitable 2012-2015, is that a reason to not take it into consideration? In my mind is the
Please Help What is the solution to this problem ?? Please help and thank you
Hi guys The strategy tester test my strategy well on major currency pairs such as EURUSD、USDCHF. But when I test my strategy on index such as US500、JP255,the profit and loss shown in the strategy tester is much larger than I expected. The contract size of my US500 is 1. So each 1.0 move of the
Hi all, I'm trying to recall the attached indicator with the followng expert, but it doesn't work. Probably parameters settings are not correct. Could you check please? double Open_Line[] ; int Open_handle ; int Bars = Bars ( Symbol (), PERIOD_CURRENT ); void OnInit () { ArraySetAsSeries
Good morning everyone, I was wondering if anyone has experience with any AI that can really help you with writing MQL5 code and, above all, that understands the difference between MQL5 and MQL4. From personal experience, I have tried several AIs, I can say that my experience with them is rather
Why do i got "failed instant buy 0.01 XAUUSD at 1810.70 [Invalid volume]" message when doing EA validation ? My product needs user to select the forex pair before it can trade

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.