MQL4 and MetaTrader 4 - page 329

Hello, In the onCalculate method I often want to see for example the value of a moving average 10 bars back. To do that I have a loop that I run for every tick! for(int n=0; n<10; n++)        {         double fMA = iMA(Symbol(), timeframe, ma_period, ma_shift, ma_method, applied_price, i+n); // i is...
HI can anyone help with this. I have an ea that gets a price value from a horizontal line or trendline. However i have the code as follows but it will not pick up either value. If i remove the Objectgetvaluebyshift it will pick up the Horizontal line price and vice versa. But i need it to recognise...
Hi Chaps I would appreciate any help that you can give with the iHighest & ILowest functions, I have coded this and am getting whole numbers returned such as 138 and 9 respectively what exactly does this shift relate to with respect to the basic Pip or Point. Kindest Regards Will
Hello to everyone. I'm trying to retrieve the SHIFT value from inside the indicator source code. Is there any manner to do that? I explain my need: when the indicator is called by the EA using iCustom, we have MODE & SHIFT parameters . From inside the source code of the Indicator, I need to know
  New MetaTrader 4 Platform build 1045  (112   1 2 3 4 5 ... 11 12)
New MetaTrader 4 Platform build 1045 The MetaTrader 4 platform update will be released on 3 February, 2017, which is connected with the release of Windows 10 Insider Preview build 15007. Due to security updates in the new Windows 10 system version, MetaTrader 4 client terminals could occasionally...
  Correlations revisited ...  (122   1 2 3 4 5 ... 12 13)
Quite some time ago I was doing some work on Pearson correlation indicator. It was working OK and I thought that the "story", as far as coding is concerned, is finished. There is Pearson, there is Spearman's rank correlations... Ops, lets go back a bit : Reading about correlations it struck me that
Hi, Ever since the update to build 1045 I get frequent crashes in MT4.  I've submitted a ticket to the service desk. I'm running windows server 2008 R2 64 bit and accessing via remote desktop. The first thing that happens is a popup window that states "A required resource was" and the GUI goes...
Hi, my friends, Anybody can help to take a look if those indicators are repaint or recalculating.
Hello, I can not set the sales position. My expert enters long if high is greater than the n opening and sells low value if the opening is less than the value n. my code.  if ((High [0] -Open [0]> 20 * Point)) return ("buy"); // buy signalif ((Low [0] -Open [0]> 10 * Point)) return ("sell"); // sell...
I tried using the search on the forums but I couldn't find anything. So I am looking for: Simple Moving Average indicator that will signal me when a candle has crossed the MA set at 12. &nbsp, An Indicator that will automatically mark the open and close of the market, An Indicator that will
I wasn't aware that different brokers can use different symbols to indicate the same underlying (non-forex) instrument.  e.g. WTI is the same as USOIL.  Is there any way to remap say a trade opening using USOIL to actually open one for WTI in this example?  The other solution for me is to use the...
Hi everyone, I am using Windows 7 ultimate with Service pack 1 updated. Now I have installed FXCM mt4. I am trying to get the data folder by File-> open data folder. It takes this path " C:\Program Files\MetaTrader ". I am also trying to open my profiles In app data But no profiles shown. What can I...
I need that my ea check stochastic value only every 5 minutes . So i wrote like this : .... double StochValue( ENUM_TIMEFRAMES timeframe, int buffer) { double val; if (buffer== 0 && CurrentTime!= Time [ 0 ]) { CurrentTime= Time [ 0 ]; val= iStochastic ( Symbol
Hello I would like to know how to add the moving average(s) into a separate window (not by code but manually) the screenshot below is for that MA I am asking for: .. set file attached for the above screenshot
Hi guys,i've a indicator which calculates and if my condition is true,i want to call a method to a EA to execute an order. I was thinking about load a buffer,but i dont think if it gonna works. It's possible to call a method inside my EA from my indicator ? i'm already using ICustom to load a...
Hi! I'm looking for a person who can write few lines of code to add SL and TP to existing EA. Best regards, Michał
Hello, I would like to know if it is possibile to draw ARC in  MT4 (or MT5) using mql or external libraries Thank you
Hi, I can't install MT4 client platform, becouse if i download MT4 from official metaquest site then is installing MetaTrader5. I need mt4 from metaquest, not from broker to open demo account. Can anyone have setup file for mt4 client? (not from broker) general file. Best regards
From the 1045 version has made its appearance a serious mistake: When sending in sequence two orders of opposite direction, the second order, sometimes runs in the wrong direction plus without entering the comment and magic number. I find myself in substance to have two buy or two sell instead of...
Hello guys, I am stuck coding a time filter in MQL4... What I want to code is:  if order open time is > a date... So I understood I must use OrderOpenTime function, but how to write correctly the condition? if(OrderOpenTime(TIME_DATE)>DATE){....... this is the format I am looking for... Help is...
Hi, I have had an EA built to my specification but I am from a trading background and not a software one so I need some help setting it up and adjusting it. Happy to pay for time or a profit share etc. Based in North London so would be handy if you're close to London Thanks Tom
[Deleted]
Hello everyone, I'm a developer, but I'm new to MQL4, and I'd like to understand a couple of basic stuff. I'm creating an EA that calls a couple of prepackaged indicators such as MA, RSI, etc, and a custom indicator. The question: Do I need to add those indicators to the chart in order to get a...
Maybe a dumb question?... When I'm in MetaEditor, I want to open the .mq4 file for, let's say, the Average Directional Movement Index. That particular indicator is in another folder - called Trend -  within the indicators folder. When I try to open a file from the editor, I can't see that Trend...
The code below is not working. Can I pass a multidimensional array as a parameter double arr[][ 3 ]; void demofunc( double & arr[]) { }
Hi, I am trying to get the list of files in a nonMT4-Folder for which I need Windows' kernel32.dll functions. Well there is an old thread to start: https://www.mql5.com/en/forum/103578 and https://www.mql5.com/de/articles/1543 for pre b600+ I just tried to change what has to be changed and...
Hi, could somebody tell me why I cannot compile an Mt4 EA with an M45 period while I can compile it with an H2 period? M45 chart was created offline with period converter and still it doesnt work. So I can it compile for H2?? Thanks!
  Meh Spread Indicator  (14   1 2)
I finally took a stab at making a spread indicator I have been meaning to write one for quite a while and never got around to it untested so it may have some bugs :P EDIT:small update I changed the color of negitive swap and added a tik monitor
Hi there, I am new to MQL4, my first ever indicator program, which I coded so far. I want to plot some values from CSV File. The format of CSV file is - 3/20/2017 0:00, 120 3/20/2017 0:05, 125 3/20/2017 0:10, 128 and so on I want to plot the values wrt the candle/bar. All is working fine, I have...
Can anyone help with an engulfing indicator? I have one but it isn't indicating on all the candles for some reason. Thanks.
EDIT: PROBLEM SOLVED. Can't use ArrayCopy with struct type if one of the struct members is of the string data type. Reason in red. I'm following the same template for copying two arrays of the struct type. I use one on an include file that's part of an EA, which works (and also worked as part of the...