Expert Advisors and Automated Trading - page 448

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...
Recently decided to understand the standard classes and the wizard a bit. As I study it, I get questions, which I can't find answers to in the help. I am writing my own module of position management after preliminary reading the article The CheckTrailingStopLong(CPositionInfo* position,double&
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?
[Deleted]
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...
  Sad story  (71   1 2 3 4 5 ... 7 8)
Dear friends, programmers. A sad story has happened to me. I have a trading strategy that I have been using for a long time. So I decided that it's time to create an EA using it. But! Shit. If I am so stupid that I can't explain how it works, or the programmers I have written to are not so sure
Hello, i thought that strategy tester automatically loads data from server which are needed for backest and stores those data locally and permanently (so new download of same data not required). This seems not to be the case. When do a backttest for EURUSD 5 Minutes from 2005 to today, i get data...
Hi everyone, I just modified my first EA from a tutorial. Everything went smoothly, it compiled with no errors, and it places trades! (yay!) However the STP and TKP values are never triggered in the strategy tester (which means that all trades are closed at the end of the experiment). I've looked...
  question  (1)
In an expert adviser, in the OnTick() function, is there a way to set a global variable that will retain its value it had during the previous call? I'm looking for a variable that won't re-initialize with each new tick.