Expert Advisors and Automated Trading - page 291

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?...
  EA doesnt trade  (3)
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,...
This is my first time trying to create an EA using MetaEditor. After manually entering a SL of 50 pips away and TP of 3 pips away from entry price, I found that the open positions are getting closed out before the SL was hit. Please refer to the attached screenshots.  I was thinking that the EA was...
I know how to disable autotrading from MQL code using DLL calls, but is it possible to do the same without DLLs? I do not need enabling autotrading, only disabling.
Hi. I have managed to use the ObjectCreate code successfully in MetaTrader 4 to display an OBJ_LABEL on the chart. However when i migrate my robot to a virtual server this OBJ_LABEL does not appear nor is there any error. I know the robot is running because all other functions of the robot are...
[Deleted]
Hi everybody,  I try to create a little money management logic but big in complexity, i searched everywhere, tested couple of things, but nothing now i'm empty. Maybe i don't found the logic behind it, i explain: i want to say that, if it's profit and history consecutivelosses was > 1 then nextlot =...
I'm having problems, to make this code work.I just want my EA to work on demo accounts, for testing purposes.Then I want to make it only work on specific accounts, example "account = 22031989"I saw this in the manual, but I do not know how it works. Thank you :D// +...
Hi there, does anyone know how to read the time and sales list by MQL? OnBookEvent() lists only pending orders, but no executed orders. Maybe i´ve overlooked something. Or can this only be done by CopyTicks? Thanks in advance
i want when value of Aval chenge with value of Sod . else value of Aval don't back to first value. please help thanks double Aval = 0;   double Dif ;   double Sod = (AccountEquity()/Goal) ;      if(Sod >= Aval)    {      Aval = Sod ;    }   else (Dif = Aval - Sod);
Hi coding in mql5 myFile.mqh class SpreadRatio{ string symbol; public:  Person(string symbol){   symbol= symbol;  }  ~Person(void); // do stuff}; myFile2.mq5 SpreadRatio spreadRatio; // compile error - wrong parameter count. <<<<<<<<<<<<<<<<<int OnInit(){ spreadRatio = new SpreadRatio(Symbol());}...
//+------------------------------------------------------------------+//|                                                MAAAACROSSING.mq4 |//|                        Copyright 2018, MetaQuotes Software Corp. |//|                                             https://www.mql5.com...
Hallo zusammen, mithilfe eines Videotutorials habe ich nun endlich meinen eigenen EA "programmiert". Nach einigen Backtests war die Freude allerdings schnell vorbei. Denn nun habe ich es beim Backtesten plötzlich mit folgender Fehlermeldung zu tun. 2018.08.04 16:57:44.895 TestGenerator: unmatched...
Hi, ‌‌I am at the very kindergarten stage of coding and I stumbled on this website http://fxeabuilder.com/ea-builder/ I am  able to create a few good EA's with their help. ‌ M‌y major challenge is how to add Breakeven to this particular EA based on CCI. ‌ I‌f price moves 20 pips, EA should bring...
I use MetaTrader 5 running on Linux through wine. The platform needs to connect to a site to release access to Expert Advisor that I use (WebRequest function), but MT5 can not connect to the site. This error message appears on the wine's log: GnuTLS error: A fatal TLS alert has been received....
Hi there, New to MQL5, have coded using MQL4 in the past. I'm trying to create an EA that detects a specific pattern based off high's and lows. And then draw lines on the chart to visualize these patterns. The code goes through lots of iterations to calculate the end result, and when it gets there...
Hello I am so new in MQl5 programing, I program it by passing to CTrade Class, and found the error 4756, then I print check detail is follows.. This routine using.. //+------------------------------------------------------------------+ //| Modify specified opened position...
  Enumered lists  (3)
There is some function to transform an element of an enumerated list in a list or array of strings. For example, when we make an indicator and put an ENUM_APPLIED_PRICE input the program will automatically display a price list in the input parameters. How can I do the same with a button or list view...
Dear MQL5 developers, at least I hope you guys read this. I started to create a set of classes to develop a trading environment on a visual basis. Everything fine so far, until I found a very odd behaviour when using the control classes. First I thought I´ve overseen something, but then I found...
Hello, I hope all is well. I'm trying to figure out the code to pull data from another indicator. I have a custom indicator that has a high and low value. I want to pull each value into a separate variable. I was looking at iCustom but i couldn't figure out the coding for that. Can someone help?
hello! i need code to select last order for a specific symbol from history even if not in the same chart symbol, for example i am on EURUSD chart but i need to select the last order with USDJPY pair from history forgive me my bad english any help
Hi all, I would like basically to reorganize my charts on the terminal by programming, but I can't find a function that returns the size of the MT5 workspace. I find this :    int ChartWidth = TerminalInfoInteger(TERMINAL_SCREEN_WIDTH);    int ScreenHeight =...
I want my EA to place a pending order at the prices (Hoch- und Tiefpreis as prices) and to replace the pending order, when on of them was filled and closed by the tp or sl. Unfortunately my EA  wont to this. Furthermore I want to close all open postions at the end of the day, but it wont close the...
Hi all, I'm trying to backtest my algorithm which trades on Gold futures connected to COMEX. I am using the every tick based on real ticks option but I seem to be getting innacurate results which are simply too good to be true. I know this for a fact because it says my system wouldn't have lost a...
I have recently bought an EA from someone at social network, and i find it interesting because so many positive review and so much profit. But the seller said that the EA will only works only on one MT4 account. After pay to him and i apply the EA to chart i can see my MT4 ID with my real name on...
  price Pattern EA  (1)
Hii, Can we Fully Automate Price Pattern EA or we have to use Indicators ? Thanks in Advance Vijay
I've been scouring mql5 for days trying to find a solid implementation of the logic built into the class " CTrailingFixedPips " ... but all I've been able to find is a myriad of seemingly bespoke algorithms that people are developing by hand. Is there any particular reason for this? My guess would
My EA is operating with Buy/Sell Limit orders on hedge accounts. When the buy and sell positions are equals, the EA uses CTrade.PositionCloseBy() to close a buy position with a sell position with the same volume. This strategy works very well in the demo account, but it does not work on the real...
Hi All I have written an EA which operates on the timeframe defined manually in the Expert Inputs tab, rather than the timeframe of the attached chart. When I run the EA in the strategy tester i get significantly different results when the Period setting (in the Strategy Tester) is changed, even...
#property copyright "Copyright 2018, MetaQuotes Software Corp."#property link      "https://www.mql5.com"#property version   "1.00"#property strictinput bool ma3_use=true;input int period_1=12;input int period_2=32;input int period_3=200;input string symbol="EURUSD";input string variable_name0 =...
[Deleted]
Hello all, can someone help me understand how to use a set file. I just started to use an EA made by a developer, now the base of this EA is made for one currency pair, if I like to use the EA with another pair I need to use a provided "set" file. So I downloaded the extra set files and stored them...