Download MetaTrader 5

MQL4 and MetaTrader 4 - page 332

To post a new topic, please log in or register
if( OpenOrdersThisPair(Symbol()) == 0 && LotSize_Buy >= minlot )         {          BuyTicketOrder1 = OrderSend(Symbol(),OP_BUY,LotSize_Buy,Ask ,3,                                             0,0,NULL,MagicNumber1,0,Green);RefreshRates();                                                if(...
Hello, I have the problem where no matter what drive I install MT4 the data folder is always located on the main drive (C: in my case).  This is terrible since my C drive is almost full!  I can't store history files so I cannot backtest.  There needs to be a way to relocate the data folder to...
Do I need to create an array if I want to record the MACD signal value each time RSI(2) goes above 90 or below 10?
hello.   Im trying to get the output for the amount of seconds since jan 1, 1970.  The output I desire should look something like this:   1413424764   I can't seem to figure this out, i've been over the documents and i keep getting the date written out such as Jan 01, 1970   or the amount of seconds...
I'm guessing I do not use "Comment" but something else? What's the easiest way just to put a Comment in the top right hand corner of chart?  Cheers! 
How do I add double Bollinger bands to a chart? In other words, I'd like to show the bands at one standard deviation and two standard deviations on both sides of the SMA at the same time. I don't see a way to add both bands in the indicator pop-up box. Thanks for any help you can provide! 
Hi, I've programmed a really simple expert advisor. The EA opens a long position when the slow stochastics closes below the value 86.  extern double lot = 0.1;extern double tp = 60; //for EURUSD M5extern double sl = 1000; //for EURUSD M5 int start()  {      double r1 = iStochastic(NULL,0,8,3,3...
Please can someone show me how to calculate the number of seconds between 2 time points. i.e the difference in seconds between Bar[0] and Bar[10]? The datetime type is intended for storing the date and time as the number of seconds elapsed since January 01, 1970. This type occupies 8 bytes of memory...
Hi all, could you check this code for me? It is supposed to alert when RSI and stoch are above their overbought (or below oversold) levels and if the price closes above bollinger. It is only supposed to look at values at price close. As of now, I still get alerts if the values say fluctuated above...
The same EA works fine on Instaforex and ICMarkets. but it does not work when I attached the EA to the charts of BTG MT4. I put a Print just before OrderSend() function, the print message shows buy/sell signals are generated as expected, but the OrderSend() mysteriously stops working.  Autotrade is...
1) Is anyone working on windows and using visual studio? If so are you getting edit and continue features? what is better than if using the MT4 IDE? 2) It appears to me, (maybe only me since im using wine + linux), that the ability to debug ticks is available only during the week during a live...
Hi all, I'm using Renko Live Charts v 3.2 to work with my Renko charts. This expert works good with Alpari, now I just opened a demo account with Activetrades. When I set the expert on a M1 graph, I obtain the usual "open offline EURUSDM2 to wiew chart". The problem is that I don't find the chart...
//+------------------------------------------------------------------+//| Order Entry function - Buy or Sell (pending orders)              |//+------------------------------------------------------------------+void OrderEntry(int direction){      //Stop calculations  -------------------   double...
Hi,  Somethimes i recive error 4024 on WebRequest function (Mt4, Build 670, windows 2008 r2 sserver. ERR_INTERNAL_ERROR Internal error   Can sombodey tell me why? 
help me i make indicator and now i have empty buffer....how to fill it if(limit>barsToProcess) limit=barsToProcess; for(int i=0;i<limit;i++) { double UP=iEnvelopes(NULL,0,14,MODE_SMA,0,PRICE_CLOSE,0.1,MODE_UPPER,0); double DN=iEnvelopes(NULL,0,14,MODE_SMA,0,PRICE_CLOSE,0.1...
hi everyone!!! i trying to code a closing condition. When there is an open position and candle is closing in profit bigger then 10*points close trade. i try to attach the code with src but i only get attachment option. it says it right there to use src , cant see any bottom for it. as u see i have...
Hi Guys I have installed my Metatrader 4 on an external hard drive. This allows me to work on my home or work PC. The platform is working, but it doesn't transfer my templates and open charts from one PC to the next. Is there a setting I need to change? How can I get my personal settings to move...
Hello,I would like to create a stoploss order that will be placed above the high of the previous order's initiation bar. Here is a picture to Illustrate the issue (In the example (picture)  there is a sell order):   Any Idea how to do that? The code below works fine If I use stoploss that is fixed...
Each time I recompile my EA (and it is used in some charts), MT4 crash and close SYSTEMATICALLY. Same problem when launching debug, the debug chart open, then crash... ==> It was working perfectly with previous build 6xx Very desappointing release :( because I also noticed many sudden crashes....
Hi, Does anyone know why any of my expert advisor logs older than 7 days get deleted? Is there any way to tell MT4 not to delete the logs?   I had not noticed this until recently.    Thanks in advance to anybody who replies. 
Hi All. I am new to MQL4 coding and am trying to code up my first automated trading system. I am looking to trade the largest absolute difference (among 10 currency pairs) between the opening price of the day and the closing price of the previous day. As such, I have to first define a new bar...
DLLs work, unless you are trying to use any system function, e.g. time(), fopen()  etc. Comments? 
Hi  I have to create a new sub-window in an EA and and create some Objects in the other window.  Thanks in Advance. 
Hello everyone, I'm new to this forum but I'm really experienced with Genetic Algorithm and  Genetic Algorithm applied to trading markets with positive results on betting exchange platforms. I'm writing this post to check if anyone is interested in a collaboration. The aim is to apply my method to...
hola! buenas tardes necesito ayuda para configurar mi robot, necesito ayuda con urgencia, por favor si me piden imagenes para que sea mas facil, me dicen ok gracias espero respuestas
Screen from tester MT4.
Hi. I have this piece of code exactly copied as is from MQL4 documentation:      string cookie=NULL,headers;    char post[],result[];    int res; //--- for working with server you need to add "https://www.google.com/finance"  //--- to the list of the allowed URLs (Main menu->Tools->Options, "Expert...
New article MQL5 Cookbook: Handling Typical Chart Events has been published: In my article I would like to describe the capabilities and hands-on practice of using OnChartEvent() with typical (standard) events predefined by MQL5 developers. The MQL5 articles and Code Base already contain examples of...
Hi guys,  An old pre build 600 coder here trying to get familiar with all the new functionality. I want to create an mt4 application that can execute trade orders with specific settings and manage things like trailing stops. I would like to use the new dialog panel which has buttons, input boxes,...
Hi I am experimenting with the good old CCI and enabled to see its 'hidden' buffers in the MarketWatch: #property indicator_separate_window#property indicator_buffers 4#property indicator_color1 LightSeaGreen#property indicator_color2 clrNONE#property indicator_color3 clrNONE#property...