Expert Advisors and Automated Trading - page 219

To post a new topic, please log in or register
Hello, people. Strategy tester does not read past indicator data. Is it right?? Is it a bug?? What am I doing wrong? I'm writing an EA that needs to read past indicator data. It works just fine in Debugging mode, but it doesn't work when used in Strategy Test. To illustrate, a prepared a simple...
Hi, dear traders I'm looking for EA with three TF (M15, H1 and H4) and candles for its indicator. EA can open buy or sell at M15 by watching candles at H1 and H4 when candles show go up or go down. Does anyone have an EA with this idea? Thank you.
Hi! How can I solve this problem? I create an EA of a Signal and I got this error: "PERIOD - member function not defined" Where do I need do define? All others functions do not show errors...
It's not working now ... at least with me. It did last week.
Hi, I am an old time C++ programmer and just started learning MQL5. I notice the pointer concept of MQL5 is different from traditional C++, especially for getting pointer. I read the MQL5 document and quite easy to understand the concept of using function GetPointer(...) to get the pointer of a...
Hello MetaQuotes, when a backtest, without visualisation has been finished, a new chart window is opened showing trades. Unfortunately, the chart is going over all available data instead of showing the interval selected for backtest. Could you please change this? This makes it extrem difficult to...
Hello MetaQuotes, when trying to add triple EMA to chart, this EMA is not visible as it is always added to chart window instead to open extra data window. No way to change it. (This chart already has 1 indicator in data window). Another chart shows triple EMA correctly in extra data window
Hi, Is it possible to add more positions without closing the already opened positions? How could I go about writing the codes?Million thanks!
hi, does anyone know how to enter trade at specific time? Thanks in advance.
Hi there, When i submit an order, like this for example: double SL = (o_symbol.Ask() + (Signal_StopLevelS*_Point)); double TP = (o_symbol.Bid() - (Signal_TakeLevelS*_Point)); trade.PositionOpen(_Symbol,ORDER_TYPE_SELL,1.0,o_symbol.Bid(),SL,TP); and...
HP 0 Agent_192.168.0.10:2005 22:42:19 EURUSD: history synchronization completed [4090 Kb] RP 2 Agent_192.168.0.10:2003 22:42:20 genetic pass (9, 110627387037426572) tested with error "critical runtime error" QR 2 Agent_192.168.0.10:2002 22:42:21 genetic pass (10, 134774014628841714) tested with...
Hi! Im new in the MQL world, with little knowledge of C# only... Looking at the Order Types (in: https://www.mql5.com/en/docs/constants/tradingconstants/orderproperties#enum_order_type), I had a doubt. Is there a order type for closing long positions? As I understood the ORDER_TYPE_SELL is for...
  Swap (2)
I am looking for documentation on what I think is called swap. Can anyone tell me where to find this?
samthewildone
Forgive me if this question has been asked or answered already. I have read the manual provided by this site but, I need a little more explanation. I thought with automated trading there are no restrictions to how much trades you have. For example... is it possible to have my EA open about 10 - 15...
Hello, i am looking for an efficient formular to change period of a moving average. This article https://www.mql5.com/en/code/75 seems to promise this but after my opinion this is not the case as the recursion used...
Hi guys, I'm still having problem with my trailing stops. The stoploss level is supposed to be changed only if the price minus the trailing stop point is greater than the existing stoploss point. But in my program, the stop loss is being adjusted as I can see it in the visual tester. The problem...
Hello, my question is about the order of prices in price arrays passed to OnCalcuate. I know, there are many tags for this subject, however, my problem is this: Now the problem: The sample below outputs on each tick CURRENT close and also "as series". I thought §as series§ means that LATEST...
Hello, within an indicator i tried to use CiMomentum. #include <Indicators\Oscilators.mqh> CiMomentum cMomentum;void OnInit(){     cMomentum.Create(Symbol(),Period(),my_period,PRICE_MEDIAN);}int OnCalculate (const int rates_total, // size of input...
Hey Guys i have a little piece of code thats saving the current position open price on a text file with the following code: int file = FileOpen(BOTMagic_Number+".txt", FILE_WRITE|FILE_ANSI, ','); if (file != INVALID_HANDLE) { FileWrite(file, pricenow.bid);...
Hello MetaQuotes, - when i do a backtest, TERMINAL_DATA_PATH returns a location below tester -> tester..../mql5/.. where no expert advisor located. - when applying EA to a chart, TERMINAL_DATA_PATH  returns a location below terminal -> terminal   So in different situations  TERMINAL_DATA_PATH...
Hello MetaQuotes, I am currently preparing a flexible framework for multicurrency EA for the ATC2012 and therefore I would like to ask for clarification on event handling mechanism in MT5. The general info about the event handling is: A client terminal sends new events to the corresponding open...
StringConcatenate error in MetaTrader 5.00 Build 687, when output string was not initialized yet, and at least one of the parameters is an imported function with string return type. (tested with Strategy tester) example code fragment #import ...string getCmdStr( int cmd);// ...string s1;...
Hey all, I'm a total noob and just experimenting for now. Been playing with, and learning strategies, but I am having issues with using the envelopes indicator. Given the following code, my upper and lower values are getting output as exactly the same. Any help would be really appreciated...
Hey there, Ive been writing EAs for some time now, i was programming a new MTF EA, I was trying to test it in the visualization mode cuz its easier to spot wrong entries there, but when i start testing and get to 2012.01.02 23:45 (M15) it just stops creating bars.. heres the screenshot hope anyone...
Hey there: Before this build i was able to copy indicator buffers the way the first code is written, after this build i starteg getting the error 4807 when i ran the strategy tester, so i decided to debug the code to see which one of the indicators i was having trouble with, so i re wrote the code...
Hello MetaQuotes, What is a practical difference when symbol has either SYMBOL_TRADE_EXECUTION_MARKET or SYMBOL_TRADE_EXECUTION_EXCHANGE? The other question is - what is the proper price that I should use for them? SYMBOL_LAST?
Hello, Could anyone please clarify when exactly are the following deal types used?? I have searched the forum, articles and reference, but didn't find an exact answer. DEAL_TYPE_BALANCE DEAL_TYPE_CREDIT DEAL_TYPE_CHARGE DEAL_TYPE_CORRECTION In particular I am...
How do I write a script of lots in the EA to comply with the rules of the ATC 2012. That rule no IV.6 and IV.6. IV.4. The minimum trading amount is 0:01 lots, and the maximum is 5 lots, with an increase of by 0.01 lot on every order. IV.6. The maximum allowed total volume of an open positions...
Hello, is it possible to get a list of all trades from along with profit (wihout having set a stop or profit target) and then to double click on trade and chart scrolls to this trade ? I found list of trades only when visualization enabled but no method to find trade in chart automatically. Also...
Good! I'm new to MQL4 programming and mql5 and I liked to obtain values ​​for purchase / sale of the EURUSD. I wanted to show these values ​​in the graph window EURUSD currency. Is this possible? I tried obtrer values ​​using the following code:   MarketInfo double price = ("EURUSD", Bid); double...