Hey all, pulling my hair out trying to work out why my EA will only perform one trade on backtest and wont open another afterwards even though I can see conditions are met. Good someone kindly point me in the right direction. #include <Trade\Trade.mqh> #property copyright "Copyright 2022, MetaQuotes
The EA is supposed to buy when the previous candle was bullish and sell if the previous candle was bearish. input double takeProfitPips = 100 ; // Take Profit (in pips) input double stopLossPips = 100 ; // Take Profit (in pips) input double lot = 0.1 ; datetime LastActionTime = 0 ;
I want to have a code to allow only one position waiting for my code Improperly formatted code removed by moderator
Hello all, I'm trying to set order with EA and get an error invalid stops Order type: OP_SELLSTOP Price: 1.066960 SL: 1.068760 TP: 0.000000 Bid = Ask at the moment of the operation and they are 1.067200 Stop Level of the pair is 0.00000 Can some one help me to understand what's going wrong with it
Hello, good day, I would like to know if there is any other way to connect Metatrader 5 with C# without using .dll, or shared files(but this is too slow) or TCP/IP connection. I have read that there is documentation for integration with Python, but I have not found information for integration with
Hello. I am new to Forex, MQL and MT5. I subscribed to a signal and so far it's doing well. But, the trade size is tiny. The profits have been under a dollar. How to I change the size of the trade. I don't where I can adjust the trade size.? Thanks in advance for any help
Hi, Currently I am using a specific expert advisor which has two many default settings, and on the website of this advisor users load their set files for symbols they test and find encouraging results. I am looking for a utility that can compare the default setting file parameters with single or
Hello everyone, I am new to MQL5 programming . I have converted a code that retrieves data from the last closed trade from MQL4 to MQL5. Even though the code is written correctly and there are no programming errors, it does not work at all, neither in live nor in the tester. I kindly request
Hello, I would like to write a program, preferably EA, to analyze the combined history of transactions on several accounts. The program would connect to n accounts, download transaction history, process, display and enable analysis. I stopped at the idea of how to connect from EA to several
Hi, What's the easiest way to move an object on the graph? I've seen that you should use: CHARTEVENT_OBJECT_DRAG, But I've only found this thread on the subject, a useful link or sample code would be welcome 😉 Best Reguards, ZeroCafeine
deal Fellow: While trying to learn about Neural Network and AI, I come across an article https://www.mql5.com/en/articles/12187 . I am trying to put most of the possible calculations within the CNeuralNet and remove them from EA_TradeNN. I am using setup of CStategy --> CBaseExpert -->
If I hardcode the time period, for all the ema handles as Period_H6 for a simple ema crossover strategy, and run the tester with H6 selected, as expected it provides a profitable result. However when I change the tester time setting to H4, it gives a different and much worse result. There is no
Hi everyone. I recently started an MT5 account with forex.com. For some odd reason when I attempt to backtest most times the tester stops early than the set end date. I have ample amounts of storage and there is no error in the journal. Does anyone have an answer that might help me? I'd really
My code is as follows: int count = HistoryDealsTotal (); ulong tik = HistoryDealGetTicket (count- 1 ); ENUM_DEAL_REASON drrr2 = HistoryDealGetInteger ( tik1+ 1 , DEAL_REASON ); When using the debugger (tester), values of variables is as follows, while they are different from the History
Greetings community To my knowledge Microsoft Windows allows a maximum of 32 installations of metatrader per user account, I'm aware this can be bypassed simply by creating a new user. My question is how does one copy trades between different windows users on the same computer? Thanks
Hi, its frequently that we have to deal with frozen charts. Any function like ObjectGetInteger(), even ObjectName() or similar, then needs seconds to return and the error code is always 4203. The error code makes no sense at all, since ObjectGetInteger() uses OBJ_TYPE with an existing object, and
I know there are differences between brookers. But why does the example downloaded below work for some and not others? int OnInit () { MarketBookAdd ( _Symbol ); return ( INIT_SUCCEEDED ); } void OnTick () { MqlBookInfo priceArray[]; bool getBook= MarketBookGet ( NULL ,priceArray); if (getBook) {
Hi, I'd like to ask coder that has already implement a multi-strategy EA on their EA. I read an article about multi-currency multi-strategy EA from this link with this framework like the picture below. From the picture above, what I understand is having 2 separate strategy and put it in an EA. I
Hello developers, I recently bought an EA from a developer and he sent me the .exe file with the password to activate it after I shared with him my account number and broker's server. The EA is working now, but how can I guarantee that is will not be disabled out of the blue? I mean, how can I
can anyone help me please, webrequest function always returns 1001
I've been trying to test my socket connection using tester, as I will need it to communicate back and forth with Python. But it keep returning 4014. What I found in the documentation (https://www.mql5.com/en/docs/network/socketconnect), it cannot be called from an indicator, I've made it as an...
I've recently seen quite a few updates to Integration with Python, including various functions. Does it can be used in back testing? According MQL5 Reference, I found that there is no such function. At the same time, Socket functions can not be used from the Strategy Tester. Is there a way to
I'm trying to do this programmatically, but I don't see a way to do it manually either. Is this possible
Hello everyone, I have a problem when I create a Panel in MT5 using Dialog library. I have some elements within my dialog box, when I need to use "Destroy" method to delete some objects within my dialog box and then again use "Create" method to create those objects, when I do that the relation
How to identify panel button click during testing. OnChartEvent of course doesn't works
Hi All, I would like to know whether it is possible to check historical Account Leverage ? Alternately, if someone can guide me on how to calculate the Account Leverage using MQL5 code for a given date time would also be useful. I've tried the below code, but the output in the journal always returns
Hello, Is there anyone who can help me about CHART_SHIFT_SIZE in my EA, it works with charts, but not in strategy tester . I have a rectangle panel with labels and everytime, bars are behind it. Thx a lot
Hello for all I have error in EA RSI and want to fix it,The error is the EA close the position randomly without hit SL,TP,Or close trade by opposite signal ((i set the close trade by opposite signal to false)) and the EA still close the position randomly
Hi, I am using EA position sizer that automatically adds the stop loss and take profit lines onto my chart once I place an order. I should be able to drag the lines on the chart if I want to change the stop loss or take profit. However, a few seconds after I drag the lines to a new price, they
Hi everyone, does EAs work when I close my notebook. It is still on

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.