What is most baffling to me is that having BrokerCommand defined, and called, is what causes the weird arguments. Here is an example with what all the arguments to BrokerHistory2 are:

[Linked Image]

And here is when it works, when BrokerCommand is not defined:

[Linked Image]

Structs seem to be aligned. The only one I'm using is T6, and from the docs I have it aligned to 4 bytes.