Expert Advisors and Automated Trading - page 51

To post a new topic, please log in or register
Hi Everyone! i'm a beginner and i'm trying to create an EA which uses 3 Moving Averages. First i was using 2 MA, no Problem. But there a Problems with 3 MA. The Code: if(timestamp == iTime(Symbol(),Timeframe,0)) return;  timestamp = iTime(Symbol(),Timeframe,0);   double maFast = iMA(Symbol()...
Dear (human) experts, I'm struggling to solve this issue with my EA (read several topics/help and tried to use different EAs). I'm running a backtest, but the my sl/tp orders are not executed. They remain active and the prices seem to be frozen. I don't know if this is an issue with my broker, but I...
hi there my EAs keep on coming and making trades even after i closed the charts and deleted them and closed all the orders.i am using MQL5 VPS.please help me out!
Is there a way to buy and install an EA on MT5 running under Wine?
Hi guys. I am trying to make a dynamic trailing stop. Instead of moving the stoploss every point in profit, it only moves the stop loss after X amount in profit. And amount of stoploss must be equal to distance between Takeprofit and bid. For example When price reached WhenToTrail variable, EA must...
Hello folks! According to documentation, MarketBookGet() has to be used after the EA was subscribed to book using MarketBookAdd(). So, we have the event OnBookEvent() always when the book changes. What happens if I use MarketBookGet() without subscribing, out of OnBookEvent()? I think about...
Hello Everyone, My mql5 is multi currency correlation hedging, so my EA analyze many other currency pairs. The running of EA depend on incoming tick of the chart that I put the EA. Sometime the price of the chart which I put the EA is not move, so there is no incoming tick which make the EA not...
Hi all, I am  developing multi currency EA and trying to implement trailing stop functionality in EA.  I need to check pip difference between current price and position opening price  and if the difference is more then N number of pips then change stop loss to specific price. For this purpose i was...
Hi all, I am using MACD indicator in MQL5. The problem I am facing is MACD is giving different values in code then front-end. But the value I received in code is as follows:  -0.02428525001140258 please help. Thanks
Hi, I would like to just get the value of a custom indicator in an Expert Advisor, here is my code : double   IndicatorBuffer[]; int      HandleIndicator = 0;int OnInit(){   HandleIndicator = iCustom(Symbol(),PERIOD_CURRENT,"MAindicator","EURUSD",PERIOD_CURRENT);      Print("iCustom HANDLE...
Tjahjadi Budiali2018.08.11 08:40 Dear Anyone, Can someone help to convert this mql4 to mql5 for open trade and close trade ? This is the mql4 for open trade that I want to use in mql5 but please using OrderSendAsync() :              string koment = komentar + DoubleToStr(MarketInfo(Pair1, MODE_ASK)...
Hi All, I have recently purchased an indicator online, and it has no input parameters. Trade signals are up & down arrows, buy on up and sell on down arrows. I used icustom to call this indicator to get up & down arrow. On testing I found only sell trade works fine although up arrow appears on chart...
Hey Gentleman , would it be possible to code an ea which does the following : 1)drawing a box for a certain time period ..for example  7.00-8.00 am  or 3.00-5.00 pm (start and end time of the box should be adjustable ) 2)after the box is drawn the ea should place 2 pending orders .. No.1 = Buy Stop...
How to get the pointer of an object by name?I created a local object in a function using the new operator and added it to a CObject array declared in global scope. Now in another function I want to get the pointer of that object by the object name.Is there a function that will do this or will I have...
hi. I reinstalled meta trader 5 and during test my expert, this error accures. how can i fix it?
Moved indicator window up by moving indicator code to the top in template.tpl file BUT cannot drag trade levels anymore. How
Hi All When I do backtesting, OrderSend sometimes failed to open trade, but I got no error (e.g. error 0) when I use GetLastError() to check. Why is this the case? what could possibly wrong in here and fail to open trade? Many thanks
  EA disabled (1)
If the EA is in-active for about a week , does it automatically becomes dis-abled ? Under which situations does the EA disables it's self? *NB: The EA is on a VPS platform.
hi I have an expert that open and close orders automatically.  is it possible to prevent modifying orders (close orders that created by expert) manually? i don't want to allow user (with the master password not investor obviously ) to be able to close the order manually after it is triggered by...
Hello Everyone, I have recently started using MQL5 and I am testing my first algorithm. It is supposed to send a buy limit order to buy a stock at price p_latest and sell it at price (p_latest - stop_loss) or (p_latest + take_profit). My stoploss is 5 points and my takeprofit is 1 points. However,...
There should be better indication whether an EA is for a Hedging or Net accounts. If I have not bought the EA , then how can I find out for which account is it because it is difficult when you buy the wrong EA.
Hello, I need to choose an EA or Signal from those in the market to make it apply to a real account on a VPS. I need to understand some parameters to choose what is the best one for me. I read carefully this page, https://www.mql5.com/en/articles/1492 but I'm still not convinced about some...
  Martingale (2)
Hi guys is there anyone knowing anything about Martingale strategy? I'm new on it and i'd like to start to use it in online roulettes. Do u think that it worth trying using it if my budget is roughly 2k£? I found this guide <Deleted> and they say it's better not to use it; but i have friends who won...
I am editing the MQL5 downloadable indicator " MACD.mq5 " to make it show the higher time frame MACD instead of the current one, but with no success. the main code I inserted is: input bool FractalTime = true;                  // Fractal Application//...//...//--- Get the proper timeframe depening...
  StopsLevel() (1)
Hi all, I am new to mql5 and the forum, so apologies if this thread is created in the wrong place.  I have also searched for solution to the problem I have, but can't find anything. I am trying to write a script to place market order (for immediate execution) with stop loss in place and am using...
Hi all helpful coders I would love to have an EA or indicator coded for visual back testing on mt4, nothing fancy, just simple parameters. It's something i've been working on to be used for binary options. It's a trend following strategy. The EA/indi has to be based on Awesome Oscillator and MACD....
Hello guys, I just Followed THIS TUTORIAL, and made everything as it should be, but this error appear : What is missing? Thanks.
I'm writing an EA that uses momentum for trading. For this I use 4 indicators in pairs of 2. Pair one evaluates for example H1, the second pair M10. I'm using the iMA() function to init it, see the code below. But when running, the second pair both return invalid handles. What am I doing wrong here?...
As the title says. How do I access individual position's information? The thought that comes to mind is looping through all of them and checking them one by one untill I find the one I want. But how do I do that? If this was some other programming language I could do this but this doesn't work here...
Hi guys, I have an EA that ive translated from mql4 , that doesnt trade. Ill send the code if anyone has ideas. //+------------------------------------------------------------------+//|                                                  Negative_EA.mq5 |//|                        Copyright 2018,...