Forum

DayOfWeek() For GMT

Hi, I know this seems odd to request but is it possible to get the days of the week based on GMT time and NOT brokers server time if that makes sense to anyone?! Basically, I want to stop my EA trading certain times on Friday and Sunday which I can do partly based on TimeGMT() BUT with brokers who

cannot convert type string to bool

This was fine before new mt4 builds but is throwing up "cannot convert type string to bool" when I try to compile now, any ideas? if (( bool )response.getAttribute( "error" ))

MT5 Strategy Tester Spread

Quick simple question - what spread is used in the mt5 strategy tester

'i' - undeclared identifier

Since latest mt4 update, when I compile my EA I am getting the 'i' - undeclared identifier error but cannot see which part of this code is causing it: void CloseOrderSell() { if ((Ask-Bid) <= MaxSpread*PipValue* Point ) { int orderstotal = OrdersTotal (); int orders = 0 ; int

Account number limitation to 10 digits

If I use my EA on a broker with a license number greater than 10 it will not work. The EA calculates the license number by multiplying the mt4 account number and this value is then entered into a "LicenseNumber" field of the inputs. For some reason, if the calculation is greater than 10 digits it

Remove date from test

I am testing a CHF based strategy but the CHF peg in early 2015 is causing irrational results so I was wondering if it is possible to code something that will prevent the strategy from trading on this date

OrderSend() error - trade timeout

I am running multiple terminals on a VPS (with EA's) and every so often I am getting the "OrderSend() error - trade timeout" message. It also happens when the EA is trying to modify open orders right after they have been placed - e.g. to place the take profit . Is there anything I can code so that

Market Sentiment Data Sources

What sources do you recommend for market sentiment data? I wonder if it would be possible to combine all these sources and create an indicator showing the overall buy/sell position % on pairs. I haven't came across an indicator that does this yet, closest I have seen are the brokers who provide the

Multi-Currency EA different results

Is it a limitation to mt5 that when testing a multi-cuurency EA the results will be different depending on the symbol it is tested on? Even using the same settings and same symbols selected, I am getting very different results depending on the symbol it is back tested on. EA uses open prices only. I

Optimization results not running single test

I spent hours optimizing in mt5 and ran a single test based on one of the results. When I tried to run other results and that same set again, the EA does not place any trades. Does anyone know why this happens