MQL4 and MetaTrader 4 - page 100

To post a new topic, please log in or register
Hi, I want know if I download the H1 data from MT4 of any instruments the timezone is the same all the year or not? If not when, for example, I want calculating the mean of the range High-Low of 9:00 H1 bars for all the year then the bar at 9:00 of any day in November it wont be the same bar at 9:00...
Hi I have a question .. How can I do this? I want place pending order but when the bar touch it the order must not active but only when the bar close under him. This is my code: void OnStart()  {   int    ticket,expiration;   double point;   double price;   double stop;//----...
Hi guys, I'm new here. amax[0] = iHigh(0,PERIOD_M1,0);   amax[1] = iHigh(0,PERIOD_M1,1);   amax[2] = iHigh(0,PERIOD_M1,2);   amin[0] = iLow(0,PERIOD_M1,0);   amin[1] = iLow(0,PERIOD_M1,1);   amin[2] = iLow(0,PERIOD_M1,2);.... I have an array like this, and after more rows. Now if I put this...
  XOR in mql4 (3)
I really cant find it in reference... Is there XOR?
Hi all, I have a copy/paste script that can copy trendlines, vertical lines and horizontal lines that I draw on my charts. The ideea to do this is to be able to draw them on naked charts and then copy paste them on the same charts after I apply templates.  The problem is that this copy/paste script...
So every time i want to appply a chart template to a chart that I drawn trend lines ,the trend lines disappear when I load a chart template. How do I go about keeping them ?
Lots will increase automatically according to the balance of account balances, and if the transaction is lost, the next transaction launcher increase by multiplying by the external input variables multiplied by the external input variable. If I follow the coding below, it is printed " "invalid lots...
After a whole day of research, I can't find a simple example of a MQL4 code to make a POST API Call with the Secret Key. I did see the documentation but there is nothing I found with the simple post api call to a url with the secret key. https://docs.mql4.com/common/webrequest Can someone please...
Hello,                //--- check new resistance               double prevResistance      = symbols[s].lastResistance;               symbols[s].lastResistance  = SR(symbols[s].name,Timeframes[t].period,4,0);               //--- new resistance ?               if(prevResistance!=0 && prevResistance...
  Error 138 (4)
Hello everyone, I'm new to mql programming, and I'm also using google translator, so sorry for any error, I'm having a very serious problem with my code, I'm trying to open a pending order using EA, but it always gives that error 138 , there is the code treble with problems for you to see:
Hi friends, I would appreciate if anyone could help me how to stop my EA from drawing "Arrows" when sending order or modifying an order in EA. Thanking in advance
Hello Everyone, I would like to make sure that I have a continuity and disaster recovery plan for my MT4 trade station. I am running a robot and would like to have multiple locations using different power and broadband providers. I would like to have each server running mt4 on the same broker and...
Hi, Is it possible to apply an indicator to a window by code? If so how please.?
I have the curiosity to know if it is possible to do this, since a single file begins to operate. It's possible?
Hello guys. I'd like to place every consequitive order using multiplier. Now I've hardcoded my prefered lots using an array. I don't like it. For the first trade the lot size should be 0.01 for the second 0.03 for the third 0.08 for the forth 0.22 for the fifth 0.61 and so on. I know if I use a...
My EA is handling different instruments (eg. EURUSD and USDCAD and AUDUSD...) and within my EA I also use H1 and M1 periode. To be sure to have the latest possible values into the history I already use arraycopy rates at every tick for every instrument and used periods (M1and H1) For usdcad M1 I use...
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 =...
Hi there, I was wondering if it was possible to get a list of input parameters given to an EA or Indicator? Right now I'm logging my EA's settings to a new file automatically whenever it detects that I'm using different settings so that I can look back and see what I was using in the past.  However,...
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...
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 (=...