Download MetaTrader 5

MQL4 and MetaTrader 4 - page 152

To post a new topic, please log in or register
Hi,   I have an indicator, and part of the code draws trend lines on the chart. There are roughly 200 of these lines on each chart, and i have 12 charts running at once. When I change timeframes, obviously all the trend lines need to be redraw, and with 12 charts open it its very sluggish.   Is...
Hello guys, I've tried to do some statistics/testing with EA and write it out into file but file always end up empty.  Here is the opening and writing the info into it - it opens the file but does not write anything into it, what's the problem? int OnInit(){   ZeroMemory(TouchCount);...
hey, I am a beginner with mql4, and I am trying to develope an ea. I have written a code that sometimes enters a trade and sometime don't. when it doesn't enter a trade, the code specifies "130 error" i.e. Invalid stops. is it possible that the stops are invalid due to the fact that the spread is...
Hi All, I am working on an Indicator that shows the Prof/Loss on the chart as a line, as well as, the highest value of the PL going back to the beginning of the chart. I wrote it in Metastock and have pasted a pick of the chart example. I'm not very good at MQL4, but have included the code that I've...
hello to everyone, you can place in the while loop a false condition and when it is true I get out of the loop. I need the while loop but I have to get out of the cycle only when the condition is true. I have to increase the N2 and N3 values of 1, until the loop condition becomes true thank you...
how do you write that?
Dear friends, I am trying to decode the encrypted data that is stored in a file.  While doing so, I am getting 4029 ERR_ARRAY_INVALID.  I tried to solve it,  but not able to do so.  Can any one find the problem in this code.  if(FileIsExist("Mytext.txt",0)){       ResetLastError();       int...
All,   I'm having a problem with iCustom indicators.  They work when I debug, and they work in live trading with a demo account, but when backtesting they return the EMPTY_VALUE or they return "0" when I SetIndexEmptyValue(0,0).   Here is how I'm calling them:   priceSignalCurrent=iCustom(NULL,0...
Hello, Is it really true that there are nothing script related in MQL4 which allow one to read the ListView content from the Terminal View Experts log. There is a Print("Write something"); with the intention to add information to the Experts log from an EA, but as far as I can see there is nothing...
Hi, how can I detect in my programm if it is running on a 4k display or on a normal pc?
Hello everybody ,, I'm a newbie in the field of Expert programming ,, and i'm trying to make an expert based on ichimoku indicator ,, but i have a problem when i put some conditions (if statement) ... for example entry buy order when the Close[2] < kijun line and Close[1] > kijun line ... but i...
Simple task. I have an array that simply takes the percent change from the previous tick. Then I want a histogram to show if the current tick is higher than the last. When I apply ArraySetAsSeries() it doesn't even work. I have placed it in multiple spots in the code and it either doesn't do...
I've been getting the Undeclared Identifier error on iClose, iOpen, iHigh and iLow, and I have no idea how to fix this. for example in this:  int      HighestCloseBarBefore = iHighest(NULL,PERIOD_H4,MODE_CLOSE,RoomCandles,(a+1)); int      HighestCloseBarAfter = iHighest(NULL,PERIOD_H4,MODE_CLOSE...
Dear All,   Can I use the expression as below? Meaning can I use || the OR operaror in the expression? while ((PA<=20 && PA>0) || (PA>=-20 && PA<0)) .........  .......   Thanks 
Hi; https://www.mql5.com/en/charts/58097...d1-fxglobe-ltd Please refer to above link. Is there any way in mt4 to show entry, SL, and TP labels on the right side of chart instead of on the left side? Thanks for any and all feedback.
Does anyone know if it is possible to create objects on the chart that are proportional to the chart screen size....? ie. If I have a rectangle eg. H=20 W=100 when my chart is "Full Screen"... those rectangle stats become H= 10 W=50 when the chart size is minimized to half the full screen... If...
Are there any plans to remove the rounded corners of chart windows and bring the design in line with Windows 10?  Also, will the iPad version of MT4 be updated any time to allow a black background?
I am new to MQL4 and have been trying to solve the following problem all day. Currently the code below will buy when the indicator raises up above -40 from below. However, I cannot get it to close that same order when it raises above +40. (The same is true of the sell signal in the opposite...
Hi All I'm new to MQL and have a request to be able to run the below scenario: I would like to open two trades at the same time, one to buy and one to sell at a specific date, hour, minute and second. I would be opening 10 lots, with a stop loss of 3 pips for both trades. I would then like to close...
Hi coders, I have 10 objects in my chart. If I pop-up an alert with ObjectsTotal() the result is 10. When I want to color them all in green I do it this way: for (int i=ObjectsTotal(); i>0; i--) {   ObjectSetInteger(0, ObjectName(0, i), OBJPROP_COLOR, clrGreen);} Now my question is this:  when I run...
New article MQL5 vs QLUA - Why trading operations in MQL5 are up to 28 times faster? has been published: Have you ever wondered how quickly your order is delivered to the exchange, how fast it is executed, and how much time your terminal needs in order to receive the operation result? Meanwhile,...
Hi I am new here and I have a simple question but google didn't help me. I am running windows 10 32bit and mt4. When I create new profile, connect to server and try to put some charts on the screen it give me an error C\Users\??...
I have assembled a Chart Zoom Out Button for "CHART_SCALE"  works just fine until I add the opposite condition Zoom In then they cancel each other out. Could someone show or explain what I need to do to have them both in the same Indicator. I have attached the both working Indicators so you can see...
Can someone explain to me why flag last state does not work on EA's but works on Indicators? My code             if ((MA1[1] > MA2[1]) && (flagval1==0))      {res=OrderSend("USDCAD",OP_BUY,LotsOptimized(),askusdcad,3,0.999*bidusdcad,1.003*bidusdcad,"",MAGICMA,0...
I want to gather all the data from an indicator and export it/generate a graph in a new window. Is there an easy way to do it? I imagine it would be something along the lines "for (int i = 0; i < Bars; ++i) if (foundSignal) exportData" Also, I'd like to do a global indicator. Meaning...I want to do...
Please somebody help me on this one.  I want it close the current order and open a reverse order when an opposite signal appear. but This EA close the order and no new reverse order. please give me some advice and some code to correct it...
Hi there,   i have a script  that i want to be executed each time a new Profile is loaded (the script will update the chart-templates). I could not find any Funktion/Event to do this. can anybody help me out here?   thank you SautaRoc 
PLEASE help me. I have opened a demo trading account with a broker and I used their link to download the met4 platform. All seems to be OK except for the fact that when opening the data folder the MQL4 folder is not there. As a result, I cannot load indicators or EA 's. I am using windows 8.1 latest...
')' - unexpected end of program Scalping.mq4 '{' - unbalanced parentheses Scalping.mq4 return value of 'OrderSelect' should be checked Scalping.mq4 return value of 'OrderModify' should be checked Scalping.mq4 extern int MagicNumber=0;extern double Lots =0.1;extern double StopLoss=0;extern double...
how can i state and wriite a good ea