Download MetaTrader 5

MQL4 and MetaTrader 4 - page 117

To post a new topic, please log in or register
Hi, I have problem with break. I'd like exit the loop through all orders after open one trade, but break doesn't work. I used loop because I was going to open different currencies. I used function call to trade individual currency.  Has anyone any suggestion? for (int i=0;i<=OrdersTotal();i++){ if...
Hi all, I am new here, but have been reading for a few weeks. I am attempting to get into MQL coding in order to write my own EA for my trade ideas. I paid for someone to write one previously but wish to understand how to do this myself, and therefore would much appreciate some guidance relating to...
I just want to know if this is possible, to connect multiple accounts via an EA, all MT4 terminals operating on the same computer. Or would i have to make this happen via Python or R.  I'm just looking to code a copier system, having one master account and two other accounts of mine copy the trades....
TA-Lib is well respected open source indicator library that has been used in products like Dukascopy's platform and MATLAB Toolbox. From the TA-Lib website: Multi-Platform Tools for Market Analysis ... TA-Lib is widely used by trading software developers requiring to perform technical analysis of...
As you can see in the code below I tried to overload the operator []. With that the polymorphism has to look at the result declaration. But it doesn't. One way to work around may be a index in one declared as double, but it's ugly. Is there a better way ? Code (not working because of: ''operator[]'...
Hi, I will appreciate it very much if you could advice on how to save Default profile using MQL4. The problem is that it looks like it is saved only when MT4 terminal exiting correctly, but when it crashed or so, Default profile is not saved. Thanks, Dmitry
  Sleep() ? (9)
Hiii gus, My name is Mary and I'm loving develop MQL. I'm a big doubt. I'm programming that after the first order, wait 10 seconds   if(OrdersTotal()==0)      {         ticket   =      OrderSend(Symbol(),OP_BUY,Lots1,Ask,0,0,0,NULL,NULL,0,Blue);         Sleep(10000);         ticket...
What can one do wrong on that simple code ? - But something is going wrong ! ArraySetAsSeries(arrValues, true); ArraySetAsSeries(bufCenterline, true); // ... newBegin = 1; for (i = newBegin; i >= 0; i--)   {      bufCenterline[i] = iMAOnArray(arrValues, rates_total, 13, 0, MODE_LWMA,...
Hi all,  I have an ea on four pairs. At first, the ea is working well, but if I close the platform  and open it again in one of the pairs multiple orders start to open. Could you show me what is wrong? Thank you in advance Luis 
Is it possible for one EA to modify the External Variables of another EA? If so how could this potential be done? Many thanks.
Hey Guys, I have a new problem ... I'm writing a scalping bot at the moment and if I want to use the S/L and T/P I must be at least 40 points + spread away from the market. Is there a way to close a order, for example order 2 if the market is at x or y? So I must check if(Ask < x || Bid > y). But...
Hi   i live in India from birth. I have opened  a International Bank account in London and especially for the Purpose of Forex Trading. My friend Deposited his money there who lives there as uk citizen. And I started doing trading from India but my all transaction places in uk and their bank.    I...
Hey Guys,   I have a problem. My code is calculating a Stop Loss. As you can see in the picture: My Bid is 1.13844 and my min. stop is 1.13794. So at least exactly 50 points. But why I get a 130 Error?    And how can I print more variables in one print methode? In Java I just type System.out...
New article Graphical Interfaces III: Groups of Simple and Multi-Functional Buttons (Chapter 2) has been published: The first chapter of the series was about simple and multi-functional buttons. The second article will be dedicated to groups of interconnected buttons that will allow the creation of...
Hi,   Just finished my building my EA.   I'm looking for a broker to trade WTI Crude Oil. Fixed spread. Max 5.   Any Recommendations?   Thanks 
Hello, everyone.  I want to write a good EA for my purposes.    I create an object:       ObjectCreate("[I]", OBJ_BITMAP, 0, X_TopRight(140), Y_TopRight());       ObjectSetString(0, "[I]", OBJPROP_BMPFILE, "Imn.bmp");       ObjectSet("[I]", OBJPROP_TIMEFRAMES, OBJ_ALL_PERIODS);...
I try to delete a pending order when one of the 2 pending orders got hit but unstead the code is not deleting the pending order  at all i dont understand why , my code is very simple and explicit here is the code.    for(int i=OrdersTotal()-1; i>=0; i--)     {    Print(  OrdersTotal());...
Hello members, Looking for a help for making an EA. I have Ea which opens buy order if last candle closes above Trade level. It opens sell order if last candle closes below the trade level. Suppose I run this on an hourly chart, then every time this condition satisfies it opens buy or sell order on...
hi friends   i have some knowledge in php so i wrote this simple ea based on three level of rsi on opening trader and stoch on closing it i hope there is someone who can help me converting it to mql4  <?php $RSI7; $RSI33; $RSI100; $StochMain723; $StochSignal723; function OrderSend(){} function...
I am looking for a methodology to restrict the visualization of an indicator's separate window, by code  There does not seem to be something like SetIndexVisualization(.... TimeFrame)   I can easily restrict the indicator's output to specific Periods. the issue is that on the not required Timeframes...
  Distance arrows / candles (11   1 2)
Hello everyone. I need help to solve a problem on the distance of the arrows from the candles. I have these two codes: int OnCalculate(const int rates_total,                const int prev_calculated,                const datetime& time[],                const double& open[],                const...
please tell me what happens for the data history after installation in mt4 does it recalculated automatically  according to the brokers time zone or should i do something to match it with my brokers timezone   
Please, how can I program my EA to return the values of extern or input variables from other charts? It is not as if I want to attach several EA's to charts. What function is necessary to achieve such a task? In view of my question, exactly what do the following mean for variable of extern?
Is there any methods that can use slow complete algorithm in MT4? I want to know how to increase optimizer passes. If third party software can do it, Let me know it.
  Change code (1)
Hi  In my EA,  I'd like to change this code:    int lvl=MathLog(maxlots/lot)/MathLog(2)+1;  if (lvl<0) lvl=0;     lot2= lot*MathPow(2,lvl);  lvl is a level which is depending of maxlots , lot is the initial lot and lot2 is the result lot level after level. In this case with Matpow the result is a...
  help with mt4 (3)
I have downloaded the MT4 software from FXCM USA   However when I start metaeditor  and i open the sample it says words like onInit and onTick These are mt5  language code words when I enter the following code from the book  as follows...
GumRai: Are you serious??? Your opening post in your very recent topic at https://forum.mql4.com/71996 So you already know how to do it. Lol... . Funny. Actually, it did not occur to me. Now I know I should figure it out by writing an empty string to all the records in the file. Thanks.
Hi all,  I come across  with an issue; When I put the ea for the first time an order is opened, then when that order closes the next one opens normally, meaning that the ea waits for price goes up or down the OpenLevel What I expect the ea to do is from the very beginning it should wait until the...
The code appears to executes OK ( i.e. reads details from file and My_Handle_line seems OK - 2) -but still generates the ERROR code 5008 My_Handle_Line  = FileOpen("Dashboard\\"+fname, FILE_CSV|FILE_READ, "|");                                  Write_my_Error("80010A My_Handle_Line =...
New article Graphical Interfaces II: The Main Menu Element (Chapter 4) has been published: This is the final chapter of the second part of the series about graphical interfaces. Here, we are going to consider the creation of the main menu. The development of this control and setting up handlers of...
1...110111112113114115116117118119120121122123124...1245