MQL4 and MetaTrader 4 - page 1076

New article Universal Regression Model for Market Price Prediction is published at mql5.com: The market price is formed out of a stable balance between demand and supply which, in turn, depend on a variety of economic, political and psychological factors. Differences in nature as well as causes of...
[Deleted]
Hi guys, I'm writing an EA that looks for a Stochastic cross as 1st trigger, then looks for a gap between a 10 and 30 EMA as a 2nd trigger. I have this code working ok. finally it qualifies the Schaff indicator and this is where I'm having a few issues. Note: this is for a long trade only The buy
[Deleted]
Hello, how can I go, as a sample in a 1 minute chart back to the 18 december 2010 at 3:25 p.m. without scrolling? Is there a possibility to determine an exact time and go directly to this point. This would help me a lot and save a lot of scrolling time thanks in advance wunderblume
I ran an Optimization a couple of days ago, it had 385 runs, when it had finished I ran the best result on visual mode to see what the trades looked like. The end result was very much different to that given in the Optimization . . so I ran the single run again but this time with Visual mode...
Hi, I would like to get the last trades profit and loss that my expert had, how can I do that? Thanks.
Hi all, I am having trouble with my EA closing single trade positions. If I have more than 1 trade open the EA works just fine and closes trades when a close signal is generated. However, if there is only 1 trade open, the EA does not close the trade no matter how many times the close signal is...
I want to create a moving sum of the sign of the bars: an up bar is +1, a down bar is -1, on a window of adjustable size: how do I work with a window? should be extern int window=10; and then?? for ( int i= 0 ; i<limit; i++) { if ( iClose ( 0 , 0 ,i)> iClose ( 0 , 0 ,i+ 1 )) sign[i]= 1 ;
Greetings all, Is anyone else having trouble with SendMail() and/or the email test tool on Vista? I have my SMTP server set to smtp.mail.yahoo.com.br:25. It had been working fine for months, then stopped sometime around Christmas. I tried switching to mail.gmail.com, but no good. I can send to my...
[Deleted]
hello, I'm trying to call a windows form that i compiled inside a DLL. I can successfully open the form and view it, but after i close the form it stops the indicator cold and doesn't proceed in the code and refuses to work again till meta-trader is restarted. i also cant delete the dll till...
[Deleted]
  Detect a daychange  (11   1 2)
Hey guys, my next step to do is to detect a day change. I think it's very simple to do but i really don't know how to code it. Can you give me some hints? Thanks
  100 % Wins  (4)
All Experts Have One Thing In Common Losses, But The Neat Thing I Have Learned Is That After A Loss The Next Is A Win... Or The Next 2 Is A Win, So How Can I Program A Expert To Just Wait Until A Loss Is Shown Not Traded
Hi, I'm a new joiner and testing one of my first strategies I noticed the following issues: 1- Printing date/time at the begging of start() method, I could see that some days in the history were missing, for example in the Daily history of EURUSD day 14, 19 Jan 2011 were not traced. 2- I expected...
Every backtest that I run starts with $10,000 initial capital. For various reasons, I would really like to be able to test with a starting figure that more closely resembles my current account balance. If the backtest was able to actually determine and use my current balance, that would be a...
Hi, I want to program an EA which is writing and reading from a csv-File from drive D:\\ I am using the kernel32.dll and can write on D:\\, but not read at the same time. Everything works with the metatrader-file functions and the "experts/files"-folder? Is there a difference to use the...
  What is this all about?!  (158   1 2 3 4 5 ... 15 16)
Hello, Happy New Year! But here's a question for anyone who knows, simple truths open to all, I can't understand why this is so... Now I will try to explain: There are cases in the market when the trend changes. Suppose there was a strong movement in one direction and we already feel the reversal
  How NOT to Hack MQL4  (12   1 2)
Having been directedto an old post about making MT4 do what you really want, https://www.mql5.com/en/forum/124688 the code below was myfirst effort. Since it is a weekend (with no incoming ticks) I thought I wouldput the code in the EA init function. What is interesting about this code isthat by...
[Deleted]
  Trade Management  (22   1 2 3)
Hello, I have a very strange thing going on in my Trade Management code. The posted part of the code is running in a loop, including the OrderSelect command. It is running on the tick. The code performs perfectly in the Tester. However running it Live, occationally it produces "Error 1", as it tryes...
[Deleted]
hello, I have basically pasted the example in for arraycopyrates and cannot get it to return any bars. What am I doing wrong?? double array1[][6]; error = ArrayCopyRates(array1,"EURUSD", PERIOD_H1); if(error==-1) Print("copying rates failed"); else {...
Hey guys another question, I am trying to figure out the indicator side of programing. Having a few problems. First Trouble is one of the indicator buffers doesn't draw properly. A problem with buffer 3&4 which I basically want to make a Highest and lowest channel out of the first buffer... Here is...
  SMTP Error 501  (7)
Hi there, I'm a bit puzzled by this one. I've been running MetaTrader 4 for a couple of years now. No problems. However, I've recently purchased a new (Windows 7) machine and installed the MetaTrader software no problem. The email settings (under Options) are giving me trouble, though. I have...
Hello, I am trying to write a code so that i can work off the highs and lows of a specific bar per day.... The specific bar will be defined by time.... E.G. Just say i want to use the range of the 4 hour bar that starts at 4:00 and finishes at 8:00 every day.... obviously i wont be able to trade...
Hi, in attachment you see the source code of custom Moving average . I want to change it so that two Moving averages with several Periods combines together but the output shows only 1 Buffer. For example i have this changes for SMA mode like below: please help me what is here wrong or what should
[Deleted]
Hi I have a technical question about the Mt4: How were the Charts updated? If I have opened f.e. the M15 Chart, do I have, at the same time, the latest data for every other Chart? I´m asking for this, because I would like to know, if I use an EA on the M15 which uses serveral indicators on other...
[Deleted]
Please note: I am very novice at MQL! Anyways, basically I am trying to create an indicator that displays text on the current chart based on conditions calculated from a different timeframe, i.e. in my case if previous close on Weekly chart was below 10 SMA then display "Sell" on current chart...
[Deleted]
Hi, i would like to know, if there is a way to generate report of history (Statement.htm) to ftp (I already successfuly uploaded a file to my ftp so there is no problem). Is there some way to generate "plaintext" delimitered by ";" or ST else? Thanks for answers
Hello Everybody, My names Dave and I am trying to create a Zigzag oscillator indicator that resembles a MACD - but without the MA line. I have tried changing the code so as the ZZ appears in a separate window, THAT part worked. :) But I cannot seem to make it operate so as when the ZZ is up the
[Deleted]
When I write: OrdersTotal()==0 at EA this mean that no orders are open for this symbol or for All symbols? and if it is for all symbols how can i specify it for the symbol which I run the EA on it??
Just had a noob question that I'm sure has been asked a hundred times over. Nevertheless, I am asking it again hoping someone can just answer. I'm using the MarketInfo("USDJPY", MODE_POINT); function, and my broker, IBFX, is a 3/5 decimal broker. I tried to use a Comment(Point); and also:...
[Deleted]
I am clueless on why the strategy Tester Bid price should pull the current Live Bid into the Strategy tester. As a work around I can use Close[0] as a fix, but would like to know why Bid, is not useable. It then brings into question backtesting of Bid in EA calculations.
[Deleted]
I didn't pay attention to it before. Last week it got me thinking. Today I decided to address the community with a question: What is the purpose of DCs uploading EA and all custom indicators they use to the server. Another curious thing is that if some indicator cannot be uploaded to the server, the