MQL4 and MetaTrader 4 - page 438

To post a new topic, please log in or register
Hi, I'm wondering the easiest way to close all charts. I need it as I have a script that opens about 50 charts to apply a template, and I want an easy way to close them all. I have utilised this script  ( https://www.mql5.com/en/code/11566 ), but it only closes charts of the same currency pair....
I am having issue with my EA. I need it to open trades at the beginning of the trading day. the issue that I am having is that when the ea sends the order. My broker gives me the error that the market is closed or busy. So I am trying to add a delay to the ordersend to execute a minute or less later...
How do i calculate the seconds since the beginning of a bar ( or the seconds before ending the bar )?
what is the Problem in my code? I have very limited knowledge on mql4. Just wanted to code somehow sup according to my imagination. Thanks. int start (){double Temp1;check4sup(Temp1); Print(" Temp1 = ", Temp1);return (0);} double check4sup(double& Temp1) {     int i;   double LOW[500];...
i want to make a daily pivot point ea for my mt4 five or four digit broker.if anyone can make this ea then i will give him 21% profit when i trade by this ea.interested person mail me and add me on my skype id. email: john01823@gmail.com. skype: john89786
In a custom indicator, we can set  #property indicator_chart_window or #property indicator_separate_window   How can I draw indicators (e.g., indicator_buffers 2) on both a separate window and the chart ? One drawing goes in the separate window and one on the main chart!    
Is this not legal ? ticket = OrderSend(Symbol(),OP_BUY,martingale(),Ask,3*pips2points,Ask-(StopLoss*pips2dbl),Ask+(TakeProfit*pips2dbl),NULL,MagicNumber,0,Green); The return value of the martingale() function will be a double Please advise
I currently work with offline charts, in fact offline charts are the only charts i look at. I have a problem though, im trying to set up a DDE/excel thing and excel is not accepting the custom chart name. =MT4|BID!EURUSD would be the standard way of putting it into excel, its just excel wont accept...
Why in the following code, does not draw logarithms? //+------------------------------------------------------------------+//|                                                   Logaritmos.mq4 |//|                        Copyright 2014, MetaQuotes Software Corp....
{      int OSS,OTS;      bool OCS;      OSS=OrderSelect(NULL,SELECT_BY_POS,MODE_TRADES);      OTS=OrderType();      if(CC1>iMA(NULL,0,48,0,MODE_LWMA,PRICE_HIGH,1))      if(OTS==OP_SELL)      {      OCS=OrderClose(OrderTicket(),OrderLots(),Ask,3,clrRed)&&PlaySound ("alert2.wav");      }}{      int...
Topic.., please,  cant find a proper guide for that on google.., thanks.. 
Dear friends, I have built an arbitrage EA that is ran on different Mt4 platforms. These EAs save timestamps and prices into the hard disk, which the other platform reads. Is there a more efficient way to communicate these two platforms that doesn't involve writing files to the hard drive every...
Hi, I created an indicator to display volume + spread as 90° turned text objects in its separate window. At the beginning everything looks perfect!, but after a while (some hours on the m1 chart) it gets mad look at the attached snapshot. Can it be that mt4 gets into troubles by the non standard...
  zero divide problem (13   1 2)
{BR1=CandleBody1*100/CandleRange1;BodyRange1=MathAbs(BR1);} So im trying to get % of the candle body to candle rande, im getting this error zero divide and the ea stops trading. How can i fix that? Thanks Piero
On build 711, if I compile an EA using the command line compiler mql.exe: 1. The EA will not appear in the experts folder unless the terminal is restarted 2.  Even after the restart, the EA is grayed out can not be attached to a chart.  NOTE:  This is not the normal "gray out" when an EA has not...
Hi,  I am trying to developer anEA by using the following indicators. However, I faced some difficulties andappreciate if anyone can help me. EA Inputs: Lots: 1.00 Takeprofit : 20 Stoploss : 15 TrailingStop : 5   Indicators used 1.      1)  MT4-LevelStop-Reverse-v2 Parameters:       2).  Center of...
Should "Close" be regarded as latest Ask or latest Bid price? or the middle between Ask and Bid? Thanks for help.
i want to make a ea by daily pivot indicator.i have no any knowledge in mql4.if anyone make this ea i will give you money when the ea make profit.email me and i will send my strategy.if anyone interested pls email me at john01823@gmail.com.
 int Jam_trade() {    bool trade = false;    if(Mulai_Jam > Akhir_Jam){      if (Hour() >= Mulai_Jam || Hour() < Akhir_Jam) trade = true;    } else      if (Hour() >= Mulai_Jam && Hour() < Akhir_Jam) trade = true;       return (trade); }
I cannot believe it's so tough to find a simple previous day/week/month high low indicator that gives the user the ability to determine the color/width/style of the line...number of days back would be a HUGE plus...with line segments only. Not something that draws channels and connects these...
I would like to change product . And want to 1 click can effect all time frame [ 15 min , 1hr , 4hr , daily ]. 
Hello my trading logic requires to check if the close of the bar is equal to 25% of the bar's range. Can somebody check if I am doing it right? below is a snippet of my code   // For long tradeif(iClose(NULL,0,0) >= (0.25 * ( iHigh(NULL,0,0) - iLow(NULL,0,0) ) + iLow(NULL, 0, 0)) //...
Hello! I have a question I'd like to throw out to there on something I am finding rather tricky in resolving. What I am trying to formulate is a synthetic tick value that is otherwise independent of what is built within MQL4 (being MarketInfo(Symbol(),MODE_TICKVALUE). Reason being is that sometimes...
Hi, I try cu call WebRequest from an indicator an dont work. I try with wininet (dll call) but the indicator dont work. How can i make to call a webpage from an indicator Thanks. 
How long does the EA logic keep working? Does it reset itself at some point? I am asking this as I have an EA that only limits trades to 2 per day or in a given time period like an hour or stops trading when profit reaches XXX dollars. I run it on a VPS so my MT4 does not technically shut down...
Hello Everyone,   I was wondering is it possible to make an EA that runs its deinit function at certain given times. I usually forget to remove my EA :P and that makes me a lot of trouble.   so I thought I have to make an extern DateTime to run the deinit function without removing the EA manually....
Is real trading possible on on conventional time frames ?
I recently started using drag to modify for take profit and one thing I noticed was the red line that marks where it should close the order is off by the amount of spread, so the price has to move past the red line for the amount spread before it closes the order..  I would prefer that the spread...
Look last Code ,why the run ruzult is  ok2    not  ok3?  double a=4.0;      double    b=4.5;      if(a>b)  Alert("ok1");      if(a<b)  Alert("ok2");      if(a==b) Alert("ok3"); double a=4.0;      int b=4;      if(a>b)  Alert("ok1");      if(a<b)  Alert("ok2");      if(a==b) Alert("ok3");...