Hey fellow traders! If you've been diving into the world of MetaTrader 5, you know that having quick access to past trades can make all the difference. Today, I want to share an incredibly handy Expert Advisor (EA) that lets you fetch the last closed trade with ease. Trust me, this is a must-have tool for any serious trader!
This EA comes packed with a useful piece of code that developers often need. You see, most of the time, we're on the hunt for that last closed trade. But what if you want to dig deeper? With this EA, you can actually search for trades using any index you prefer.
Now, when I mention 'active trades,' I’m talking about market orders—those that are currently live, not the pending ones. If you pass a value of 0, it’ll fetch the most recent trade that was closed. Want to go back one step? Just pass 1 to get the trade before that, and you can keep going from there.
Additionally, this EA allows you to filter trades based on the symbol and magic number, making it easier to find exactly what you're looking for.
Comments 0