I know I'll have to use some constants to define my target percentages among the instruments. And I assume that will be an array using the instrument as an index. And then I would compare my current position for the instrument (as a percentage of the total value of all positions) against the target percentage. Does that sound correct?
But I'm not sure how to retrieve and calculate the position values for each instrument. The Position object doesn't seem to include an instrument. Can I use the IPosition object? But how do I get an IPosition object for all open positions? If you can point me in the right direction, I would appreciate the help.

Comment