Expert Advisors and Automated Trading - page 24

To post a new topic, please log in or register
Dear,My EA has problems with optimizations. It locks the computer and also by Google Coud. I thought that the MT5 self, but I realized that it only happens with my EA.After that, I realized that the out-of-memory error is due to array storage.Can someone explain or help me?About the OnInit source...
Hi! I'm trying to develop an E.A. but when the price trigger the StopLoss it execute with the wrong value (one tick below when it's a buy). I appreciate any help.
I want to know what base currency of the Symbol. I need this because depending of the base currency I will use a Risk % per trade. My broker have stocks from UK, US and EUR. Each one of this is in different currency and my money function always is considering my account currency (USD), so is not...
hello im trying to code an expert with multi orders for 1 pair the idea is opening x amount of orders and when one or more order closed at the same time, the EA will collect its ticket numbers and deal with each order separately. i tried arrays and files, even both together the problem EA some times...
hello guys,i wrote a simple code to get the High of the current candle but it gives me the open price instead.         double Maxima_Candle[];        CopyHigh(Symbol(),PERIOD_CURRENT,0,1,Maxima_Candle);        MqlRates rates[];        CopyRates(Symbol(),PERIOD_CURRENT,0,1,rates);        Print("OPEN...
Hi all, Thank you for looking at this thread. I want to know whether or not it is possible to change the comment on MQL5 to trades which hit a stop loss or take profit? I have a comment added to trades which closed based on my exit condition, but if a stop loss or take profit is hit that comment...
This is my M1 scalper expert's 3 month result. You can see big drawdowns. (I tested with commission and Dukascopy variable spreads) Examples of loss positions: The robot expects the RSI to come to the oversold/overbougt zones in the M1 chart and use 490 pips trailing stop. Most trades make profit in...
I'm subscribed to a signal that has opened 21 trades, all but 3 are losing. How can I stop any new trades from being opened by the signal but let the open trades run their course? 
Sorry if this has been asked before. I am looking for an EA that will close multiple trades from multiple currency pairs instantaneously. Hopefully something you have had personal experience with and something you rely on  Ideally you could place a dollar value in it and the trades would all close...
Hi All I'm using Buy/Sell like the following example. The problem is that although PositionModify return TRADE_RETCODE_DONE, it seems that the order does not have SL/TP assigned to it. What needs to be fixed with this approach? Thanks,          if(m_trade.Buy(lot,m_symbol.Name(),0,0,0))...
Hi, I'm new to mt4 but not to programming, I'm working on a EA and one thing I've noticed is that the value for ATR from the EA is different to the ATR on the chart window, see attached screenshot This is my code in the EA double atr = iATR(NULL, 0, 14, 0);Print("ATR FROM EA = ",NormalizeDouble(atr...
I want to check when I put/pull out a derived CObject from a derived Clist that it is of the correct type: I thought templating somehow but I can't find a reference to it? #include <Arrays\List.mqh>//+------------------------------------------------------------------+//| List of...
Is there a thread on here where there has been a consensus or votes on the most successful EA for MT4?
Hi everyone! I'm trying to retrieve the lasts 100 rows/registers of the Trades & Sales without sucess (like the attached image), someone could help me and tell whats i'm doing wrong or how to do it right?  Actually my code is like that: MqlTick tick_array[];CopyTicks(Symbol(),tick_array...
What code could be used to place multiples values in one external parameter?   This is what I know for a single value: external bool Timeframe = true; or false; But how to put several values in one tab. Thanks in advance.  I will appreciate any help.
Hello, I have a code for Risk per Trade in MQL5, and it works perfect for FX only. My broker also have CFD of stocks, futures and cryptos. But this code only work well with FX, in other cases the risk is much higher that what I say on the Risk variable. I want to use the same code for any...
  EA Coding (9)
It's probably staring me in the face but could someone point me to a resource where I can learn to create an EA myself? Thanks in advance.....
Hello Mql4, Need an simple  Ordermodify Code. Problem: I must Change the TakeProfit, because the negative Orderswap "EATS" my TakeProfit. Can you help? THX Balduin
Friends, I'm having trouble trying to save times & trades data to a text file. I am trying to save this data in real time, but always the last trades executed in the market are appearing repeated. If I use the Print () function to display in the console the last volumes of executed orders, they...
When we view the Current Positions of the Signals, all "Pending Orders" are listed in the mql5.com/ Signals "Positions" Table. However those "Pending Orders" are not visible in the subscriber account in MetaTrader 4 or 5 Terminal. Queries: 1) Any solutions to view them 2) Any scripts which can help...
Hello friends,  I succeeded in building my expert advisor and its working but i have a challenge in the sell direction, i need a code to stop it from reentering an order when the buy side is in profit with a trailing stop. Both buy and sell enters order the same time with a stop loss level activated...
  Strategy Tester End Date (11   1 2)
There's any way (workarounds and crazy ideas are wellcome) to get the strategy tester end date in the optimization start method (OnInitStart)?
chrisdk2015
Hi, I know this has been covered a trillion times everywhere but I am stuck on setting a stoploss: My code: Print("Setting stop loss: " + Stopper); if (OrderSymbol() == Symbol() && (OrderMagicNumber() == MagicNumber||OrderMagicNumber()==0) && Stopper !=...
I'm new to MetaTrader and the community and was wondering if I spend money to purchase an EA, do I get access to the code base? I know that there are various parameters that can be set for different scenarios, but I'm talking about the core code base. Basically, I want to know if I can take(by...
how can i optimize my bollingerbend ea for instance and keep it one indicator. for examaple if i use input bb open trade and bb close trade i get 2 diffrent bands after optimize. one is optimized to open and the other is optimize for closing trades.   but i would like to keep it as one bb with the...
Is it possible to write an EA for back testing which trades a basket of 14 pairs? 
  OnTick Handle (1)
Hello Every one i want to know more about  text  Below. How often does the Ontick() handle? Is it possible every 10 or more ticks, once  Ontick() Handles?
Hi, Can anyone give me more information on the Testerstop() function? It does what is says in the documentation and allows successful optimisation results through. However when I use it during optimisation, it slows down or never stops optimising and printing "genetic pass...tested with error...
Hi Everyone, I'm facing a stranger issue when I try create an iCustom indicator. When I instance iCustom without parameters like: indicator = iCustom(_Symbol, _Period, "IndicadoresSid/ChannelSid"); It's work perfectly, but when I add any parameter I get this erros:  2019.03.06 14:14:59.500 2016.01...
My EA has two prices stored in two double variables. I want to plot those two prices as horizontal lines and then plot a histogram in between them. I can only plot a histogram between two buffers in an indicator.  The values exist only inside the EA. How can I get the values from me EA into the...