MQL4 and MetaTrader 4 - page 91

To post a new topic, please log in or register
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...
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...
As far as I can tell GetTickCount() does not work in Tester (if I'm wrong then PLEASE correct me). So my question is, how can I "inject" a delay into Tester? For example, let's I want a more realistic OrderClose() function - obviously in Live/Demo closing an order takes time - a few 100 mili-seconds...
I downloaded 1 minute historical data from https://www.histdata.com/download-free-forex-data/ and then imported it into MT4.  I then ran the period converter script (https://www.mql5.com/en/code/7935) to create a 5 minute chart.  When I select File - Open Offline, it appears the M5 chart has...
Hi. I am trying to derive the formula used by OrderSwap(). Is it like so: Orderswap = (MarketInfo(currentsymbol,MODE_TICKVALUE)/MarketInfo(currentsymbol,MODE_TICKSIZE))* MarketInfo(currentsymbol,MODE_POINT) * OrderLots(); ?
Hi all, i'm trying to add alert to an indicator, but only on certain levels: if (Extend_Line) {      for(i = 0; i < Maxbar; i++) {         if (UpBuffer[i] > 0) {            level = UpBuffer[i];            for (c = i; c > 0; c--) {                if ((Open[c] > level && Close[c] < level)){ //Cancel...
Hi, I am trying to backtest but I am unable to download sufficient data into MT4.  Oanda says you are the owner of the data.  I am looking to backtest 2016 data for the following pairs. EURCHF AUDCHF CADCHF USDCHF EURUSD AUDUSD NZDUSD NZDCHF How can I get more historical data into MT4? Thank you,...
Hi everyone, am creating an indicator for MT4 and I need to be able to dynamically change the line colors when certain conditions are met. Unfortunately, once I specify property indicator_type1 DRAW_COLORLINE the lines disappears entirely and are  no longer visible. However if I change...
Hello Coder If anyone have idea or advice for an issue I am facing, it would be very appreciated. When I place buy trade, I use previous candle open price. To ensure Buy Limit order is triggered. I need to use Open Price + Spread when placing Buy Limit order. I have coded below to place buy limit...
I tried searching for C++ Keycodes but nothing came up for C++, just different languages. I noticed the MQL4 help manual offers some examples, but I couldn't even find the ones that match up with the following example in the help manual: #define KEY_NUMPAD_5       12 #define KEY_LEFT           37...
Hi guys, I want to count the total number &  separate new line from the multiple of label (string) that have same value. Example: Sun Opposition with Mercury & Venus Opposition with Mars. At the moment, my code use OBJPROP_YDISTANCE & plus the range to separate the lines. So how to separate the same...
Hi all, I need to use the fractals indicator, but I need it to use 3 bar config - lower high, higher high, lower high and higher low, lower low, higher low. Is it possible be used this way, and if not, is there any way to achieve that ? 10x.
I came across this interesting EA in the archives but cannot get it to trade on backtest. Any assistance? Or is it not able to be traded on backtest? I didn't bother posting in the original thread since it is too old. Thanks
  Waddah Attar Win Expert (411   1 2 3 4 5 ... 41 42)
Hi, this is my last and new expert Sell when Up Buy when Down very simple good luck
I have the MT4 and Im on the 1M GBPUSD and I downloaded the latest data but when I get backtest the last day it says the data for that period isnt available. 
I want to print the values of account balance, equity etc. on my chart. How can I print them with thousand separators, for example like 12,920.12 or like 12 920.12 (Metatrader uses this format on its terminal tab) on my chart with the Comment() function or with any other function you will advise?...
I have 2 accounts in MT4 with 2 different EAs. But it seems I can only enabled 1 at a time, as it disables the other when I switch accounts. Please help!!
Important Update for MetaTrader 4 build 1080 The MetaTrader 4 platform update will be released on May 12, 2017. We strongly recommend that you install this update. A month ago, Microsoft released a major update of their operating system Windows 10 Creators Update (version 1703). After installing...
Hello to all, for about two months I discovered the world of binary operations. I downloaded MT4 and I tried to understand the workings of the candles. I noticed that often after a candle long the trend will change within 15-20 minutes. Taking a currency as an example, this happens at a rate of...
Hello, I have installed MT4 from metaquotes.net and cannot create an account. When I launch the program, it opens and the pop up "Open an Account" window comes up immediately, with my wife's information already entered into the fields as she traded from this PC previously. However, after filling...
MetaTrader 4 Build 600 with Updated MQL4 Language and Market of Applications Released Over the past 7 months since the release of the public build 509, we put in a lot of effort to improve MetaTrader 4 client terminal. MQL4 programming language for developing trading strategies has undergone...
Hello friends please to close the profit with profit protection not clearing the account. . Period M5 or M1 . ECN Account . Starting balance $ 100 or $ 500.  And set to become profitable?  Thank you. <Decompiled code removed>
Hi all, I am trying to do my own programming in this indicator. I took the default RSI code from MT4 and made some modifications. However, I add in the moving average of the RSI code, the compiler seems ok but when I apply to the chart, there is only an RSI line. The moving average of the RSI is...
I'm trying to write a custom indicator usually i press F5 and it compiles and I see the changes immediately on the live chart except for any changes in init() I'm using arrows which are sized in init() like so int init() int size = 4; SetIndexBuffer(2, signalUP); SetIndexStyle(2,DRAW_ARROW...
Hi. This post is a continuation, of sorts, to the thread started here: https://www.mql5.com/en/forum/218952 . It was titled "Swap Calculation issues..." by BoredMember but the thread was hijacked by the "rules", so many of us never got to see a solution. I am approaching the issue in a  different...
I was attempting to download some broker's mt4setup.exe and the connection kept timing out.  I tried from two different computers in two different countries. After about 15 minutes, I got it to download in the Thailand location.   But New York I am still getting "Timed out".