Not sure if it is related, but look, at the following. It was actually about setting a UD field, but is kind of related by the fact that UD fields arent always directly accessed.
Basically, you might be able to make a condition using an expression like:
ttOrderHedRow.UDField<System.Decimal>("BidMargin_c")
to reference the UD field