MQL4 and MetaTrader 4 - page 514

Hello,  I made a simple EA but to speed up optimization I want to make the EA open a new trade at the same time and at the same bar that the indicators are right and NOT when a new bar starts. Could someone tell me the code to use? I can't find the info online. Current Code:...
Hi I am trying to place an order for the first time in MT4. When placing an instant order it s automatically closing.Can I know how to fix this one please
[Deleted]
Hi guys, I wrote a small code to demonstrate my problem: //+------------------------------------------------------------------+ //| Expert tick function                                             | //+------------------------------------------------------------------+ void OnTick()   { //---    if...
  candle issues  (9)
hi i hope someone can help if they have had the same issue as me.   for some reason with some charts the candle stick formation wont work and instead shows the bar chart formation.  the line chart and bar chart both work fine but i would work off the candle stick formation.  has anyone ever...
plsss can sum1 assist....i try downloading metatrader 4 from the metatrader site but once it installs n runs it actually installs mt5. 
Hi, I have an mt4 EA and I would like to add mt4 code into this EA to stop all trades and delete pending orders if equity reached a certain percentage. I searched on MQL5 forum but I don't find mt4 code. I would like to stop all trades and delete pending orders for this day if my equity reach +2% of...
if(Buffer[2-5]>=var1){Print("buffers greater than var1");} because for some reason it compiles but doesn't yield a print. *i'm trying to compare the values of 3 bars back through 6 bars back.
Hi all... I'm a newbee and trying to write an EA. All is going well but I wish to make the EA stay out of trading for 2 periods (candles) after it closes a trade. I've tried using "TimeCurrent()" and adding the seconds of the period but I get a warning of different data types. I seem at a loss as to...
It is easy to set an expert to run for a particular pair, but there aretimes when I want to stop that EA for that particular pair. If I'll just disable (CTRL-E), it will disable all running EA's for all other pairs. The system doesn't offer a simple way to 'unload' the EA. The optionsare to replace...
how do i turn on allow DLL imports on a chart so i can undock it
Hey guys, new to the platform. I attempted a search, but could not find the answer. I'm sure it is easy... As I scroll through past candlesticks, MT4 moves me back to the most recent candlestick when the price changes . Is there any way to maintain my position when the price changes, so I can study
Hello,   I am learner and beginner in MQL. I am trying to achieve inheritance possiblity: Below is situation where i am finding diffculties.   template <typename T> class A { protected:    virtual T Func()    {      Print("from Class A");      return NULL;    } public:    A(){Execute();}    void...
Hi, Which setup would be best for me please trading with 2 mt4 platforms: 1. Mt4 Master cross-connected in Amsterdam (ping of 2 ms) sending signal to Mt4 Slave (on same vps) to second broker located in LD4 (ping of 8 ms); or 2. Mt4 Master in LD4 (London), signal read from Amsterdam’s
Hi all.   How can i make my own function, that accepts parameters in sequence?   Like this :   int filehandle=FileOpen(filename,FILE_READ|FILE_WRITE|FILE_CSV); 
Hello my name is Dibi N'Guéttia Michel Stéphane Aufaite I wanted to know if it was possible to create an EA with the indicator Regularized momentum it gives Histogram.Please if you would like to know how to automate it in MQL4
I have a few questions... Do I have to use a cycle to get access the past bars or is the function ArrayMaximum all that is needed? Also if someone could provide an example it would be appreciated..
I am running mt4 on a Windows 7 system. Windows is on a SSD as C: drive. I have a storage drive F: that I have most programs install on. In order to not fill the SSD I direct downloads to the F: drive. Currently I have a notice that the C: drive is full. I am unable to run Strategy tester because of...
Hi All, I did checked forum example and also this https://docs.mql4.com/trading/orderclose. But, it doesn't close any of the open trade. The first code I uses, it return a warning as "return value of 'OrderClose' should be checked" OrderClose (tradeTicket, 1 , Ask , 3 ); So, I uses this. But, it
I want indicator to display buy and sell arrows at high and low point of given period (m15). It seems to work when I use OBJ_HLINE but when I use arrows as graphical it runs with no errors but I get nothing showing up on chart. Sorry if there is a simple explanation - I am very new to coding!  (I...
Hi, I would like to save in common folder 2 variables in order to use them in another EA. here is my code :   if ((hautt!=haut) || (bast!=bas))            { numfichier=FileOpen("points.csv",FILE_CSV|FILEWRITE|FILE_COMMON,';');              FileWrite(numfichier,haut,bas);...
Hello all May I ask about little coding in mql4 Please Just how to detect the London session??? Thanks
Hi,    I use Parallels Desktop on my macbook.  Is it possible to use FILE_COMMON when the 2 terminals have different path ? Please see my attached files 
In order to send multiple orders simultaneously, it's needed to work outside of the EA. Can this be done by using a library or script?  Within the EA you need to wait for the result of the OrderSend() function. For my project it is needed to use the OrderSend() function without waiting for it's...
Hello guys i am having this problem with my metatrader 4.00 version 4 build 1031 the problem is that i have 2 screens and every time i show the popup prices box and drag it to the 2nd screen and right click it to make it show in full screen it automatically full screen at the 1st screen " the main...
Hello,  I want to remove the custom indicator after I saved it. Because there is too many ZigZag indicators when test complete. I searched in forum but I didn't find an exact solution.  Thank you  Here is my code for getting ZigZag values  for(int i=last_index;i<low_bar_index();i++) {   double...
  OrdersTotal()  (7)
I see this code offered to those wanting a count of their Open and Pending orders int num-0;    for(i=OrdersTotal()-1;i>=0;i--)      {       if ((OrderSelect(i,SELECT_BY_POS,MODE_TRADES)==true) && ((OrderCloseTime() == 0) &&                 (OrderType() == OP_BUY || OrderType() == OP_SELL ||...
Hi, I have two VPS servers running on the same network (VPS1 and VPS2).  I want to send a message from one MT4 terminal running on VPS1 to a different MT4 terminal which is running on VPS2. Latency is not extremely important, however this process should not take longer than 500ms. What do you think...
[Deleted]
How to see time of bar and then see time of bar at like 45 seconds for example if i had to write it out it would be something like this, get time of bar in seconds(current time) get time of last bar in seconds and add the time in seconds to it we want and then compare it if the comparison results in...
Please, do you know if it's possible to call value of a variable used on an EA running on anther MT4 cession ? I want to use extremum of zigzag indicator running on a H24 trading hours broker in another graph used by another broker. Regards