Forum

Strategy tester: Clicking the stop button

I'm wondering what happens eventwise when we stop the strategy tester . Is there no event triggered when this happens? Let me explain: My EA opens and writes lines to a file. The file is closed at the OnDeinit() event. All is fine when I run the EA till the end, but if I stop it by clicking the stop

Will MT5 implement native DB support?

I'm wondering if Metaquotes is planning such feature or not. My opinion is that databases for automated trading is a must. I've tried several librairies for db access, ADO, MySQL, SQL Server and SQLLite to name a few. All are rather old and not maintained at all by their authors. For me, only two of

Calculating last bar only

Hello, I'm stuck with my new indicator because it is still not clear which is the current bar's value in the buffer array. Is it 0 or rates_total-1? I'm confused. Here it the code of the OnCalculate() function , which displays two MAs. What I'd like to do is to get rid of the loop in order to show

How to subscribe to forum topics?

Hello, All is in the title. How do we subscribe to this forum topics? Is it even possible? Thanks

mql5 strategy tester visualization not updating very well

Hello, Can someone help in having the strategy tester visualisation to update smoothly? Is there any special command to update the visualisation? Sometimes it does not update. I can make it update by moving the chart with the mouse but it is often inefficient. Specially with positions opened on

How to close a position when symbol is "close only"

I went into this problem recently. I use Trade.PositionClose from the library to close a position. Looking at its code, it uses TRADE_ACTION_CLOSE_BY, which means it is closing by opening a trade in the opposite direction. Problem is that on a pair, trade is disabled . Info says that this symbol is

Difference between TRADE_ACTION_DEAL and TRADE_ACTION_CLOSE_BY for closing position?

Hello, All is in the title. If anyone can explain, when closing a position, the difference between TRADE_ACTION_DEAL and TRADE_ACTION_CLOSE_BY. Apparently is it the same? In the Trade.mqh file, it is closing using TRADE_ACTION_DEAL. With my broker, in certain occasions, Trade.ClosePosition opened an

Strategy tester agent memory

Hello metatraders, Is there a way to increase the memory available to strategy tester agents ? After a few passes my agents are very often showing a red icon on their left. All I can do is restart MT5, but is is annoying, and anyway I plan my EA to have more features, so it will use more memory. Is