Stewart
Stewart
Friends

Add friends via their profile or user search and you will be able to see if they are online

Stewart
Added topic 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
Stewart
Registered at MQL5.community
Stewart
Added topic 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
Stewart
Added topic Enumerating Symbols?
Is there an easy way to write a script to list out all of the symbols available to MT4 for that broker
Stewart
Added topic 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
Stewart
Added topic 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
Stewart
Added topic 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
Stewart
Added topic 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)
Stewart
Added topic 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
Stewart
Added topic 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
Stewart
Added topic OrderLots() after partially closing a trade?
Ok, let's say I have a ticket 1000011 which is long 2 contracts. I use OrderClose() to close 1 of those contracts leaving a position open of just one. Two questions - 1) Will the new position have the same ticket number? 2) Will calling OrderLots()
Stewart
Added topic Programmatic access to name of EA
Is there any way to programmatically retrieve the name of our EA
Stewart
Added topic Do OrderSend() and OrderClose() automatically select the current ticket?
If I make a trade using OrderSend() or OrderClose() then want to look at the number of lots or execution price on the ticket, do I need to make a further call to OrderSelect to get this ticket, or does this happen automatically? Eg if I call
Stewart
Added topic 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
Stewart
Added topic Programatic MQL4 access to ticks in the TickChart window
If I right click on a symbol I can view a tick chart. it shows the past 100 ticks or so. Is there any way to get programmatic access using MQL4 to this short history of ticks? I'm guessing not as I can't find anything on the forum about it, but I
Stewart
Added topic StackSize
Hi All, When setting the compilation options there is a setting for stack size. I'm quite familiar with the concept of stack size (I'm from a technology background) but am surprised to find no posts about this on the forum and documentation gives
Stewart
Added topic Quick Poll on Slippage
A quick question for anyone interested in answering. 1) Have you sometimes got slippage in your favour? That is, you have on occasion got your order executed at a price more favourable than you asked for? (Yes or No) 2) How many slippage points or
Stewart
Added topic My Broker doesn't support OrderCloseBy()
My Broker doesn't support OrderCloseBy() and my current strategy adjusts its position size each bar. For example at 10am it may be +3 lots, at 11am it may be +4 lots and at 12noon it may be +2 lots. My problem is how to implement this as cleanly and
Stewart
Added topic Return codes for standard functions?
One area that is not clear in the book or documentation is what the return codes should be from init(), deinit() and start() under the condition of success and failure? Should we always return 0 from these
Stewart
Added topic MT4 crashing silently
Hi All, I am hoping that someone has seen this before. I have an FXCM MT4 b419 system running on a VPS . Occasionally when I log into the VPS I find MT4 is closed. The VPS hasn't been restarted and it looks as though MT4 has crashed. Anyone seen this