I have a trade structure that saves the entry object and the exit object and I can get the actual realized trade profit/loss just fine. The problem is when I try to subtract commission from that. For the input parameter Cbi.Execution e in OnExecutionUpdate(), when I check e.Order.OrderState = Filled, it seems the commission is halved when there was a partial fill (of 1+1 for qty 2) and completely accurate when the entire order was entirely filled.
What's the best way to keep track of these commissions or can I get what the commission is for that instrument somehow (that would be best)?
I don't have any problem multiplying by however much I need to but I can't figure out how much I need to multiply by because I can't tell how the order was split. If that information isn't available, I'll settle for getting what Ninjatrader is figuring out, of course if there is a way to do that...
Note: I've already looked here so no need to refer me to this... https://ninjatrader.com/support/help...?execution.htm
Thanks!
Comment