MQL4 and MetaTrader 4 - page 130

The following code returns "0" for the BuyProfit variable although there are several Buy trades open and running. can you perhaps tell me why? Count = 0 ; for (Count = OrdersTotal ()- 1 ; Count >= 0 ; Count--) { if ( OrderSelect (Count, SELECT_BY_POS,MODE_TRADES)
Is the spread field in the strategy tester in pips or fractional pips? I can't find it in the documentation. For instance, on a pair with 5 digits should that parameter be set to 1.6 or 16 if you want to simulate a spread of 1.6 pips?
Hello friends, I am trying to write a Expert Advisor for trading but I would like to use the Relative Strenght Index for my trades. This is the code i wrote based on the formula on the internet and also the indicator. It should work but it doesn't match the results found on Tradingview and also
I opened 42 charts and attached my EA on all of them. But only 30 of the EAs (same EA) are sending me email alert. What happens to the EA on the remaining 12 charts
For example iclose (), iopen () are "in black" but I expected them as "in blue". Have I to link some library? Thanks a lot for the contribution of everyone. Paolo Cacciapuoti
[Deleted]
I'm a beginner and have traded using both platforms, but I'm still not sure which platform would be suitable and profitable for scalping
Hi I cannot connect my MT4 account to MQL5.community. However i can login successfully on mql5.com website with my login and password. And my account is successfully connected in MT4. Error messages: 2019.09.11 22:36:59.315 Signal: '549038': failed get list of signals, connection error 2019.09.11
  How can I get Close [0]?  (23   1 2 3)
//+------------------------------------------------------------------+ //| Check for open order conditions | //+------------------------------------------------------------------+ void CheckForOpen() { double ma; int res; //--- go trading only for first
Hello. I try to open broker's .hst files from history/brokerfolder with FileOpenHistory() or FileOpen() functions to see and edit OHLC data, but I can not find any number like open price or any order of candle's data. Can we read inside .hst files? simple example: int handle=FileOpenHistory(
I have been using the VPS Hosting for many years with great results, however... It now appears to be malfunctioning - It runs OK for about 6 hours then fails to execute positions anymore. EA works fine on my computer but not on the VPS? - START/STOP/UPLOAD buttons are also failing to function by
I'm really confused. My EA runs just fine using Strategy Tester during trading hours. No hangups at all. But after hours when backtesting offline, it has problems. I figured out part of the problem in that the larger spread after hours was interfering with my stop loss and take profit values . Once
Hello, There is a problem in my testing. Any guide is appreciated. My chart is on EURJPY and I need to know EURUSD rate in my EA. I get EURUSD rate with SymbolInfoDouble(EURUSD,SYMBOL_BID) and it works perfect while using EA. But when I run strategy tester, output of
I have a problem when my EA places a pending order and my trade hits TP. I get lot size (0.01)* 5pips = 0.42 profit instead of 0.50. With JPY pairs its less 0.37 etc. Here is my code below, please help if you know the problem. extern double TakeProfit= 5.5 ; int MagicNumber; int MaxTrades= 0 ; int
Morning All So I have a snippet of code set up to prompt a MessageBox to make itself known at a certain time (closingTime) which is formatted to an Integer on the 24 hour clock, which in this case is 17 (or 1700 GMT). I am aware that the terminal works to EET and that I have to make an adjustment to
[Deleted]
  calculating time difference  (21   1 2 3)
I need my slave EA to calculate the time difference between The master Time and Slave Time. If the difference is more than 10 min. then slave must return(0), Any feed back about the code please.
Hello, I want to take RSI input parameters from user and put RSI on the chart. Does anybody know what codes should be written? Thanks
Hi I have an issue in the below code where some labels do not appear on the chart, and I get different results when I count down or up on the ObjectCreate loop, as shown in the images attached below. Also as a beginner in coding, and just learned to use arrays. This code is part of a huge code as a
I would like to change my push notifications ringtone to something that will wake me up while I am sleeping. Does anyone recommend a software or method that will work with signals coming from an indicator
[Deleted]
Hi all, I would like to program my EA to detect if an object appears (an arrow... put there by an indicator) on the current bar of my chart. Is this possible? Thanks! Shawn
Hi I have a hedging expert advisor running and it has currently opened many trades in both directions. I wanted to know if I switch off the auto trading button on mt4 to stop it opening more buy trades and hopefully it will recover on the sell side. When I switch the EA back on when it's back in the
how do i sequence conditions within a cycle? while ( Bars > LastBar) { if ( OrdersTotal ()<= 10 ) if (Zone1== "sell" ) //signal 1 if (Zone2== "sell" ) //signal 2 if (signal== "sell" ) //signal 3 if (Zone3== "sell" ) // signal 4
Hi i gave my accont to manage to someone, I want to know what ea they used to trade the account as they wont disclose this information. does anybody know how i can find out which ea they used
Hi, I'm trying to make an algorithm which will open all charts in selected template based on user inputs. I have 2 problems: 1) I cannot specify correct path to find proper template 2) Even I'll use workaround to 1) ChartApplyTemplate doesn't work for me. Description for 1) input string templateName...
  Tick Data on MT4  (3)
Importing Tick Data on MT4. On MT4 After checking Tools->History Center, Import-> I see the minimum granularity is minute data. (nothing about ticks) On the MT4 tester I do not see any tick import option either. Is there any way to import tick data on MT4 or does it necessarly require a 3rd party
Hello, I am in EDT, New York, time. How do I change the time on the MT4 charts to my time? If I can't change it, is there a tool/program that can do it? Thanks. 
Why does the Warning "empty controlled statement found" come up when using if (enableCount == true ) within the following code? void OnTick () { double close = Close[ 1 ]; datetime time = iTime( NULL , 0 , 1 ); static int barCount = 1 ; static bool enableCount = false ;
Hello, I would like to calculate the daily profit of one of my EA, my code is: double DailyProfit() { double profit = 0; int i,hstTotal=OrdersHistoryTotal();   for(i=0;i<hstTotal;i++)     {      if(OrderSelect(i,SELECT_BY_POS,MODE_HISTORY)==TRUE)        {          if(TimeToStr(TimeCurrent()...
I would like to set my TakeProfit as closing in profit and not in pips. Below is my code closing in profit. for ( int Loop= OrdersTotal ()- 1 ;Loop>= 0 ;Loop--) { if ( OrderSelect (Loop,SELECT_BY_POS,MODE_TRADES)) if (OrderSymbol()== Symbol ()&&OrderMagicNumber()==MagicNumber) { bool
Hi, Doing a backtest my trades bunch-up how ca I correct this
Hi, I am looking for advice, as lot size do not match my expecation. My Provider had 20K account with leverage 1:500. I have 10K account with leverage 1:100. Nevertheless if the provider set a trade in size of 0.38 lot, than the trade is copied as 0.03 lot. I have 95% money in copy deposit. Spread