Download MetaTrader 5

MQL4 and MetaTrader 4 - page 230

To post a new topic, please log in or register
Hi, I have an EA attached to several pair. The problem is it always disturb each other (closing pending order). The code  for closing is custom function as below; void CloseLimit() {   bool CloseOrder;   int CloseError;   bool DeleteOrder;   int DeleteError;      for (int i = OrdersTotal() - 1; i >=...
they might have sped it up x 100 but it sounds pretty close. https://www.youtube.com/watch?v=LQfzvQFTtEw
Hello i'm looking to run a BAT file from a script (and upon successful testing ultimately from an EA). I've looked at https://www.mql5.com/en/forum/139191 which i found very helpful but... #property strict#import "shell32.dll"int ShellExecuteA(int hwnd,string Operation,string File,string Parameters...
Has anyone experienced this before? Why does this happen?
Hi, I hope someone can help me, I could use an indicator that signaled me on a graph in part, the formation of a pattern on its currency pair. To better understand, I need an indicator that behaves as shown in the picture.
Hello all, I have reciently noticed that my FXCM accounts behave bizarre regarding the spread. In the market watch window of my demo account I see very small spreads 1.18020-1.18021 in EURUSD now. The MarketInfo(Symbol(),MODE_SPREAD) command returns a spread congruent with the market watch window,...
i have the following simple code for an OnTimer() function:     void OnTimer()  {   int bla=FileOpen("last.txt",FILE_READ|FILE_CSV," ");   if(bla==INVALID_HANDLE)     {      Alert("Problem reading file");     }   else     {      Alert("last.txt?, Got it!   ",TimeToString(time_stamp)," and  "...
  Rates function problem (14   1 2)
Hi All, I am baffled by the issue below. Very simple code asking for the high & low of the first bar on a chart of specified timeframe. extern ENUM_TIMEFRAMES tf = PERIOD_D1;                void OnStart(){RefreshRates();MqlRates rates[];ArrayCopyRates(rates,NULL,tf);Print(tf,"   ",rates[0].high,"...
Hi,   I am a fairly experienced coder and I have sort of gotten stuck on this one.  I have a lot of text to put on a chart and I am using multiple labels. My client has asked for it to be translated into Chinese at some point. The client will be paying for a professional translation but he wants me...
Hi. I have 2 EAs running on  a Demo account and the same 2 EAs on a Live account. There is more money in the Demo than in the Live account. The EAs in each account have the same input parameters. At this very moment the Demo has 20 trades open, 1 negative, while  the Live has 19 open with 10...
Hi, I'm trying to write a simple rsi EA code for mt4 but my code is working just part time . ClosePosition function is not working.( probably my code is a bit weirdo lol ) . It worked without a problem few times but mostly didn't work on the same computer and also didn't produce any error code......
Hello, I used (there these years +) the Play-sound function in MT4 progs without problems Today I want to utilize this function again but there is no sound emitted even though the file is found: 10/26/2015 checked this in the program with the following code: PlaySound("bidonalert.wav");...
Under Build 902, Custom indicators are no longer removed automatically, if not used for 10 minutes. This, I think, partially contributed to the result differences between live accounts and Strategy Tester. Strategy Tester never removes indicators - at least I didn't see any indications to that. I...
Hi, I need help, this below is an indicator that is used to recognize certain patterns, the problem is that only recognizes the patterns that form the previous candle, but I wish that the scope of its action was around the time that take into account all the candles. Simply put, instead of 1, in...
Hi, Let say i have a real account with a broker..And i am very succesful in my trades If i have given the INVESTOR PASSWORD to someone, is there any way that i can possibly know he/she is using the access to my account to copy my trades 24/7? Is there a way to know or not?  Thanks 
I see other platforms that offer a wide range of hourly candles, not just 1 & 4 hr. & daily....  One I saw offered 1-12 hr. + daily,...  It is very instructive and helpful for interpreting candle setups.  Surely, given the open format of MT4 there are add-ons that provide this? I appreciate your...
Dear Coders I have a problem with calling a custom function twice in OnTick() function. Every things are alright when i call my function once. but when i call it twice every things become messed up. You can find my function below. i wrote this for detecting crossing a level. when i want to use it...
Dear all, I'm puzzled with how to track partial closes in MT4 account history when multiple EAs are running on the same account, and more than one of them are doing partial closes. What I see in the comment field instead of the EA name is something like from '#24048391' or' to #24062061'.  Even...
I am writing an EA to place buystop and sellstop orders, everything works great but I do not think I am calculating the sl and tp values correctly in my code.   in the code: BST = 10 SL = 30 TP = 30 xecn = 10   the broker uses a 5 digit quote and spread is 19   here is the code for buystop:...
Hi,   I am working on a basket trading EA. So far I have written most of the code and I came to the basket BUY and SELL Buttons linked functions.   What I have so far is several arrays to build the buttons and feed the several formulas with the needed values. I now have the following to complete:...
I have the following loop code: for ( i = 0; i <= 59; i++){ M = H + i;       if(M == FS)     {        Ready = StringConcatenate( IntegerToString(CH),":", IntegerToString(i));       TL = StringToTime(Ready) ;      //---------- Drawing time line--------------//       Obj_Name="Tk";              //...
I have sometimes windows whish opens and I have this  THE FAT LADY SINGS AUD/CAD PERIOD 30 That this message means buy or sell because I understand not very well english Iam french 
Hello, is there a way to know if an EA is using indicators? How can we know the indicators used by?  Thank you in advance. Dream3r 
I am not good in programming. I know that start() is work on every new incoming tick, I would like to have Task A work every new tick, Task B work every 1 second, both task run in parallel. How should I code?   Below my code structure, Task A also work every second which is not what I want. I want...
I have a connection problem with MetaTrader 4 Platform, I have 4G LTE wifi internet connection  and when I openthe platform it doesn´t connect, the connection bars on the right hand in thebotton activate but they begin to desapear and it says COMMON ERROR. I havethis problem since october 14th or...
I indeed need everyone to support to develope MT4 to send mail to others through Gmail or Yahoo mail or Zing mail. Very many of sincere thanks!
I've got a bunch of indis I wrote, not recompiled since my MT4 auto updated to 890, all working fine. I needed to make some minor changes today, and recompiled against 890, and suddenly strange things are happening. For one, an ArrayResize statement in a section of code is now completely failing to...
What happened to the Start() function that almost all tutorials and guides use? i get ontick and ontimer instead?
Hi, I am working building an EA where it will create 4 buttons for each pair (7 pairs in total), BUY PAIR, SELL PAIR, BUY ALL, SELL ALL. Everything is working fine and the screen design is complete. I got to assigning functions to the buttons and Ive written the below code. All is working well but...