Parameters | Description |
Counterparty flow | If true, we are seeing the trade flow from the counterparty’s point of view; that is, a BUY means that we have sold. If false, we are seeing the flow from our point of view |
Operation | Description |
start | Starts the calculation of positions. Must be called before the calculator will generate any position data. Sends initial data to the position output feed with 0 as the value of numeric fields and an empty string as the value of text fields. |
stop | Stops the calculation of further positions. Any subsequent input feeds are ignored. |
clear | Clears the block’s state and accumulated values. |
Feed | Fields | Description |
trades | order identifier | The unique identifier for the order. |
symbol | The symbol of the ordered instrument. | |
side | The side of the order (BUY or SELL). | |
quantity executed | The total amount executed for the order. | |
average price executed | The volume-weighted average price for all fills for the order. |
Feed | Fields | Description |
position | symbol | The symbol of the position being reported. |
money balance | The net currency made on this instrument; increases when we sell, decreases when we buy. | |
position | The position in this currency; positive if we are long. | |
average price | The average price at which we have traded this instrument; (BUYs and SELLs) = total money executed / total quantity executed. | |
total quantity executed | The total quantity of this instrument traded; always positive. | |
total money executed | The total money exchanged for this instrument; always positive. |