MQL4 and MetaTrader 4 - page 1274

[Deleted]
  MA cross problem  (6)
Hi Can anyone advise me what is wrong with this code? Logic is to long 2 lots when 12EMA and 26 EMA meets, however backtesting this EA resulted in zero trades executed. /+------------------------------------------------------------------+ int start() { if(iMA(NULL,60,12,0...
[Deleted]
  Script structure  (2)
int start()  {  int A;    while(true)    {     A++;     Comment(A);      Sleep(10);      RefreshRates();      if(Close[1]-Open[1]>0)      {        Alert("Bullish bar");        break;      }    }   return(0);  } Sleep(10) is to ease pressure on processor. while(true) is to make the script search...
New article Transferring Indicators from MQL4 to MQL5 is published at mql5.com: This article is dedicated to peculiarities of transferring price constructions written in MQL4 to MQL5. To make the process of transferring indicator calculations from MQL4 to MQL5 easier, the mql4_2_mql5.mqh library of...
Hi, I want to expand my knowledge in auto trading so I'm looking for resources about auto trading. For example I'd like to know how my backtest graphs should look like, what should be the range values of profit factor, max drawdown, etc... and mathematical essential knowledge to design a good...
[Deleted]
its my first EA and i have a problem, im trying to buy or sell when ever the price is touching the bands, but when im doing back testing it doesnt show me they touched the bands, or it show me that it touched just one's, it doesnt make any sence. let me know if u want the full code thank you for...
[Deleted]
Hello All, I would like to know whether it is possible to run more than one mt4 MOBILE (Windows Mobile 6.1) client at the same time in a mobile phone. If it is so, please let me know the procedure. Thanks
[Deleted]
  Boyce  (2)
What is Boyce Codd Normal form?
[Deleted]
Below is what saw on sale page of XPP - a new robo millionaire maker... (yeah, sure) What interests me is HOW can one dynamically and assume in real time, do display of 'current' broker slippage. Their point for all this is that (apparently some) brokers can/do ramp up slippage values, which of...
Hello Guys, my OrderSend command sometimes returns -1 and sometimes goes trough. What does return code -1 mean please ? This is from expert log: param 0 - param 10 are parameter and their values for OrderSend;param 0=Symbol. The EA was attached to EURUSD chart. As you can see, the first order is...
[Deleted]
Hello I know you can have Reuters datafeed on Metastock software via quotecenter, but I would like to have it on metatrader since I think that's better software for my kind of trading. Anyone knows if it is possible and if so, how? thx in advance :)
Hi, Here is my cycle to check the last closed order, to decide how many lots the next order will open. It works fine, but I would like to introduce some break time, e.g. 12h or 24h, if the last order were a loser one. I just can´t figure out how can I do that. I already tryed in so many ways, but
HI, Is there a way to obtain the long price or the short price that the trader had placed from the broker server (IBFX)?
[Deleted]
  Need help on my EA  (15   1 2)
Hello together, my problem is that the EA didn´t change the Stoploss. Example low[1] 1.0000 low[0 current candle] 1.0009, so now current candle is closed and low[2] 1.0000 low[1] 1.0009. the new stoploss...
[Deleted]
  Custom Back Testing  (13   1 2)
hi there, I want to adapt (c++) the backtesting function of mt4 in order to make faster back tests. I mean functions like "control of the stoploss or tradeprofit". Also the function for closing orders and calculate the profit correctly. Does anybody know where to start? thanks in advance
Hello, What could be the cause for the Market Watch rates to differ from the rates on the chart? How can this be corrected? If for instance the EURUSD in the Market Watch shows a 2 pip spread (standard account conditions), and the chart itself shows 3 pip spread (mini account conditions). The broker...
B"H Hello! At the "Execution Errors" documentation (https://docs.mql4.com/trading/errors), few variants of the ERR_TOO_MANY_REQUESTS error are described, but I find the explanation there a bit confusing. Could someone please explain the meaning of each variant and what should be done in response?...
New article Creating and Publishing of Trade Reports and SMS Notification is published at mql5.com: Traders don't always have ability and desire to seat at the trading terminal for hours. Especially, if trading system is more or less formalized and can automatically identify some of the market...
[Deleted]
How could I remove an indicator from the window? Please
Hi I am programming a Neural Network but I have the following problem: I run it once, and I get some results, then I run it again, with the same data and I get absolutely different results (in testing). It is apparently training over and over again and is not erasing the previous data (at least I
[Deleted]
Hello! I have a new bar function that I found on the internet. Here it is bool NewBar(){   static datetime lastbar = 0;   datetime curbar = Time[0];   if(lastbar!=curbar)   {      lastbar=curbar;      return (true);   }   else   {      return(false);   }}   It works very nicely except that it gives...
  alert once  (5)
Does this code only check the Bid > Bands at the first tick of each bar? I want the alert to sound once but for the code to be checked on every tick during the bar:          // See if this bar is new         if (Time[0] > MostRecentBarStart)          {            // Store the time of the current bar...
[Deleted]
Hi all, May I asked for a little help from those seniors here. I would prefer to trade with bar chart rather than candlestick chart. But the bar body (and its open and close little horizontal lines) in standard view is rather thin when I have to open 2 chart windows. I can zoom in the chart to make...
[Deleted]
hello, in my ea I get error 130 on sending a pending order. I've checked Bid/Ask and price of the order but don't see any errors. For example: OrderType: OP_BUYSTOP Bid: 1.29915000 Ask: 1.29928000 Price: 1.30056000 (Is 0.00128 above the current Ask price) S/L: 1.29916000 (Is to close to Bid and...
[Deleted]
  icustom query  (8)
Hello, A non programmer here: Ive created a new EA template and I am trying to incorporate the iCustom function with multiple time frames. I have copied the all external variables from the custom indicator into the iCustom line . Below are the extern variables that appear in the indicator. extern...
  Only 2 trade per day, how?  (12   1 2)
Hi, I hope someone can help me with my problem. I'm trying to create an EA which only open max 2 positions per day. Let say the trade is triggered by MA Cross and I only want the EA open max 2 position per day. Which one is the best technic? Using GlobalVariable or checking history ? Or is there any
Hello, I wish to suggest the consideration of language selection option in the installation of our popular platform MT4. This is because one may only use one language at a time and therefore inclusion of all the languages in the package only contributes to bandwidth consumption. Since I use English,...
This keeps happening, usually when there are many orders - and usually while I'm sleeping or away. It's happening at 2 different brokers. The brokers told me to reinstall the platform, which I did. Still happens. There has been a critical error Time : 2010.06.01 21:36 Program :...
[Deleted]
U sing Alpari MT4 and I was updating the database at History Center. I found that there are some missing data in the database such as provided below; USDCAD:5/8~7/12 were missing EURCAD:5/8~7/11 were missing EURUSD:5/8~7/18 were missing USDCHF:5/8~7/18 were missing EURJPY:5/8~7/18 were missing I...
Will be made Linux version of Meta Trader whenever ?
[Deleted]
Hi I would need some help with my code. I have stripped it to the bare minimum and posted it below. Basically the code below says when 12EMA crosses above 26EMA and if the current price is above the closing price of Bar[1]+30pips, i would enter into a long order for 2 lots. I will then close 1 lot...