For storing a pointer in a var, try *(TRADE**)&TradeVar - maybe this works. There is however no workaround that would make a double for(open_trades) loop work.