Download MetaTrader 5

MQL4 and MetaTrader 4 - page 27

To post a new topic, please log in or register
Hi All, I want to learn coding in MQL4 but cannot find a way to get Yesterday Highest CLOSED and Yesterday Lowest CLOSED price? I can get yesterday highest and Lowest price but not its closed price. Can anyone show me how to do it? Thanks in advance.
Guys, is it possible to create a horizontal line in MT4, and when it gets crossed by a candle, to sound an alert (and perhaps open a .dll or .exe file)? I am using this 4H strategy, and I don't want to be bound to the PC... Thanks in advance. Dave
Hi Guys, I have an EA that works properly on EURUSD... Now I want it to work on others 10 different cross... What is the best practice in this case ? Should I have to implement a loop on each cross ? Thanks to support!
void OnStart()   {    int TrailingStop=50; //--- modifies Stop Loss price for buy order №12345    if(TrailingStop>0)      {       OrderSelect(12345,SELECT_BY_TICKET);       if(Bid-OrderOpenPrice()>Point*TrailingStop)         {          if(OrderStopLoss()<Bid-Point*TrailingStop)            {...
I'm trying to create a EA for the attached indi, and even if it turns out unprofitable / unreliable - I REALLY need to understand what I've been doing wrong at this point. Sorry in advance for my coding style - complete noob here :-) The EA will only acknowledge sell signals for some reason (Buffer...
How to get high of a certain time period    I want to get the high for e.g time of my forex broker from 00:00:00 to 00:02:00 I want get the iHighest for the time period of 00:00:00 to 00:02:00 for Today   How do I achieve it , sorry for asking and thanks for helping !  
i have tried everything from resintalling the platform and asking my broker to fix the problem, but all in vain can someone help me fix this, i cant even download the program i bought as there is no download option on the platform coming up
Hi Guys, I'm quite new to Mql4 coding language and my team asked me to use ADX on H4 timeframe in order to identify the trend... How can I do this? Thanks to support! Dario from Italy
Hi Guys, I'm working on a EA and I need to check if the Bollinger Bands has crossed in the last X Candle of the specified timeframe... How can I do it ? Should I have to implement a loop where "for X times" calculates the bands and check if the value crossed? Thanks to support !
Hi, For every symbol in MT4 I use a different traded lot size defined in different chart windows, as shown below: How can I access from a script to this traded lot size defined in a selected chart ?
Hi everyone, i want to change the default settings for price alert from sound to notification! When i add new alerts over the chart than the expire date is activated. I want this also off as a default. Thanks@all!
Hi all, is there a way to clear an Excel sheet? I'm developing my on Excel sheet to monitor my positions. I'm searching between the File functions but I don't find it. Thank you!
Hello guys, may I ask you a little question: Is it possible to send a webrequest to a specific port? (MQL4) And how can I set up metatrader 4 to communicate with a localhost? Is it possible to send a request to a "http://localhost:10000/" ? WebRequest returns ERR_WEBREQUEST_INVALID_ADDRESS and I'm...
In mq4 iTime("USDCHF",PERIOD_H1,0) and  how get time for "USDCHF",Period H1, and Bar 0 in Mq5? Thanks
Hi All, I am trying to install MT4 on a new Mac PC and I am encountering problems and please bear with me if this issue has been discussed previously. I have installed PlayonMac and the Wine as advised on the Mac OS instructions. On the PlayonMac Menu under File/Install I am able to search and then...
FIRST TIME I LOGIN, I CLICK "SAVE PASSWORD". But now i forget it. How to solve? Thanks
  SL & TP (3)
Hi, one question, is it possible to delete a TP or SL once added by script? I have also a custom function of OrderModify...but with parameters 0,0 it doesn't seem to work
//+------------------------------------------------------------------+ //|                                                           HM.mq4 | //|                        Copyright 2017, MetaQuotes Software Corp. | //|                                             https://www.mql5.com |...
Hi, I didn't find anything about that in the forum staff: I want to write some Text on the Terminal Window. Very easy with the Comment () function. But the text should only appear if an appropriate extern variable of type bool is set. Problem is that every new call of the Comment () function...
Hello friends :-) I  need some help regarding comments in mql4.  below is my code If (condition1) { Comment(abc) } If (condition2) { Comment(xyz) } The exact problem is if both condition is true at same time , i get only only 1 comment in upper left corner.. I need both comments in 2 lines Please...
Since latest mt4 update, when I compile my EA I am getting the 'i' - undeclared identifier error but cannot see which part of this code is causing it: void CloseOrderSell(){    if ((Ask-Bid) <= MaxSpread*PipValue*Point){    int orderstotal = OrdersTotal();    int orders = 0;    int...
  write to file (2)
I am trying to get a simple script to write the values of the technical indicators to a text file but I do not get the right values.  The output file dates are integers void OnStart(){   int file_handle=FileOpen("h1.csv",FILE_READ|FILE_WRITE|FILE_CSV);      double   macd_buff[]; // array of...
I'd like to return my custom Candle class (inheriting from CObject) from a function. The compiler will complain: "object of 'Candle' cannot be returned, copy constructor 'Candle::Candle(const Candle &)' not found. How can I implement this copy constructor if my class has the following constructor:...
Hi, I have connected a DDE from MT4 to Excel and now I want to use that live updated price to multiply it with an other value but it doesn't work, it just says #VALUE!, how can you solve this? Best regards
On my VPS I have around 120 ms but when I click on the objecg in the bottom right corner to see my ping, there is usually an option for 100 ms. I click on it and it changes, but then I check later and it has automatically switched back to the default. This vps the ping is no problem, but I have...
I have a couple different EA's that I designed.  But the programmer I used just closed his business and doesn't take coding jobs anymore. I would like to make a simple modification to all of the ea's.  Basically, I want to add the function that if the current Heiken Ashi candle on the chart is...
Hi, I make this simple code to display arrow on chart : canvas.CreateBitmap(0,0, "arrow01", Time[0], High[0], 50, 50, COLOR_FORMAT_ARGB_RAW); canvas.LoadFromFile("ObjBuy.bmp"); canvas.Update(); The arrow01 object display correctly. For having two arrows on my chart, I use this code : canvas...
class Child {   Parent *parent;      public:   void setParent(Parent *p) { parent = p; };      };class Parent{   Child *child;      public:      Parent()      {         child = new Child();         child.setParent(this); // << Can we do something like this?      }      ~Parent();};   I need to...
  #property (3)
Hi I want put my ea to mql market .but , i have this error  (EX4 file must be compiled using #property strict directive) I've added this code at the beginning of EA #property version     "1" #property description "my description" #property description my description" #property description "my...
Hi , I recently started trading in forex , i had worked with mt5 , and today i started working with mt4 , and I noticed a “charges” fee in my deals that made all my deals negative in profit , can you help me to understand what is this part for ?