MQL4 and MetaTrader 4 - page 869

hi all i am currentley using windows 8 and i am having some issue in my back test results what i did was manually back tested and then use the ea to confirm my results. this has worked for 2 currency pairs (eur/aud and gbp/aud) but not on the eur/usd (Back test came up with 102 and the ea came up...
I'm not returning any value for this iCustom function. I am trying to get the following value of Momentum //====================== // Indicator Setup //====================== SetIndexStyle(0,DRAW_HISTOGRAM,EMPTY,3); SetIndexBuffer(0,Pos_Diff); SetIndexStyle(1,DRAW_HISTOGRAM,EMPTY...
Hi, I have calculated in my MS Excel sheet many values for different forex symbols such as: Stop Loss, Take Profit, Lots() etc... How can I import data from MS Excel into my Expert Advisor in order to set for example Stop Loss as value from my excel sheet("source"), cell(A3) ? Regards,
  int and double  (2)
Feel free to ignore this if you want, it's a little simple, but I hope someone can explain this aspect of programming to me? I tried to find the number of points between 2 prices (i.e. an integer like 10 points, or 2 points).       int    origSLpoints = (SLprice-askprice)/Point;      double...
Hello, I wrote EA using 2 different timeframe.eg. 15m and 4hr. but when i backtest nothing doing. Forward test works fine where i opened 2 timeframes on chart. Question is: Is this possible to code to test backtest also? if yes how it will be done? I saw someone wrote ea using multi timeframe.which...
  EMA of a buffer  (1)
I'm trying to get the exp moving average of the TSI buffer in this code and then draw the EMA on the indicator. However, it does not draw the value correctly as the red and yellow lines are very far apart, they should be crossing over each other. Any ideas where I have gone wrong?...
how could i transfer quotes and other data to dll??? wat is the function used for ttansferring---->from mql to dll???
Using this thread as a guide (https://www.mql5.com/en/forum/121681) I put together the below indicator as a way of indicating the FTSE Open and Close with some vertical lines on the chart window. I was hoping that as the server time passed through 00:00, the indicator would draw in more lines for...
Hi, I wrote a code, for trial purpose, which: 1>, draw a line showing zigzag swing high/low price, 2>, and print out price of peak1, peak2, peak3 and peak4 (from right to left). The code is like: ......   for(int i=0; i<limit; i++)   {   ExtBuffer[i]=iCustom(NULL,0,"ZigZag",.....,i);   }int k=0;...
how hedging is useful manully. means what is the strategy use.
[Deleted]
  Need help squashing a bug  (12   1 2)
Hello, I have no idea what is wrong with this piece of code bellow: bool Remainder = ( MathMod (LotSize, MarketInfo( Symbol (),MODE_LOTSTEP)) > 0 ); ///bug here if (Remainder|| LotSize > MarketInfo( Symbol (),MODE_MAXLOT) || LotSize < MarketInfo( Symbol
I am a new trader. I didn't get trading statement for everyday. Those days I didn't get the statement, there was no trade opened or closed. Is it possible that when there is no trade open/close, there will be no statement for that day? I know how to generate history report from the platform. I'm...
I really need to know a way to set a buy limit higher than the market peice or a sell limit lower than the market price is there any way to do so ? if there is any I would sharr with u my trades .. more than 2000 pip last month ...
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...