Expert Advisors and Automated Trading - page 233

To post a new topic, please log in or register
First, I am running only version eatrader.ex5 on this pc without mq5 source, how can the log show as Zero divide in 'eatrader.mq5' ?? Second my ea was working fine on previous build, and the backtest is ok too. but on this built when i run it in live mode..what is the problem here ? then expert is...
I have tried hard but have not found a solution. I am creating a multi-currency advisor and want to have a stand-alone class object for each pair instead of a mess of functions on global scale.
What's the best way to scale-out of position in Mql5? I prefer entering through 1 order and then scale-out through multiple targets For eg. Entry, Buy_Stop 2 lots at 1.2627 SL: 1.2584 TP1: 1.2647 - Exit 1st lot TP2: 1.2667 - Exit 2nd lot I also tried scaling-in by entering two orders with...
void OnTick() { //--- PrintFormat(TimeToString(TimeCurrent())); PrintFormat(Bars("EURUSD",PERIOD_H1)); } //+------------------------------------------------------------------+ Bars from 2010.08.12 05:00:00 to 2010.08.27 23:00:00 are missing. IJ 0 Core 1 22:03:10 2010.08.12 05...
After making a small change to an EA and recompiling, I get garbled output in the result window as well as incorrect trade opening/closing. The small change I made was a simple change to the variable names for MA indicators. I have defined several variables as the values of various MA indicators...
In MT4, I used to be able to generate several GBs of log data (with the Print command), in order to check the values of variables and make sure my rules are correct using the "every tick" method. In MT5, the backtester generates incomplete truncated logs, even when using the "open prices only"...
Hi guys! Is it possible to automatically  raise event every x milliseconds? I want my EA to run every x milliseconds and not every tick, therefore i thought maybe i can raise event every x milliseconds .  
One more issue with pending orders and backtester... I put 2 pending orders and then OrdersTotal() = 0 when 1 of the pending orders is opened OrdersTotal() = 1. According to the MQL5 reference OrdersTotal() should give the number of all orders including pending orders not only the open positions,...
MT4 EAs shows markers when opening/closing positions take place. MT5 does not show them. Am I missing something? Shouldn't this be automatic? The markers are shown in backtesting but not in live trades I do not want to create an object for this... please help.
I make the following code for a pending order but then it seems that the order doesn't expire after 1 hour in the backtester Any idea why? request.action=TRADE_ACTION_PENDING; request.magic=1234; request.symbol=_Symbol; request.volume=Lots; request...
First of all I know that in the journal a lot of info is missing and I have to check the agent logs. I am talking about the agent logs here. When I have my code without CopyLow or CopyHigh I see all ticks called If I do ArraySetAsSeries(Low,true); if (CopyLow(_Symbol,PERIOD_M1,1,60*2...
Hello: I have an "MT-4" Expert Advisor that I am thinking about converting to MT-5. The EA uses correlations (multiple pair correlations for the pair being traded) and because of this, I have never been able to strategy test it. Can the MT-5 Strategy Tester test such an EA? Can it handle...
I think it is so useful for me thanks
We are proud to announce that Expert Advisor Visual Wizard Pro will be released soon. Create expert advisors in MQL5 for MetaTrader 5 in minutes. No coding is required. No MQL5 programming is needed. Presale Promotion: Buy Expert Advisor Visual Wizard Pro for MetaTrader 5 between August 26 and...
Hello, Is there a function that counts the number of bars that is being shown on the current chart? Thank you.
I just set deviation = 5, but my ea gets requoting 120 pips..;; What is the problem?
like topic, I like the function like MT4, can view the graphics object while testing.   thanks
Hi, i modified the MACD Sample ea, make's it buy or sell close when macd goes from <0 to >0, sell or buy close when macd goes from >0 to <0. bool CSampleExpert::LongClosed()&nbsp;&nbsp;{ bool res=false; if(m_macd_previous>0 &&...
Hey everyone, I was thinking today if it is possible to build an indicator action library using the object oriented programming in mql5 ? Let me give an example: Let's say I'm programming an EA that enters the market shortwhen the EMA trend of period 34 is smallerthan zero, and the MACD Signal...
I have a trailing stoploss EA that I use to just close positions. The code I have drops the SL price along with other info in the EA log. The issue I have is with the code I use to close the order. For some reason it makes it to the expressions as if the CPositionInfo::Select() and the Ctrade:...
Hi. My idea is to modify a bit the EA called MACD Sample EA, in this way: i would like to reprogram the algorithm in the way that i can switch between many entry(and also exit and modify) strategies. In a concrete example: When in the code there is this piece (for short opening position) bool...
Hello, Is it possible to use a DLL which is created with C#.NET with MT5? Or is C++ the only way to go. Please advise. Thanks!
It appears that my EA doesn't get informed through OnTrade() at the final "end-of-test"-deal or at least HistoryDealsTotal() does not get updated correctly . Has anyone else observed this too? I have found a workaround: call OnTrade() one more time myself as soon as I receive OnTester(). But "my...
  Pending Order (1)
Hi everyone, I made a Expert that uses Pending Orders in MQL4, but I cannot delete pending orders in MQL5 Strategy Tester. Anyone had more success than me? Here is the part in the source code...
Hi all, i'm here after a lot of hours spent on my pc attempting to understand how the import of DLL works with structures. Some months ago i've easily created a class to interface my EA with MySql server using libmysql.dll without finding any difficult, since all functions uses a common mysql...
(Build 306) int BarOfTheDay(datetime time){ MqlDateTime dt; TimeToStruct(time, dt); int min = dt.min + (dt.hour * 60); Print("min = ", min, " dt.min = ", dt.min, " dt.hour = ", dt.hour ); return min/Period();} Output: 2010.08.16 20:07:36 K_sStatisticsOfBars (EURUSD,M30) min = 2008 dt...
I am trying to create a quick class for timing particular sequences of code (loops and nested functions) to determine where all my cpu cycles are going. So far I have come up with this: class DebugTimer{ datetime StartTime; datetime EndTime;&nbsp;&nbsp; bool running;&nbsp;&nbsp; public...
Because the SYMBOL_VOLUME_MAX is 5.0, I have to open two orders: a 5.0 lots sell order and a 4.7 lots at the same time. When I use trade.PositionClose(_Symbol,3) to close the opened orders, I get the error: failed instant buy 9.70 EURUSD at 1.16000 [Invalid volume] How can I close both of these...
Hi Coders! I'm working on to develop my own functions (DealsTrack(), GetVolume(), etc.) for my Expert Advisors. Could somebody explain me the difference between the functions of the Deals (Ticket) and the Order (Ticket)? In MT4 there's only Order Ticket - it's clear. If I see the Orders/Deals...