Expert Advisors and Automated Trading - page 39

To post a new topic, please log in or register
I need How to find a broker so that I can trade on my own. Was told I needed a broker to do that. Does anyone have any advice on how I can get started reading on my MQL5 thank you
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
I was wondering when is we use CreateBitmap and when do we use CreateBitmapLabel from CCanvas Class and wheather someone could post some code which contains the correct syntax in how to properly use these methods
good day. How can I get a double value from a string value. double value =StringToDouble("123.45");//Print result: 123.45//but double number = StringToDouble("num123.45"); // or even 123.45? or ??123.45?? where ? represents an unkown string the second example function function will not return
Dear MetaQuotes, Since you have just introduced new event handling function OnTradeTransaction(), could you please clarify - does this function completely enhance the old OnTrade() function? What I mean is - is there a point in using OnTrade() any longer when writing EAs from scratch? (e.g. if...
Hi everyone I need some help with a script/EA (could be either) that can accomplish the following: Open Buy and Sell positions simultaneously for a given currency pair Allow me to specify how many positions of each kind should be opened, i.e. how many buy positions and how many sell positions - up
I'm doing a MACD crossover EA to test my MQL5 skills, however I cannot understand why this simple comparison isn't working at times, but is working at others when I run the stategy tester. At 2019.09.02 01:03:00 on the strategy tester journal (red box on screenshot), the conditions (MACD0 > MACD1)
Why mql5 don't have and ORDERCLOSE function like mql4 and have a library for that? is there is a reason
Can anyone share some kind of code that deals with gaps when copying rates? Thanks
Hi, I am not able to solve this. The basic idea is this code, but it produces the warning message for line 31. #include <Charts\Chart.mqh>//+------------------------------------------------------------------+//| CChartExt class
Hello, I run into “hit order rate limit” issue, below you may read some specifics: If conditions are right my EA/MT4 starts to build up/open pool of orders by small portions (0.01 lots) every 5...1 minute; all open orders in pool are Market orders with slightly different market prices and slightly
So I use this functionto get the value of a trendline for a specific bar: double trendline(int i){ double trendline=ObjectGetValueByTime(0,"Trendline",iTime(NULL, PERIOD_D1, i),0); return trendline;} then I compare it with bar close using: if(barclose(1)>trendline(1) &&
Hello all ; As you may know that while ago MT5 has supported the libraries and codes written in .NET . I found great libraries written in .NET which made developing MT5 professional and complex Apps easier specially those apps which involve GUI . my question is simply does MT4 or MQ4 behave have the
So I have an MT5 VPS running and an expert placed on the chart. I use trailing stop (price + ATR) and I get ATR value with this code: double ATR(){ double myPriceArray[]; int AverageTrueRangeDefinition=iATR(_Symbol,PERIOD_D1,10); ArraySetAsSeries(myPriceArray,true);
Hello everyone! I have this code in my EA. Problem is, the code lays out numerous orders in my chart when I only intended to run the code once until the next event occurs. Any advice? if (OrderType==ORDER_TYPE_SELL && DealMagicNumber==MAGICMA) // Buy Trade {
Looking at capturing spikes in price and breakouts with large volume, but want to mitigate the risk of receiving slippage on those orders by breaking them down to smaller sizes. Rather than having to manually break my trade up into lets say 10 individual trades, is there a script that can do this
I modified a sample code from MQL5 documentation to look like the following #property indicator_chart_window#property indicator_buffers 1#property indicator_plots 1//---- plot Line#property indicator_label1 "Line"#property indicator_type1 DRAW_LINE#property indicator_color1 clrDarkBlue#property
I would like to know if I could set my signals to private and give access to a selected group only. Any information regarding this is highly appreciated
Hi all, I'm trying to make an EA and backtest it, but I'm having problems with the buffers in my EA. I know that in my custom indicator the values are getting set correctly in the buffers there as I have debugged through that and checked. However in my EA when I use CopyBuffer(), I am not getting
Hello, who can I create a Hline on another chart. Because when I use the ChartID of the other chart the line is createt on the main chart where the EA is placed on. I have tested it on build 2190. Thanks for your help
Hello all I trying to develop an I define some base condition but the expert doesn't attend them... bool Buy_Condition1 = (mrate[1].low<=LBB[1] && mrate[1].close>LBB[1] && mrate[1].close<mrate[1].open && mrate[2].high<TBB[2] && mrate[2].low>LBB[2] && mrate[2].open>LBB[2] &&
Hi all, ... Im quite new to creating EAs ... & Its a pain in the ass for me when it comes to Defintion of PIP, POINT, PIP VALUE, POINT VALUE, TICK, TICK SIZE, TICK VALUE ... kk I found 2 ways of converting ATR into a number of Pips or Points ... But got little confused & Dont know which one is the
Hello everyone I would like to ask you for advice about a project that I would like to have developed by a freelancer I am learning MQL5 but it will take me some time to be sure of my skills even if I am already developing a bit with python and I have worked 2 years on Java. I understand OOP and so