Download MetaTrader 5

MQL4 and MetaTrader 4 - page 801

To post a new topic, please log in or register
Hello! I've been developing my EA Kanguru and these are my latest Backtesting results: The EA works on 5M TF, using the pair AUD-USD (other pairs not tested yet). It uses ADX indicator to determine trend and it's strenght. Then, it uses Parabolic SAR as a trigger to open trades, according to the...
I have an idea for coding an EA, but at very first stage I found out that it would start making losses if by any reason MT4 would be switched off and on again. I need my EA to remember a set of data (an array to be specific) no matter what. I couldn't find any solution anywhere on the internet. My...
hi, I have some code below for classic pivot points, the problemwith this indicator is that it does not update automatically after thefirst tick of the new daily/weekly/monthly bar I have to keeprefreshing it to the 4H chart then it updates, I would like to have itupdate automatically on the first...
Let's Help Beginners
Hello all I am coding an EA which trades when price closes below/above a 10 SMA, along with confirmation from 2 other indicators. The only problem is, that sometimes all criteria are met several candles AFTER the initial cross, so simply saying "if((TenSMA > Ask) && (etc, etc))" doesnt suffice. I...
Hi, I have programed my EA and now I am optimising the settings. During live testing (real money, real time) I would like to change some setting in the EA that are adjustable during launch (extern int EMAperiod=21;) . Can I do that while it is working. e.g. I would like to change the EMA Period,...
Hi Guys, I can program EAs a little bit, so I copy and paste what I need and adjust it to match my requriments. But there is one thing I could not find. I want an EA that is always in the market and only changes from long to short (or the other way) when a trailing stop is hit. Can you give me a...
I have created a EA using dll . When I attach it to the chart the MT4 crashes. Can anyone tell me the reason for that.
Is it possible to code Buy and Sell Buttons on Chart wich can be use to open Order? I have here a solution wich is coded with objects on chart, but I asking myself if it could be possible to code real buttons?
  AND OR handling (14   1 2)
Hello folks, might be a silly question for most of you, but I'm just running in a problem and would appreciate some clarification. Sample: if (Variable1 == Variable2 && Variable3 == Variable4 || VariableA == VariableB && VariableC == VariableD)   {   bool CriteraMet = true;   } As far I my...
I am NOT accusing MetaQuotes for for anything here, I'm only speaking up on some concerns that I have. I would like MetaQuotes to submit their sourcecode for scrutiny by independent western security firms, and have the code ( including updates) certified free of application backdoors. IF MetaQuotes...
Hi, I want to know how can we tell the program to continuously check for new bar opening?
The moving average only goes back so far. I have an EA that uses moving averages as one of many signals. The problem I am running into is that I can't back test further than the moving average goes. Are there any moving average indicators that go back as far as the time chart goes?
Hi all, A year ago or so I started with coding mql4 expert advisors. I have no programming background so I had to learn everything from the start. Currently I am at the stage where I can code most common strategies. In order to improve my coding skills and gain experience, I am offering to code...
Will there ever be a 2hr timeframe chart in metatrader?
Hi, I need some coding help. I want to set one buy order and one sell order at a specific time at a specific day of the week. Now I want the code for only trade if no buy or sell order is open. Who can help? Thanks and Regards, Jimbofx7
I am in process of creating a dll. In a mql4 function I would like to pass 2 or more parameters, which will be called in a dll. And the dll function should return multiple parameters. In this process I am passing a reference of an array resDataCollection1, which will store the data that is be...
Hello to everyone, I've developed an EA that looks like working nicely in real time... The problem is when I try to make a backtest, using the Strategy Tester... Everything starts correctly, but all of the sudden, when one or two days went by on the tester, the EA starts to take wired deals, and/or...
What syntax can I input in DLL file and how to create my own DLL file in Meta Trader 4 ? Can I use Meta Editor for it ?
i have his error in my EA code when i try to back test my EA but compiling the EA there no error . 2010.11.25 22:52:02 RAY MA finish inputs: profit=1000; stoplose=1000; lots=0.1; 2010.11.25 22:52:02 TestGenerator: unmatched data error (low value 1.3667 at 2010.11.19 22:45 is not reached from the...
Hi there, I am trying to find a code or if someone could be kind enough to help me program the code in mt4 for the following. I am trying to chart the varying difference from a moving minus the curren bar max or moving average - the current bar min. so that on the saperate window i would be avble...
Hey guys,  Brand new to MQL4, been reading the docs and all that, so go easy on me!  Just wondering if its possible to initialize an array with a variable length.   For instance, the following works fine:   double blah[10];   ...Whereas this doesn't':   int arrayLength = 10; double...
Hello, I have a big Problem using the received Ticket number of OrderSend function. The Ticket which I get back from the function is not the same as the ticket that is placed in the Open Trades List..... Has anyone an Idea how this is possible?? The reason why I need the right ticket is because of...
Hi, I have two questions: 1.Why is the main Loop in an indicator f.e. BB_Oszillator running twice? I don't know, why I have to substract one from the actuall counted_bars: if(counted_bars>0) counted_bars--; 2.If I have a variable datetime test; How can I write 8:00 from the actual day in that...
Hi fellow traders, I hope you all had a successful trading week. Some of you might know me already - I can look back upon a "Forex Career" of 2.5 years. In these two years, I've been trading and heavily developing MQL4 programs such as EAs and Scripts. I know of many traders who are in need of a...
I'm trying to create & use an array of arrays, and got stuck.    //// note that StatsTally will resize pStatHolder to particular size   //int StatsTally(double pTallyValue, double& pStatHolder[]);      double Arr[];   double ArrOfArr1[169][];   double ArrOfArr2[][];   ArrayResize(Arr, 5);...
With version 1.3 my mt4R.dll has finally reached production quality and is released under GNU GPL https://sites.google.com/site/prof7bit/r-for-metatrader-4 and some example code that illustrates how to use it can be found here: https://sites.google...
The following script returns a '1' for any index of Time[], when run on a chart in any timeframe. For example, it seems to me that the barshift for 10 weeks back should be '2'. This error only seems to occur with period = PERIOD_MN1. It seems to work fine with any other period. Anyone have any...
Hello, Can anybody help me with understanding the MT4 Multi Terminal and how we can set it up to run off of the Master Account? is there a guide somewhere we can use? any help is most appreciated
Dudes, when i tried automated pending orders, when it becomes open for trade there is a difference of 12 pips (approx) in the entry price than quoated price. This is not consistently giving this problem, Sometimes it happens. Is there any valid reason? Thanks San