Forum

Can't use market depth in EA anymore

Hi there, for quite a while I was using market depth info in my EA on a demo account . Suddenly (maybe an update of MT5 platform) I can't anymore, unless it's window is manually opened in the MT5. The code to get the market depth goes like MqlBookInfo priceArray[]; bool getBook= MarketBookGet (

Which DB engine for MT5

Hi there. to assist my automated trading via EA-s in MT5 I would need a database in which/from which I could read/write data using mql code. I've seen some posts explaining how to connect MT5 with MySql, have tried that, but it's a bit difficult, while writes to DB are straight forward, reads from

How check if trading enabled?

Hi, I wonder if it's possible to do a check from mql5 code if trading of certain instrument at a given time is possible. The reason I'm asking this is, because my EA, opens multiple orders of different instruments, it is some kind of "hedging" strategy. So the problem I've faced when testing it on

How get position profit?

Hi there, the title says it all..In my EA (MT5) when the robot is closing position I want to check the profit of current position properly. I know there is a function " PositionGetDouble " but am not sure about how to use it properly. On my ECN account I pay commisions for each position opening cca

How to remove indicators in EA testing

Hi everyone. I wonder if there is an option to hide or switch off somehow the indicators which the EA uses, so that they would not show up when you run the backtesting with "Visulization" enabled. My EA uses a lot of indis and I don't want to "see" them while testing my EA, they take a lot of space

How to add comment on close positions?

Hi everyone. I' programming my own EA which opens a lot of positions on the same instrument. So far so good, but now I have trouble identifying which pairs belong together, I mean which closing position belongs to which opening position. I can add a comment when opening a position, but I can't find

MT5 template for multiple charts?

Hi everyone. I wonder if it is possible to save/load template for several charts opened. For instance I have charts EURUSD,GBPPJPY,AUDUSD opened with different indicators attached (MACD,EMAs etc..) however not all indicators applied to all currency pairs . So now would like to save this "view" that

How to join two charts in MT5

Hi everyone. I've seen at my friend, that he has some kind of web browser platform, forgot the name...which enables for instance to open 2 charts of EURUSD one D1 and on H1 positioned side by side. All this can be done in MT5 the sames way. But he has the feature which somehow connects/integrates

How to write new line in binary file?

Hi all. I create a binary file, to which I write certain price data. For the reading purpose, I declare file as binary, but now I'm having problem how to write new line characters to it (like char 13 10). How do I do this? Much thanks

Append text line at the beginning of file?

Hi, title says it all, normally when you use FileWrite method, string is appended to the end of file. However I would like the other way around if possible, that is to append the new strings at the beginning without overwriting existing content, so that the last string appended is always on top of