MQL4 and MetaTrader 4 - page 880

I want to know how to get the closing price of 9th later bar. which function should I use?
I'm trying to get a values from different arrays in the same indicator but I already have the icustom getting values from a different indicator. I need them both
[Deleted]
Hello, If Math*() functions that come built-in are not enough for my purposes, are there any math libraries I could #include? Otherwise, would it be possible to obtain source code of the math.h that is used in C languages and somehow use it in mql4. Otherwise, I will have to code a few math...
Hello people, I would like to find out, how do you avoid selling low or buying high with an expert advisor, and which indicator is suitable to use in such an environment?? I ask this because I have my expert advisor, but in many instances and in volatile pairs such as XXX/YEN OR YEN/XXX i end up...
Does anyone know a way to get the values of the levels of an indicator in code? I know iCustom() will allow access to all indicator buffers. But the levels? There is a method to set the level values but how to retrieve them? Any help is appreciated, Siddi
If you need some help to insert indicator triggers or instructions on how to use it let me know.
At the moment I'm creating an array with 7 entries like this: string     readline[7]; But I'd like to put the code in a .mqh file and then #include it in many files, with different sizes of the array. I tried to do this: int        number = 7string     readline[number]; but it doesn't compile:...
Hmm, is something wrong w/ this close part? It's not working in my EA ...         for(ib=0;ib<totalb;ib++)        {         if(OrderSelect(ib,SELECT_BY_POS,MODE_TRADES))         if(OrderType()==OP_SELL)         {         if (OrderType() == OP_SELL && CloseSell && OrderSymbol()==Symbol())...
[Deleted]
  help coding ea  (8)
hello, i'm trying to code an ea that will notify me if some conditions occurs on multitimeframe. I m using it on M15, M30 and H1, the ea work BUT as i'm attaching it to the m15 charts, when the H1 conditions occurs, it send me the same notification on every new m15 bar until a new H1 bar appear. how
  samsung mega  (6)
hi, i bought a samsung mega smart phone, i cant run mt4 on it, is there anyway i can handle this problem?
Hello, I am unable to run backtestings due to non availability of historical data. I initially had some good backtesting results for 2-3 years since Jan 2008. Now I am looking for the fresh market data to be simulated over the backtesting but I am unable to do that. Can anyone guide me on that. I...
Hi, I want to make an EA single instance. ---- only can attach to 1 chart, neither any other symbol, nor same symbol but multi charts. But I can switch timeframe in this one chart. I managed to write the following code: datetime timeinit = TimeCurrent();int init()  {   if(...
[Deleted]
I wanted my AddStopProfit() below to keep attempting to adjust the stop till it becomes valid. But it doesn't seem to do that. I suspect it is because a new tick comes in before the for() loop is able to make enough adjustments. bool AddStopProfit(int argTicket, double argStopLoss, double...
Is it possible to send an order to a specific account?
here is image pleae tell me the EA name
Hi all, I write a little code for comparing candle size. But i get a error .My code is : double dRCandleSize = High[1] - Low[1];double  dSCandleSize = High[2] - Low[2]; if (dRCandleSize  >= dSCandleSize){ Print ("Valid"); } else Print ("Invalid") ;Print (NormalizeDouble(dRCandleSize,5));Print...
Hello Forum I have tried to make an indicator which simply puts a vertical line on my chart at the same time every day I have got the indicator to draw a line at the right time, but the line is not repeating or visible on different time frames, and is only drawn once, not each day as I desired. I...
  Grouped trades.  (9)
Hi guys, I'm trying to implement the following in one of my EA. The concept is having grouped trades. For example: - I open trade A1 A2 and A3. - After 1 hour, I open trade B1 B2 and B3 - After 2 hours, some of my trades hit Take profit. For example A1, B2 and B3. - What I want is to know when all...
I am working on an EA that does multiple trigger levels and then sets trailing stops from there. So, when the first trigger (say 2 pips for example purposes) is hit then the system does a trailing stop (use 1 pip) on the trades. Triggers -- Trailing Stop ......2 ------ 1 ......4 ------ 2 ......8
Hi, I'm trying to make a simple EA which should be able to recover any losses in 10 trades. But my code won't works and I can't see where the mistake is. Are there anybody who could give me a hint to where the mistake is ? int start()  {    int total = OrdersTotal();      double recovery_amount;...
Hello, I'm using ATR in my systems, but i need ATR show on chart with 5 or 6 digits. How can i do that? Anyone can help me? Thanks a lot. Bizu
Hello I have a problem writing to a file. These are the two first cells in the CSV file: none none After running this line: FileWrite(handle,"AUDCHF"); The result is : AUDCHF ne The problem is, why the FileWrite function removes the firsttwo characters from the second cell? Thanks
[Deleted]
dear senior and forum community, please help i trade with grid using ea, i want ea open new position only if no position in the same area example using grid 50 point, current price is 1.5000, then price move to 1.5050 (if no position active at 1.5050 then open new buy, but if there is active...
  ArrayCopyRates  (1)
Dear Forum, Is there any example to teach me to handle correctly the function: int ArrayCopyRates( double&dest_array[], string symbol=NULL, int timeframe=0) Let's say I need to code the indicator WPR inside DLL, how to pass the parameters to DLL? Also, is this process slows down the considerably...
Phoenix_5_6_03 what is the currect optimization this ea
Hello Is it possible to have the very useful Polyline code in a separate, self-contained library file? Because I've had issues getting the code to compile, it seems integrated into the trading functions of WHRea.mq4 but I just want to display the result from calls to iCustom, and when I try to...
I am new at trading and I found the EA named "Expert+10" here on the site. This EA only works well with EUR/USD because it is set to a particular time frame, "I guess," specific to the EUR/USD. I was wondering if there was a way to set it up to trade the previous days high and lows on any currency...
Hi, I am developing a function that is driving me crazy, a simple: if ( temp1 == temp2 ) seems not to be working. The Original function is: int encontraIOposto2(int direcao, double valorFecho){   for(i=0;i<150;i++)   {      if ( direcao == 1 && valorFecho == longGridPositions[i] ) return ( i-1...
[Deleted]
Hey guys! I'm very new to writing EA and just trying to learn the basic of it by making a simple moving average cross over + RSI + trailing stop loss EA. My code is as below but I can't find any reason why it keeps saying unbalanced left parenthesis. I even check every single parenthesis with the...
Hi all: I want to test my EA, but in the tester, it seems that lots of the historical data are missing. As shown in the following image, the data between 2012.04.02 15:00-2012.7.27 05:00 are missing. My code is very simple. Just demostrate the idea. int start(){Print("Enter the trendea2, time @...