Expert Advisors and Automated Trading - page 391

This is a run from the strategy tester. The open of the trade is on the open of the bar but the close of the trade is not on the close of the bar.   Is this caused by a strategy tester setting? Thanks.
Hello, The MQL5 Reference has a page on function templates ( https://www.mql5.com/en/docs/basis/oop/templates ) which has the following function template: template<typename T> T ArrayMax(T &arr[])   {    uint size=ArraySize(arr);    if(size==0) return(0);                  T max=arr[0];    for(uint...
So I have a file in the metaeditor that has a bunch of #includes. The error tab gets filled up with echos of these filenames, burying my coding errors down several screens.  I can't tell if the file has compiled correctly without scrolling through them Can I turn these echos off? Thanks
I'm trying to reserve n elements in CArrayObj and it seems to be missing a routine for setting the m_data_total variable to the number of elements reserved. When you .Reserve(n) it will allocate the elements in memory but using the .Total() returns 0; Is this a bug or a feature? #include...
I have never run any EAs on my PC.. but I have opened 10 pairs in the MT4.. and I have experienced some delay on ticks.. I suppose (or assume) that running EAs on those 10 pairs the EA will have also delays to enter automatically on positions...? Could you give me some lights on this situation? am I...
I'm using OnTradeTransaction() to monitor trades.   Is there a way to tell if the deal is being opened or closed? Right now I'm filtering the callbacks using trans.type == TRADE_TRANSACTION_DEAL_ADD Thanks.
Hello I did everything correctly like they said in here :  https://www.mql5.com/en/articles/862 But Sqlite3 does not work. When I run SQLite3Test script, I got this error. How can i solve it ? Thanks  
Hello I've declared a CiStochastic: private:CiStochastic stochastic; On a method I've tried to create it: stochastic.Create(symbol, timeFrame, 14, 3, 0, MODE_SMA, STO_CLOSECLOSE);   but appears these errors: 2017.03.29 23:49:14.257    2017.01.01 00:00:00   cannot load indicator 'Stochastic...
Hi, In my EA, I use a moving average indicator with a large period, it needs to access up to 150 bars in history. So I need to check if there are enough bars in history and, if not, download the missing data from within the OnInit() function. What is a good practice to do so. As for now, my code...
Hello All, I have a Trading Strategy which I would like to automate by creating an Expert Advisor for it. Please I need someone to help with this; let's discuss. Best regards
Dear Coder Since the migrants to MQL5 language, there are many differences in the coding structure to work with historical trades in mql5 language. Here I would like to discuss any problem related to Historical Trades. I just simply feel this is necessary because the History Deal structure from...
[Deleted]
HELLO, CAN anybody please add a news filter and a CSM to an already operational EA with conditions as mentioned in the attached Excel file please? Awaiting any reply. If so I will post the EA. Please read the excel file to know how I want it. Thank you very much and thank you once again. Since its
Hello everybody, I have a strange problem with overloading operator = in MQL5. I have a struct used for data storage: struct ZigZagData   {     double      Value;     datetime    Time;   }; Here everything is OK. I use this data type in one array I need to overload operator = and change the example:...
Hello, I am a new user of MT5. I would like to manually test a strategy using historical data. Is it possibile ? how can I do ? thanks
How do I return Minimum Stop Price (FOREX) in MT5 with code? Thanks
Hi everybody. I'm pretty new here. I found this on youtube. Now I'm searching for a bot that does this or maybe this topic will be inspiring somebody to build a bot that does it. I'm not good at math nor programming, I'm just thinking of ways to getting money and not losing it. The trading system is...
I do not know what this 813 more... is. I am not using an EA. Can it be removed ? Thanks Ken
is it possible to run MQL5 EAs in a broker that supports only MT4? I have chatted with the broker's customer support and they say.. "you could try... but we don't give support on EAs". So I would like to ask the forum according to your experience to know if I shoud then program in MQL4. Thanks a lot...
  Maximum Lots MM  (1)
I have nice life problems here. My EA only trade once or twice a week  and now I have reached my broker's maximum lots, now I feel like the EA is being limited and no longer performing as it has been for the past months. I am currently thinking of a way to code my new lots management so that it will...
Can somebody tell me what kind of file is *.ex5 - machine code or code for virtual machine?
  Form Malfunction  (3)
Hello! When I attach AceTurn to chart it appears normally, but I cannot reach to ComboBox selections and also CheckButton don't take changes when pressed. What is wrong in my code
Hi, i am trying to build a EA that reads the MACD levels, but i want to check if the MACD is above level 90 or below level 10 currently i am only getting some negative decimals numbers. Help please. Thanks
I tried to run the attached simple script in 64bit MT5, but for some reason ReadFile() results in an ugly crash. All other functions imported from kernel32 work fine. This code also works without problems in MT4 and 32bit MT5. Any idea what's wrong?
anyone know of an  EA/script available where one can quickly place multiple pending buy/sell orders at specified price (with distance) as grid with each pending order at specified distance (ie: 10 pips) ? Also would be nice if it has take profit in profit in X dollars profit  and stop loss in X...
  Export to Excel  (2)
Dear all Is it possible export to an Excel file the trade made with the back test
Hello, The following function compiles in MT4 (build 1045) (per @whroeder1 ), but not in MT5 (build 1545): void demofunc( double & arr[][]){} Does anybody else know why this would compile in MT4 but not in MT5? What is the correct syntax for defining a function in MT5 that accepts as a parameter a...
Hi to all, I've created 2 custom indicators that use other indicators. In my EA I m using the 2 custom indicators. All is fine but if I launch the genetic Optimizer nothings happens Or I get an error OnInit()...How can I get more informations or trying to solve it? Thanks in advance.
Hey Guys I have two subclasses with lots of the same functions and I would like to call a series of same functions from both classes, the simplest example of what I would like to do is below (btw I use "virtual" to ensure the sub-base function is prioritized over superclass function!) int...
Hi, As an EA developer, I wonder how does product updates work on the market. Once I publish a new version of a product, do the buyers get notified about it ? Does it install automatically on their terminal or do they have to do it manually? Other related question: is it allowed to use a WebRequest...