Hello, I have an EA written in mql5, everything works properly in both live trading and strategy tester. However some times when trying to update local buffers of the indicators the ea is dependent on, it turns an error 4116. This is totally strange to me as all the indicators were attached to the...
Here is the indicator which is returning the time remaining for the new bar: //+------------------------------------------------------------------+//| CandleTimeStationary|//| |//|...
Hi, I try to use a CandleTrail function on a simple MAcross system and it works but I have many [Invalid stops] errors and I don't know why. Can someone help me fix this problem?
Hi all, I'm using the CTrade class to place a pending order and retrieve the executed price when the order gets executed, however I keep getting a value of 0. This is the MqlTradeResult I get : MqlTradeResult{ retcode:10009 deal:0 order:2 volume:1.47 price:0.0 bid:11766.129999999999199645 ask:11767...
Hi, I am trying to learn about Expert Advisory strategy tester. Just as a test I would like to calculate if I opened a position above the 200MA and then closed it when it closed below again or at say 50 pips and again for the opposite. Can anyone assist me in getting this to work on EA Strategy...
Hello Everyone, I'm developing my first EA. I got to write one, and it works perfectly well on the strategy tester. My EA does the following: I specify a pair of currencies, say currency1 and currency2. When it starts, the EA buys immediately the currency1. Afterwards, it checks the conditions A &...
I am trying to create a simple indicator on Mql5 but i get an ERROR when i compile it... Could anyone help me please? int OnCalculate(const int rates_total, const int prev_calculated, const datetime &time[], const double &open[], const...
Hello, why when I connect the mt5 to the Metaquotes server is deleted the personal data history present in the folder Custom \ Symbol \ Ticks? Thanks for the reply
Hi everyone, Is there anyone that can help me with my problem on how to convert CloseAvg() function from MQL5 to MQL4? I got this from one of the samples from MetaQuotes. https://www.mql5.com/en/code/316 double CloseAvg(int ind){ CIndicatorBuffer *buffer=At(0);//--- check...
Hello, in my backtest result is see a relative drawdown maximal of 24.24 %. The backest is over 259 trades. The problem: I can't reproduce this value visually in the equity, balance curve. Find attached 3 files zipped : The backtest results in numbers. An image of balance curve and a screenshot...
Hi all! Thank you for looking at this thread. I'm having an issue where an EA keeps removing itself from a chart on tick. It occurs when I add a function to my main EA script. The function is down below. Any help would be greatly appreciated, this is giving me a real headache!...
Hi there, I try to use iMA. This is my configuration: int MA_Definition1 = iMA(symbolName, timeFrame, 10, 0, MODE_EMA, PRICE_CLOSE); For a Buy or Ask decision I need the distance between EMA-curve and Ask- or Bid-curve. 1- Is ENUM_APPLIED_PRICE based on Ask- or Bid-price? 2- What is displayed on...
Good day! 1. I would like to ask how to fill the gaps in historical data. I have tried various methods. From the classic download via History Center of MT4, to downloading a certain software which downloads data from a certain broker, to getting an EA which supposedly downloads data for me. However
I have an EA written in MQL5 the EA depends on data from four indicators, sometimes it copies the data correctly most times I get an error 4116, as a result of this error trades that depend on the value of the indicator are closed because of the ridiculous values that are posted to the indicator...
Hello Everyone, I tried to modify Stochastic , to pop-up alert only one time once indicator reach to over-brought or Over-Sold Level. But again getting same error, //+------------------------------------------------------------------+ //|
Hey! I need to dynamically fill objects of complex types (class or struct) with data. The class/struct may look like this: class FooClass{ public: int Int; string Str; double Dbl; . . .};struct FooStruct{ int Int; string Str; double Dbl; . . .}; The catch...
Both of them returns the computer time, isn't it?
What is the difference between them?
I'm running the same EA on three MT4 accounts. One relatively large account and a smaller account with the same broker. And another smaller account with another broker. Although I'm running the same EA and same timeframe on all of three accounts, they very often don't trade the same way. Often the...
Hi, I am trying to get the last deal type (Buy or Sell). I tried to find it in https://www.mql5.com/en/docs/constants/environment_state/marketinfoconstants#enum_symbol_chart_mode as I am using SYMBOL_VOLUME to get the last deal volume, but i couldn't find anything similar to that. I also tried to...
Hi at All, i need to know if is possible to write a file (in the shared folder) when an EA (MT4) is running on MQL5.COM VPS services? Not a VPS with a MT4 terminal but a VPS buy from MT4 in MQL5.COM community! Thanks
I founded this tool for remaining bar, but I don´t know where I can download it; some help please
Hey all, is it possible to cancel a OnDeinit request ? Like i have EA1 and EA2, EA2 has dependencies on EA1. For some reason EA1 is turning into a "OnDeinit" state, now i want to check if he is allowed to exit. OnDeinit is a void function which will have no return check and this also means the...
Hello, I am trying to use the ZeroMQ library in order to send information on a TCP socket When I use my first line of ZMQ code in my Expert Advisor... ex: Context context("PROJECT"); ...and try to execute, I am asked by MT5 the following: I accept but nothing happens after that, I can the the same...
void OnStart(){Alert ("Total buy order is ",GetOrderCount(ORDER_TYPE_BUY));}int GetOrderCount(long type) { ulong order_ticket; int total=0; //--- go through all pending orders for(int i=0;i<PositionsTotal();i++) { if((order_ticket=OrderGetTicket(i))>0) { //if(magic_number...
hi everyone . i was building an ea and now im testing it. but the ea stop working when i log out from trading platform (MT5). is there any solution for this? Thank you
After the moving average crossed, Delay the third K-line alert。 e third K-line alert
Hi, I'm new in mql programming and trying to develop my first EA based on what I found in mql articles. The scope is learning because I've made backtests but I never got any profit :) For the code below I get next errors: 'CCI' - enumerator identifier already defined 'Stochastic' - enumerator...
Hello i need to draw support and resistance levels for my EA, i have looked on alot of S/R indicators but none of them quite does what i need.
I need a code that draws a line when the price is being rejected 2 seperate times in 2 diffrent candles(A support or an resistance area/line) nothing...
Hi traders and ea coder, kindly share ur views on my strategy , intraday, 1) daily every new high buy entry, 2) daily every new low sell entry, 3) timeframe 5 min and 1 hour 4) stop loss previous swing high for sell stop loss previous swing low for buy or 5) stop loss current day high for sell...
Hi All, Is there any way to calculate dynamic take profit in dollar for martingale postilion. If I have .01 to .05 - TP should be 2$ If i have range from .06 to.1 -- TP should be 5$ if the range from .2 to .9 -- TP should be 10$ like that it need to go I was thinking like this --...

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
If you do not have an account, please register
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.