MQL4 and MetaTrader 4 - page 479

[Deleted]
I've written a Custom Indicator that does everything I wont it to do. Discovered that you can't open and close trades through a Custom Indicator. Keep getting error 4055. Attempted to convert Custom Indicator to Expert Advisor, Advisor won't run. Does anyone know how I can conert a Custom...
Hi, Can you someone clarify me whether MODE_MINLOT is always same as MODE_LOTSTEP for any broker I am using below to calculate average price for my open positions and it works fine. But I have little doubt whether I should use MODE_LOTSTEP TotalBuyOpenPrice =...
  Save Indicators  (7)
Is there a way to save "profiles" where only the indicators are saved and you then can apply them to a new chart? Profiles or templates seem not to work because they save either the objects too or they save whole groups of charts (profiles).
Hello, I developed an EA for the DAX (ger30), it works perfectly in tests I have no error. But when I go into real OrderSend and OrderModifiy returns the error "invalid tp or sl", while I never had this error in test. So I just ask for your help after spending the long hours digging into my code and
  RSI as an OHLC indicator ?  (24   1 2 3)
Hi all, I looking for an indicator that represents the RSI as a candle, with Open/High/Low and Close values.  Googled it but no luck. I can code in MQL4. How can I store the OHLC values of an RSI throughout a period of time (H1, H4 etc) ? Your help would be really appreciated. Any sample code on how...
Goodmorning i made a code in javascript that if i visit this page from browser it open a position in binary.com. But if i made a webrequest from mt4, it doesn't work also if i get result 200 on webrequest and 4000 error of mt4. Some one can help me?    string params="";      char data[];      int...
Hi there, i have never coded before and have no idea where to start on creating this advisor. The EA is a custom indicator im using along with another rule i have to enter my trades. I want the advisor to enter a trade when the 5MA crosses over the 10MA and the RSI 10 (applied to median price HL/2)...
It is possible to read (using code in mql4), on which timeframe indicator is visible, like it's showed in Indicator's parameters window
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...
  Close all xpips  (1)
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...
  Stop & Reverse  (5)
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...
  how to alert once at a time  (12   1 2)
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...
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, 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.
  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