MQL4 and MetaTrader 4 - page 414

I downloaded the MQL4 Book by Kovalyov: https://book.mql4.com/content I was able to right click Properties > General tab > Unblock on the file to make the file readable. But now I got to keep clicking on bottom page links to go to the next section, as opposed to just flipping pages back and forth...
I wrote anEA for MT4 that should open at the same time 3 trades for 3 different pairs.  On demo account, when volatility is high there is a delay of 20seconds between order open times, same happens for order close (orders should closeat the same time)   void ……….()  {  SO_EURUSD=OrderSend("EURUSD"...
Hello, I've searced everywhere but didn't get 100% answer on the question: What is the correct CSV format for MT4? I am calculating custom CSV and trying to convert it to FXT and HST(with Birt CSV2FXT script) but the script i sayng that the data have too many errors. I run the test in 15M visual...
Hello, I have written this simple chunk of code    int *quotient; But, when I try to compile, I got the following error: '*'pointer cannot be use. Is there a way to declare a pointer to an 'int' value  ?
Hello All, I want to ask you, as you know, in MQL4 code, when the indicator of Moving Average , EMA, is above the price of the current trend, for example of 20 pips (in Forex) Thank you very much to anyone who can help me
Hi, I want to know why within the following code when I press the button CHARTEVENT_OBJECT_CLICK returns 11 instead of just 1? //+------------------------------------------------------------------+//| Expert initialization function...
Imagine Istart trading with 10.000 usd, and after several weeks I have 10.250 in myaccount balance. Andsomebody ask me how many PIPS I have win in this period. Is there aformula to calculate it in base of that 250 usd of profit (in MQL4)? (SupposingI have traded with different symbols and lots)....
hi everyone, I want to withdraw Bid and Ask of market watch (with metatrader 4) to keep only symbol and spread. Is it possible to do that ? Best regard ;)
Hi, I've got this file(CSV), it contain data about the news from 2007-2010, in this format: DateTime;Currency;Impact;Descripton;Actual;Forecast;Previous;RevisedFrom;Unit now I want to put in my EA the option that, X minute before and after the news, the EA won't trade... how can I do it? someone...
Hello Coder: I want the indicator to only display buy arrow if the current arrow is higher than previous arrow, and display sell arrow if the arrow lower than previous arrow how to code that ?! please help Thanks in advance
In EA when I make a Variable in the Global Scope it is Initialize only once at the beginning of the program. And it doesn't get reinitialize/its value change to the original value when Time Frames change. But when I try the same concept on an Indicator, I found that the variables in the global scope...
EA CODE:       doublem1psar0=NormalizeDouble(iSAR(0,PERIOD_M1,0.02,0.2,0),5);       doublem1psar1=NormalizeDouble(iSAR(0,PERIOD_M1,0.02,0.2,1),5);       doublem1psar2=NormalizeDouble(iSAR(0,PERIOD_M1,0.02,0.2,2),5);       double m1psar3=NormalizeDouble(iSAR(0,PERIOD_M1,0.02,0.2,3),5);...
Hi everyone. I am trying to program a new trading system (very simple one) which consists of 1 MMA crossover with 2 type of exits. One stop loss based on volatility and another one which is a kind of trailing stop based on the breakout. I.e. if I have a long position, it will be closed when the...
  Reducing RAM  (14   1 2)
Hi Guys... Can any of you give me a few pointers on how to reduce my EA's RAM... specifically Indicators that I use on my GUI ( Graphical Interface )... Most of my heavy "lifting" is done with Arrays and Global variables...but,... I have a GUI that is split into 3 - Chart "0" - the main MT4 chart
given the following two arrays: string symbols[]=      {       "USDCHF","GBPUSD","USDJPY","EURUSD","AUDUSD","USDCAD","EURCHF","EURGBP",       "EURJPY","EURCAD","EURAUD","GBPCHF","GBPJPY","CHFJPY","NZDUSD","NZDJPY",       "CADCHF","EURNZD","AUDJPY","AUDCHF","AUDCAD","AUDNZD","CADJPY","USDSGD",...
Greetings! Would just like to ask why when I backtest using the parameters of optimization, the backtest results are radically different from when I optimized it? Did I miss something? Isn't it that optimization is akin to a backtest en masse? Spread is fixed. Basically all i did is uncheck the...
hi ..am traying to find the highest high among number of candles using the function  iHighest and iHigh first i used a loope for(int i=shif2;i<=(shif);i++) and want to find the Highest High within  or between  shif and shif2  using the code  double Highesthigh  = iHigh(NULL,0,iHighest(NULL, 0...
  saving  (3)
hi why the mt4 dosn't remember my last use all ways have to setup the tools and all the other helpers
Hey, Is it possible to edit the iFractals function. It returns previous values based only on 5 candle tops and bottoms. 2 lower candles either side of high. Can it be edited to return a previous fractal value of this with 3,4 or 5 candles either side of the fractal ? My suspicion is as it is a built...
Hi  I wrote a function for set SL equal to OrderOpenPrice.  It is working but in strategy tester  Journal I see many errors befor and even after this action . would you please tell me whats wrong? void RiskFree()  {   bool result;   for(int i=OrdersTotal()-1;i>=0;i--)     {      if(OrderSelect(i...
Hi This code needs to open/create a file to write in, so that the content of the file will ONLY have what is being written by this code. GetLastError() is reporting 5011. Could some one please show why and how to fix it? The docs says File must be opened with FILE_BIN flag, but I want to write text...
Hi guys, i had problems with one of my EAs, after normalizing prices i still got outputs like this: I dont know why this is there, considering all prices are normalized.Ill send my code, if someone could help! Thanks       double stoplevel=MarketInfo(Symbol(),MODE_STOPLEVEL)*point;      double...
Hello everyone, I would like to know how I can to send another pending order after the previous order becomes a real order. Look the example extern double Distance = 20; OrderSend(Symbol(), OP_BUYLIMIT, Lot, Ask-Distance*Point, 1, 0, 0, "comment", Magic, 0, CLR_NONE);   When opening a BUY order,...
Hi guys, I recently tried my EA on a new MT4 platform of a new broker (FXCM) and aparently their system doesnt accept the OrdeCloseBy function. It returns "error 3" I tried all possible settings to avoid the problem without success. My EA works fine on more than 10 other MT4 different brokers and...
Its from their liquidity provider from back then? MT4 backtester proceeds to "model tick data" since before there were ticks on the broker? I just want to gather raw tick data from my broker from as far back in time as possible. 1m frame only goes for six months, so I decided since I only need the...
Good morning, the editor gives me the following error: “notall control paths return a value”. Do I need to place return(0) at the end of every “for” “if”and all other functions? For instance, where do I place return(0) in the code below? Thank you! for(cnt=0;cnt<=total;cnt++)     {     if (...
Hello dear fellow traders and coders, good day/night. I created this post because i turned on my pc today and opened my MT4 to continue working in some projects and it asked me to update, wierd at first but i did. afterwards i found out this: Did they update MT4? If yes, how do i find out the new
This EA is based on the "Forex Gladiator" strategy which was available for free download from the author a couple of months ago. Here's the basic strategy, it's a counter-trend system: BUY- Close must be above both the long term and short term SMA's. Close must drop down within n-points...
Hi, I want to select the newest order. Following code is for searching all orders? How can I modify the code  to select the only one order (newest one) ? I want to select only the newest order to compare the price, etc.... How can I know the newest order information? I want to know OrderOpenPrice()...
I made an EA so that if the profit is above 0 the order is closed. But the order is still being closed even if the profit is negative. Why is this happening? OrderSelect(OrderA,SELECT_BY_TICKET);         Alert(OrderProfit());// It does alert a negative profit         if(OrderProfit() > 0)...