MetaTrader 4 Trading Robots - How to find which robot has done the buy/sell

 

Hi,

I currently run three individual trading advisor robots, namely; FapTurbo, MegaDroid, and FXCP. My question is, I would like to know in the Account History which robot performed the buy/and or sell at a particular time.

I'd like to find out the effectiveness of each robot and how they behave. I'm currently using MetaTrader 4.

Could somebody help here.

Thanks

Braith

 

most robots put their name into the order comment.


If you want to evaluate it programmatically you can also use the magic number. It is not displayed as a separate column in the oder history (only visible when hovering the mouse over the ticket number) but it is part of every order and if the robots are programmed properly then you should be able to easily filter the list by the magic number and extract the trades of only a certain robot. Simply make a loop through all historic trades, filter by OrderMagicumber() and write it all to a CSV file or just write everything including OrderMagicNumber() into a CSV file and do the filtering with your statistics software.


You can also search for equity recorder here in the code base, there is a library and some example code to plot real-time equity charts that are filtered by magic number and/or comment and/or symbol (this must be run forward, it does not analyze the history). There are also some other indicators around that try to extract filtered orders from the history and attempt to reconstruct a (partial) equity curve of the past (including floating drawdown) as precise as possible.