Forum

How does one change the spread used in the Strategy Tester?

It appears that the strategy tester uses the last official spread for each particular currency, and keeps that value constant for the entire duration of the backtesting period. How does one change this value? Does anyone log these spreads

How do I simultaneously look at other sectors (instruments) in MT4?

Is it possible to look at other sectors/instruments on m EA in MT4? For example, I would like to monitor the S&P 500 while I trade EURUSD? Thanks! Vishal

STOP orders vs LIMIT orders, when to use which?

Hi, I'm curious, when (or rather how) do you choose to open a Pending STOP order vs a Pending LIMIT order

Is it possible to default the "All History" setting in the "Account history" tab of the terminal?

Hi, I use the OrderHistoryTotal() function in my scripts to output my trade data into a CSV file, but it appears that only recent trade data is processed unless I click the "All History" button in the "Account History" tab. I need the cumulative trade data in my CSV file, and I don't like having

Dynamically sized arrays?

Hi, How do you create a dynamically sized array in mql4? Is there a *new* construct? I can't even use a variable to define the array size: int totalEvents = 7; datetime events[totalEvents]; :(

How do you modify the order size of a pending order?

Is it possible to modify the order size of a pending order ? If not, any other suggestions? Is there a way of doing an order replacement

Check Server Connection

My brokers test server went down this morning, and I didn't notice until much later. How would I create a function to notify me when the server is down? The EA loop is only triggered when there is an incoming tick, but there are no ticks when the server is down. How do other people handle this

Does "late-binding" require more CPU usage?

Presumably yes, but my cpu meter (i.e. task-manager) is running a lot higher than expected when I make the swtich from static binding (i.e. #include -> #import). Is this the case for everyone else too? Any recommendations on dealing with this

Automatically converting pending orders after an open order has closed

Hi, Is it possible to create a pending order that gets converted to a market order only after a pre-existing open order has been closed? That is, I want to create pending orders when my criteria is satisfied, but I only want them converted to market orders after a pre-existing market order has just

How do I get Volume[0] ?

How do I get the instantaneous volume of the current minute bar? I tried Volume[0], but it appears that the values are being sampled discretely