Download MetaTrader 5

MQL4 and MetaTrader 4 - page 899

To post a new topic, please log in or register
Hi, Can I create a script or EA that calculate and plot my average position price? TIA
Colleagues, Please advise why two indicators with identical mq4 code produce different picture on the chart? More precisely, what is the methodolody of indicator development, for two lines (one drawn in real-time and one produced by calculating completed bars) would be the same? Here is the...
Hi, I'm trying to add a time condition to a custom indicator (essentially to only generate the alert during certain times of the day). I've had a read through some documentation and I understand that the time functions relate to seconds elapsed since 1/1/70. However, I can't seem to find an elegant...
Hi, Does someone could explain the difference between EachTick and Complete bar ? My ea entrance is always too late . Here the part of the code when I enter long : previous close > SMA 20 & RSI(25)>70 double EnterLong1_1 = iClose(NULL, 0, Current + 0); double EnterLong1_2 = iMA(NULL, 0, 20, 0,...
I know it sounds strange, and I did some research in this forum before, but I couldn't understand how you guys calculate angles. The regular way to calculate an angle in a chart price x time would be like this: tan = (Close [x] - Close [y]) / (Time [x] - Time [y]);angle = MathArctan (tan) * 3.14 /...
I'm having a problem in my hedge EA and would like someone to help me. When an order reaches SELLSTOP or BUYSTOP (hedge), the EA needs to remove the Take Profit of the first order. Thank you
Hi there, Is it possible to have F12 STEP the graph tick by tick (interpolating data) ? Thanks, Guy
New Version: MetaTrader 4 Client Terminal Build 226 Fixed displaying of pending orders for symbols with 3 decimal places. At 100 points before the execution price orders are highlighted red. The live update will be available through the LiveUpdate system.
  Wu Wei EA (8)
Hello all, I mentioned my system in the free section and decided to try my hand at coding. I wasn't sure how to program the start, but one of the EA's called MasterMartingale here gave me an idea. So I started to program and what I have so far seems pretty interesting. Keep in mind, I haven't...
Hello and thank you. I'm new to the forum, so I'll try to make this compact and as tight as I can the first time around. I'd like to create an EA that uses Indicators in multiple time-intervals (M1, M5, M15, M30, H1 and H4). Can MT4 handle plotting something like a PSAR array in each chart?...
Hello. I've been coding EAs for almost a year now, but all of them have used my original code to check closing prices and indicator values of the last closed bar. I am going to start from scratch on a volatility breakout EA and I "think" that I want/need to check "intrabar" prices and indicator...
Hi All, According to the manual, after downloading the history with the download button, all the time frames are being recalculated accordingly (If I download all the minutes from 1999 than also the 5,15,..... 1w time frames database is recalculated and synced). I tried it, and it works perfectly....
Hi all, First post in the forums :) I've downloaded 1Mhistorical data from FXDD and I successfuly converted it to 5M and 15M using the scripts. Let's say now that my EA is running on a 15M graph, what is the granularity of the data sampled to the EA when i check the expert using the tester? Is the...
I'm having a problem in my hedge EA and would like someone to help me. When an order reaches SELLSTOP or BUYSTOP (hedge), the EA needs to remove the Take Profit of the first order. Thank you
- I open a multi lot order with OrderSend(). - I Ordermodify() it with no problem. - I close out 1 lot with OrderClose(). - Now when I try to modify the order which still has the remainder of the lots, I get an "unknown ticket for OrderModify() function" The ticket is open, OrderTicket() continues...
Hello, Sorry for asking one more question about Open Price, but my search in the forum didn't bring me a clear answer. I added this line to the start() of my EA: if (High[0] != Low[0] || Volume[0] > 1) return; The result, as expected, is that the backtesting is giving very close results on the...
Is it possible to have two charts of the same currency pair and same timeframe and on each chart to have a differnet ea running? Ofcourse, all on same platform. Thanks
On answering a question on IndexBuffer I realize I myself still don't have full grasp on the nature of regular arrays used in Indicators, So, I made a test to achieve that, and have the followings : - If I use a regular array (let's call it RegArray[]) to calculate on prices then an IndexBuffer...
Is there any way to add user-defined parameters to the list of optimization parameters?
Hello, I have a huge problem with a new indicator that I wrote. Basically it is an indicator that calculates trend values for all time frames from all currency pairs and sums it up in a table. The problem, once I attach the indicator the platform freezes. I think the platform does not have all...
I'm having a problem in my hedge EA and would like someone to help me. When an order reaches SELLSTOP or BUYSTOP (hedge), the EA needs to remove the Take Profit of the first order. Thank you!
Hello everyone, please i need your help on this ea (attached). the issue is that it delays opening of orders when it matters most,even when all my signals are true, sometimes it opens an order 4 candles after all the signals have been confirmed, meanwhile i programmed it to open an order,once all...
I searched extensively for this and found lots with much more complicated issues than this, but I can't find and nor understand how and why dividing and array in half correctly 'resizes' it when I have just entered the count into the Array with OrdersTotal()
Forex News Reader - 4 market opening clocks with dim/glow color to identifiy market open and close - Voice notification with market open - Supports proxy in case your computer is under proxy server - Displays day/upcoming economic releases(in Eastern Standard time(NY Time)) -...
Hi, I'm new to MT4 and mql4 and would really appreciate some help with a code I've been working on. The code is supposed to find the most recent high (multi-candle high that is, not the high of one candle) and then search for the previous high that is higher than the most recent high. Then it would...
Hello all, I have this question, if is possibile to resolve... Can i make in a IF operation made more level in one parenthesis??? Example: if (((Num1> Num2 && Num3> Num4) || (Num5> Num6 && Num7> Num8)) && Num9> Num10) Num1-2-3-4 data and Num5-6-7-8 is possible to separate to their function? Like a...
Hello, I am a beginner, trying to convert the momemtum indicator from MT4 platform to an EA to do further testing and also to learn how works the process of building EA on MT4 ; The code I have is the following and it returns 2 time the error 'iMomemtum' initialisation expected. I have tried...
Is there any MQL code that will determine how much $ per pip is gained/lossed with a buying size of 0.10? For example at aplari, buying 0.10 will result in a trade that gains or losses $1 per pip. At other brokers, buying 0.10 will result in a trade that gains or losses $0.10 per pip. And in...
When I back tested from year 2006, the EA works fine. But when I switched the year earlier to 2005, the back test did not work. Is there anything I miss in the code for the old years?