In my application/Addon I am checking on Positions for the Account and the orders on the account too. In the Help pages the example of iterating over Positions :
it uses the lock statement
lock (Account.Positions)
{
}
whereas the example of the Orders in help does not
I am iterating over these with the foreach and wondered if it was recommended to use the lock if i am just 'read only' of these values to get a current snapshot? In what instance would the lock be recommended ie if attempt to update Position information during a read.
Will this cause any issue (not using lock or using lock) as my strategy/addon runs which will then update position / order information?
thanks
Comment