Your code is wrong. You need to explicitly select trades to get their info. Try trade loops or TMFs.