Forum

Enumerating Symbols?

Is there an easy way to write a script to list out all of the symbols available to MT4 for that broker

HFT and can we reduce spreads by trying to place orders at midpoint?

Hi, 1) I'm finding that it typically takes about 0.5 to 1.0 seconds to execute a market order on MT4. I don't want to turn this into a review of brokers but am asking if anyone else has been able to achieve anything approaching HFT (eg perhaps sub 0.1s) using MQL4 and MT4? 2) I have a trading system

HFT and can we reduce spreads by trying to place orders at midpoint?

Hi, 1) I'm finding that it typically takes about 0.5 to 1.0 seconds to execute a market order on MT4. I don't want to turn this into a review of brokers but am asking if anyone else has been able to achieve anything approaching HFT (eg perhaps sub 0.1s) using MQL5 and MT4? 2) Does MT5 generally have

What is wrong with my TypicalPrice function?

Hi All, I keep looking at this and can't work out what I have done wrong. I have written a function to populate the array t with TypicalPrice based on high, low and close (h, l and c). // The typical price is the average of hlc. &t needs to be length long void TypicalPrice( double h[], double l[]

Dealing with Partial Fills?

In the documentation, after calling OrderSend() , I can't seem to see an error code for partial fills. Does anyone have any experience with how to detect and correct (ie a further trade to buy what has been missed)

ERR_NO_CONNECTION coming up from time to time!?

When I OrderSend() every minute, I tend to get about one ERR_NO_CONNECTION per hour. This is on a VPS (I'm also assuming the broker is reliable). After the failure, the trade always goes through successfully when I retry immediately. I am beginning to suspect that there is something more at play

Trading Loops?

Hi have written some code which attempts to make an OrderSend() to open an order. After the OrderSend() the code checks for the GetLatestError() and if an error is found (ie > 0) then it tries again. My concern with this is that a situation may arise where the trade has actually gone through

Declaring contents of an array!?

The following is valid. double v1[10] = {47.73,49.384,49.845,50.167,50.465,50.628,50.857,51.12,51.315,51.565}; The following is not valid. double v1[10]; v1 = {47.73,49.384,49.845,50.167,50.465,50.628,50.857,51.12,51.315,51.565}; Any ideas how to make it valid? The reason why I ask is that I want to

Writing a function with any number of parameters of any type (ie 'paramarray')?

A quick question. Do any of you know if it is possible to create a function with a variable number of parameters that can be of any type? In other languages this is sometimes referred to as 'paramarray'. An example in MQL4 is int FileWrite ( int handle, ...) With the above, once you have entered a

Debugging EAs in MetaEditor?

I notice that the MetaEditor has a F9 option to add a breakpoint. I take it though that we can't use this for debugging/stepping through EAs