Forum

EA to run just once a day

I'd like to test a strategy to run only at 6 every morning. I think I can do it with the timer OK, but it's still incredibly slow to test, maybe half an hour to do a month.. Can I do something to speed it up? Here's the code I have: int OnInit() { //--- create timer MqlDateTime hari;

Scan through all symbols

Suppose I want to run a scan through all markets available with my broker to look for favourable trades. Say I want to look for any stocks that have reached a yearly minimum. Can I do that with MQL4? I note that the technical indicator functions all have a symbol parameter, so clearly they don't

EA causes metatrader to crash.

My EA has started causing the platform to crash. I don't think I've made any susbstantial changes to it, but suddenly it does it every time. I also get message under the Experts tab of the platform that the EA file is corrupted. However it compiles without any problems. Any ideas as to what this

Ask price indicator

My broker varies spreads on a market that I'm interested in. I'd like to have an indicator that shows the historic Ask price. Can I access historic Ask prices, or will I need to keep a record of them myself? Does such an indicator already exist? Also, if I do need to keep a record myself, how can I

Layout settings not saved

When I close MetaTrader and reopen it the layout settings have all been reset to default ones. So the toolbars, for instance, all appear on separate lines. I don't like that, it takes up a lot of space, so I have to drag them all back to the same line each time I open the application. Somebody has

Objects Disappearing

Objects keep disappearing from my charts. I think, but I'm not certain, that it only happens when I close and restart MetaTrader. It is the case for trendlines that I add with my EA, for trendlines that I add manually and for the little arrows that mark where I've done trades. I don't delete any

REASON_CHARTCHANGE

1. Why is it necessary for an EA to deinitialize and reinitialize if I change the timescale of a chart? I see no reason for this, and it doesn't help me. 2. If it is necessary, can I supress the messages that are shown in the Experts tab regarding initialization and deinitialization? They make it

Control when I'm asked for manual confirmation of a trade.

Is there any way that I could arrange to be asked for manual confirmation when my EA wants to enter trades but not when it wants to close them

Comment in Close Order dialogue box.

In the dialogue box that comes up to close an order there's an entry entitled "Comment". Is there any way for my Expert Advisor to put an entry in here? I can do it for opening orders with the Comment parameter of OrderSend(), but there's no such parameter for OrderClose(). Thanks

Maintaining continuity across platform termination and EA recompilation.

I've got an EA which opens a trade for me and sets a target level which it monitors. It closes the trade when that level is approached and certain other criteria are reached - so it's not as simple as setting a take profit on the trade. I use the EA for a number of different currency pairs but there