Download MetaTrader 5

MQL4 and MetaTrader 4 - page 364

To post a new topic, please log in or register
Hello There are 2 variants of the ObjectCreate () function. One of them takes as the first parameter the Chart_ID - defining the target open chart that the graphic will be drawn on. However, I've not been able to successfully use this function from an EA either in the strategy tester, or applied to...
I need anyone who can make code for rsi sound alert ( everytime reach 70 and 30 ).
The old builts didn't enable us to get the Windows Errors: GetLastError()? Now the mt4 still has that name :( Gooly
I want to know am Using 2 meta trader 4 clients one for charting only and one for where I place my trades I don't like his charting so my question is in my charting MT4 when I open a position is there any posibility that my sl tp and order also be opened in other MT4 and also when I update my sl tp...
hello people i am new to mt4 and have a problem with my trades being stopped automatically, i enter a trade for say a size of 1 and just before a peak in the chart and the trade is closed always automatically just before the turn incuring a loss or sometimes a small gain. why wont my trades run for...
In the terminal log usually several error messages appear which says for example: 2014.03.29 06:08:26.359 HistoryBase: 2 errors in 'USDJPYi1' How is it possible to detect and repair these errors from mql4 ? Thanks
Open EA Input-Settings and press OK, with or without changes, and the OnInit() executes TWICE. Really messes with the idea of trying to politely handle errors. Anyone else noticed this and reported it? At first I thought it might be my complex coding, so I grabbed sample code from the Code Base....
Hello I'm trying to get a very basic ChartFirst() command working in mql4. But it always produces error 4211 - Chart Not Found. There is a chart open in the trader. 3 charts open, in fact. My code simply says in OnInit(): Alert(ChartFirst()); Any idea why this is not returning a valid chart ID?...
I have beenrecording broker data for two years now, in the hopes that my data has a higherquality than the history download. I only recorded the 1m, 5m, 15m, 1h and 1dbecause that is what I use mostly. I have 2 brokers and 2 terminals per brokerto record several symbols. I always suspected that it...
I have coded the simplest of an EA, with just basic init, deinit and start functions sending an alert,,,however the start function is not getting executed whereas both the init and deinit are running good,,,,What could be the error??? Oh,, and by the way it compiles just right.
  Orderselect (7)
Hello guys, I wanted to know what I am doing wrong, I do not get the ticket number, all I get is 0; int ticket = OrderSend(symbol, OP_BUY, 0.5, Ask, 0, Ask -0.020, Ask +0.100, "BUY ORDER", 0, 0, Green);     Print("TICKET NUMBER: ", ticket);
Hi there, I'm trying to get the value of Value[1] but as a result I'm getting 2 different values like 1203 and 735 ... The same is for Volume[2] ... [3] etc. Is it not supposed to be just a single value returned ??
HI everyone!!! I need some help in writing an ea as I have no knowledge in it at all. I trade using pivot points as entry and exit levels. I set the trades by using pending orders (sell stop and buy stop). The problem is that I enter the trades at 07:00 gmt and since I have to work I can't always...
Hello, I write because I cannot find a solution to this problem and I hope you can help me. From build 600 and above of MT4 (I currently have the latest version, build 625) I can no longer perform backtest with Volatility Factor EA and WallStreet FOREX Robot. After reading M1 data, MT4 crashes as...
Hey guys, I am new to this forum and I have a question about this code: #property indicator_chart_window#property indicator_buffers 3#property indicator_color1 DeepSkyBlue#property indicator_color2 DeepSkyBlue#property indicator_color3 DeepSkyBlueextern int BandsPeriod = 20;extern int BandsShift =...
Hi guy. Can someone help me out? So when I call the "sell" function, I want to place 1 sell order and then close all the currently opening order (if any). But somehow, with this code, the system doesn't close the currently running "buy" order. void sell(){   int ticket = OrderSend(Symbol(), OP_SELL...
Hi, I am thinking of creating an EA using 2 moving averages basing on crossover method. Which EMA is recommended? Is there a way to optimize which EMA to be used ?
Dear all, I have a problem while trying to translate AFL to MQL4. Anyone here can help me code User Function which is similar to ValueWhen Function in Amibroker Here it is: https://www.amibroker.com/guide/afl/afl_view.php?id=163 Thanks so much!
There are many foults on new mt4.At least give people to use older versions
Hi all! I found a fractal custom indicator that I am fond of. Also, I modified it a bit to represent a clearer image of support and resistance. That's right! lol... ;) My wish is to select the last created fractal written on the chart. If this cannot be done, maybe the possibility of using...
  Open Risk (4)
Hello, I am a beginner with MT4. If a trade ten stocks, in ten windows of MT4 and use every time a stopp loss, then I have ten times an open risk. If I mowe the sls afterwards, the open risk will be reduced all in all. Is there a script or whatever on the market that shows / displays the total open...
Hello! Sometime, I've a problem with OrderSend Function when i try to open at same time a Buy and a Sell Order. The platform (not the EA) answer me that one of two order was open in Buy (instead of Sell) or vice versa. I'm sure that not is a problem of my EA, because it is able to open Buy and Sell...
I'm still a bit new to MQL4 especially after the build 600 changes Anyway, I'm not sure if my coding is wrong, if this is a bug, or if I don't understand something... but anyway: double calc[]; for (int loop = 200; loop >= 0; loop--) { calc[loop] = iRSI(NULL, timeframe, period, price, loop);...
With this example code...    long search_handle=FileFindFirst("*",file_name);   if(search_handle!=INVALID_HANDLE)   {      do      {         Print("file_name = ", file_name);      }      while( FileFindNext(search_handle,file_name) );      FileFindClose(search_handle);   }   else      Print("Files...
Hi peoples :) I guess this is super easy for all of you to understand. But I do not even have the most simplistic understanding. I receive this error: Arrays are passed by reference only << ehh I have no Idea how to rearrange an array :( #import "exp.dll" int SetRateArray(double rates[][6]...
Hi There I have a need to read indicators and bars values based on a 4 hour window, but always updated to refer to a 4 hour bar ending at the latest tick. So instead of finding out the 4 hour low, high, etc only every 4 hours (12am, 4am, 8am, 12pm etc...), I need to read these values for the last 4...
Hi, I recently went to close a chart and accidently shut down the platform (Why are those X's so close together?) So I started the platform again and it auto-updated to build 625 from 610. Next time I looked at MetaEditor, there was the small message "Do you want to save changes to....." I guess...
  Question about EAs (21   1 2 3)
I had this question before but the thread went off topic. I back tested my EA against (by now) probably over 12 instruments, mostly currencies, my EA did well against most of them however on two instruments, Hang Seng and FTSE, my EA was hit pretty hard, my EA survived Hang Seng but the drawdown was...