Expert Advisors and Automated Trading - page 109

As the title, TimeDaylightSavings() doesn't work when I run backtest for a year, it always Print out "true". Expected: I want to detect the time while running the backtest is considered daylight saving time or not int OnInit () { //--- trade.SetExpertMagicNumber( 1 ); //--- return (
Getting this error in MT5 backtesting. Plz help to fix it. Plz let me know if i need to provide more details. IM 0 11:49:25.084 Core 1 2023.01.04 01:28:01 OrderSelect( 37183, SELECT_BY_POS, MODE_HISTORY ) - Error #4755
Hello everyone! I've found a pretty good system that makes solid trades on the H1 time frame EUR/USD. Now, all it needs is an EA to stack some serious cheese! Here it is: MACD: Fast-5 Slow-12 Signal-100 RSI: 21 Period If the RSI is above 50, look only for longs, if it is below 50, look only to go...
Hello, I am using pending orders in my EA and need they expire today if not activated. but in strategy tester the pending orders will not expired and still remain pending orders in terminal tab. What is the problem here ? how can be resolved ? My code is as below. void placeOrder( ENUM_ORDER_TYPE
Hello, I am currently building an EA and it uses data from an external file, the problem is that when running a single test each time it has to re-read that data file. The question is, is it possible to retrieve data once and save it somewhere to use for running slow complete optimization test
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
  Error in my code  (1)
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
  Freezing charts - Error 4203  (23   1 2 3)
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