Forum

Backtesting slowing to a crawl

I'm backtesting some EAs and while things used to be nice and fast, as of lately things have slowed down to a crawl. When I'm backtesting in visual mode, I initially see bars being placed very rapidly but then after about 30 seconds or so, it slows down to a crawl. This happens on my EAs and also

Backtesting progress indicator has disappeared

I used to have a progress indicator (right above the animated green progress bar) which said something like: 1) "3065 / 10277 (11237623)" on the left side 2) 4:35:33 / 8:43:22 on the right side About a day or two ago, this has disappeared. Does anybody know what I may have done to cause this and

Tracing EA execution during backtesting with optimization

I have an issue with an EA which seems to hang after a few passes during backtesting with optimization. Trying to figure out what's going on, I am using the following code: void subFileWriteFlush ( string sFilename, string str) { int iHandle = FileOpen (sFilename, FILE_READ | FILE_WRITE | FILE_CSV

Mysterious Stop-Loss calculation issue

I'm backtesting an EA I have written and I have the following code for handling stop-loss calculation & setting: bool subTrailingStop ( double dTrailingStop) export { bool rc = false ; bool op = false ; int iTypeBuySell = OrderType(); double price =

Problems calling function from self-developed library

I'm trying to group some common functions into a library of my own and for some silly reason can't get things to work. In my rlib.h file (located under "...\MQL4\Include" I do the following): #property copyright "xxx" #property link "xxx" #import "rlib.ex4" int subGetMagicNumber(int

How to add Moving Average Indicator on EA price chart

I'm trying to add a standard moving average indicator ( iMA() ) to the price chart of an EA. I've googled quite a bit but all I've found explained is how to add a custom MA to a price chart. Does a simple 1-line command exist which allows me to add a standard MA to a price chart or do I have to go

Limit drawing of open positions SL & TP to timeframe of chart

I'm having an EA which I'm running on a chart/symbol on 2 different timeframes (say EURUSD H4 and H1). So I'm having 2 chart windows (same symbol, different timeframes) open, each of which is assigned a running instance of the EA. When the EA opens a position in 1 chart (say EURUSD H4) the position

Mysterious Unbalanced Left Parenthesis error

Either I'm going blind or something mysterious is going on. Can someone see what I'm doing wrong here? int subMACrossDirection (double fastMaValue, double slowMaValue, int &prevDirection, int &currDirection) { fastMaValue = ND(fastMaValue); slowMaValue = ND(slowMaValue); if (fastMaValue <

What does OrderPrint really return

Hi, I'm having trouble with an EA I'm writing in the sense that my orders are being closed very quickly (ie: before SL or TP is reached). I've examined the orders using OrderPrint() and I've noticed something odd. The manual says that OrderPrint() returns the following: #ticket number; open time;