MQL4 and MetaTrader 4 - page 725

  Bar close rules  (8)
Is it better to use iClose() or Close[1] when comparing two in an "if" statement? I have an open position I want to manage through comparing of H1 bars. I don't seem to be getting it right. Hypothetically, what is the best way of comparing bar [1] with [2], [3] and [4] (and so forth). I.e
[Deleted]
Hi there, I'm not a coder, but i try to solve my own problems before asking. So i am develoing an EA, that triggers orders based on Stochastic and RSI levels. I want to add this Hull Ma indicator i attach. I have problems with the conditions for trend up trend down, maybe i will need to modify
Hello,  I would like to ask you whether exists some way how to save .csv file to somewhere else than to default directory ../files? When I use the function FileWrite(......), it saves only to the directory ../files.   Thank you for any advice.   Regards,   Lukas 
I was using MT4 plateforme till january 2014 and I restart a few days ago. Before my break I could install any EA by placing the file in the expert folder of my MT4 plateform, but now the new EA I'm trying to place in it doesn't appear in the plateform in the EA contain but sometime in the indicator...
Hello,   is it possible to run script without mq4 file? I mean, for example I wanna program some EA for a customer but I don't want to the customer see my code. Is it possible some way?    Thank you for any advice.   Lukas 
Hi I've a bit of hypothetical situation that Id like put out there as I do not know the answer. The broker I am using for my MT4/EA activities is a tad slow at execution sometimes, and you end up with a order open price a few points out of what you expect (slippage). I get that, that's part of...
[Deleted]
Hello, does somebody know if it is possible to play at same time when a signal occure a Sound ALert and a Text Alert. As you know when a Textalert take place a sound file is also played and when you want to play at same time another sound file, then i think that is not possible, in my test it looks...
Good morning to all I have very basic programming concepts and I am trying to add two functions to calculate the Sharpe Ratio and Sortino Ratio for you to reflect on the information panel on my EA. I have the code in another programming language but I find it impossible to transform MQL4 language....
[Deleted]
Hi,   I have  simple array with strings (about 800 entries).  But now I want to determinate frequency of each different  string element. Idea is to take first element of array and then run over all array and count how many times it shows up there. So my calculation is that the loop should repeat...
[Deleted]
how to limit an order a day,  I placed an order today and sold it today,and I dont want it to place another order today again. how to write it? thanks
Hi! Shall i Suspends execution of the current expert for the specified interval? eg: i would like to validate conditions at buystop/sellstop at 11:29, once validated EA must wait 55-59 seconds and must place order. is this possible? shall i use Sleep(55 * 1000) function?
hello friends. I have a problem to install the MetaTrader 4 (see also attachment). It should run on Win7 but the installation stops on the second step. The internet options are all set as low and the firewalls are inactiv. Nevertheless the installation isn´t possible. Do you have any further...
[Deleted]
Can any one help : how to edit the lines on the mobile MT4 of FIB time zones to make it show the levels in stead of  1,2,3,5,....etc to make it 0.382, 0.50, 0.618.....etc I know how on the desk top version but not on the mobile version. please help thanks
Hello!   I have a script, which plots data from .csv, as vertical lines with (or without) text. At the script start, I would like to be able to select timeframes that those vertical lines (and text) should be plotted on. Like:   input int PlotOnTimeframes = 60, 240, 1440;...
[Deleted]
Can anyone explain me in more detail than in articles about matlab, as I can do the following ?:  "1- Download OHCL matlab data in real time."  "2 Generate response in metatrader platform."  Articles do not understand well.  Any suggestions would help me a lot.  Thank you very much.
hello, i want to check if the last order is minimum one hour old, so i was thinking the OrderCloseTime() and datetime are borth using the date from the 01.01.1970 in seconds when i use my code i get some unexpected results i was thinking, i use the order close time minus the actual time and get
How to set only 1 time for all variables of "double data type" ? Thank you
Are the values of the spread settings for the Strategy Tester actually a tenth of the shown values?  For instance, is a spread setting of '2' actually a spread of 0.2? 
[Deleted]
Hey everyone, the web agency I work for has a prospective client who is already a metatrader4 broker, and they are looking to build a website to allow their clients to log in and see a few basic bits of data, including their balance and possibly trading history. The website will be written in PHP,...
Somewhere sometime I am sure that I have seen a MT4 with a side indicator window Was it part of the MT4 build or was it an add on ? Creating a composite of multi windows is the way most are doing it so far. BUT, it's hassle trying to establish if they are matching currency pairs and Time Frames....
Hello, If this topic has been covered, would appreciate if someone would point me to the thread.  Otherwise, I would like to to do back testing of EA's on the strategy tester using 5m/15m bars going back 5 years or more.  Could someone please explain how I can get sufficient data into the tester to...
I was able to run programs using ShellExecuteA in the previous build. For example to run notepad.exe it was the code below. Now with the new metatrader build it doesn't work anymore... And also file handling is much much slower. #import "shell32.dll"int ShellExecuteA(int hWnd,int lpVerb,string...
please this is the forex copy that i use to duplicate trade to multiple platform,though am not the own of the program codes. but since i download the latest mt4 update compiling this ea show me error below.please help me with the new updated program line.thanks below is the attached trade copy EA....
[Deleted]
MT4 closing open hedged positions at end of day needs to change from 23:59 to 23:54, is there a way to do this modification in the server? FIFO method Time Zone (UTC+02:00) Thank You
Dear all traders, I have created an indicator on the base of BB, malty time frame method, but its not working properly, I don't find any errors when I compile, when I use it in Live market signal comes and goes, it works in 1 minut time frame, but I get the signals in 5m also, when changing the time...
I am using a new laptop with Windows 8.1. The problem is : Windows explorer does not show all EA's in the expert directory. To make sure i created en new EA t.mq4. It is not shown by the Explorer. Does someone else have this problem too?
Hi all, I have a string CurrentSignal = "NONE"; I have my SL code. So once I have a buy or sell signal it will activate the thrailing stop however, after it takes profit using thrailing stop I got no where to reset my CurrentSignal to "NONE". How can I reset it?   CODE: if(type==OP_BUY)    {...
Dear,   can anybody modified this script for the pending order with a specfic time? for example if the market open at 8 am the order should be active at 9 am.  thx   #property show_inputs//#property show_confirmextern double Lots    = 0.1;extern int Slippage   = 3;extern int Stop_Loss  = 20;extern...
My EA works as follows -------------------------------------------------------------------------------------------------------------- "BUY" When MACD1 is less than 0 and MACD2 is greater than 0 it opens a BUY MACD1< 0 && MACD2 >0 ORDERCLOSE And when they are close to the same effect MACD1 <0 &&
Hi, is there a way to skip input dialog by debugging from MetaEditor (F5) please? Its anoniying to confirm the input by every small change. regards taskin