How do you get LastTradeTime of current symbol only?

 
To prevent my system from overtrading I try to limit it to one trade per day per symbol. How do I do that with MT3? As I understand, LastTradeTime gives the last time that a trade was opened for the entire account, but if I have an expert running on several pairs, I can't make MetaTrader only return that value for the symbol on the current chart.

Thanks,
JS
 
you have to loop through all the closed orders and check each for its symbol and close time...take the one that matches Symbol() and has the latest close time.

Maybe someone can post the code to do this. It should be included natively in the MQL4.

Actaully, there are a lot of functions that are useful and not included in MQL4. Perhaps someone can create a "standard library" for mql4. I know there is stdlib.mq4, but perhaps someone can head-up making this library contain actually useful functions.
 
Thanks GT very much for your help! I agree that a standard library would be very useful. Especially for those of us amateur coders (like myself).
 
If only one could buy more than 24 hours in a day.
Reason: