To understand what the macros are doing, you need to know that function
calls push argument values onto a stack
. When
construct_trade
is called with both a price argument and a number
argument, the stack looks like this:
*-- The argument count | | *-- The price | | | | *-- The number of shares | | | v v v ------- --------------- ------- --*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*- | | | | | | | | | | | | | | | | | | | | | | | | | | -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*--