Forum

MT4 history data

For MQL5 there is very good tool to download history data that can be called from within the EA that I found here. Is there a similar tool available for MQL4 ? Or a tool to convert from MQL5 format to MQL4 format? I am using M15 up to W1 for all major pairs when analyzing "strenght" Hate to do this

setting up indicator

Long time since I tried to setup a new indicator. I remember that the indicator values are not stored in the same directory as the program unless I specifed that somewhere. I wanted them stored in the same directory as the software. How do I setup it so the spec for my indicators get stored in the

Pros and cons on method for subroutines

When an EA starts to get fairly large, structuring the code gets vital. Ways to structure. - Subroutines in main code - Include subroutines as mqh - Include classes - Libraries I have favoured Libraries. You get a clean interface and good "isolation". During development it is a bit of a overhead

OnTimer

A problem I have been chasing for some time is probably caused by the timer interrupts a vital history data update or a follow up routines for new data. I have been thinking of different ways to handle this problem. The timing is not crucial, it just a way to refresh data on regular intervals. 1

Trailing StopLoss

I hav been using trailing stoploss coded into the EA. Works fine. The only catch is that if contact is lost it does not work. The trailing stoploss can also be set manually on the terminal. As I understand it it is then handled by the server, which means it will work even if contact is lost witht

Download history in MQL4 EA

I need 15M 1H 4H 1D 1W for all 28 pairs for 30 periods back in my EA. I have used a very good tool in MQL5 published here but is there a way of doing this in MQl4

Hedging Feature in MT5 and changing of SL

I am running identical code on 2 MT5 accounts on FXChoice. One with Hedging and one normal using the same code. I also test on Metaquotes with hedging I have an EA that just does trailing stops. The code works fine on the non hedging account. On the hedging account I get Error 10036 Invalid Request

MT4 MT5 Brokers New Hedge in MT5

I am building an EA that trades all the majors. I t has 2 features, a special trailing stop function and a check if a position has reached break even. If so an additional position can be taken on this pair if the conditons are right. I have a version 0.7 Beta running on MT4 and MT5. The function for

Checking for Maket Closed

Is there some method to check if the market is closed or open for trade. Except for getting an return code of 10018 when trying to place an order

No more than 1000 symbols can be selected

I am developing a MT5 multisymbol EA. I get the message "No more than 1000 symbols can be selected" What statements substitutes a "selection" How do I "Deselect" a symbol? I am working with all the majors