MQL4 and MetaTrader 4 - page 127

To post a new topic, please log in or register
ok so i setup the network farm on my 2 pcs. they are visible and show as ready. standard setup settings used. but when i run an optimise - it displays connecting, then ready, then connecting, then ready etc etc etc. is this a bug of mt5 we all deal with or it there another step im missing?
I want to know the profit for the last order. The last (newest) closed order number  is OrdersHistoryTotal() -1 Is this correct? So, I coded like; I think I don't need to use FOR function because I just want to know the last (newest order information only). var = OrdersHistoryTotal() -1...
I want to put Close[0] price value into buffer. I coded. #property strict   #property indicator_buffers 1double Buffer[];int OnInit()  {    SetIndexBuffer(0,Buffer);}void OnTimer()  {     Buffer[0]=Close[0];} But when I checked buffer1 , it is EMPTY_VALUE. What am I missing?
  MTF Stochastic (31   1 2 3 4)
Hi, The attached stochastic is an mtf version that is great. However it does not show interim values on higher time frames when used - it only updates the values on close of the higher time frame values. Could you change it to show higher time frame values in the interim before bar close, during...
I'd like to report some legitimate bugs in MT4/MQL4 but the service desk has closed down because, from what I gather, they were being flooded with requests which were actually amateur programming questions and errors which should have first been searched, and if necessary, posted in the forums. I...
Hello everyone, I desire to auto scale the width of an histogram buffer according the zoom scale's candle. My problem is it only works when i change the time frame. I want it to be directly after zooming in/out. I have put the function in : OnInit + OnCalculate + OnChartEvent ... but, it doesn't...
How can i use the an indicator array as symbol for another indicator inside my EA? Example: i want to calculate the standard deviation of ATR (or any other indicator/custom indicator). How can that be done?
#property copyright "Copyright 2018, MetaQuotes Software Corp."#property link      "https://www.mql5.com"#property version   "1.00"#property strictdouble lots = 0.01;int takeprofit = 40;int stoploss = 40;int magic =33454;int OnInit()  {   return(INIT_SUCCEEDED);  }void OnDeinit(const int...
Hi, i tried to count buy and sell orders of History of an magic number. I tried this out but it seems that it is not working well. int count_order()  {   int count=OrdersHistoryTotal();   for(int i=0;i<count;i++)     {      if(OrderSelect(i,SELECT_BY_POS, MODE_HISTORY)==true)        {...
Hello, Have never used MT5, but now having been forced into build 600+, was trying to take a look at the debugger. Has anyone used this (successfully)? Is there any documentation about it? I placed a couple breakpoints and tried to start (F5); it opened a chart, choosing H1 AUDCAD, which would not...
Hello there! Indicator: #property indicator_chart_window#property indicator_buffers 2#property indicator_color1 Purple#property indicator_width1 2#property indicator_color2 Purple#property indicator_width2 2//---- indicator parametersextern int ExtDepth=100;extern int ExtDeviation=75;extern int...
Hi friends, Is it possible to run the stochastic indicator and my custom indicator simultaneously while attaching my own custom indicator on the chart? thanking in advance,
When I am trying to open MQL4 indicator folder to add new indicator.The folder is appearing for a while and disappearing soon. Help require how to come over this problem.Would any one help me please.                                                                    Bijoy
A thanks to Marco vd Heijden whose comments showed that I was going in the wrong direction. I am trying to apply high and highest as well as low and lowest to a Bollinger Bandwidth indicator. I am new to MT4 programing. Code was copied from a BBW indicator. Then High(...Highest(...)) and Low(.....
Hi coders, I need help on fixing OrderModify Error 4108. I am trying to develop EA that buys incrementally (Scaling In) with trailing stop on each order. Error happens when particular order hit the stoploss and later EA tries to modify the same order for trailing stop but, of course, EA cannot find...
Hello guys, Adding and subtracting datetime value within a single day can be done without any problem but doing such calculations which leaks into next day or previous day give some erroneous results. For Example I want to find out the time after adding TimeCurrent() + 23 hours, how to do it? At the...
I am trying to display two versions of a custom indicator (with differing lookback periods),  on the same chart, but when I try to change the indicator width or line style in the indicator properties box, it just disapears off of the chart after pressing "OK". What do I need to enable to allow the...
I am designing a robot in MetaTrader 4 that will trade 7 currencies, at a time. I want to make a B (Buy) S (Sell) or W (Wait) decision in the Current (1 of 7) currencies based on the current signals from the BSW signals in the other 6 currencies.  The way that I set it up, each currency has a...
Hi, Recently the icon for sharing a page to my news feed disappeared. Is there an explanation for this? Thanks!
When I refreshed the navigator window to show new EAs (build 670), I see the new EAs available for trading.  But I do not see the new EAs available for backtesting in the strategy tester. So that means that either the strategy tester also needs a 'refresh' button to refresh the available expert...
Hi guys, how can I disable combobox  ? (ComboBox.mqh form Controls ) I need to lock it and not allow to select items.
Hey guys, I'm a little stuck here. I downloaded the currency strength indicator from bug located @ https://www.forexfactory.com/showthread.php?t=300750 (file name CCFp_v1.0.2cvert.mq4 ) and opened up the data folder and pasted it into the library as well as indicator folders in mql4, restarted mt4...
  iForce (1)
Hello, I´m experimenting with the iForce indicator. And now I want that mt4 give a signal(arrow) as soon as the iForce indicator reach a defined value. May be 0.2. I tried it with this way. if(iForce(NULL,0,1,0,PRICE_HIGH,1) >= 0.2){          string FR="ArrBuy "+TimeToStr(CurTime());...
   EA on the local computer can trade, I use the VPS after the club's official website, but can't deal, display an error "trade operations not allowed by Settings", and why?
Hello can someone help me.I just download two indicators on my PC. I like them and I want to know is their a way to transfer them to my mt4 account on my iphone and android cellphone.
If yes, How can i get hold  of that unopened-chart's id?  I want to  apply ChartRedraw() on that chart. SO i need it's id. P.S: pure MQL solutions proffered, but if you suggest DLLs, please explain how to efficiently use them. Things mustn't slow down.
I want to know total profit of open orders (BUY position + SELL position) I also want to include swap + comission. I don't want to use AccountProfit, so I tried to calculate total (BUY+SELL orders). I coded below but when I check with Print(Total_profit), the value is different from MT4 current...
Please help. I am trying to get this into an array I can work with in mql4. No luck so far. [{"orderid":291,"symbol":"GBPNZD","type":"sellstop","price":"1.72","sl":"1.7320","tp":"1.682","ts":100,"expiry":"0000-00-00","status":"pending"},{"orderid":292,"symbol":"GBPNZD","type":"buylimit","price":"1...
With the following code, using the variable "period" (which can become PERIOD_M5, PERIOD_M1, PERIOD_H1) and the variable "long" (various integers) c = NormalizeDouble (iClose (NULL, period, length), Digits); if they were set to PERIOD_H1 and 4, I was sure I would have obtained the closing price of...