I have discovered that the "AddBars" in a script for certain instruments causes Ninja to lock itself (Ninja + IQFeed).
In the video attached you can see
1 - Top left - Process Explorer search that shows who is locking the file "201602191700.Last.ntd" - as you can see Ninja and only Ninja has a handle on that file. This means that no other process (such as AV/search indexer) is locking the file
2 - I then add the indicator "" to YM 03-16
3 - We see the message in the log : IQFeed.Adapter.MessageLoopBars msg='!ENDMSG!,': The process cannot access the file 'G:\Documents\NinjaTrader 7\db\tick\YM 03-16\201602191700.Last.ntd' because it is being used by another process.
4 - I refresh Process Explorer and still only Ninja has a file lock on the file.
[youtube]v=btkh7SIkzc0[/youtube]
Now - I do understand that when you see this issue, it is mostly because some 3rd party app is locking the file. That is not the case here, I can run this over and over again, checking that no app has a handle on the file before I add the indicator and then again after. In all cases, only Ninja has the lock.
It is safe to conclude that Ninja has locked itself out.
This happens with YM and I heard from customers it occurs on other instruments like TF.
Comment