Expert Advisors and Automated Trading - page 375

How can I run/test an expert inside/from a script i want to run an expert tester from inside a script and i can't find how to do it.
Dear community, i debugged my EA (only the OnInit funcions) and it was bugfree. Then I testet my EA and the tester showed me an 'array out of range' in a OnInit function. How can this be? The period of testing and the date of debugging is not the problem. With best regards, Larry
  EA Time Filter?  (1)
Hello, Can anyone tell me what the option labelled as "Enable Time Filter in Hour" is for? Does it apply to the days of the week selection or the time settings for trading? My coder that did this is being kind of quiet, so reaching out for help! Thanks, Lorraine
Example: My time limit is "2015.12.30. 00:00". And at the time of Backtest is 2016. So it will not work right away. How do? Thanks!
Comments that do not relate to the "Open Buy Code issue.", have been moved into this topic.
I wrote an EA for Metatrader4 and it logs everything that the EA does in a log file that is opened like that: filehandle= FileOpen ( "EA_LogFile.csv" , FILE_CSV | FILE_WRITE | FILE_SHARE_READ , '\t' ); before I call OrderSend() I check the following conditions: if ( IsExpertEnabled () && IsConnected
Hellow folks, The only way possible to get past data is by downloading it historical data centre. I am looking for a way to do it automatically. I am using a cluster indicator based on multiple symbols. The biggest problem is unsincronized amount of past candles available. Therefore, the indicator
Hi All, I am new in meta trader and trying to code using iCustom. I also tried to read a number of articles, forum and even meta trader definition of iCustom and still clueless. So, I need your help. This is my simple indicator script: #property  copyright "Jeannnie"int...
Hi, I'm trying to connect MQL4 with Python via C++. I've embedded Python in C++ with Boost.Python, after compilation in .dll, it doesn't interact with MQL4. I've put .py and .dll in ~\MQL4\Libraries, it's that right? Did I put it in the right folder or did I miss anything?? Thanks in advance.
The time frames below H4 are the same for brokers on different time zones . H4 and above come out different since brokers start servers at 00;00 in the time zone they are operating (it seems). So running an EA that make use of H4 and above shows different results on different brokers. I have tried
Hi, I'd like to know more about SetAsyncMode. First : void  SetAsyncMode( bool mode // asynchronous mode flag ) True activated for all transaction using the class, false deactivated ? Second : Which interest to not wait for the server answer, will it speed up the way...
Hello! I want to learn how to use Stochastic in a EA. But failed to find a sample EA with Stochastic. Can anyone help me ? Hope it's a simple one…enough for me to learn how to put a Stochastic in my EA would be great. Thanks a lot
Yes I know this might be the wrong place to post such a thing, but im extremely curious and I'd like to learn a lot more maybe even make my own EA, currently I know the basics of MT4 and forex trading, but I want to go deeper into automated, coding, etc. There aren't many people my age interested in...
I have noticed something which I do not know if its true yet, I would like someone to give their opinion on this. I think Strategy Tester calculations on TimeCurrent() gives different results than live, for an example, If I send an order ==> record the time when it is sent ==> take the recorded...
Hello, I had been looking through the documentation on the iStochastic and I haven't found what I am looking for, with the info in the documentation it wasn't clear to me how to implement what I want. Im setting up conditions for which a trade can be opened. One of those conditions is if the...
How to write the code in mql4 that able to click BUY or SELL, change the lot size from 'one-click trading panel' automatically (auto-click) instead of OrderSend function . The reason ... some brokers don't accept OrderSend from the EA - they want my client to do manual trading only
  C++ dll problem?  (2)
Hi, I'm trying to code in C++ to interact with MQL4 and I compiled with VS express 2015. However, it doesn't work when I include in the mq4. I want to know if it works when compiled in vs 2013 or 2015. Because I see in the link http://www.metatrader5.com/en/metaeditor/help/development/c_dll the mql...
Hello, I am extremely new to MQL5 and MetaTrader in general. I thought I would take a shot at making my own little EA for fun just to get my feet wet in MQL5. I followed a tutorial at www.mql5.com/en/articles/100, but tried to change it to use the CCI indicator only. I thought I did it right, but I
Hello, I'm using Markets.com Metatrader 4.00, build 950 and I'd like to report what I think is a dangerous bug in the Strategy Tester tool. The Strategy Tester always opens a pending stop order at the price given by the trader when he/she placed the order, while in reality it should be opened (i...
Hello, I wrote a function in MT5 to get the value of indicator ATR like this: double mATR(int days)   { double ATR[]; int ATR_handle; ATR_handle=iATR(NULL,0,days); CopyBuffer(ATR_handle,0,0,1,ATR); ArraySetAsSeries(ATR,true); return(ATR[0]); } But I noticed that it get...
Hi, I slightly modified the iFractal indicator and I called the new one MaxMin. It seems to work properly but some problems arrive when I try to use it in an EA. I call it with the function if((m_handle_MinMaxM1=iCustom(NULL, PERIOD_M1, "MyIndicators\\MaxMin.ex5", MinMax_nBar)...
Hello, My "Trade Tab" has many order and symbol in the same time like a " EURUSD ", "AUDUSD", "EURGBP" ... as below But I don't correct code to separate counting "EURUSD", "AUDUSD". Please advise. Thank you
Hi All, I am trying to write a EA for Binary options on MT4 platform. But I cannot place the order by using OrderSend() function (My account does not have any problem, I can place the order buy using the EA from the broker). It gives me Error 3 when I am using the following statement...
Dear All, I want to try a expert advisor for tester with a method but always it gave me fail. The method is ; 1. Using MA and Bollinger bands. 2. The time H4. 3. If MA is lower than boolinger band main 3.a if t-2 close is lower than MA and bollinger band main (bar must be bearish)...
Hi, I tried to create an EA on http://sufx.core.t3-ism.net/ExpertAdvisorBuilder/ . For some reason the EA takes trades on each bar above the signal. I do not know anything about coding. I just want the EA to take one trade when the signal occurs. The EA is for a buy signal only. Once this problem...
Hello If I run a few intraday eas on different charts at the same time, how can I set a simple money management for the terminal such as if total profit/ total loss from all eas on all charts for the day reaches XXXX/YYYY then close all positions and stop trading until tomorrow Thanks
Good afternoon:  I write from Spain.  I program in mql5 and I downloaded "Fann2MQL 0.1.5_x64". The code of the EA not error when I compile, but when running I get this messages...  '\MQL5\Libraries\Fann2MQL.dll' is not 64-bit version Cannot load '\MQL5\Libraries\Fann2MQL.dll' Cannot call...
Is it possible to exclude bars that start at a certain time in an EA? For example if a backtest shows that trades on H! bars of 13, 14, 15, 17,21 and 23 did not do well then how do I exclude them in an EA? Thanks.