Expert Advisors and Automated Trading - page 285

Hi, everyone! I've tried to run an optimization and the EA Journal at the Strategy Tester got flooded by the messages shown at the picture. While debugging nothing goes wrong and now I don't know what to do. Any ideas, guys? Best regards.
Hi this is my first time here sorry if this is the wrong place. I just started having this issue today, the code was working fine before. I'm using mt5 and getting "Error loading - wrong type." This is very frustrating for me because I cannot run any ea's as of today. Any guidance would be
I'm using a demo account right now and trying to play around with exper advisors scripting. I'm trying to reporduce that tutorial: https://www.mql5.com/en/articles/5691 but I still get error: Connection to localhost:9876 error 4014 Any idea why it isn't working? The python server is runnig
Hi im trying to make EA based on custom indicator values but in data window i see only one buffer, either than this its empty when i point the mouse of the arrows any help ? i tried this but didnt work double SignalBuy =iCustom(NULL,0,"pattern",0,1);double SignalSell = iCustom(NULL,0,"pattern",1,1);
I know how to drawl trendline using trend object but I have no idea how can get trend slope as manual drawing here manual can drawl both upper and lower trend here object Here my code Trend_Line(Time[0],Time[65],Close[0],Low[50],Gold,STYLE_SOLID);
Hi I'm trying to set up a robot to tell me when price moves by about 10 points. What I've tried is if(Bid < OBJ_HLINE) { SendNotification("Message"); The problem with that is, it notifies on every tick, so endless messages. But if I say if(Bid == OBJ_HLINE), the price will probably never be
I cannot find any docu about compiling expert adivsor in demo version? How do I create a demo version of EA or Indicator?
Hi everyone How do I add a logo to Expert? Sample : thanks all of you
I found the zero divide error in this trend line calculation int fnGetTrendLineSignal(string strName, int type){// get the four coordinatesdouble x1 = ObjectGet( strName, OBJPROP_TIME1);double y1 = ObjectGet( strName, OBJPROP_PRICE1);double x2 = ObjectGet( strName, OBJPROP_TIME2);double y2 =
Hi everyone, I'm now using MetaTrader5 libraby for python to get history price data. However, I can't get the the price that from 2014 backward. I just able to get from 2015 to now. My code is as below usdjpy2 = MT5CopyRatesRange("USDJPY", MT5_TIMEFRAME_M15, datetime(2009,1,5) ,datetime(2019, 1, 3))
Hi, I am having an issue with my EA optimization results or the back test results against my EA. When I run my EA against all market watch symbols the results are different from a single test run. The strategy tester is set to run against 30 currency pairs delays of 50ms and my maximum balance. It
Hello, hope this is not a duplicate, but i've noticed, the documentation to mql5 concerning function templates is showing code, that does not compile any more, redering the template functionality more or less useless. (And broke my code) The documentation shows an exmpel at
I have a very special situation in which I am not able to send buy and sell orders using mql5 because auto trading is disabled on my broker server from their side and it is not possible to ask them to enable it. I was wondering if there is any possible solution that I could write a code that on
Hi everybody, I'm really ignorant about Expert Advisors. I have TPL file and EX4 indicator files for MT4, but im totally ignorant about coding i don’t know how can i transform template and indicators to EA for mt4. Could you please help me if you know the answer
i am looking for a Brokers that accept Signals from MQL5 (i i would prefer to use MT4) right now i am using avatrade, but they have turned the signal tab off(it´s completely gone) on their MT4. so if you guys have a list or something with brokers that allow me to use the signal trading option with...
Hi, this is probably a stupid question but I am trying out the MT4 VPS for a month and cant figure something out. I started the registration with an account 937xxx which was in GBP and opened up a second demo account in EUR which is 557xxx. I want to get rid of account 937xxx (GBP) completely from
Dear all, I rent Virtual Hosting from MQL5. I tried very time for migrate my EA to Virtual Hosting. But can't. ---------------------------------------------------------------------------------------------------- "Virtual Hosting : 8091 failed to send migration data(receive response...
Hi, I'm having problems with the code to retrieve closed trades from the history in MQL5. I'm using this code but when I close a trade, it does not show up in the history deals. I need a function to retrieve the latest trades closed. I'm calling this function from OnTrade(). I use to program in MQL4
Hi All During a trading day if my profit or loss for all of my open and closed positions combined on that day exceed a certain amount (either profit or loss) I close all trades. This part of my code works fine. Once all trades have been closed no more trades are opened on that day. If neither profit
  4202 error  (2)
Why do I get 4202 error from this code? (in strategy tester it works fine!) double trendline(int i){ double trendline=ObjectGetValueByTime(ChartID(),"Trendline",iTime(NULL, PERIOD_D1, i),0); if(GetLastError()>0) { Print("Error :", GetLastError()); } return trendline;} This does not make any
  zero divide  (5)
what is zero divide. metatrader is givin zero divide error. I'm building the robot. wiping oneself
My code started giving me a error seen in the screen shot below. 1/. I rebooted - same problem 2/. I did RAM and disk checks on my system - no issues reported 3/. reboot and run of sample MACD supplied with MT5 distribution - error similar to the one in my code --- Anyone any ideas where to start
m_LabelInfo is object of CChartObjectLabel    m_LabelInfo.Color(clrRed);   m_LabelInfo.FontSize(28);   m_LabelInfo.Description("Information");   Print(m_LabelInfo.X_Size()); // The value is 0, why? m_LabelInfo.X_Size() will be set to zero(0) after calling Description(). I even tried to call...
I have an heiken ashi indicator which works great by itself & the EA works by itself (without the #include statement) but when I try to attach it to the EA I get "array out of range error". I am learning coding but there are no simple explanations of why this should happen. The indicator has an .mqh...
Hello all, I fount out that ArrayCopySeries  and ArrayCopyRates  are 2 useful functions in MQL4. It does not really copy anything except when you call it first time. That saves some manual labour when I work in multiple timeframes. And since it does not actually copy the whole array every time I...
Both indicator and EA stop working after few minutes, or when new candle starts. They both rely on some algorithm and data from several currency pairs, using the iClose("XYZpair") function. More specifically: The indicator appears to be getting left behind, not to be running after a while, and I
I am trying to search figure out how to search for a pattern within a range of timeframes in MQL5. Obviously, it is likely that the pattern would occur several times based on the timeframes, that’s why I’m particularly interested in the largest number of times it repeats. To explain what I’m trying
It looks like during optimization the tester agent does only call OnDeinit when the OnInit fails. If it passes, OnDeinit will not be called. I have no idea why. Sample EA to reproduce: input int InpStart=1;input int InpStop=2;int OnInit() { Print("OnInit Start: ",InpStart," Stop: ",InpStop);
I wrote an Advisor that closes orders of other advisors working on the account according to the profit-loss criteria and the news feed. However, to close the orders of the adviser before the release of important news is only half the case. We still need to stop its work for a given interval before
Hi at all, in my EA framework i have implement a personal log service, that write a strings file. This log service, write 2 line strings line at events that i specified it: 1 for infos, and last: "[server time] - last line logged". In logical function of this log services, for every new line to log