Reviewing the sample indicator "Sample Level 2 Book" , at OnMarketDepth() you are using lock in order to avoid a race condition.
2. if so, why not place the lock in the beginning of OnMarketDepth() ?
3. In the continues of the function you are update the "LadderRow" without lock(critical section).
sincerely, Kobi
Comment