Download MetaTrader 5

MQL4 and MetaTrader 4 - page 117

To post a new topic, please log in or register
I am new to using ea's and I would like to know how to load an ea in two different brokers at once?
New article Graphical Interfaces VIII: The Tree View Element (Chapter 2) has been published: The previous chapter VIII on graphical interfaces has focused on the elements of static and drop-down calendar. The second chapter will be dedicated to an equally complex element — a tree view, that is...
Hello guys! I was wondering if there is a way to check the same condition with a different variable. For example: I want to buy when Open[1] is lower than a certain price and  Close[1] is higher than the same price. Lets say the price is 1.2500 I know how to write this condition, but what if i want...
I've been Googling for a while, but can't turn anything up. Is there a way to retrieve the currently active profile name in code? lastprofile.ini contains, unsurprisingly, the last profile name, not the current one. Thanks
Hi all,  My EA strategy's adapts according to various market setting which are represented by X that can take the Value of -2,-1,0,1,2. In order for the EA to be more user friendly I would like to display on the Chart the Value of X.  I used the following code:    ObjectCreate("XValue", OBJ_LABEL, 0...
When I use F12 "Step by Step" sometimes a bar that goes beyond the visible bottom or top of the chart is not displayed fully: 1) Is there any MT4 settings that can help correctly displaying such bars? 2) Is there a way to program correctly displaying such bars?
I recently upgraded my desktop and my Asus Vivo Note 8 tablet to Windows 10 Anniversary update. After the update I can no longer attach indicators or do a debugging session in the metaeditor using MT4 builds 971 & 988. Using build 950, I was able to attach and debug in my tablet.  The weird thing is...
Trying to get gvs of testerstats and the following is not working. Have also tried placing the code within Start() within an IsTesting() condition and still no go. How do I retrieve TesterStatistics?  //*************************************************************** 1 **//...
Hi, the error messages below were generated in the journal while an EA was trying to place pending orders. Error 136 (off quotes) is captured by waiting for the refreshrates() in a loop and immediately sending the order again with the new prices; However, the process below keeps repeating itself....
The mt4 has an "alert" by right clicking on mt4 for "Trading" then "alert". I used to get alert push notification to my phone Samsung S4, and now the function doesn't work. The red arrow is suppose to appear after clicking on "alert" but it doesn't show anymore. I seen on one of the forums that...
New article Graphical interfaces VIII: the Сalendar control (Chapter 1) has been published: In the chapter VIII of the series of articles dedicated to creating graphical interfaces in MetaTrader, we will consider complex composite controls like calendars, tree view, and file navigator. Due to the...
Hello folks,   I want to be able to control line description field via MQL code. As you know when double clicking on line in MT4 you get a message where you can fill in two fields with text - 'label' and 'description'. I can set a lable name but could not find any reference how to change description...
Metatrader is an excellent tool and congrats to all of you for building it and keeping the community active. My Metatrader4 is forcing 0 commission on the forex instruments which is good for my backtesting but forcing a commission of $10/lot on stocks. How can I change this setting to make it 0...
Hi, I would love to backtest my strategies using 2 years' worth of data. I was able to find a source to import the data, which is 1-min OHLC. However, my strategy is based on hourly candles and I would like to use control point and obviously I need to import data to go back as far as I want to go. I...
The style dropdown field (OBJPROP_STYLE) of existing horizontal line is disabled and I cannot set for example a STYLE_DASH. Any ideas why and how to enable it?
Hy, beginner question, I have an EA that closes open positions like this: for(i=OrdersTotal()-1; i>=0; i--){        OrderSelect(i,SELECT_BY_POS,MODE_TRADES);        if(OrderSymbol()!=Symbol() || OrderMagicNumber()!=magic) continue;        if(OrderType()==OP_BUY)OrderCloseZ(OrderTicket(),OrderLots()...
Hello guys. I need help in coding my EA, so it can avoid news. I tried ti do it myself and what happens, is that the EA opens trades (inside news time), and closes them immediately. Here is the code: Externs: extern bool AvoidNews=true;extern int MinimumImpact=1;extern int...
hu, i signed up to a signal provider about tw weeks ago and she is taking no trades. What can i do about it? the signal is Profit Point.  Can anyone help.how doi switch toa differnet signal? cheers Andrew
I am calling an indicators values in an expert using iCustom. My question is, when I call the indicator using iCustom again, is the previous iCustom call still active, or is it like loading the indicator fresh again? I want to essentially simulate dropping the indicator on a chart, and removing it...
i can't get counted bars to work properly. it keeps reusing the last two trend lines. if(LookBack==0){ iCNTr=Bars-1; }else{ iCNTr=LookBack; } iCb=IndicatorCounted(); if(iCb<0){ return(-1); } if(iCb>0){ iCb--; } iCNTr=iCNTr-iCb; while(iCNTr>=0) { //- } thx again to whroeder for help with placing...
Hello, please, could you tell me how to have an alert when a buystop or sellstop is open ? Thanks, can not find it in documentation. best regards, 
  Panel color (7)
Hello all, I'm playing around with the MT4 simple panel (existed by MT4 default). I'm trying to change the background color but have no luck so far. Is it possible? if yes, how? Thank you
I am wondering why I can't open and close a position. Can you please tell me the problem?   0 14:05:39.390 '1055': close order #182 sell 1.00 USDCHF at 0.97947 sl: 0.00000 tp: 0.00000 at price 0.00000 1 14:05:39.800 '1055': order #182 sell 1.00 USDCHF closing at 0.00000 failed [Trade is disabled]...
Hi   As far as i understand it, stopout level is a percentage of the minimal margin at which all orders are forcibly closed.   to compute the stop out here is the code: int level=AccountStopoutLevel();  if (AccountStopoutMode()==0)  {     Print("StopOut = ", level, "%");  }    else  {      int d =...
In MT4, is it possible to read through all open charts and count all the HLINE and TREND objects of a specific color?  I have the following code and know that the statements after the "for" loop will not work because the ObjectName function does not have a ChartID parameter.  I tried looking for...
Hi, I'm running 6-8 scalper EAs at once. Today there was a massacre when I went out to eat and by the time I got back the 3.2% daily gain was replaced by 1.5% loss in a 30 minute window with 6 different scalping attempts that were called to dance and hit the stop out. This is what I am hoping to...
i can't get anything related to another timeframe plot correctly in my time frame i am using. Lets say i am in the 1 min chart and want to plot data from the 5 min, i want 5 min upbars plot as up arrow in 1min chat and 5min < 30 RSI, plot as down arrow in my 1 min chart, here is my code (not doing...
I would like to shade the area between two emas. I know there has been some discussion on this, but I can't find the right solution... I just bought a dell alienware, and it has a 4k screen. So I thought I would mention that I am dealing with high resolution. However, there are two ichimoku...
  Scam Aware! (2)
Hi guys, I just want to inform you of the latest scam binary options software called 3 week millionaire released into the market by those scam developers. Please beware of the developer and his fake software and take note that his main aim is to make you lose money not to gain it. Once you subscribe...