MQL4 and MetaTrader 4 - page 375

Dear MQL4. Community members! We are glad to inform you that the book by S. Kovalyov is now available on this website. The translation and proofreading are not fully complete yet, but you can see many sections of the book in English now. We would also like to ask you to put all your notes and...
if (counted_bars<0) return(-1);   if (counted_bars>0) counted_bars--;   limit=Bars-1;   if(counted_bars>=1) limit=Bars-counted_bars-1;   if (limit<0) limit=0;     for(i=limit;i>=0;i--)   {      hhb=Highest(NULL,0,MODE_HIGH,dist,i-dist/2);      llb=Lowest(NULL,0,MODE_LOW,dist,i-dist/2); Hi all,...
[Deleted]
Hi fellows, especially fellow programmers.... I was wondering the ways of how the bot can identify a doji price bar, where the open and close price of a bar close relatively the same. I'm not programming this myself but I'd like inputs on how to do it MQL4's language wise.. I mean its easy and basic...
Hoping someone has some suggestions for how to resolve the below. A broker I use only offers reports generated via MT4. The figures are accurate for closed trades but I'm still struggling with how to generate an accurate report for a specified period for open trades. e.g. I want to see what the...
Hello, I have an indicator in ex4. I wish to programmatically retrieve last value of this variable (level) that is in the indicator: I wish to retrieve #4 and #5 price levels..... Thanks
  Rectagle price  (3)
How to check the highest and lowest price of a rectangle drawn by a mouse in mql4 ? I drew a rectangle as in the picture, but I want to see the price in mql4, can I make it?
i was wondering, i have custom indicators, however they seem to not save once i change them, for instance one has a colored in sectino between 2 moving averages, but i am trying to make the color translucent as it is coloring over the bars, yet when i change it, the color goes right back to being...
Let's say that we modified the stop loss of an order with OrderModify() and then we closed our computer. How can we get the original first stop loss of the order after opening the computer next day? Is it possible in MQL 4? Thanks.
Hey there, quick question: Is there any way to set a custom text to push notifications that MT4 sends to mobile about transactions? What I have in mind is that instead of the default notification text unforming of a closed position such as for example "order #35811722 buy 1.00 USDCAD at 1.34242...
I have an EA for Period 5 min but in the code I also use daily data like the daily 8and 21 SMA.  I want to backtest my EA butsince  MT4 cannot backtest multitimeframe  I need a workaround for this: I have this daily SMA filter: iMA(Symbol(),PERIOD_D1,8,0,MODE_SMA,PRICE_CLOSE,0)  < iMA(Symbol()...
Hi,  I know how to use Print() function to get messages to show in the Expert tab locally, but when I load the EA to VPS it does not show any of the Print messages. Is there a different function or method of going about this I need to use? I just want to run some different diagnostic checks when an...
  Disabling EA  (7)
Hi everyone, I wrote an EA that seems to not be working all the time. I do not think the code is the problem so I was wondering what are the current technical problems that may cause an EA to stop working. 1/ Is it possible that after a certain number of tests, the EA needs to be restarted? 2/ Is it...
How do I draw rectangles on the top of the chart? I also want them to stay there if I zoom or unzoom. 
Hi The double open[] gives the open price of a bar. As in https://docs.mql4.com/predefined/open Is that price bid or ask? Thanks
I think it is not possible to develop en EA that connects to another account different from the actual running one, but I want to be sure of this.. thanks!
Hello coders, I'm trying to implement a partialclose function to my trade manager, but I don't actually know how to make it work as expected. With this code I get several partial closes at specified ClosePrice, what I need is to partial close at distance from the OpenPrice for first step (this does)...
Used to be https://storage.mql5.com/!/#.
The indicator setting is like this: 1. Moving Average Period:5 Method: Linear Weighted Apply to: Close 2. Moving Average Period:5 Method: Linear Weighted Apply to: Median then change Apply to: Previous Indicator's Data How to create a indicator that can give us signal when this two MA crossover
https://www.mql5.com/en/code/14085 I used this code as a base and modified it to close the last trade of either OP_TYPE before opening the next. However, after a while the trade copier stops placing trades altogether. My modified source code is posted below.
Hello,  Recently, something wrong happened to me from Metaquotes. Back in February 2015, I had discussions about the gateway between me and the sales team from Metaquotes. I was not sure what the gateway was. Metaquotes is claiming that this gateway was added to my license but not added to the...
Hi, I couldn't find a MTF version of the Fisher Transform indicator so i decided to create one and post below. Please note, this is only a quick mock up, so there could be various bugs etc. Example interesting results can be seen on the following for EURUSD: Set colours to None for indicator buffers...
I am trying to write an indicator that plot the volume, its moving average and its standard deviation. When I compile it, there is no error. However, when I try to plot it onto the chart, there isn't anything. What's went wrong? Thanks in advance.  Below is the code. #property...
Hi, when I open a chart with the OpenChart() function the checkbox "allow live trading" in my EA's properties is always disabled. But when I open a new chart manually, the EA's properties are correct and live trading is allowed. I don't understand that because the function OpenChart() uses the...
Hi all! I'm trying to display in an indicator the current profit level and the % of equity that it represents. Actually, I'm testing it across 17 pairs and it this moment there are open trades on 14 of them, so I would expect to have information displayed for all of those. However, for some reason,...
Hi all! I'm trying to build an indicator based in ADX and a MA attached to it. In MT5, when I use iMA I can apply it to a handle. How can I do this in MT4? This is how I'm doing it: for(int i=rates_total-14-1;i>=0;i--)     {      adx[i] = iADX(NULL,0,14,PRICE_CLOSE,MODE_MAIN,i);      ma [i] =...
Hello experts...! I'm new to MT4 platform and I've been trying to create an EA, I managed to come up with an indicator which is fine but when I try to make it as an EA I receive the following error: MT4 Journal: 2019.04.03 11:05:47.286 'testEA' is not expert and cannot be executed Meta Editor: 0...
Dear MQL4 experts, I am learning MQL4 and building my first expert advisor. I tried to learn as much as I can in the beginning but would need some help with my code Trade Setup: -------------- Open Buy Order on Fridays at market open, if the D1 Candle open of the previous day AND todays open are...
I had this EA working perfectly last week. I had to reinstall the MT4 terminal on my PC. And now I can not get it to load. Every time I try to load it onto a chart, it tells me to contact the EA admin. I have sent him an email. But sometimes it takes a week or more for him to respond. So I'm hoping...
[Deleted]
I have just begun to get to grips with learning the mql4 language from the downloaded tutorial when mql5 rears its head. Not much point in continuing with 4. When and where will the mql5 tutorial be available? Thanks
Hi all, I just recently activate my Email Alert in MT4. I set up the smtp using online service by GMX.com. Everything works great. Alert got sent to my email, etc. I am wondering whether this email alert thing works just like EA; that it will remain active as long as the Computer running the MT4 is...