Download MetaTrader 5

MQL4 and MetaTrader 4 - page 69

To post a new topic, please log in or register
hello all, I have a question about an indicator issue. I try to create indicator from two others. I do that because of the limit of 8 buffers for one indictor. And to analyse, i need the history of the indictor, in history, i mean the line before the current bar. For that, in the final indictor, i...
I do not understand one thing. Since Meta Trader, Windows, Android and all scripts, strategies and Expert Advisors for MT4 are written in C ++ or C # or similar C language. So far, Android has not created the MQL compiler under MT4 yet? I mean no MQL Editor for Android. Besides, there is no...
Ola  I need EA to close all positions when it reaches xpips. I already found some, but it seems that in a market with a lot of volatility they do not work very well. I suspect that if you put slippage this problem must solve. If possible put him to keep trying to close the positions if the price...
I am currently working on EA in following:  if the last closed order is a loss position, and then the next order will be a reverse position. Ex: if the last closed order is a Sell position and it hit the SL or Close by Ea, then the next position will be a Buy Position only even it match other sell...
If I open a Buy signal with the code OrderSend(....), how can I launch a Sell order if (only if) the first order go in Stop Loss? Example: 1° Order Long --> 1.0100; TP 1.0150; SL 1.0080; if TP in taken --> end the EA, if SL is taken go Short with the 2° order at the close price of the 1° order (=...
Hi all, I am quite new to mql4. I have just created my first EA which takes signals to open trade when main Stochastic line crosses signal line in the extreme area - this is theory. It works fine visually with the H1 timeframe. However when I run it through EA code the signals come in totally...
  Maximum Loss (11   1 2)
if(TodayLastProf()>=-4){// do this}double TodayLastProf(){double sum;for(int k=0; k<OrdersHistoryTotal(); k++){if(OrderSelect(k,SELECT_BY_POS,MODE_HISTORY)){if(OrderSymbol()==_Symbol && OrderMagicNumber()==magic_number){if(TimeToStr(TimeCurrent(),TIME_DATE)==TimeToString(OrderCloseTime()...
my code didnt perform well. ex : if(normal logic... ){ if( !hasSentAlertOnce ){ Alert(" Alert " + Symbol() +" "+ Period()); hasSentAlertOnce= true; } }else { hasSentAlertOnce = false; } anything wrong in this code (bt didnt wrk :( alert over n over ) . still couldnt figure out
Hi All, obviuosly brokers do not offer to download years of data, so i used "History Center" of MT4 to download my data form Metaqoutes. But because my EA is time based and most brokers are using DLST, i am curious how time/price is shifted if you download and use the data lets say in summer or...
Hi,I have a questions... What function I must use for open an orden when the price reach a specific distance?  Thanks.
Hey Guys,How does the code have to look like, if I want to open a Buy-Order every Monday?if(DayOfWeek()==0 {// Place Buy Order} sorry im new to mql
Comments that do not relate to the "OnCalculate Problem for Convert Candlestick Indicator to EA", have been moved into this topic.
Hello  I thought that my monitor was dying but I've removed that variable. Horizontal lines appear to be different colors on my screen depending on where they are drawn. This happens if I move their location by scrolling / zooming or if I highlight and move them. This is quite irritating as I use...
Hi!  Thanks ! #property strict#include <stdlib.mqh>#include <Controls\Dialog.mqh>#include <Controls\Button.mqh>extern string sVisualSettings="<<=== Visualization Settings ===>>"; // <<=== Visualization Settings ===>>extern color BuyFontColor=clrWhite; //Buy Btn Font Colorextern color...
Hi. The problem is, when I set a pending order by my EA in strategy tester with magic number 1: OrderSend(Symbol(),OP_SELLSTOP,lot*n1,sell_price,0,sell_stop,NULL,"",1,NULL,Blue); And when the SELL trade get opened in specified price, it's magic number automatically would be 1. But in my real account...
Hello, I've got a problem. I created an EA which trades the data of a range bar EA. Everything is working fine when I have both of the EAs operating on my computer MT4 terminal. I basically open up a M1 chart and place the range bar EA on it. After that I open up the offline chart which was created...
Hi, I have 3-level-semaphore indicator. Refer the attached mq4 source file.  Sometimes when current signal appears, previous signal near to that current signal disappears automatically.   Can anyone please suggest any changes in code so that the signals shouldn't vanishes automatically?  
Hi Since 3 days i am working on getting MT4 running on Raspberry Pi 3 (os: Raspberian) .  Installed exagear and wine... Check. But every Installation of MT4 turned out as MT5. Don't know  why.  This was very strange for me. The setup was called MT4, the desktop link was named MT4, but the real...
Hi, how are you. I have a problem with a code that, under certain conditions, must determine if it is favorable to open a purchase or sale position, but only send the notice. I try to put an Alert ("There is an opportunity to buy or sell according to the case"). But the alert appears every time the...
Hello, I want to close all positions at a defined time. E.g. at 23.00 I want to close all positions.  What code you recommend.
Previously on build 509 the GMX for the email alert works fine, but after the update to build 600, it doesn't work anymore. This is the setting I use for version 509: SMTP server: mail.gmx.com:587 SMTP login: email@gmx.com SMTP password: ***** From: email@gmx.com To: email@gmx.com now the error is...
  unable sending mail (23   1 2 3)
Hello, I have just created a gmx mail account for sending mails with metatrader but the simple test does not work. I have configured like on the attached picture, where is the problem? Maybe I have to use my internet access provider like in Outlook, isn't it?
I have read that also others have problems with sending mails with the integrated mail function. I am using my metatrader build 625 with my gmx mail account and getting the following errror message: "Mail: 550 Insufficient security or privacy level" It is necessary to turn on Encryption STARTTLS or...
Hi, I've been working with email to sms alerts in my EA using the SendMail function. I currently have my email set up through GMX which forwards all incoming messages from MT4 to my cell phone. This all works great about 90% of the time. The other 10% of the time I get delivery delays from my email...
Hi everybody, I have some problems with email alert in MT4.  I guess the config is ok but it doesn´t work. The Mt4 is 950 Build
    Hi all Is there any way to remove the news candles from the data history ? most of back tests fails due to these candles !
Hello MQL4 community, Does anyone know of a way to resolve http POST webrequests in the form of "https://username:password@site.com/urlhandlers..."? Apparently the MQL4 webrequest function does not accept URLs in that form (I've allowed permutations of the URL already in the options setting, before...
Is there an efficient way to exit loop? I can't relay on ticks, i have to check database every second or 2, tick sometimes have long pause. When i do infinite loop, MT4 is difficult to shut down. Can anyone help?
  Indicator window blank (17   1 2)
Trend Direction Force Indicator made by mladen, it compiles without any errors and should work but indicator window is blank. Tried on 3 different broker's MT4 but nothing. //+------------------------------------------------------------------+//|                                Trend direction &...
Hello  I need to Open a new Opposite order immediately after stop loss hit if i have a buy order and the Stop loss hit immediately open a sell order with a stop loss at the open price of the previous order and a take profit target 2 times the SL and if i have a sell order and the stop loss hit...