MQL4 and MetaTrader 4 - page 366

Hi experts, I have learnt about mql4 and stuck with "for" loop.plz see the script. void OnStart()  {int e =2;for(int i=1;i<3;i++)  {   for(int j=i;j<j+e;j++)     {      Print(j);     }  }     } It's not complex at all.But The result maked me so confuse.  I think the shown value should be 1,2,2,3....
  draw circle  (2)
Hello , I know how to create an ellipse : ObjectCreate(objname,OBJ_ELLIPSE,window,time1,price1,time2,price2);ObjectSet(objname,OBJPROP_SCALE,scale); But i want  a perfect circle, the plot shape does not change as you zoom in/out, either horizontally or vertically. How to do? Tnx
Have this loop to get some values for code operation:    for(int i=0;i<OrdersTotal();i++){      if(OrderSelect(i,SELECT_BY_POS,MODE_TRADES)&&         OrderSymbol()==Symbol()&&OrderMagicNumber()==MagicNumber){         if(OrderType()==OP_BUY){            BuyLots+=NormalizeDouble(OrderLots()...
how to remove take profit from buy order i call buy1 when a sell1 order open i need it to attached to the name sell1 because there will be a sell2 in ea code for ex4 mt4 
Hi buddy, I got curious to know why MT4 M1 plot only has past two months data. How I can get access to the M1 data before 2 months?
  Balance Update  (2)
For the 2nd time this week. I've got an unknown 'Balance Update' showing on my history which is deducting money from my account. Is there anyway to find out why it is doing this. I'm currently on a practise OANDA account, but i'd like to understand if this is a charge i'd see if trading for real....
Hi, I want toask you if it is possible to react to a button clicked from a chart that is openedfrom the main chart which the EA is executed on. I load theEA in the main chart. In this main chart, under some circumstances anotherchart is opened. Inside thisnew chart, the EA creates a button. And the...
I refer to the sample given in the documentation. How are we meant to use OnCalculate? With the old "start" event, we have a for loop to calculate the indicator per bar, how do we do that here with OnCalculate?why are these arguments have an ampersand, e.g. &open[]? What is the difference with the...
  Bid/Ask Volume  (4)
Hello, I'm using MT4 and need to access this bid/ask volume information. Could some tell me how to access it please? Thanks,
Hi all, I have been looking for an indicator or an EA that can push notification or send email when a divergence signal appears at support or resistance zone. If anyone can create a code or mql4 file, please help me. It would be very appreciated. Thank you so much for your help in advance. Best...
Hello Everyone, From the best of my knowledge, both  of these are used within mql4. Question: Why would you choose one over the other and why?
[Deleted]
Two charts are open in metatrader - one EU H1 and another EU M5. I have a script (coded by me) which is running on EU H1 chart . Objective : This script should run only when the expert advisor 'XYZ" is loaded in M5 chart. The script should stop execution if the loaded EA in M5 is "ABC". The expert
Hi, everybody. Can anybody help me understand how to make things right in my script? I'm trying to use several indicators at once, and naturally I got the problem of "your indicator is too slow..." How can I solve this problem? I NEED TO STUDY 5 PREVIOUS CANDLES. That is why I call [i+n] in each...
Hello, I am new to the MQL language. I am attempting to access and apply past values to my indicator based on certain conditions. My test code looks like: int limit = rates_total-prev_calculated;if(rates_total<=DATA_LIMIT)      return(0);//--- last counted bar will be recounted...
In a perfect world MT4 would let me draw buffers from one indicator into both a separate window and the chart window.  I have an indicator in a separate window that does some calcs and draws a modified MACD.  But I also need to do some calcs on the chart window and display stuff there.  I tried...
  pips away  (2)
How can I make a jump of pips against the opening price? (in MQL4) and the TP is the same for open trades with the pips away... but it is getting closer with some formula so that the final result is positive. Example: Buy 1.2500 - Rebuy 1.2000 
Hi I've migrated All Experts etc and Mail is failing to send from VPS where is succeeds in MT4 Desktop 
My MT4 Client Terminal won't start and open. I tried uninstalling and installing it again, but that doesn't seem to fix the problem. I can still access and open the MetaEditor, and from there, I tried accessing the MT4 Terminal again, but still I can't access  and open the MT4 Terminal. In the...
Hi all, I was wondering if there was a way to fix myEA, it won't place orders because there are other orders open on other pairs etc, not placed on this chart by the EA. Here's my order code, if you need any more, ask and ill put it up. So i have an array, where the strategies to be used are set to...
Hi all, I just wondered if anyone could see any issues with my trailing stop? For some reason, all the trades seem to close for a small loss, and dont appear to be trailing. Also, would this alter the SL on my other trades, not placed by the EA? If so, can i filter them to this EA on this chart only...
As a forex trader you have recourse to different types of orders in order to enter and exit the forex markets. These different types of orders allow you to specify precisely as to how your broker should fulfill your forex trades. This article explains the different order types that are possible in...
Attached is the indicator from A Samir. But there is a bug in it. See link below row 8  is always blank. https://www.mql5.com/en/charts/9767396/euraud-h1-gain-capital-group.
accountBalanceinEuro = (int)(NormalizeDouble(AccountBalance(), 2) / NormalizeDouble(MarketInfo("EURTRY", MODE_ASK), 5)); I get "zero divide" error for this line. EA is working on EURUSD. How can I make the EA to read the EURTRY prices when working in strategy tester?
Is there any way with which we can encrypt the content of .tpl file generated through MT4. Also, we would like to have the functionality to have it decrypt automatically once user loaded it on MT4 like the .dat files.
Hi, I'm trying to check if all of my strategies in my EA (the ones the user has selected to use) has got a buy or sell signal. Basically, I have an array with the total amount of strategies. For each one, if a buy signal is given, a 1 is placed in the array, sell is 2 and if tno signal is given, its...
I want to make candle stick delay when place orders. For example, buy condition matched and place order. if (buy_condition==1){Buy_order} How can I code (add) to delay order? For example, if buy_condition is matched and after 5 candle stick later, I want to place order.
Hello, Anybody help me to do that? "Convert from Amibroker to MQL4 (display multi time frame chart in one window chart)" Example like that, can you help me to convert? => Thank you! " _SECTION_BEGIN("Chart mmulti timeframe"); SetChartOptions(0,chartShowArrows|chartShowDates); _N(Title =...
hi, backtesting in visual mode can take forever.  is there anyway to save the visual charts afterwards?  and I'm not talking about a picture, rather, able to load the chart entries and exits back into MT4 to be re-used again for analysis? Thank you
void BreakOut(){//--- Create a button to send custom events   ObjectCreate(0,buttonID,OBJ_BUTTON,0,100,100);   ObjectSetInteger(0,buttonID,OBJPROP_COLOR,clrWhite);   ObjectSetInteger(0,buttonID,OBJPROP_BGCOLOR,clrGray);   ObjectSetInteger(0,buttonID,OBJPROP_XDISTANCE,100);   ObjectSetInteger(0...
Hi all, could you give me an help on how to extract the Hour number from OrderOpenTime() ? I need to compare this to the Hour() function. Thank you!