Download MetaTrader 5

MQL4 and MetaTrader 4 - page 51

To post a new topic, please log in or register
Hi is there another way than to open a file to read, read it totally, close it, do some changes e.g. actualize the last access date of a line  and then reopen it again to write and rewrite it completely and close it. I open this file read|write|binary (!), read it, place the file pointer at the...
The charts do not stay in time sync with each other. The S&P can be very inconsistent in the mornings and if no data is received the chart does not put in a gap filler and so when comparing say Gold to the S&P visually it goes out of sync. Does anybody know of a fix for this???
From the dairies of the worlds worst programmer So I run the attached code through strategy tester Yet every time I do it slows down each pass just a little bit more. Initially I could do a non-visual test in under 10 minutes. Now it takes an hour. As for using the optimizer, well given up on that....
Hey Guys, Can someone please explain to me why I always get ERROR 4202 whilst backtesting. I use two indicators drawing trend lines and horizontal lines. Apparently the EA is not able to process the those objects. Many thanks for any help. See the attached files. 
Hi,  I literally took the example listed on https://docs.mql4.com/customind/indicatorbuffers and just modified it slightly to create a ROC [rate of change] indicator. However even though new quotes arrive the indicator flattens out after a while. Like seen in the attached image. What am I doing...
Hello everybody, How come I am getting this error? void ACCOUNTS()  {   int Value=0,       Orders=0;   double TicketValue[],          test=0;   if(OrderSelect(Orders,SELECT_BY_POS)==true)      TicketValue[Value]=OrderProfit(); Orders++;   test=TicketValue[Value];Value++;   else  // illegal else...
hello everyone, i need a little help on finding the error on this code, I Downloaded this EA from the from the MQL Code Base. I totally don't know anything about programing. This EA opens a lot of orders but not closing it when the take profit value reaches. So can anyone here please help me to find...
I'm trying to run an algorithm over every symbol available. The problem is that if I want to get data with iClose for USDCAD for example, I need to have that chart open, otherwise I'll get 0 because local history hasn't been loaded. So far, I've been trying to Open and Close the symbol's chart...
I heard that "multi-currency baektest" are not allowed at mt4. I'm not trying to deal with multiple currencies transaction in a single currency. When the best indicator of the various pair is eqal to current open pair, I want to  open it. So I will open several pair However, "multi-currency...
I want to get say 20 different random numbers "at the same time". My problem - I think - is the seed (MathSrand(GetTickCount())). Even if I use some pause between the iterations, the result numbers are not so random as I wish. If the desired range is between 0 - 1, then I got this sequence after 20...
This is the last step to getting my system going. Really need this solved.    for(int i=OrdersHistoryTotal();i>=0;i--)     {      if(OrderSelect(i,SELECT_BY_POS,MODE_HISTORY))        {         if(OrderSymbol()==Symbol())           {            if(OrderProfit()>0)              {...
Hi Traders, i need some help. I want to use values of indicators of higher timeframes in the strategy tester. But this doesn't work.  I start the strategy tester on M15 and have an indicator attached. This indicator prints the values of iMA of the higher timeframe M30 in the onTick function . When...
I'm trying to develop an ea, so far I can understand and write this which will place orders when a new bar opens. int BarsCount = 0; int start(){ if (Bars > BarsCount){ OrderSend(Symbol(),OP_BUY,0.01,Ask,2,NULL,NULL);                                         BarsCount = Bars; }   return(0); how to...
Hello everybody, I turn to the customizable CCI indicator found on the site, which gives me the positions of the records for buying and selling, and I would like to automate my results thanks to this indicator. The only problem is that I do not have enough time to learn mql4 to create my own...
There are not MT4 / MT5 Linux versions BUT the good news is that MT4 installed and work OK on Linux Wine (Windows Emulator) Ver 1.2. I test for 7 Days MT4 on Linux Ubuntu10.4 + WINE 1.2 with EA loaded and auto Open/Close/Trailing all orders without problem. The MT4 installation on WINE worked OK...
Hi guys, I tried many times to send an email alert using either my solid email account and or a GMX new account, with all aparent port number possibilities (25, 465, 587), and nothing works. Apparently connection seems successful but login failed... I have seen several topics about that on the web...
l want to encode account number to md5 hash. How to do that? Please help. Thank you very much Regards.
Hello. I am new to coding, and am learning a lot, however I have struck something that I cannot get my head around at the moment. I am trying to call the result of a test in one of my indicators, to an ea, so it can add it to its own tests before placing a trade. The ea is a simple moving average...
Hi community. I am new to MQL4. I am currently developing an EA to operate with binary options. After a few months of work and checking the reference and forum I have come to the conclusion that there is no course of action left for me but to ask here if someone can help me solve my issue. My...
Hi, I'm currently facing a problem editing my EA. I managed to get the EA to open a new trade every single candle, using: int start()      {      CurrTime= Time[0];     if(CurrTime!= PrevTime) // Time has changed      {      OpenOrder();      PrevTime = CurrTime; // Time reset...
The last years I was working with MQL4 and I dont want to change to MQL5. What are the plans of metatrader ? Will MQL4 be alive the next 10 years or must I learn MQL5 ?
I have 4 labels (just a squares in wingdings) that represent the 1, 5, 15, and 60 minute time frames. I want those to change between green/red when the corresponding time frame's EMAs (doesn't matter which ones) cross up/down. I made a per-bar arrow indicator for crosses before but I'm not sure how...
  Read .csv (1)
I heard that "multi-currency baektest" are not allowed at mt4. I'm not trying to deal with multiple currencies transaction in a single  currency. When the best indicator of the various pair is eqal to current open pair,  I want to open it. So I will open several pair However, "multi-currency...
In the ViboLevelsCreate I added the following before the return:    double          Fval[] = {0.0, 0.236, 0.386, 0.500, 0.618};    color           Fcolor[] = {clrBlue, clrRed, clrGreen, clrGreen, clrGreen};    ENUM_LINE_STYLE Fline[] = {STYLE_DASH, STYLE_DASH, STYLE_SOLID, STYLE_DASH, STYLE_DOT};...
Hi guys, I have some trouble with this script : extern double a1         =0.85; extern double amin       =1; double pos; if ((OrderProfit()*a1>=amax) && (OrderLots()*a1>=amin) && (sens==1))     {        ok=OrderSelect(0,SELECT_BY_POS);        pos=OrderLots()*(1-a1);...
Dear All, Can someone please give me some clues as to how I could retrieve the original value of SL in an open order after the SL has been moved to BE or beyond? Please note I am using MQL4 and not MQL5. Thanks in advance, Jaya
i want moving averages with  Apply value First Indicator's data? In code only 7 Enum Allowed how can i get this value.
Im new to Forex on the MT4 platform so this is a demo account, the green arrow is where i placed my sell trade but it ddnt take profit when it hit the take profit line.There are two candlestick that hit my take profit twice so im very confused .Please help
I find the highest value and find the name of the pair by comparing the EMA. What's the problem with the code below? There is a warning to ‘ implicit ’ from ‘ number ’ to ‘ string ’. Is there any kind of a function that can be found out from any pair? int i; int cnt, ticket, total;     bool...